View previous topic :: View next topic |
Author |
Message |
gjy0724 Apprentice
Joined: 11 Jun 2005 Posts: 165 Location: Lock Haven, Pennsylvania
|
Posted: Sat May 06, 2017 4:34 pm Post subject: [SOLVED] Bridged interfaces w/out IPs |
|
|
I recently returned to running Gentoo as my primary desktop after a 5 year hiatus of running RHEL (Scientific Linux specifically). This is also the first time running KVM VMs under Gentoo. Anyway, with the RHEL products, they have the ability to create bridge interfaces for VMs to send traffic through without an IP on the physical interface. The VM's themselves have ip addresses of the external network already.
::::::::::::::
/etc/sysconfig/network-scripts/ifcfg-ens3
::::::::::::::
DEVICE=ens3
NAME=ens3
ONBOOT=yes
NM_CONTROLLED=no
BRIDGE=ens3-br0
BOOTPROTO=static
::::::::::::::
/etc/sysconfig/network-scripts/ifcfg-ens3-br0
::::::::::::::
DEVICE="ens3-br0"
ONBOOT="yes"
TYPE=Bridge
Is there a way to do this within Gentoo?
Thank you in advance.
Last edited by gjy0724 on Sat May 06, 2017 8:43 pm; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54097 Location: 56N 3W
|
Posted: Sat May 06, 2017 5:10 pm Post subject: |
|
|
gjy0724,
You can create an empty bridge and route traffic to it.
/etc/conf.d/net: | # We don't donate any hardware to br0
bridge_br0=""
# fix the macaddr
mac_br0="fe:54:00:1c:ab:06"
routes_br0="5.x.y.z" |
Then on the VM side, its ethernet port in connected to br0.
On the VM host, br0 has no hardware nor any IP _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
gjy0724 Apprentice
Joined: 11 Jun 2005 Posts: 165 Location: Lock Haven, Pennsylvania
|
Posted: Sat May 06, 2017 8:43 pm Post subject: |
|
|
Unfortunately I left out a very important point, for reason still unknown to myself I decided to use systemd with the system. I don't believe I have any requirement to use it.
Anyway, as it turns out your post at least got me thinking.
The the following files solved my problem:
/etc/systemd/network/br0.netdev: | [NetDev]
Name=br0
Kind=bridge
|
/etc/systemd/network/br0.network: | [Match]
Name=br0 |
/etc/systemd/network/enps41.network: | [Match]
Name=enp4s1
[Network]
Bridge=br0 |
Thank you for your help. |
|
Back to top |
|
|
|