cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7472
Views
15
Helpful
28
Replies

How can I get 2 VLAN's to communicate with each other

whiteford
Level 1
Level 1

Hi,

I'm just setting up a lab, I have 2 VLAN's on a Cisco 2950, one for servers and one for users. Both VLANS are on different subnets:

Users: 192.168.1.x/24

Servers: 192.168.2.x/24

Would I have to make the VLAN's layer 3 and give each VLAN an IP and add some sort of static route?

Thanks

28 Replies 28

Cisco Catalyst 2950 is a layer 2 switch. In order to allow your vlan to communicate you need to have either a router or a layer 3.

this will allow you to activate inter vlan routing.

Regards,

Karim

I agree with karim. In order to set this up you will need a so called "Router on a stick" - a router connected to the 2950 with a single link (a better option). You will need to configure the interface on the 2950 connected to the router as a trunk (switchport mode trunk blah blah), and configure two (per a VLAN) subinterfaces on the router. Make sure the IOS on the router supports dot1q. Then you will need to assign IP addresses to these subinterfaces in the same ranges as your VLANs. You will need to set default gateways on your PCs to the IPs of the subinterfaces, corresponding to the VLANs the PCs are in.

Job done.

The second option is to use a L3 switch instead of the router. You will need to connect it to the 2950 over a trunk, configure the same VLANs on the L3 switch AND configure VLAN interfaces with the IP addresses in the same ranges as your VLANs. The rest is the same as in the first option.

And option 3 - to use a L3 switch instead of 2950. Then you will skip the step with trunk ports and start from the VLAN interfaces.

Hi,

"Router on a stick" - a router connected to the 2950 with a single link (a better option) - can you explain this a bit better, I have a Cisco 2620, 1721 any good?

Would a Cisco 3550 switch help to I have one?

It's for a CCNA lab so it would be good to learn all.

Thanks

Router on a stick

the idea is to have a L3 interface per a VLAN to be able to route between them. In your case (as 2950 does not provide this option) this can be achieved by either connecting as many physical interfaces from your router to the switch as the number of VLANs you have (which is normally not possible or wise), or by configuring the corresponding number of subinterfaces on the router on one of teh interfaces and then connecting the physical interface to the switch. By configuring the port on the switch as a trunk you will allow it to pass traffic for all VLANs. Router's IOS must support dot1q encapsulation in order to understand what is going on.

So as a result each subinterface on the router will act as a virtual router for each corresponding VLAN on the switch. Traffic between VLANs will be sent up the trunk to the router, where the router will make a desision what to do with it and then it will send it down one of the subinterfaces to the destination VLAN.

2620 will do it, just check with cisco.com that the IOS supports dot1q, 1721 should be able to do it too, depending on whether it can run the required IOS level or not.

3550 switch is a layer 3 switch and will do all that itself without an external router. You will need to configure VLAN interfaces one per a VLAN and assign IP addresses to them.

shane.kearney
Level 1
Level 1

Hi, this is how I would over come this issue.

Inter VLAN Routing,

set up the network like normal, connecting the servers to the ports that are contained in the wanted VLAN, Servers VLAN 10 and users in VLAN 20, OK with that done our next step is to set the port on the switch that is connected to the router to a trunk port, next move to the router and enter

interface fa 0/1.10, encapsulate it using ISL or (dot1q 10) assign the interface an IP address within the server subnet, this IP will act as the default gateway for the server subnet.

when finished in this interface exit and then enter the interface fa 0/1.20 do the same here, encapsulate it in (dot1q 20)this is the default gateway for the Users subnet,

Now "do not" assign an IP address to the interface fa0/1 instead make it a trunking interface.

this is a quick run down of the commands for the router.

config-if)#interface

fastethernet 0/0.10

config-subif)#encapsulation

dot1q 10

ip address

192.168.1.1 255.255.255.0

config-if)#interface

fastethernet 0/0.20 is for the vlan number created on the switch

config-subif)#encapsulation

dot1q 20

ip address

192.168.2.1 255.255.255.0

Looks like my routers on have 1 FE port and the WIC-1T WAN port. I guess I need another router?

what router do you have

2 x 2620's with 1 x Ethernet and 2 x WIC-1T cards

1 x 1721 with 1 x FE and 1 x WIC-1T

I have two 2500 routers and two 2950 switches, I couldnt do intervaln routing with these because it was not supported by the IOS and for some reason I cannot download an IOS, so I bought a 800series router for England and got it this week, now no probs all works well

2950 won't do it as it is a L2+ switch - you can have only one VLAN interface on it for management. If you try to configure lets say interface VLAN 10 on it, it will admin down the default VLAN 1 interface.

The 2950 Catalyst can do more than one VLAN?

2950 can do as many VLANs as you need (up to the maximum of 4096) but it can only do one VLAN interface. In other words - you can use this one interface for managing the box (telnet to it for example), but the box will never be able to do inter VLAN routing without help of an external router.

1 port is all you need. Remember though - IOS must support encapsulation (ISL or DOT1Q).

hm... I am not sure 2950 does ISL by the way.

So from the 2950 I would just the one port off this for the router and the router would work our the routing and trunk info and send it back down that port to the right VLAN?

Is very simple terms

Thanks

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: