Troubleshooting Inter-VLAN Routing

Hello Pradyumna

You cannot assign IP addresses to switchports because they are Layer 2 ports, but you can assign VLANs to switchports. Each VLAN on a switch can have one or more switchports assigned to it. In addition, each VLAN must have a configured SVI in order for hosts on that VLAN to be able to access other networks. The SVI is configured with an IP address and acts as the default gateway for that subnet.

For this reason, IP addressing must correspond to the VLANs that exist on a switch. What this means is that a single VLAN will typically correspond to a single IP subnet, with a single SVI acting as the gateway for that subnet.

Within a single multipoint switch, you can only have a single SVI per VLAN, and thus only a single IP address for the default gateway. Now if you have two switches connected via a trunk, then you can have multiple SVIs with IP addresses. In this case, if you do use multiple SVIs on multiple switches for the same VLANs, you must be careful how you configure them. They should be on the same subnet, but you may run into some interesting behaviours such as unicast flooding and asymmetric routing. Take a look at this lesson for more information:

I hope this has been helpful!

Laz