04-24-2024 08:56 AM
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.
Solved! Go to Solution.
04-24-2024 01:33 PM
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).
04-24-2024 09:55 AM
Hello,
I don’t think it’s your subnetting.
For the switch:
For the router:
Let’s see if that changes anything…
04-24-2024 09:59 AM - edited 04-24-2024 09:47 PM
Interface f0/1
No shut
and in SW
under the interface connect SW to Router add
switchport mode trunk <<-
Then check
MHM
04-24-2024 01:33 PM
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).
04-25-2024 05:52 AM
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!
04-25-2024 06:29 AM
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.
04-24-2024 02:48 PM
Hi @gabetheboss56 ,
Can you try adding the following command on the switch:
interface FastEthernet0/12
switchport trunk encapsulation dot1q
Regards,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide