Router on the stick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2011 06:43 PM - edited 03-07-2019 01:41 AM
Hi folks,
I have configured vlan 2 and vlan 3 on my switch and trunk them to my router and I do have connectivity between those two vlans..When configured the router sub-interface f0/0.1,f0/0.2 and f0/0.3 I have used the fallowing ip address 10.37.37.1, 10.37.36.1and10.37.35.1 respectively for vlan 1,2 and 3. Host 1 on vlan1 ip address is 10.37.37.5 with default-gateway 10.37.37.1 and host 2 ip address 10.37.36.10 with default-gateway 10.37.36.1. I don't have connectivity between vlan 1 and any of the vlan I can't even ping the default-gateway that I have set for vlan 1 on router sub-interface from a host connect to vlan. In the router configuration under sub-int I did hard coded vlan 1 as native but it still don't work .What I'm missing here ?
- Labels:
-
Other Switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2011 08:04 PM
Hi
The configurations should be
Router example, for fa0/0.1
interface FastEthernet0/0.1
encapsulation dot1q 1
ip address 10.37.37.1 255.255.255.0interface FastEthernet0/0.2
encapsulation dot1q 2
ip address 10.37.36.1 255.255.255.0interface FastEthernet0/0.3
encapsulation dot1q 3
ip address 10.37.35.1 255.255.255.0
Let us consider the port connected to the router from switch is fa 0/1:
The configuration would be
switch(config)#int FastEthernet 0/1switch(config-if)#switchport trunk encapsulation dot1qswitch(config-if)#switchport mode trunk
Hope this helps
Cheers
Somu
Rate helpful posts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2011 08:11 PM
Also can you check this command on switch.
show interface
Here interface no is the interface where the host is connected to the switch.
Cheers
somu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2011 10:13 AM
This is exactely I have configured and that is why I do have connectivity between vlan 2 and 3.
You can see these output from the router and switch:
R1#sh vlan
Virtual LAN ID: 1 (IEEE 802.1Q Encapsulation)
vLAN Trunk Interface: Ethernet0/0.1
This is configured as native Vlan for the following interface(s) :
Ethernet0/0
Protocols Configured: Address: Received: Transmitted:
IP 10.37.37.1 0 0
Virtual LAN ID: 2 (IEEE 802.1Q Encapsulation)
vLAN Trunk Interface: Ethernet0/0.2
Protocols Configured: Address: Received: Transmitted:
IP 10.37.36.1 531 12
Virtual LAN ID: 3 (IEEE 802.1Q Encapsulation)
vLAN Trunk Interface: Ethernet0/0.3
Protocols Configured: Address: Received: Transmitted:
IP 10.37.35.1 0 0
R1#
--------------------------
R1#sh vlan
Virtual LAN ID: 1 (IEEE 802.1Q Encapsulation)
vLAN Trunk Interface: Ethernet0/0.1
This is configured as native Vlan for the following interface(s) :
Ethernet0/0
Protocols Configured: Address: Received: Transmitted:
IP 10.37.37.1 0 0
Virtual LAN ID: 2 (IEEE 802.1Q Encapsulation)
vLAN Trunk Interface: Ethernet0/0.2
Protocols Configured: Address: Received: Transmitted:
IP 10.37.36.1 531 12
Virtual LAN ID: 3 (IEEE 802.1Q Encapsulation)
vLAN Trunk Interface: Ethernet0/0.3
Protocols Configured: Address: Received: Transmitted:
IP 10.37.35.1 0 0
R1#
SW2#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23
2 Sale active Fa0/2
3 Managment active Fa0/3
4 Marketing active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
4 enet 100004 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - srb 0 0
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
SW2#sh int trunk
Port Mode Encapsulation Status Native vlan
Fa0/24 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa0/24 1-4094
Port Vlans allowed and active in management domain
Fa0/24 1-4
Port Vlans in spanning tree forwarding state and not pruned
Fa0/24 1-4
SW2#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2011 10:41 PM
Maybe you have not allowed vlan 1 on the trunk link between the two devices.
Look at the output of "show int trunk" on the switch and ensure that all 3 vlans are allowed to go over that link.
Also ensure that you have the same native vlan set on both devices.
For example, if you have vlan 1 as the native on the switch, ensure that you put in
encapsulation dot1q 1 native
under the fa0/0.1 interface of the router.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2011 04:23 AM
Hi,
Apart from what Somu and Aniruddha has given, you can refer to the below link as well for more understanding:
This is a really good document and will really explain you stuffs very clearly.
Hope that helps.
Sweta
Please rate helpful posts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2011 10:15 AM
Thanks but I have red that document more than once.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2011 12:54 PM
Can you try
int fa0/1
ip address 10.37.37.1 255.255.255.0
int fa0/0.2
encapsulation dot1q 2
ip address 10.37.36.1 25.255.255.0
int fa0/0.3
encapsulation dot1q 3
ip address 10.37.35.1 255.255.255.0
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2011 03:43 PM
In the router on the stick configuration the main interface of the router should not get any ip address instead the sub-interface are configured.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2011 03:52 PM
Please give me some credit
You can do it either way ie. -
you can specify subinterfaces for all vlans
or
you can configure the native vlan on the main interface and then just use subinterfaces for the other vlans.
If your router supports the "native" keyword then you have done it the recommended way. However as it does not seem to be working i though it may be worth trying it the other way just to see if it works.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2011 04:11 PM
You may be right but every documentation I have red they don't assign ip address to a main interface,the just put no shutdown.That is why I have said that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2011 04:23 PM
No problem, but if you ask for help then perhaps you ought to have a bit more trust in what people say.
I suspect this not the issue but it was worth trying. However as you seem to know more about this than me i'll drop out of this thread
Jon
