cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1585
Views
0
Helpful
4
Replies

How to Route Vlans Through Linux Router Interface

Hello,

I am hoping someone can help me.  I am trying to route 2 vlans through an emulated router interface. 

2950 Cisco switch configuration

interface FastEthernet0/40

switchport access vlan 100

!

interface FastEthernet0/43

switchport access vlan 101

!

interface FastEthernet0/45

switchport mode trunk

!

Emulated Linux router I used vconfig tool that is suppose to route qtags vlan information

eth1.100  IP address 192.168.1.1

eth1.101  IP adress 192.168.2.1

Everything currently looks fine physically.  I have just been trying to confirm first my switch is configured properly because it does not seem like it is routing normally.  So is there a way to confirm vlans are being routed through the trunk?  Or does someone have any ideas or comments?

Thanks,

Joe

4 Replies 4

The switch-config looks fine. Have you enabled forwarding in the linux-kernel?

in the sysctl.conf:

net.ipv4.ip_forward = 1

-- 

Don't stop after you've improved your network! Improve the world by lending money to the working poor:
http://www.kiva.org/invitedby/karsteni

I have enabled IP forwarding on the router.  If I use wireshark on the router interface it does not look like any vlan traffic is arriving on the interface.

I have 2 vms, 192.168.1.2 and 192.168.1.3 hooked up to vlan 100.  I can ping between them, but if I try to ping 192.168.1.1 which is on the router I see no traffic.  Using wireshark I see CDP messages coming from the trunk port but it does not appear like any vlan traffic is being routed out the trunk port.  I do have another "dumb" switch that sits between the trunk port and the router I wonder if that would matter?

"Cisco Switch

2950 Managed"

vlan 100--192.168.1.0/24

Vlan 101---192.168.2.0/24

Trunk port------------------------"dumb not managed switch"------------------linux emulated router ifconfig eth1 10.50.0.1

                                                                                                                                            eth1.100 192.168.1.1

                                                                                                                                            eth1.101  192.168.2.1

Thanks for your help,

Joe

Well, I wouldn't wonder if that "dumb" switch is dumb enough to get confused by tagged packets. So try it without that device. But you should at least see arp-requests leaving the 2950 on the trunk-interface.

-- 
Don't stop after you've improved your network! Improve the world by lending money to the working poor:
http://www.kiva.org/invitedby/karsteni

Sure, thanks for your help.  I agree I would expect to see ARP messages which I have not received as it appears.  I will work on getting permission to remove the not managed "dumb" switch.