Implement inter vlan routing with Linux


 
Thread Tools Search this Thread
Special Forums IP Networking Implement inter vlan routing with Linux
# 1  
Old 10-29-2014
Implement inter vlan routing with Linux

Hello. I want to Communicate 2 VLAN with router like this solution:
Image
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):
Code:
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):
Code:
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
Code:
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

Moderator's Comments:
Mod Comment Code tags for code and output, please.


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:

Code:
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?

Last edited by Corona688; 10-29-2014 at 01:26 PM..
# 2  
Old 10-29-2014
Can the hosts get beyond the router. Can anything ping the router (icmp protocol)?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Linux bridge routing failing on Proxmox3.2/Debian7.0

I am having problems configuring bridged networking on Proxmox3.2/Debian7.0 I have 2 bridges - vmbr0 and vmbr1. I want to attach a gateway/firewall running in a virtual machine between the 2 and use it to connect out to the WAN through vmbr0. I have removed the IP, mask and gateway from... (0 Replies)
Discussion started by: OSSVirt
0 Replies

2. UNIX for Dummies Questions & Answers

Linux - how to turn on the the RIP (dynamic routing)

(3 Replies)
Discussion started by: samnyc
3 Replies

3. Ubuntu

How to implement TIOCOUTQ for USB modem on Linux Ubuntu

Hi, I need to override ioctl operation for a few USB drivers (sierra, option, cdc-acm) on Linux Ubuntu 2.6.34sb2 to support TIOCOUTQ command. Unfortunately, none of the drivers I mentioned above support TIOCOUTQ because it seems unclear to know amount of data inside a modem. Does Linux... (12 Replies)
Discussion started by: SDoroshenko
12 Replies

4. Linux

How to implement a system call in linux?

I encountered a variety of difficulties when implementing a system call as simple as HelloWorld example in Linux so far. Firstly, according to the book "Linux Kernel Development Second Edition", I tried to implement a syscall in 2.6.31 but no way absolutely because 2.6.10 has a very different way... (5 Replies)
Discussion started by: sunnyhay
5 Replies

5. IP Networking

network segment use vlan, linux vconfig and AT-GS950

Dear all, I have a Allied Telesyn AT-GS950 16 port switch. All hosts&router have rtl8139 NICs. OS : Slackware linux 12.1. I use a switch with vlan technique to separate my network to some segment. here my plan: router eth0 ---> switch port 1 switch port 5 <--- eth0 host A switch... (1 Reply)
Discussion started by: penyu
1 Replies

6. Linux

Routing in Linux

Hello All, I know it's a tricky probably stupid question but I'm stuck.... :( Is there any way to route different protocols through different eth cards for the same destination in Linux? With route add or something like it? For instance: FTP to/from 192.168.1.1 goes through eth0 - gw2... (1 Reply)
Discussion started by: pmpx
1 Replies

7. Linux

linux routing

how i add new routes to my linux machine (1 Reply)
Discussion started by: youmna
1 Replies

8. Red Hat

Linux Routing Help

I have just recently got into using Linux RedHat 9. So far I love it, I have set it up on a server I am running. Right now I have set up Samba and am running a file server for my house. I have four computers, the linux box is connected to the internet through a switch I have. There are two NICS in... (1 Reply)
Discussion started by: xTHESEUSx
1 Replies

9. Red Hat

Setting Up Routing In Linux Redhat 9 Help

:mad: I have just recently got into using Linux RedHat 9. So far I love it, I have set it up on a server I am running. Right now I have set up Samba and am running a file server for my house. I have four computers, the linux box is connected to the internet through a switch I have. There are two... (5 Replies)
Discussion started by: xTHESEUSx
5 Replies

10. Linux

NAT Routing in linux

How to use NAT Router in linux Redhat 6 ? and what packages and configuration are required ? (1 Reply)
Discussion started by: salhoub
1 Replies
Login or Register to Ask a Question