LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-29-2014, 06:04 AM   #1
z.s.n
LQ Newbie
 
Registered: Oct 2014
Posts: 1

Rep: Reputation: Disabled
implement inter vlan routing with Linux


Hello. I want to Communicate 2 VLAN with router like this solution:
http://8pic.ir/images/83m0ouih8mmm9s1sfl56.jpg
For this purpose I'm configuring 2 Linux system as a switch and connect 4 host to them. Then a router is added to scenario.
The configuration of the switches is:

On DUT1(Linux):
DUT1# Brctl addbr br0
DUT1# Brctl addif eth0 eht1 eth2 eth3
DUT1# Ifconfig br0 up
DUT1# Modeprobe 8021q
DUT1# Vconfig add eth1 10
DUT1# Vconfig add eth1 20
DUT1# Vconfig add eth0 10
DUT1# Vconfig add eth0 20
DUT1# Vconfig add eth2 10
DUT1# Vconfig add eth3 20

On DUT2 (Linux):
DUT2# Brctl addbr br0
DUT2# Brctl addif eth0 eht1 eth2
DUT2# Ifconfig br0 up
DUT2# Modeprobe 8021q
DUT2# Vconfig add eth2 10
DUT2# Vconfig add eth2 20
DUT2# Vconfig add eth0 20
DUT2# Vconfig add eth1 20


On Router (Linux) - IP Forwarding is enable
Router# Modeprobe 8021q
Router# Vconfig add eth2 10
Router# Vconfig add eth2 20
Router# Ifconfig eth2.10 192.168.10.50/24 up
Router# Ifconfig eth2.10 192.168.20.50/24 up



With this configuration only hosts that are in same vlan can ping eachother and hosts cants ping their Default Gateway. The request ARP packet are receive on router but the router don’t send response of it and I don’t know why?
In addition, when the router ping hosts the request is stay on pervious switch of host and Host don’t receive ARP request of router.


After this test I Replace router with the Cisco C3700 on GNS3, but the result is the same …
The configuration of C3700 is:

R1#vlan database
R1#vlan 10
R1#vlan 20
R1#config terminal
R1(config)#interface fa0/0.10
R1(config-subif)#encapsulation dot1q 10
R1(config-subif)#ip address 192.168.10.50 255.255.255.0
R1(config-subif)#interface fa0/0.20
R1(config-subif)#encapsulation dot1q 20
R1(config-subif)#ip address 192.168.20.50 255.255.255.0
R1(config-subif)#interface fa0/0
R1(config-if)#no shut
R1(config-if)#end

For both test I check ARP table of router but it was empty…
Can anyone help me?
Why the hosts don’t ping the gateway? And why Router doesn’t Produce response ARP packet and send it?
 
Old 10-29-2014, 12:44 PM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Not 100% sure this will work but based on your diagram, to me it looks like you want to do something different with your bridging, specifically bridge the vlans not the main interfaces. So do the vconfig first and then switch the bridges to something like:

DUT#1 - br0 interfaces eth1.10 eth0.10 eth2.10
DUT#1 - br1 interfaces eth1.20 eth0.20 eth3.20

DUT#2 - br0 interfaces eth2.10 eth0.10
DUT#2 - br1 interfaces eth2.20 eth1.20


Also turn on forwarding on DUT#1 and DUT#2

Last edited by estabroo; 10-29-2014 at 12:45 PM. Reason: added forwarding
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Underwhelming Linux routing/VLAN/bonding performance markfox Linux - Networking 19 02-25-2015 10:20 PM
LXer: RCPlive: Inter-VLAN Routing LXer Syndicated Linux News 0 11-19-2013 11:13 PM
shorewall, vlan routing alitabas Linux - Networking 3 09-07-2012 07:23 PM
VLAN Routing teamchachi Linux - Networking 0 06-14-2005 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration