I am have setup router on a stick. I am using dot1q encapsulation for both sub-interface on the router. The router I am using is a cisco 2620 which has a fastethernet interface. I setup 2 different vlans using the 192.168.2.0/24 and 192.168.3/24 network addresses. I setup one pc on each vlan and gave them a ip address from each subnet. I then assign a valid ip for to the sub-interfaces to be the default gateway for the pc's. I am able ping the gateway of the pc's vlan I am on and the other vlan however when I attempt to ping the pc from the pc in the different vlan the ping fails. I can ping both pc's from the router with no problem. The switch I am using it a 2960G cisco switch running en dot1q trunking as well. Am I missing something? I have used packet tracer to make this happen with no problems at all.
Did you put the default gateway in the pc nic settings . your setup should look something like this for switch and router.
ip address 192.168.2.1 255.255.255.0
encapsulation dot1q 2 native
ip address 192.168.3.1 255.255.255.0
encapsulation dot1q 3
switchport trunk encapsulation dot1q
switchport trunk native vlan 2
switchport trunk allowed vlan 2,3
switchport mode trunk
> I setup one pc on each vlan and gave them a ip address from each subnet.
> I then assign a valid ip for to the sub-interfaces to be the default gateway for the pc's.
Good, that's taken care of. The only thing left is verifying if those PCs have a Firewall enabled. If so, disable it and try pinging again.
"I can ping both pc's from the router with no problem. The switch I am using it a 2960G cisco switch running en dot1q trunking as well"
Seems like firewall is not an issue on
I found out the problem was the router. I never found out what the exact problem was but,I decided to erase the start config and reprogram everything. That seemed to work perfectly. Weird huh. Thanks for everything and all your help. Oh yeah. Can someone explain what is NATIVE and how should I use it when setting up router on a stick?
> Can someone explain what is NATIVE and how should I use it
> when setting up router on a stick?
NATIVE vlan means those packets will be untagged on a trunk link.
So what you saying is that vlan1 is always native by default and can I make any other vlan I choose native? What is cisco's best practice on this subject?
You can have Vlan1 as the native Vlan w/o problems. Make sure the native Vlan matches on both devices (switchport and router).
Yes, you can have another Vlan as native.
Should any interface that is not a sub-interface be setup as the Native VLAN or can sub interfaces be setup as Native as well?
On the router, the only way to perform dot1q trunking is by using subinterfaces (logical interfaces).
On the switch, the native vlan is set under the physical interface.
Great!!! Thanks you have really helped me understand this Cisco material. It is truly demanding. Hopefully one day I can know half as much as you do.