LinuxQuestions.org
Visit Jeremy's Blog.
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 07-24-2014, 08:45 AM   #1
plentyow1
LQ Newbie
 
Registered: Jul 2014
Posts: 4

Rep: Reputation: Disabled
Bridge 2 nics of a VM and


The server is setup with 3 NICS, 1 main/management nic and 2 different VLAN nics - non routed. I am trying to bridge the VLAN nics together for a home-built WAN emulator. Below are the network configs:

ifcfg-br0:
NAME=br0
DEVICE=br0
ONBOOT=yes
TYPE=Bridge
STP=on
Delay=0
BOOTPROTO=none
IPV6INIT=no
USERCTL=no

ifcfg-eth1(192.168.2.128/26):
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
BRIDGE=br0
DEVICE=eth1
HWADDR=XX:XX:XX:XX:XX:XX
IPV6INIT=no
USERCTL=no

ifcfg-eth2(192.168.2.192/26):
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
BRIDGE=br0
DEVICE=eth2
HWADDR=XX:XX:XX:XX:XX:XX
IPV6INIT=no
USERCTL=no


firewall IP: 192.168.2.194/26
router IP: 192.168.2.193/26

firewall --(network 192.168.2.128/26)-- eth1 |PC| eth2 --(network 192.168.2.192/26)-- router

I had to split the network up like this so that there was not a straight path on the network around the emulator. Also the hypervisor would not allow 2 different VLANS to have the same network assigned.

If I setup a temp IP on the bridge and take down either eth1 or eth2, I can ping the firewall/router that it is attached to, but not the other. If both VLAN interfaces are up, I can only access the VLAN of the nic that has the same mac as the bridge. The outcome I want is to be able to go from either end to the other end.
 
Old 07-24-2014, 09:14 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
I'm not a networking expert but I don't see where you are creating or using a vlan anywhere in your description. I would expect the vlan id to be part of the interface name. Also the ifcfg script should have VLAN=yes.
 
Old 07-24-2014, 09:19 AM   #3
plentyow1
LQ Newbie
 
Registered: Jul 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
The VLAN-ID is set in the settings of the VM on the hypervisor (Hyper-V). Would I still need to setup the vlan tag within the eth configs?
 
Old 07-24-2014, 12:15 PM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Depends where you want to see the VLAN tags, I guess. You can do trunk mode to the VMs, but not sure what you do on the bridge in that case. I've only ever set it up in normal mode.

https://mthode.org/posts/2012/Oct/vl...ng-to-kvm-vms/
 
Old 07-24-2014, 03:23 PM   #5
plentyow1
LQ Newbie
 
Registered: Jul 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
So since these are different vlans, should I setup the interfaces as regular eths with an IP and use route to get traffic back and forth?
 
Old 07-25-2014, 03:29 PM   #6
plentyow1
LQ Newbie
 
Registered: Jul 2014
Posts: 4

Original Poster
Rep: Reputation: Disabled
I was going down the wrong path with bridging. I had to remove the bridge, setup an IP on each eth of the PC, and use routes (route-ethX) to get traffic from one nic to the other.
 
  


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
[SOLVED] Two NICs - bridge and proxy lucmove Linux - Networking 4 05-09-2013 12:26 AM
I have 3 nics on squid and need a script to switch nics teky68 Linux - Newbie 2 12-15-2012 03:48 PM
[SOLVED] OpenVPN in bridge mode cutting access to web (Server with 3 NICs acting as router) Joaquim Almeida Linux - Networking 1 09-10-2012 12:12 AM
Wireless bridge linux box with 2 NICs, one wireless AwesomeMachine Linux - Wireless Networking 1 09-23-2007 01:26 PM
When using Knoppix, I need to bridge the 2 nics together! p4ocer Linux - Networking 0 06-22-2004 02:59 PM

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

All times are GMT -5. The time now is 03:41 AM.

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