sguido
asked on
How to I route VLANS between 2950 switch and a 831 Router
I have a 2950 switch that I configured with 6 VLAN's and I also have a configured 831. My question is how do i route between different VLANS?
same way as you route between different sub nets.. (or are all your vlans on the same subnet?)
you will need a trunking port running to the router that can carry all 6 vlans..
switch port mode trunk i think is the comman on the interface of the port you want to use as the trunking port..
you will need a trunking port running to the router that can carry all 6 vlans..
switch port mode trunk i think is the comman on the interface of the port you want to use as the trunking port..
sw mo tr
sw tr al vl 1,2,3,4,5,6 <- your vlans
there you are for the trunking commands ;) dont you like cisco abrivaitions :)
sw tr al vl 1,2,3,4,5,6 <- your vlans
there you are for the trunking commands ;) dont you like cisco abrivaitions :)
sw mo tr = switchport mode trunk
sw tr al vl = switchport trunk allowed vlan
sw tr al vl = switchport trunk allowed vlan
ASKER
So on the router all I have to do is enable the dot1q protocol on the interface that is connected to the 2950? Don't i also have to set encapsulation dot1q on the switch?
see we can see From_exp is a real expert in the short hand they use :)
ASKER
Ye, but im a bit confused. i created the vlans on the switch, i have to create the vlans on the router as well?
yes, you have to create vlans on both devices.
encapsulations dot1q is not needed on 2950 (because there is no isl encapsulation), it's the only enc possible
encapsulations dot1q is not needed on 2950 (because there is no isl encapsulation), it's the only enc possible
yes you create each vlan on the router with its own ip address. and then set them to route back down the trunk port to the switch..
in effect the traffic come from one vlan through the trunk. the router decided what vlan it needs to end up on and sends it back down the trunk on the new vlan.
from has set up each vlan to have its own ipaddress range. as you dont route on vlan to vlan you are routing on ip to ip.
in effect the traffic come from one vlan through the trunk. the router decided what vlan it needs to end up on and sends it back down the trunk on the new vlan.
from has set up each vlan to have its own ipaddress range. as you dont route on vlan to vlan you are routing on ip to ip.
ASKER
I cant run these commands on the 831:
configure router:
conf t
int vlan1
ip address 192.168.0.0 255.255.255.0
no shu
int vlan2
ip address 192.168.2.0 255.255.255.0
no shu
int vlan3
ip address 192.168.3.0 255.255.255.0
no shu
int vlan4
ip address 192.168.4.0 255.255.255.0
no shu
int vlan5
ip address 192.168.5.0 255.255.255.0
no shu
int vlan6
ip address 192.168.6.0 255.255.255.0
no shu
int e0/1
desc port_to_switch
sw mo tr
sw tr al vl 1-6
end
configure router:
conf t
int vlan1
ip address 192.168.0.0 255.255.255.0
no shu
int vlan2
ip address 192.168.2.0 255.255.255.0
no shu
int vlan3
ip address 192.168.3.0 255.255.255.0
no shu
int vlan4
ip address 192.168.4.0 255.255.255.0
no shu
int vlan5
ip address 192.168.5.0 255.255.255.0
no shu
int vlan6
ip address 192.168.6.0 255.255.255.0
no shu
int e0/1
desc port_to_switch
sw mo tr
sw tr al vl 1-6
end
i suppose, your interface name is different, but you can create all vlans and vlan interfaces
can you post what you switch says, when you paste this config into console, please
can you post what you switch says, when you paste this config into console, please
I'm not sure about the 831 Router specifically, but on my 2610 I removed the IP from the interface then added sub-interfaces.
example:
interface GigabitEthernet0/0
no ip address
!
interface GigabitEthernet0/0.1
description Local Network Managment
encapsulation dot1Q 1 native
ip address XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX
!
interface GigabitEthernet0/0.3
description Data Network
encapsulation dot1Q 3
ip address XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX
ip helper-address XXX.XXX.XXX.XXX
ip helper-address XXX.XXX.XXX.XXX
where the X is the vlan id in "encapsulation dot1Q X".
Hope this helps
example:
interface GigabitEthernet0/0
no ip address
!
interface GigabitEthernet0/0.1
description Local Network Managment
encapsulation dot1Q 1 native
ip address XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX
!
interface GigabitEthernet0/0.3
description Data Network
encapsulation dot1Q 3
ip address XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX
ip helper-address XXX.XXX.XXX.XXX
ip helper-address XXX.XXX.XXX.XXX
where the X is the vlan id in "encapsulation dot1Q X".
Hope this helps
so your commands would look somthing like this:
int e0/1
no ip address
int e0/1.1
encapsulation dot1Q 1 native
ip address 192.168.0.0 255.255.255.0
no shu
int e0/1.2
encapsulation dot1Q 2
ip address 192.168.2.0 255.255.255.0
no shu
int e0/1.3
encapsulation dot1Q 3
ip address 192.168.3.0 255.255.255.0
no shu
int e0/1.4
encapsulation dot1Q 4
ip address 192.168.4.0 255.255.255.0
no shu
int e0/1.5
encapsulation dot1Q 5
ip address 192.168.5.0 255.255.255.0
no shu
int e0/1.6
encapsulation dot1Q 6
ip address 192.168.6.0 255.255.255.0
no shu
int e0/1
no ip address
int e0/1.1
encapsulation dot1Q 1 native
ip address 192.168.0.0 255.255.255.0
no shu
int e0/1.2
encapsulation dot1Q 2
ip address 192.168.2.0 255.255.255.0
no shu
int e0/1.3
encapsulation dot1Q 3
ip address 192.168.3.0 255.255.255.0
no shu
int e0/1.4
encapsulation dot1Q 4
ip address 192.168.4.0 255.255.255.0
no shu
int e0/1.5
encapsulation dot1Q 5
ip address 192.168.5.0 255.255.255.0
no shu
int e0/1.6
encapsulation dot1Q 6
ip address 192.168.6.0 255.255.255.0
no shu
Actually the IP Addresses are the network addresses... you would have to change them to:
Ip address 192.168.0.1 255.255.255.0
or whatever address you want to use for your gateway
Ip address 192.168.0.1 255.255.255.0
or whatever address you want to use for your gateway
yepp, my mistake, just missed that thing
ASKER
831 can't encapsulate
Then you will need a separate eth int for each vlan.
again i cant help with this paticular switch as its not one i have access to.
but the idea is the same for any switch.
The idea here it seems is you are setting up "router on a stick" config. where the traffic passes to the router on a ethernet cable. is router by the router (which basicla looks at the ip address and retage the packets with the destination VLAN tag) and sends them back down the same cable to the switch..
but cant a 2950 do routing its self?? i know the 3500 and 3700 switchs can do vlan routing onboard.. is this not possible with a 2950? (it would depend waht iso was running on it but? )
but the idea is the same for any switch.
The idea here it seems is you are setting up "router on a stick" config. where the traffic passes to the router on a ethernet cable. is router by the router (which basicla looks at the ip address and retage the packets with the destination VLAN tag) and sends them back down the same cable to the switch..
but cant a 2950 do routing its self?? i know the 3500 and 3700 switchs can do vlan routing onboard.. is this not possible with a 2950? (it would depend waht iso was running on it but? )
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can route traffic via your router.
so configure your cisco switch:
conf t
int gi0/1
desc port_to_router
sw mo tr
sw tr al vl 1,2,3,4,5,6 <- your vlans
end
configure router:
conf t
int vlan1
ip address 192.168.0.0 255.255.255.0
no shu
int vlan2
ip address 192.168.2.0 255.255.255.0
no shu
int vlan3
ip address 192.168.3.0 255.255.255.0
no shu
int vlan4
ip address 192.168.4.0 255.255.255.0
no shu
int vlan5
ip address 192.168.5.0 255.255.255.0
no shu
int vlan6
ip address 192.168.6.0 255.255.255.0
no shu
int e0/1
desc port_to_switch
sw mo tr
sw tr al vl 1-6
end