LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Unable to set gateway when second network adapter fitted (http://www.linuxquestions.org/questions/linux-networking-3/unable-to-set-gateway-when-second-network-adapter-fitted-788825/)

catkin 02-12-2010 11:26 PM

Unable to set gateway when second network adapter fitted
 
Hello :)

Problem symptoms

When a second network adapter is fitted, the boot script fails to configure the default gateway. Here's from /var/log/messages with DEBUG_ETH_UP="yes" configured for the boot script
Code:

Feb 13 10:22:23 ps1 logger: /etc/rc.d/rc.inet1:  /sbin/route add default gw 191.168.1.1 metric 1
Feb 13 10:22:23 ps1 logger: SIOCADDRT: No such process

After boot the same command failed with the same message when done by root logged in via ssh but succeeded when run from the console :confused:

After removing the second network adapter, the boot script is able to configure the gateway.

EDIT: or not. The problem now seems intermittent :( Now with only the onboard network adapter the same "SIOCADDRT: No such process" error is logged during boot and the "/sbin/route add default gw 191.168.1.1" command fails at the console too. Am experimenting with disabling the onboard adapter and fitting the NIC.

EDIT 2: definitely intermittent. Just rebooted with no hardware changes; same error during boot and route -n showed no default gateway but "/sbin/route add default gw 191.168.1.1" worked. :(

System details and history
  • Intel D865GSA motherboard with onboard Realtek RTL8100C (maybe -- see lspci output below).
  • Second network adapter is Compex RE100ATX (main chip marked RTL8139D Slackware 13.0 32-bit
lspci -v detail on the adapters:
Code:

02:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
        Subsystem: Intel Corporation Device 0c4a
        Flags: bus master, medium devsel, latency 32, IRQ 23
        I/O ports at b400 [size=256]
        Memory at feaff800 (32-bit, non-prefetchable) [size=256]
        Capabilities: [50] Power Management version 2
        Kernel driver in use: 8139too
        Kernel modules: 8139too, 8139cp

02:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
        Subsystem: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
        Flags: bus master, medium devsel, latency 32, IRQ 22
        I/O ports at b800 [size=256]
        Memory at feaffc00 (32-bit, non-prefetchable) [size=256]
        Expansion ROM at 30000000 [disabled] [size=64K]
        Capabilities: [50] Power Management version 2
        Kernel driver in use: 8139too
        Kernel modules: 8139too, 8139cp

Before booting with the second network adapter fitted, /etc/udev/rules.d/70-persistent-net.rules was deleted and /etc/rc.d/rc.inet1.conf's eth1 stanza changed to:
Code:

# Config information for eth1:
IPADDR[1]="10.0.0.41"
NETMASK[1]="255.255.255.0"
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

Best

Charles

catkin 02-13-2010 12:59 AM

Solved.

Mea culpa :redface: The gateway in rc.inet1.conf was 191.168.1.0 not 192.168.1.0 and the problem symptoms were compounded by my sometimes erroneously trying to add 192.168.0.0 at the command line.

The lesson (apart from trying to avoid human error) is that the message "SIOCADDRT: No such process" can mean that the gateway being added does not match the network on (any of) the interfaces.


All times are GMT -5. The time now is 12:05 PM.