Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Bridged interfaces w/out IPs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
gjy0724
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2005
Posts: 142
Location: Seffner, Florida

PostPosted: Sat May 06, 2017 4:34 pm    Post subject: [SOLVED] Bridged interfaces w/out IPs Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42563
Location: 56N 3W

PostPosted: Sat May 06, 2017 5:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
gjy0724
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2005
Posts: 142
Location: Seffner, Florida

PostPosted: Sat May 06, 2017 8:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum