Installed New Ethernet Card. Now Software Bridge Doesn't Work.

Installed New Ethernet Card. Now Software Bridge Doesn't Work.

Post by Gazz » Mon, 01 Dec 2003 09:24:48



Hi,

I have a 3-PC 10/100 Mb/s Ethernet home network, with all machines runing
Mandrake Linux 9.1.  I have two NIC's in my main computer, PC 1.  One is
installed in PCI slot 2, the other is in PCI slot 4.  In linuxconf, I set
up their IP addresses and FQDN's (respectively) as:

192.168.1.1, bedroom.masterton.net (alias 'bedroom') and
192.168.2.1, bedroom.masterton2.net (alias 'bedroom2').

PC's 2 and 3 were set up with IP addresses and FQDN's (respectively) of:

192.168.1.2, lounge.masterton.net (alias 'lounge') and
192.168.2.2, kitchen.masterton2.net (alias 'kitchen2').

Because PC's 2 and 3 were on different sub-nets, it was difficult to access
one from the other (and vice versa).  So, I set up bridging on PC 1 by
issuing the following commands:

brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
ifconfig eth0 0.0.0.0
ifconfig eth1 0.0.0.0
ifconfig br0 192.168.1.1

and changed PC 3 to 192.168.1.4/kitchen.masterton.net/kitchen.  Everything
worked beautifully, so, I added the above brctl lines to the bottom of my
/etc/rc.d/rc.local file so that the bridge comes into play at the end of OS
loading.  Works fine.

The problem started when I installed a third NIC in PC 1, in PCI slot 3.
This Ethernet card is connected to a cable modem and, in linuxconf, I set
it (eth2) to get it's IP address by selecting 'DHCP'.  I re-booted and did
an ifconfig.  It showed everyting as expected, except that eth2 did not
show an IP address, but, underneath, there was something referred to as
'eth2:9', which had an IP address I recognised as belonging to a pool of
IP's that my ISP uses.  I could ping this dynamic address.  So, everyting
was okay.  However, I could no longer ping PC 3 (192.168.1.4).  192.168.1.1
was pingable and so was PC 2 (192.168.1.2).  What's up?

Sorry about being so verbose, but I thought I'd better give as much info. as
possible.

Yours,
Gary Hayward.

 
 
 

Installed New Ethernet Card. Now Software Bridge Doesn't Work.

Post by David Efflan » Mon, 01 Dec 2003 13:54:51



> Hi,

> I have a 3-PC 10/100 Mb/s Ethernet home network, with all machines runing
> Mandrake Linux 9.1.  I have two NIC's in my main computer, PC 1.  One is
> installed in PCI slot 2, the other is in PCI slot 4.  In linuxconf, I set
> up their IP addresses and FQDN's (respectively) as:

> 192.168.1.1, bedroom.masterton.net (alias 'bedroom') and
> 192.168.2.1, bedroom.masterton2.net (alias 'bedroom2').

> PC's 2 and 3 were set up with IP addresses and FQDN's (respectively) of:

> 192.168.1.2, lounge.masterton.net (alias 'lounge') and
> 192.168.2.2, kitchen.masterton2.net (alias 'kitchen2').

> Because PC's 2 and 3 were on different sub-nets, it was difficult to access
> one from the other (and vice versa).

Should not have been a problem if you had proper routing.  Since you were
planning on setting up an internet connection, all you would have needed
was a default route on lounge using gw 192.168.1.1, and default route on
kitchen2 using gw 192.168.2.1.  Of course you need ip_forward enabled on
PC 1.

- Show quoted text -

Quote:> So, I set up bridging on PC 1 by issuing the following commands:

> brctl addbr br0
> brctl addif br0 eth0
> brctl addif br0 eth1
> ifconfig eth0 0.0.0.0
> ifconfig eth1 0.0.0.0
> ifconfig br0 192.168.1.1

> and changed PC 3 to 192.168.1.4/kitchen.masterton.net/kitchen.  Everything
> worked beautifully, so, I added the above brctl lines to the bottom of my
> /etc/rc.d/rc.local file so that the bridge comes into play at the end of OS
> loading.  Works fine.

> The problem started when I installed a third NIC in PC 1, in PCI slot 3.
> This Ethernet card is connected to a cable modem and, in linuxconf, I set
> it (eth2) to get it's IP address by selecting 'DHCP'.  I re-booted and did
> an ifconfig.  It showed everyting as expected, except that eth2 did not
> show an IP address, but, underneath, there was something referred to as
> 'eth2:9', which had an IP address I recognised as belonging to a pool of
> IP's that my ISP uses.  I could ping this dynamic address.  So, everyting
> was okay.  However, I could no longer ping PC 3 (192.168.1.4).  192.168.1.1
> was pingable and so was PC 2 (192.168.1.2).  What's up?

What did your routing look like?  It may also depend upon how you
configure iptables.  For communication between eth0 and eth1 networks, you
would need to insert a forward rule before any masq rules to allow your
local networks to communicate with each other.  But I am not sure how all
that works with bridging (I have done proxy_arp, but not bridging).

--
David Efflandt - All spam ignored  http://www.de-srv.com/

 
 
 

Installed New Ethernet Card. Now Software Bridge Doesn't Work.

Post by Gazz » Thu, 04 Dec 2003 05:31:05




>> Hi,

>> I have a 3-PC 10/100 Mb/s Ethernet home network, with all machines runing
>> Mandrake Linux 9.1.  I have two NIC's in my main computer, PC 1.  One is
>> installed in PCI slot 2, the other is in PCI slot 4.  In linuxconf, I set
>> up their IP addresses and FQDN's (respectively) as:

>> 192.168.1.1, bedroom.masterton.net (alias 'bedroom') and
>> 192.168.2.1, bedroom.masterton2.net (alias 'bedroom2').

>> PC's 2 and 3 were set up with IP addresses and FQDN's (respectively) of:

>> 192.168.1.2, lounge.masterton.net (alias 'lounge') and
>> 192.168.2.2, kitchen.masterton2.net (alias 'kitchen2').

>> Because PC's 2 and 3 were on different sub-nets, it was difficult to
>> access one from the other (and vice versa).

> Should not have been a problem if you had proper routing.  Since you were
> planning on setting up an internet connection, all you would have needed
> was a default route on lounge using gw 192.168.1.1, and default route on
> kitchen2 using gw 192.168.2.1.  Of course you need ip_forward enabled on
> PC 1.

[snip]

Hi,

On PC 1 I have done the following:

*  ifconfig'ed my bridge down;
*  did a brctl delbr br0 [deleted bridge];
*  commented out my bridging script in /etc/rc.d/rc.local;
*  removed reference to eth2 in /etc/modules.conf;
*  shut down;
*  physically removed eth2 NIC;
*  booted up;
*  checked to see that eth0 and eth1 were 192.168.1.1 and 192.168.2.1      
respectively [okay];
*  entered the following into /etc/sysconfig/static-routes:
        eth0 net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
        eth1 net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1

On PC 2 I did the following:

*  checked to see that eth0 was 192.168.1.2 [okay];
*  entered (on command line):
        route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.1

On PC 3 I did the following:

*  changed IP address of eth0 to 192.168.2.2;
*  entered (on command line):
        route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.1

On PC 1, I could ping 192.168.1.2 and 192.168.2.2.

On PC 2, I could ping 192.168.2.0, 192.168.2.1 and 192.168.2.255 _but not_
192.168.2.2 (PC 3).

On PC 3, I could ping 192.168.1.0, 192.168.1.1 and 192.168.1.255 _but not_
192.168.1.2 (PC 2).

How come I can't ping from PC 2 to PC 3 and vice versa?  I used instructions
from the Internet to do this and it said I would be able to access machines
on one sub-net from machines on another.  I can't!  :-(

Please help me.

Yours,
Gary Hayward.

 
 
 

Installed New Ethernet Card. Now Software Bridge Doesn't Work.

Post by Gazz » Thu, 04 Dec 2003 10:43:14





>>> Hi,

>>> I have a 3-PC 10/100 Mb/s Ethernet home network, with all machines
>>> runing
>>> Mandrake Linux 9.1.  I have two NIC's in my main computer, PC 1.  One is
>>> installed in PCI slot 2, the other is in PCI slot 4.  In linuxconf, I
>>> set up their IP addresses and FQDN's (respectively) as:

>>> 192.168.1.1, bedroom.masterton.net (alias 'bedroom') and
>>> 192.168.2.1, bedroom.masterton2.net (alias 'bedroom2').

>>> PC's 2 and 3 were set up with IP addresses and FQDN's (respectively) of:

>>> 192.168.1.2, lounge.masterton.net (alias 'lounge') and
>>> 192.168.2.2, kitchen.masterton2.net (alias 'kitchen2').

>>> Because PC's 2 and 3 were on different sub-nets, it was difficult to
>>> access one from the other (and vice versa).

>> Should not have been a problem if you had proper routing.  Since you were
>> planning on setting up an internet connection, all you would have needed
>> was a default route on lounge using gw 192.168.1.1, and default route on
>> kitchen2 using gw 192.168.2.1.  Of course you need ip_forward enabled on
>> PC 1.
> [snip]

> Hi,

> On PC 1 I have done the following:

> *  ifconfig'ed my bridge down;
> *  did a brctl delbr br0 [deleted bridge];
> *  commented out my bridging script in /etc/rc.d/rc.local;
> *  removed reference to eth2 in /etc/modules.conf;
> *  shut down;
> *  physically removed eth2 NIC;
> *  booted up;
> *  checked to see that eth0 and eth1 were 192.168.1.1 and 192.168.2.1
> respectively [okay];
> *  entered the following into /etc/sysconfig/static-routes:
>         eth0 net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1
>         eth1 net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1

> On PC 2 I did the following:

> *  checked to see that eth0 was 192.168.1.2 [okay];
> *  entered (on command line):
>         route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.1

> On PC 3 I did the following:

> *  changed IP address of eth0 to 192.168.2.2;
> *  entered (on command line):
>         route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.1

> On PC 1, I could ping 192.168.1.2 and 192.168.2.2.

> On PC 2, I could ping 192.168.2.0, 192.168.2.1 and 192.168.2.255 _but not_
> 192.168.2.2 (PC 3).

> On PC 3, I could ping 192.168.1.0, 192.168.1.1 and 192.168.1.255 _but not_
> 192.168.1.2 (PC 2).

> How come I can't ping from PC 2 to PC 3 and vice versa?  I used
> instructions from the Internet to do this and it said I would be able to
> access machines
> on one sub-net from machines on another.  I can't!  :-(

> Please help me.

> Yours,
> Gary Hayward.

Hi,

Problem solved by a posting I noticed above mine!  (I needed to re-boot the
router computer).

Yours,
Gary Hayward.