[Server-devel] XS eth1 problems

Jerry Vonau jvonau at shaw.ca
Fri Jul 9 10:47:47 EDT 2010


On Thu, 2010-07-08 at 22:19 -0700, Sameer Verma wrote:
> I'm setting up a XS machine (XS 0.6) that has only one Ethernet port.
> This port gets appropriated at eth0 and acts as the primary LAN
> interface for XOs to talk to it (via a bridged AP). I also want to get
> this box to talk to the outside (WAN) so I'm using a Airlink USB to
> Ethernet dongle. Plugging it into the machine triggers the detection
> and the dongle gets assigned as eth1.
> 

The default to to have the LAN on eth1 and WAN on eth0, I'd stop the
network (service network stop) and run swapnics to change that
assignment. You would need to reboot to have the change take effect.

> dmesg says:
> 
> eth1: register 'asix' at usb-0000:00:1d.7-2, ASIX AX88772 USB 2.0
> Ethernet, 00:50:b6:00:51:e3
> usb 1-2: New USB device found, idVendor=0b95, idProduct=7720
> usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> usb 1-2: Product: AX88772
> usb 1-2: Manufacturer: ASIX Elec. Corp.
> usb 1-2: SerialNumber: 000001
> bonding: lanbond0: Adding slave eth1.
> eth1: link down
> bonding: lanbond0: enslaving eth1 as an active interface with an up link.
> eth1: link up, 100Mbps, full-duplex, lpa 0x45E1
> 
> udev has the appropriate rule as well.
> 
> [root at schoolserver ~]# cat /etc/udev/rules.d/70-persistent-net.rules
> 
> # This file was automatically generated by the /lib/udev/write_net_rules
> # program run by the persistent-net-generator.rules rules file.
> #
> # You can modify it, as long as you keep each rule on a single line.
> 
> # Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit
> Ethernet controller (rule written by anaconda)
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
> ATTR{address}=="00:01:c0:05:ad:5d", ATTR{type}=="1", KERNEL=="eth*",
> NAME="eth0"
> 
> # USB device 0x0b95:0x7720 (asix)
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
> ATTR{address}=="00:50:b6:00:51:e3", ATTR{type}=="1", KERNEL=="eth*",
> NAME="eth1"
> 
> 
> 
> However, eth1  does not get a dhcp lease from the WAN network. I have
> to run dhclient eth1 for eth1 to get a IP. The WAN network is also a
> private subnet. 192.168.89.0/24 ifconfig says:
> 

With eth0 as WAN the default is to use dhcp. eth1 is really part of
lanbond0, shouldn't appear in the routing table and is meant for the
LAN. Your trying to force your will, don't fight it, swap the assignment
as above, configure your network as per:

http://wiki.laptop.org/go/XS_Techniques_and_Configuration

You don't have anything to edit as your using dhcp for that interface.

> [root at schoolserver ~]# ifconfig eth0
> eth0      Link encap:Ethernet  HWaddr 00:01:C0:05:AD:5D
>           inet addr:172.18.96.34  Bcast:172.18.96.255  Mask:255.255.255.0
>           inet6 addr: fe80::201:c0ff:fe05:ad5d/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:900 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:575 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:87611 (85.5 KiB)  TX bytes:71795 (70.1 KiB)
>           Interrupt:16 Base address:0x2000
> 
> [root at schoolserver ~]# ifconfig eth1
> eth1      Link encap:Ethernet  HWaddr 00:50:B6:00:51:E3
>           inet addr:192.168.89.111  Bcast:192.168.89.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
>           RX packets:340 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:338 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:20353 (19.8 KiB)  TX bytes:22449 (21.9 KiB)
> 
> route -n says
> 
> [root at schoolserver ~]# route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 172.18.96.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
> 172.18.16.0     0.0.0.0         255.255.255.0   U     0      0        0 mshbond0
> 172.18.0.0      0.0.0.0         255.255.255.0   U     0      0        0 lanbond0
> 172.18.1.0      0.0.0.0         255.255.255.0   U     0      0        0 lanbond0
> 192.168.89.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
> 172.18.14.0     0.0.0.0         255.255.254.0   U     0      0        0 mshbond2
> 172.18.12.0     0.0.0.0         255.255.254.0   U     0      0        0 mshbond1
> 172.18.10.0     0.0.0.0         255.255.254.0   U     0      0        0 mshbond0
> 172.18.64.0     172.18.1.7      255.255.248.0   UG    0      0        0 lanbond0
> 172.18.72.0     172.18.1.8      255.255.248.0   UG    0      0        0 lanbond0
> 172.18.8.0      172.18.1.1      255.255.248.0   UG    0      0        0 lanbond0
> 172.18.16.0     172.18.1.1      255.255.248.0   UG    0      0        0 lanbond0
> 172.18.24.0     172.18.1.2      255.255.248.0   UG    0      0        0 lanbond0
> 172.18.32.0     172.18.1.3      255.255.248.0   UG    0      0        0 lanbond0
> 172.18.40.0     172.18.1.4      255.255.248.0   UG    0      0        0 lanbond0
> 172.18.48.0     172.18.1.5      255.255.248.0   UG    0      0        0 lanbond0
> 172.18.56.0     172.18.1.6      255.255.248.0   UG    0      0        0 lanbond0
> 172.18.96.0     0.0.0.0         255.255.224.0   U     0      0        0 lanbond0
> 169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 mshbond2
> 0.0.0.0         192.168.89.1    0.0.0.0         UG    0      0        0 eth1
> 
> 
> and cat /etc/resolv.conf says
> 
> [root at schoolserver ~]# cat /etc/resolv.conf
> ##
> ## NOTE: This file is generated from
> ##       resolv.conf.in
> ##
> search example.org
> nameserver 172.18.0.1
> 
Remember to add the forwarder as shown in

Use ISP-provided DNS servers in the above link

> 
> I have had no luck pinging anything on the public Internet either with
> an IP or with a domain name. Given that eth0 and eth1 are both
> private, how will the XS know how to get to the Internet?
> 

Default route points to the internet, start by pinging the gateway ip
address, then progress farther out. Don't bother until you swap the nic
assignment. 

Jerry






More information about the Server-devel mailing list