A worked example: one ticket, step by step

The ticket

"PC2 (guest, VLAN 20, on SW2) has no network." Everything else works. Start in the middle: what does the PC have?

In NetLab

▶ PC2
student@PC2:~$ ip addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:1a:f2:3a:a4:ee brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.11/24 brd 192.168.10.255 scope global dynamic eth0
       valid_lft 86399sec preferred_lft 86399sec
    inet6 fe80::21a:f2ff:fe3a:a4ee/64 scope link 
       valid_lft forever preferred_lft forever
▶ SW2
SW2>enable
SW2#show interfaces status | include Fa0/1 |Port
Port      Name               Status       Vlan       Duplex  Speed Type
Fa0/1                        connected    10         a-full  a-100 10/100BaseTX
SW2#show vlan brief | include STAFF|GUEST
10   STAFF                            active    Fa0/1
20   GUEST                            active    

No address, so DHCP failed. Layer 1 is fine (Fa0/1 connected). Layer 2: the port is in VLAN 10, not 20. The fix is one command; then ask for an address again and test:

In NetLab

▶ SW2
SW2>enable
SW2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
SW2(config)#interface fa0/1
SW2(config-if)#switchport access vlan 20
SW2(config-if)#end
*Mar  1 00:00:05.000: %SYS-5-CONFIG_I: Configured from console by console
▶ PC2
student@PC2:~$ sudo dhclient eth0
student@PC2:~$ ip route
default via 192.168.20.1 dev eth0 proto dhcp src 192.168.20.10 metric 100 
192.168.20.0/24 dev eth0 proto dhcp scope link src 192.168.20.10 metric 100 
student@PC2:~$ ping -c 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=2 ttl=254 time=0.640 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=254 time=0.580 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 2 received, 33% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.580/0.610/0.640/0.030 ms

Remember: Verify after every fix with the same test that failed. If it still fails, the next fault is further along: go on from where you are, don't start again.

Tip: Write down what you checked and what you changed as you go. In the labs that follow, nobody tells you how many faults there are.

HOME LABS COMMUNITY DASHBOARD