View previous topic :: View next topic |
Author |
Message |
Thalionath n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 May 2003 Posts: 12 Location: Switzerland :: Berne
|
Posted: Fri Mar 02, 2007 5:28 pm Post subject: 2 NICs on same subnet |
|
|
Hi all
I have a gentoo box, which is connected with 2 network cards to the same subnet.
eth0 192.168.1.10/24
eth1 192.168.1.11/24
Yesterday, I finally decided to update my /etc/conf.d/net
from the old syntax:
Code: |
iface_eth0="192.168.1.10 broadcast 192.168.1.255 netmask 255.255.255.0"
iface_eth1="192.168.1.11 broadcast 192.168.1.255 netmask 255.255.255.0"
gateway="eth0/192.168.1.1"
|
(has been working for 2 years)
to the new syntax:
Code: |
config_eth0=( "192.168.1.10/24 brd 192.168.1.255" )
routes_eth0=( "default via 192.168.1.1" )
config_eth1=( "192.168.1.11/24 brd 192.168.1.255" )
routes_eth1=( "default via 192.168.1.1" )
|
Code: |
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.1 * 255.255.255.0 U 0 0 0 eth0
192.168.1.1 * 255.255.255.0 U 0 0 0 eth1
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
|
Now I've the problem, that only one of the two works at a time.
It seams somehow logically to me, that only one can be working with 2 default gateways in the routing table. But why and how worked it with the old
config?
Would it make more sense to bond the interfaces together?
Code: |
slaves_bond0="eth0 eth1"
config_bond0=( "192.168.1.10/24 brd 192.168.1.255" "192.168.1.11/24 brd 192.168.1.255" )
routes_bond0=( "default via 192.168.1.1" )
|
thx |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ttuegel Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 18 Jan 2005 Posts: 176 Location: Illinois, USA
|
Posted: Fri Mar 02, 2007 6:34 pm Post subject: |
|
|
Yes, you'll want to bond the interfaces since they're on the same subnet. That will give you the result you're looking for. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
HeissFuss Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 11 Jan 2005 Posts: 414
|
Posted: Fri Mar 02, 2007 6:57 pm Post subject: |
|
|
Is there a reason you're using 2 NICs on the same subnet instead of a virtual interface? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Thalionath n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 26 May 2003 Posts: 12 Location: Switzerland :: Berne
|
Posted: Fri Mar 02, 2007 7:19 pm Post subject: |
|
|
@ttuegel thx
@HeissFuss: No. I'll bond the interfaces together as soon I get access to the box... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Assgier Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/15716493040da5be571e5a.jpg)
Joined: 28 May 2003 Posts: 127 Location: Europe -> Netherlands -> Utrecht -> Amersfoort
|
Posted: Sat Mar 03, 2007 2:25 pm Post subject: |
|
|
Should the bond not work; when comparing your old config against your current one, note that in your old config you only specify a gateway for eth0 while, in your current one, you specify the same gateway for both NIC's. It could be the issue ![Smile :)](images/smiles/icon_smile.gif) _________________
![Cool 8)](images/smiles/icon_cool.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Cyker Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 15 Jun 2006 Posts: 1746
|
Posted: Sat Mar 03, 2007 3:21 pm Post subject: |
|
|
Yeah; In the original config eth0 is the only one with a default gateway, but in the new config you gave both eth0 and eth1 the gateway.
I think that's why one of them gets disabled - To avoid creating a loop (And thus a Happy Fun Packet Storm!(tm))
Just delete the routes_eth1=( "default via 192.168.1.1" ) line... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|