Justin Willmert wrote:
I just set up a desktop with two network cards and have got a bridge
working between the two. That is not what my problem lies in though. I
would like for the box to be able to connect to the internet also, but
if I understand what I've set up correctly, I can't do that with my
current setup. When I've tried to give one of the network cards an IP
address, nothing but lo works, so I know there's something missing. I'll
add my configuration at the bottom, but shortly, br0 is configured with
an IP address, and eth0 and eth1 have none. Now, I know br0 is capable
of at least a network connection because as I type this, I'm currently
SSHed into into the box, but if I try to ping anything, all the packets
are lost.
OK, so here are some of my thoughts and possible hints to a solution:
1) My routing tables need another route, so I just figure out how to
configure that and add a route.
2) br0, eth0, and eth1 are incapable of an internet connection, in
which case I need to create a virtual interface that can connect as if
it were a separate interface that does the internet connecting.
br0 is the network interface of the system. eth0 and eth1 are part of a bridge
and therefore completely transparent in the network.
3) (Very unsure, but...) use a alias interface to allow both eth0
without an IP address to make br0 happy and give eth0:0 an IP address to
allow me to connect to the internet.
Thanks for any help,
Justin Willmert
===================== ifcfg-br0 =====================
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
IPADDR=192.168.2.75
NETMASK=255.255.255.0
ONBOOT=yes
DELAY=0
STP=off
===================== ifcfg-eth0 =====================
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:04:5A:50:A6:38
ONBOOT=yes
TYPE=Ethernet
BRIDGE=br0
===================== ifcfg-eth1 =====================
DEVICE=eth1
BOOTPROTO=static
HWADDR=00:04:5A:4E:BC:02
ONBOOT=yes
TYPE=Ethernet
BRIDGE=br0
===================== static-routes =====================
any: net 127.0.0.0 netmask 255.0.0.0 dev lo
any: net default gw 192.168.2.2 dev br0
===================== output of `route` =====================
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 br0
169.254.0.0 * 255.255.0.0 U 0 0 0 br0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
===== 10 second or so delay here =====
default 192.168.2.2 0.0.0.0 UG 0 0 0 br0
You haven't set a netmask on the default route. It should be 255.255.255.0 to
match the network segment.
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@xxxxxxxxxxxx
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555