Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Keep network access on device after it is attached to bridge
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
syl22_00
n00b
n00b


Joined: 31 Aug 2011
Posts: 14

PostPosted: Thu Feb 21, 2013 10:14 am    Post subject: Keep network access on device after it is attached to bridge Reply with quote

Hi,

I am creating a bridge to be used as device for a XEN guest. My physical device is eth0 and the bridge is xenbr0. After I start xenbr0 I lose connectivity on eth0. Meanwhile, the guest can access the network.

Here is /etc/conf.d/net:

Code:

config_eth0="192.168.1.61 netmask 255.255.255.0 brd 192.168.1.255"
routes_eth0="default via 192.168.1.1"
dns_servers_eth0="192.168.1.14"

bridge_xenbr0="eth0"
config_xenbr0="dhcp"
routes_xenbr0="default via 192.168.1.1"
brctl_xenbr0="setfd 0
sethello 10
stp off"
rc_net_xenbr0_need="net.eth0"


I am quite confused whether I should turn on or off ip forwarding, in /proc/sys/net/ipv4/ip_forward or in /etc/sysctl.conf, and whether I should add entries to iptables. Any help would be very appreciated.
Back to top
View user's profile Send private message
AngelKnight
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2003
Posts: 127

PostPosted: Sun Feb 24, 2013 11:07 am    Post subject: Reply with quote

Hi,

This config exhibits conceptual errors with regard to what ethernet bridges in Linux are and how they work. Try this:

Code:
config_eth0="null"

bridge_xenbr0="eth0"
config_xenbr0="dhcp
192.168.1.61/24"
routes_xenbr0="default via 192.168.1.1"
brctl_xenbr0="setfd 0
sethello 10
stp off"

dns_servers_xenbr0="192.168.1.14" # This might bomb out if you require the DNS server provided by DHCP
rc_net_xenbr0_need="net.eth0"


The conceptual error is in thinking that an IP address belongs to a specific adapter. It doesn't; it belongs to the host. An IP was traditionally "bound" to a specific adapter in order to let the kernel know where the L3 network to which that address belongs belongs. (The previous sentence really does make sense; read it again.)
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