PDA

View Full Version : ifup and ifstatus on eth3 removes default gateway on eth0



jayvi
01-May-2015, 02:21
I have a SLES 11 SP3 appliance with multiple NICs. I have configured eth1 as DHCP and it receives an address and default gateway from the DHCP server. I then configure eth2 with a static IP address. When I run


# ifup eth2

the default gateway route for eth1 is removed and replaced with one for eth2. Very strange behavior. I need the default gateway route to remain unchanged when I bring any other interface up.

Here is it's configuration for eth1 /etc/sysconfig/network/ifcfg-eth0:

BOOTPROTO='dhcp'
IPADDR=''
PREFIXLEN=''
STARTMODE='auto'
NAME='Ethernet Controller'
DHCLIENT_PRIMARY_DEVICE='yes'
PRIMARY_NIC='yes'


Note the DHCLIENT_PRIMARY_DEVICE which is supposed to protect the default route.

Here is the configuration for eth2

BOOTPROTO='static'
IPADDR='10.10.81.194'
PREFIXLEN='24'
STARTMODE='auto'
NAME='Ethernet Controller'

Thank you for any insight you can provide

jmozdzen
05-May-2015, 11:46
Hi jayvi,

is there any entry in your /etc/sysconfig/network/routes file?

Regards,
Jens

jmozdzen
05-May-2015, 11:52
Hi jayvi,

I forgot to comment on


Note the DHCLIENT_PRIMARY_DEVICE which is supposed to protect the default route.

Here is the configuration for eth2
[CODE]BOOTPROTO='static'
[...][(CODE]


please note that the mentioned option relates to having more than a single interface configured to use DHCP - which is not what you're having. "DHCLIENT_*" options are, as the name implies, options handled by "dhclient". eth2, in your case, is configured statically, so no dhclient there and no handling of DHCLIENT_* options...

Regards,
Jens

mikenash
08-May-2015, 18:17
I had problems with multiple nics and resolved them with information from this document.
Document ID:
7007649
Applying SLES 11 SP 1 Causing Communication Issues