Capstone: build the branch

NetLab lab Advanced 6 tasks 30 points

Build a small branch office from scratch. R1 already reaches the internet (8.8.8.8 is on ISP); every other device is unconfigured apart from hostnames.

  1. VLANs on SW1 and SW2: 10 STAFF, 20 GUEST.
  2. EtherChannel: SW1 and SW2's Gi0/1 and Gi0/2 into Po1 with LACP (both sides active), as a trunk.
  3. Access ports: SW1 Fa0/1 (PC1) in VLAN 10, SW2 Fa0/1 (PC2) in VLAN 20, both with PortFast and BPDU guard.
  4. Router-on-a-stick: SW1 Fa0/24 trunk to R1 Gi0/0; R1 Gi0/0.10 = 192.168.10.1/24, Gi0/0.20 = 192.168.20.1/24.
  5. DHCP on R1: pools STAFF and GUEST for the two subnets, gateway .1, excluding .1-.9.
  6. Spanning tree: Rapid PVST+ on both switches; SW1 root primary for VLANs 1, 10 and 20.

Finish with both PCs getting addresses and reaching 8.8.8.8.

How it works: this is VulnTech NetLab, a network simulator running in your browser. Click a device in the diagram to open its console and type commands, just like on real equipment (? shows help, Tab finishes a word). Click a cable to inspect it. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Your work is kept if you reload; Reset starts the network over.

Solution explanation

Build from the bottom up and test as you go: VLANs, then the links between switches (channel, trunk), then access ports, then routing and DHCP. Configure the trunk on the port-channel interface so both members match. spanning-tree vlan 1,10,20 root primary sets SW1's priority to 24576 in all three VLANs. The PCs were already set to DHCP, so once the router could hear them, a renew was all they needed.

Show solution
[SW1]
enable
configure terminal
vlan 10
name STAFF
vlan 20
name GUEST
exit
spanning-tree mode rapid-pvst
spanning-tree vlan 1,10,20 root primary
interface range g0/1 - 2
channel-group 1 mode active
exit
interface port-channel 1
switchport mode trunk
interface fa0/24
switchport mode trunk
interface fa0/1
switchport mode access
switchport access vlan 10
spanning-tree portfast
spanning-tree bpduguard enable
end
[SW2]
enable
configure terminal
vlan 10
name STAFF
vlan 20
name GUEST
exit
spanning-tree mode rapid-pvst
interface range g0/1 - 2
channel-group 1 mode active
exit
interface port-channel 1
switchport mode trunk
interface fa0/1
switchport mode access
switchport access vlan 20
spanning-tree portfast
spanning-tree bpduguard enable
end
[R1]
enable
configure terminal
ip dhcp excluded-address 192.168.10.1 192.168.10.9
ip dhcp excluded-address 192.168.20.1 192.168.20.9
ip dhcp pool STAFF
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
ip dhcp pool GUEST
network 192.168.20.0 255.255.255.0
default-router 192.168.20.1
exit
interface g0/0
no shutdown
interface g0/0.10
encapsulation dot1Q 10
ip address 192.168.10.1 255.255.255.0
interface g0/0.20
encapsulation dot1Q 20
ip address 192.168.20.1 255.255.255.0
end
[PC1]
ipconfig /renew
ping 8.8.8.8
[PC2]
sudo dhclient eth0
ping -c 3 8.8.8.8
HOME LABS COMMUNITY DASHBOARD