Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] BRIDGE and ROUTER - Bridge 3 interfaces and route 1
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
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 907

PostPosted: Fri May 26, 2006 8:55 am    Post subject: [SOLVED] BRIDGE and ROUTER - Bridge 3 interfaces and route 1 Reply with quote

I'm new to bridging and would like to know how I can bridge more than two interfaces.

The network layout is as follows:

LAN 1 ----------------------------------|
Internet---ADSL modem/router---SWITCH---Gentoo Shorewall---ATM line---LAN 2
LAN 3 --------------------------------------------------| |
DMZ -------------------------------------------------------

I need LAN 1, LAN 3 and DMZ to be on the same subnet 10.215.144.0/255.255.255.252
The ADSL modem/router's local IP would be 10.215.144.92.
The Gentoo Shorewall gateway would have a bridged interface virtual IP= 10.215.144.91 and the fourth interface would have IP= 172.20.3.4 and would be in charge of ROUTING traffic to LAN 2 (several subnets of type 10.215.0.0) from the remote ATM line endpoint (172.20.3.2).

What would be a SAMPLE NETWORK CONFIGURATION for Gentoo (supposing eth0 connected to ADSL, eth1 connected to LAN 3, eth2 connected to ATM/LAN 2 and eth3 connected to DMZ)?
e.g.:
Compile KERNEL with BRIDGE support
# emerge net-misc/bridge-utils

EDIT /etc/conf.d/net:
bridge_br0="eth0 eth1 eth3"
config_br0=( "10.215.144.91 netmask 255.255.252.0" )
config_eth0=( "null" )
config_eth1=( "null" )
config_eth3=( "null" )
brctl_br0=( "stp on" )
config_eth2=( "172.20.3.4 netmask 255.255.255.0" )
routes_eth2=( "default via 172.20.3.2" )

# ln -sf /etc/init.d/net.lo /etc/init.d/net.eth1
# ln -sf /etc/init.d/net.lo /etc/init.d/net.eth2
# ln -sf /etc/init.d/net.lo /etc/init.d/net.eth3
# rc-update add net.eth0 default
# rc-update add net.eth1 default
# rc-update add net.eth2 default
# rc-update add net.eth3 default

# ln -sf /etc/init.d/net.lo /etc/init.d/net.br0
# rc-update add net.br0 default
# /etc/init.d/net.br0 start

What I'm not sure about is whether I can bridge_br0="eth0 eth1 eth3" or if I have to do that two by two.

I would appreciate any tips/suggestions.

Thanks in advance


Last edited by Vieri on Tue Jun 27, 2006 6:23 am; edited 1 time in total
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Fri May 26, 2006 11:57 am    Post subject: Re: BRIDGE and ROUTER - Bridge three interfaces and route on Reply with quote

Vieri wrote:
What I'm not sure about is whether I can bridge_br0="eth0 eth1 eth3" or if I have to do that two by two.

I'm not very experienced with the gentoo-init scripts, but (kernel-wise) you can definitely add more than 2 if's to a bridge. The terms "bridge" and "switch" are technicaly the same. only "switch" is mostly used for a local device with multiple ports, "bridge" for a device with 2 ports that spans some distance; but they're both layer-2 "repeaters"
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 907

PostPosted: Tue Jun 27, 2006 6:22 am    Post subject: Reply with quote

Thanks nielchiano.
Bridging several interfaces was quite simple in Gentoo.
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