a networking question
Tapas Mishra
mightydreams at gmail.com
Thu Jan 6 13:56:26 UTC 2011
On Thu, Jan 6, 2011 at 6:39 PM, stan <stanb at panix.com> wrote:
> I have a workstation in my lab with 10.04 on it. I want to create a
> situation where I can atache test devices on various 192.168.x.x subnets to
> one of the switches it is already pluged in to. Taht is I want multiple
> subnets on the smae physcial "wire" Here is what I have put in
> /etc/network/interfaces:
>
> auto lo
> iface lo inet loopback
> address 127.0.0.1
> netmask 255.0.0.0
>
> auto eth0
> iface eth0 inet static
> address 10.209.120.12
> netmask 255.255.255.0
> gateway 10.209.120.1
>
>
> # auto eth1
>
> # iface eth1 inet static
> # address 192.168.1.5
> # netmask 255.255.255.0
>
> # iface eth1 inet static
> # address 192.168.1.6
> # netmask 255.255.255.0
>
> # iface eth1 inet static
> # address xxx.85.106.148
> # netmask 255.255.255.128
>
> auto br0
> iface br0 inet static
> address xxx.85.106.148
> broadcast xxx.85.106.255
> netmask 255.255.255.128
> # gateway xxx.85.106.143
> bridge_ports eth1
> bridge_fd 2.5
>
> auto eth1:0
> iface eth1:0 inet static
> name Ethernet alias LAN card
> address 192.168.100.2
> netmask 255.255.255.0
> broadcast 192.168.100.255
> network 192.168.100.0
>
> auto eth1:1
> auto eth1:1
> iface eth1:1 inet static
> name Ethernet 2nd alias LAN card
> address 192.168.1.11
> netmask 255.255.255.0
> broadcast 192.168.1.255
> network 192.168.1.0
>
> And here is what netstat -rn reports:
>
> stan at plabws1:/etc/network$ netstat -rn
> Kernel IP routing table
> Destination Gateway Genmask Flags MSS Window irtt
> Iface
> xxx.85.106.128 0.0.0.0 255.255.255.128 U 0 0 0
> br0
> 192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth1
> 10.209.120.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth1
> 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0
> virbr0
> 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0
> eth0
> 0.0.0.0 10.209.120.1 0.0.0.0 UG 0 0 0
> eth0
>
> But I cannot ping something on 192.168.1.x What am I doing wrong?
>
You need to enable ip forwarding on the machine where bridge is.
Correct entry for a bridge is as follows
auto lo
iface lo inet loopback
# The primary network interface
auto eth2
iface eth2 inet manual
auto br0
iface br0 inet static
address 192.168.1.14
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.10
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.13.2
dns-search myserver.net
bridge_ports eth2
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
You can not have eth0 and br0 simultaneously at the same time.
The output of brctl show on my machine shows
brctl show
bridge name bridge id STP enabled interfaces
br0 8000.0026b9824238 no eth2
vnet0
vnet1
vnet2
vnet3
Paste your outputs on paste.ubuntu.com here it becomes cluttered to read.
--
http://mightydreams.blogspot.com
More information about the ubuntu-users
mailing list