cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
313
Views
1
Helpful
6
Replies

VLSM with Inter-VLAN routing

gabetheboss56
Level 1
Level 1

Hello,

Studying for my CCNA and I thought I'd practice some basic configurations, such as router on a stick. I setup 4 PC's (each representing an imaginary number of hosts) each with a vlan attached to a switch leading to a router, with the link between the switch and router configured for trunking. The issue I have seems to be only the first vlan (10) is able to ping every sub-interface on the router, but none of the others can do so. From researching I think this has to do with how my subnets for each vlan are setup, but I am not sure what needs changing. Addressing is as follows:

Vlan 10 (Sales 600 hosts) 172.16.0.0 ~ 172.16.4.0 /22

Vlan 20 (Construction 454 hosts) 172.16.4.0 /26 ~ 172.16.6.0 /23

Vlan 30 (Engineering 127 hosts) 172.16.6.0 /26 ~ 172.16.7.0 /24

Vlan 40 (HR 54 hosts) 172.16.7.0 ~ 172.16.7.64 /26

All 4 PC's have the second usable host for each subnet as well as their default gateways entered in. Any insight on this would be great. Both the switch and router configuration files are attached.

1 Accepted Solution

Accepted Solutions

Richard Burts
Hall of Fame
Hall of Fame

Am I correct in understanding that the PCs are connected to Fa0/1, 0/2, 0/3, and 0/4 and the router connects to Fa0/12? From what I can see the config of router and switch do not seem to have problems. There are a few things that I would change if I were you

- The ports where PCs connect are configured as access ports (as they should be) and also have switchport trunk allowed. It does not create a problem but trunk allowed on an access port is ignored.

- You have configured vlan interfaces on the switch. But they serve no purpose on the switch.

I note that what you describe in the text of your post about the subnets does not match what is in the router config. For example vlan 10 does not include 172.16.4.0. But I do not see issues in the router config that would prevent 3 of the PCs from communicating. My guess is that the problem is likely something in the configuration of PCs 2, 3, and 4.

If you want help in investigating this issue I suggest that you post the output of these commands on the router:

show ip interface brief

show arp

And from PCs 2, 3, and 4 the output of ipconfig (or other appropriate command depending on OS of the PC).

HTH

Rick

View solution in original post

6 Replies 6

chrihussey
VIP Alumni
VIP Alumni

Hello,

I don’t think it’s your subnetting.

For the switch:

  1. Remove the “switchport trunk allowed vlan….” config from the F0/1-4 interfaces
  2. Add “switchport trunk native vlan 10” to the F0/12 interface

For the router:

  1. Add “encapsulation dot1Q 10 native” to the F1/0.10 sub interface.

Let’s see if that changes anything…

Interface f0/1

No shut
and in SW 
under the interface connect SW to Router add 
switchport mode trunk <<-

Then check

MHM

Richard Burts
Hall of Fame
Hall of Fame

Am I correct in understanding that the PCs are connected to Fa0/1, 0/2, 0/3, and 0/4 and the router connects to Fa0/12? From what I can see the config of router and switch do not seem to have problems. There are a few things that I would change if I were you

- The ports where PCs connect are configured as access ports (as they should be) and also have switchport trunk allowed. It does not create a problem but trunk allowed on an access port is ignored.

- You have configured vlan interfaces on the switch. But they serve no purpose on the switch.

I note that what you describe in the text of your post about the subnets does not match what is in the router config. For example vlan 10 does not include 172.16.4.0. But I do not see issues in the router config that would prevent 3 of the PCs from communicating. My guess is that the problem is likely something in the configuration of PCs 2, 3, and 4.

If you want help in investigating this issue I suggest that you post the output of these commands on the router:

show ip interface brief

show arp

And from PCs 2, 3, and 4 the output of ipconfig (or other appropriate command depending on OS of the PC).

HTH

Rick

Hey Richard,

It seems that despite reviewing the addressing numerous times on my PC's, re-entering them (and gateways) seems to enable full communication across all devices now. Its strange because the ipconfig /all command showed their properly assigned IP addresses and gateways, so I'm not sure if to attribute that to an interaction with the router or maybe the net sim I'm using (Boson) not working correctly. Regardless, thanks for pointing that out!

Thanks for the update. Glad to know that now it works, even though not sure what fixed it.

Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.

HTH

Rick

Harold Ritter
Cisco Employee
Cisco Employee

Hi @gabetheboss56 ,

Can you try adding the following command on the switch:

interface FastEthernet0/12
switchport trunk encapsulation dot1q

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Review Cisco Networking products for a $25 gift card