Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-24-2014, 08:45 AM
|
#1
|
LQ Newbie
Registered: Jul 2014
Posts: 4
Rep:
|
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.
|
|
|
07-24-2014, 09:14 AM
|
#2
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,195
|
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.
|
|
|
07-24-2014, 09:19 AM
|
#3
|
LQ Newbie
Registered: Jul 2014
Posts: 4
Original Poster
Rep:
|
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?
|
|
|
07-24-2014, 12:15 PM
|
#4
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,195
|
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/
|
|
|
07-24-2014, 03:23 PM
|
#5
|
LQ Newbie
Registered: Jul 2014
Posts: 4
Original Poster
Rep:
|
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?
|
|
|
07-25-2014, 03:29 PM
|
#6
|
LQ Newbie
Registered: Jul 2014
Posts: 4
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 07:41 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|