Router Vlaning

Nov 14, 2006 15 Replies

I am working on setting up multiple vlans on a 2600 router and a 2950 switch. I basically created a vlan 100 and a vlan 200 which have interfaces 10.10.100.1 and 10.10.200.1.

The switch has a pc in each port, on on vlan 100 and one on vlan 200. Both pcs can ping the gateway but I want to make the pcs be able to communicate. I know the best most logical way would be to make one network of them but this is going to be used for an example to a class.

The routers vlans are using dot1q encapsulation so they have two sub interfaces .100 and .200.

How to I allow vlans to communicate with each other?

Router Vlaning open original image

I am working on setting up multiple vlans on a 2600 router and a 2950 switch. I basically created a vlan 100 and a vlan 200 which have interfaces 10.10.100.1 and 10.10.200.1.



The switch has a pc in each port, on on vlan 100 and one on vlan 200. Both pcs can ping the gateway but I want to make the pcs be able to communicate. I know the best most logical way would be to make one network of them but this is going to be used for an example to a class.



The routers vlans are using dot1q encapsulation so they have two sub interfaces .100 and .200.


How to I allow vlans to communicate with each other?



google site:cisco.com configure vlan routing

formatting link
It even uses the 2600 as the sample router.

Thanks for the reply but I have seen taht article and it just doesnt work. The PCs do not ping. I currently am not using the default 1 vlan so I am trying to setup a sample office network in my simulator.

Basically I want to show how vlans are separate and also you can allow some vlans to communicate. Any> >> I am working on setting up multiple vlans on a 2600 router and a 2950

formatting link

Simulator. We ran it on a similar setup in the lab and still had problems getting the vlans to communicate.

A lot of forums I am getting messages saying that the router should be able to handle the routing itself. In my understanding, the VLANs create secure networks by restricting access so by default they shouldnt be able to communicate. Is that right or wrong?

As for why they arent talking, is this an access list thing or a route thing?

Drake wrote:

^^^^^^^^ Are trying this on a simulator or on real hardware?.

Why don't you post your configs from the switch and the router?

OK

I just used the config files from the document that Brad recommended on a similar lab on a BOSON netsim simulator. I am able to ping from PC1 to PC2 with no problems.

Did you check table 2 in the document? What ios version are you using?

To the OP:-

Have you configured the respective default gateways on the respective PCs?

The router needs: ! ip routing !

however that is the default.

ROUTER 2621 CONFIG:

*************************************

! Version 12.1 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Router ! ! ! ip subnet-zero spanning-tree vlan 1 priority ! ! ! ! ! ! ! ! interface Serial0 no ip address no ip directed-broadcast shutdown ! interface FastEthernet0/0 no ip address no ip directed-broadcast shutdown ! interface FastEthernet0/1 no ip address no ip directed-broadcast ! interface FastEthernet0/1.100 encapsulation dot1q 100 ip address 10.10.100.1 255.255.255.0 ! interface FastEthernet0/1.200 encapsulation dot1q 200 ip address 10.10.200.1 255.255.255.0 ! ! ip classless no ip http server ! ! ! ! line con 0 transport input none line aux 0 line vty 0 4 ! no scheduler allocate end

****************************************

SWITCH 2950 CONFIG:

*************************************

! Version 12.1 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname Switch ! ! ! ip subnet-zero spanning-tree extend system-id ! ! ! ! ! ! ! ! interface FastEthernet0/1 switchport access vlan 100 ! interface FastEthernet0/2 switchport access vlan 200 ! interface FastEthernet0/3 ! interface FastEthernet0/4 switchport access vlan 100 ! interface FastEthernet0/5 switchport access vlan 200 ! interface FastEthernet0/6 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 ! interface FastEthernet0/10 ! interface FastEthernet0/11 ! interface FastEthernet0/12 switchport access vlan 200 switchport trunk allowed vlan 1-1005 switchport trunk encapsulation dot1q ! vtp Server vtp domain bigdomain ! interface Vlan 1 no ip address no ip route-cache ! vlan 100 name vlan0100 vlan 200 name vlan0200 ! ip classless no ip http server ! ! ! ! line con 0 transport input none line aux 0 line vty 0 15 ! no scheduler allocate end

*******************************************

The two things with that is that the trunk port in the switch is in a VLAN because if it is not put in one, the traffic does not pass through it from more than one VLAN.

Secondly, the example on the Cisco site uses a native VLAN. The native is untagged access to the hardware so you can ping/telnet each device correct? Does it have anything to do with the pinging accross vlans.

Lastly, I am trying to use my understanding of VLANS as security restrictions and separating networks, and then trying to understand how the router would default to routing traffic between VLANS. It seems kind of un productive.

Thanks again for all your help.

snipped-for-privacy@hotmail.co.uk wrote:

try

interface FastEthernet0/12 switchport mode trunk switchport trunk encapsulation dot1q

Boxxa wrote:

The switch would need that command. Routers route, but on a switch you need to tell it to turn on routing.

snipped-for-privacy@hotmail.co.uk wrote:

Can you please post your network map and configs for netsim?

Thanks Bryan

Drake wrote:

Please do not top-post: it makes it difficult to construct a proper discussion.

On a switch, you *cannot* turn on routing. If you could turn on routing, it would be a router, not a switch.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required