Each interface, or subinterface, must be assigned an IP address corresponding to the subnet to which it is connected. A common error is to incorrectly configure an IP address for a subinterface. Figure 1 displays the output of the show running-config command. The highlighted area shows that subinterface G0/0.10 on router R1 has an IP address of 172.17.20.1. The VLAN for this subinterface should support VLAN 10 traffic. The IP address has been configured incorrectly. The show ip interface command is useful in this setting. The second highlight shows the incorrect IP address.
Sometimes it is the end-user device, such as a personal computer, that is improperly configured. Figure 2 shows the displayed IP configuration for PC1. The IP address is 172.17.20.21, with a subnet mask of 255.255.255.0. But in this scenario, PC1 should be in VLAN 10, with an address of 172.17.10.21 and a subnet mask of 255.255.255.0.
Note: Although configuring subinterface IDs to match the VLAN number makes it easier to manage inter-VLAN configuration, it is not a requirement. When troubleshooting addressing issues, ensure that the subinterface is configured with the correct address for that VLAN.