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?  
LVL 1
sguidoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

from_expCommented:
hi!
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
0
Aaron StreetInfrastructure ManagerCommented:
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..
0
Aaron StreetInfrastructure ManagerCommented:
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 :)
0
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

from_expCommented:
sw mo tr = switchport mode trunk
sw tr al vl = switchport trunk allowed vlan
0
sguidoAuthor Commented:
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?
0
Aaron StreetInfrastructure ManagerCommented:
see we can see From_exp is a real expert in the short hand they use :)
0
sguidoAuthor Commented:
Ye, but im a bit confused.  i created the vlans on the switch, i have to create the vlans on the router as well?
0
from_expCommented:
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
0
Aaron StreetInfrastructure ManagerCommented:
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.

0
sguidoAuthor Commented:
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
0
from_expCommented:
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
0
msonenCommented:
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

0
msonenCommented:
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
0
msonenCommented:
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
0
from_expCommented:
yepp, my mistake, just missed that thing
0
sguidoAuthor Commented:
831 can't encapsulate
0
msonenCommented:
Then you will need a separate eth int for each vlan.
0
Aaron StreetInfrastructure ManagerCommented:
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? )
0
from_expCommented:
cisco 2950 is L2 switch with no routing options.
you can use your router's interfaces for different vlans. still 831 router is rather old, and it can lack of performance
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Switches / Hubs

From novice to tech pro — start learning today.