I am studying for ICND1 through CBTNuggets,
I recently watched videos on how to interact between different vlans using separate interfaces, sub-interfaces and Layer 3 Switching.
The first two worked fine for me, but the Layer 3 Switching is not working when i am pinging PC in one VLAN to the PC in other VLAN.
Suppose PC A is connected to Fa0/1 of Switcher and PC B is connected to Fa0/2 of Switcher.
Here is what I did,
I went to Switcher CLI,
Went to Global Configuration mode,
created two vlans using commands,
# vlan 10
# vlan 20
Now I moved fa0/0
port to vlan 10
and fa0/1
port to vlan 20
I assigned IP addresses to PCs,
PC A (fa0/1):
10.1.1.100
Default Gateway: 10.1.1.1
Subnet Mask: 255.255.255.0
PC B (fa0/2):
10.1.2.100
Subnet Mask: 255.255.255.0
Default Gateway: 10.1.2.1
Now i went to the CLi of switcher and did this in Global mode,
# interface vlan 10
# ip address 10.1.1.1 255.255.255.0
# no shutdown
# exit
# interface vlan 20
# ip address 10.1.2.1 255.255.255.0
# no shutdown
# exit
Both vlans 10
and 20
are up and running and all the ports are up too, but I couldn't be able to ping PC B
from PC A
.
This is exactly what the guy did in the video and he managed to ping.
What did i miss ?
P.S: I also tried to erase arp tables but still couldn't be able to ping.
Best Answer
On the switch, your IP for interface vlan 20 is wrong.
Then make sure you have
ip routing
on.Also the gateway for PC A should be
10.1.1.1
while the gateway for PC B should be10.1.2.1
. The subnet mask should be255.255.255.0
not the gateway.Once fixed, make sure you can ping the gateway of each PC from the respective PCs as well.