Lance Dryden wrote:
> Scríobh Kevin Brennan:
>>>> (eth0 is unplugged)
>>>>> If there's no cable in eth0, shouldn't the routing default to mybridge ?
>> /KB
>>>> Note that you assigned eth0 the same layer 3 address as you gave the
> bridge. Maybe you were looking to do this?
>> ip addr del 192.168.0.248/24 dev eth0
> ip addr del 192.168.0.248/24 dev eth1
> brctl addbr mybridge
> brctl addif mybridge eth0
> brctl addif mybridge eth1
> ip link set up dev mybridge
> ip addr add 192.168.0.248/24 dev mybridge
>> If you've worked with any Cisco layer 3 switches before, this is sort of
> the same as:
>> int eth0/0
> switchport
> switchport access vlan 50
> no shut
> int eth0/1
> switchport
> switchport access vlan 50
> int Vlan50
> descr mybridge
> ip address 192.168.0.248 255.255.255.0
> no shut
>> -- Lance
>>
What I was trying to do was understand a basic bridge setup. Example is
not practical in any way and does not use eth0
ie. box was 2 NIC's one always unplugged, you can plug LAN into either
and it works.
BEFORE
eth0(192.168.0.254)
eth1(192.168.0.248)
replace with same functionality but use a bridge on eth1 (just to
understand it, not for practical purposes)
AFTER
eth0(192.168.0.254)
eth1 ----- mybridge (192.168.0.248)
>Note that you assigned eth0 the same layer 3 address as you gave the
bridge.
Well it was assigned for me. It seems bridge always picks up on of the
HW macs
if I try to change, i get's error
]# ifconfig mybridge hw ether 00:13:72:3D:11:22
SIOCSIFHWADDR: Operation not supported
I later reconfigured to a more practical bridge which includes some
OpenVz containers and both eth0 and eth1.
This works full on one of the NIC's but not no the other.
bridge now looks like this
# brctl show
bridge name bridge id STP enabled interfaces
mybridge 8000.0013723d11b6 no eth0
eth1
veth101.0
veth101.1
when I connect to eth0 it works full but when I connect to eth1 I can't
reach the VM's (I can ping 192.168.0.254 but not 192.168.0.244 which is
on veth101.0 inside VM)
any idea why I would not be able to reach the VM's through eth1 but can
through eth0 - perhaps same reason routing was not working.
[root at foxyloxy ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BF:DC:90:15
UP BROADCAST RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:1893614 errors:0 dropped:0 overruns:0 frame:0
TX packets:1393620 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:279267160 (266.3 MiB) TX bytes:1048507229 (999.9 MiB)
Interrupt:21 Base address:0xdc00
eth1 Link encap:Ethernet HWaddr 00:13:72:3D:11:B6
UP BROADCAST NOARP MULTICAST MTU:1500 Metric:1
RX packets:69 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4416 (4.3 KiB) TX bytes:192 (192.0 b)
Interrupt:16
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4846 errors:0 dropped:0 overruns:0 frame:0
TX packets:4846 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:32466000 (30.9 MiB) TX bytes:32466000 (30.9 MiB)
mybridge Link encap:Ethernet HWaddr 00:13:72:3D:11:B6
inet addr:192.168.0.254 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:28702 errors:0 dropped:0 overruns:0 frame:0
TX packets:12613 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2317171 (2.2 MiB) TX bytes:1922392 (1.8 MiB)
venet0 Link encap:UNSPEC HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:10329 errors:0 dropped:0 overruns:0 frame:0
TX packets:34189 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:719112 (702.2 KiB) TX bytes:45434637 (43.3 MiB)
veth101.0 Link encap:Ethernet HWaddr 00:18:51:70:DE:3D
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:425 errors:0 dropped:0 overruns:0 frame:0
TX packets:12791 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20293 (19.8 KiB) TX bytes:669810 (654.1 KiB)
veth101.1 Link encap:Ethernet HWaddr 00:18:51:6E:B1:D5
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44 errors:0 dropped:0 overruns:0 frame:0
TX packets:4382 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1232 (1.2 KiB) TX bytes:229731 (224.3 KiB)
[root at foxyloxy ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.0.249 * 255.255.255.255 UH 0 0 0
venet0
192.168.0.0 * 255.255.255.0 U 0 0 0
mybridge
/KB
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!