I am trying to use a statically-assigned address on one interface (eth1) of a server and have a dhcp-assigned address on another interface (eth2) on the same subnet (172.17.11.0/24).
When I setup a static IP for eth1 (following the directions found on http://www.cyberciti.biz/faq/rhel-centos-fedoracore-linux-network-card-configuration), I entered the following into /etc/sysconfig/network-scripts/ifcfg-eth1
:
# ServerEngines Corp. Emulex OneConnect 10Gb NIC (be3)
DEVICE=eth1
BOOTPROTO=static
DHCPCLASS=
HWADDR=00:21:5A:9B:00:41
IPADDR=172.17.11.203
NETMASK=255.255.255.0
#TYPE=ethernet
ONBOOT=yes
If eth1 is the only adapter running, I cannot ping ANY external IP :(
When eth2 is also running, I can ping external addresses.
ifconfig
returns the following:
eth1 Link encap:Ethernet HWaddr 00:21:5A:9B:00:41
inet addr:172.17.11.203 Bcast:172.17.11.255 Mask:255.255.255.0
inet6 addr: fe80::221:5aff:fe9b:41/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4747 errors:0 dropped:0 overruns:0 frame:0
TX packets:5495 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:447100 (436.6 KiB) TX bytes:1059019 (1.0 MiB)
Memory:fbf60000-fbf80000
eth2 Link encap:Ethernet HWaddr 00:21:5A:9B:00:42
inet addr:172.17.11.245 Bcast:172.17.11.255 Mask:255.255.255.0
inet6 addr: fe80::221:5aff:fe9b:42/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6745 errors:0 dropped:0 overruns:0 frame:0
TX packets:10802 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1260318 (1.2 MiB) TX bytes:12302950 (11.7 MiB)
Memory:fbe40000-fbe60000
The contents of /etc/sysconfig/network
:
HOSTNAME=<redacted>
NETWORKING=yes
NETWORKING_IPV6=no
GATEWAY=172.17.11.1
Am I missing something super obvious? If so, what is it?
Edit per request with eth2
down
# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
172.17.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 172.17.11.1 0.0.0.0 UG 0 0 0 eth1
and with both interfaces up:
# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
172.17.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
172.17.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth2
0.0.0.0 172.17.11.1 0.0.0.0 UG 0 0 0 eth2
netstat -rn
from when only eth1 is active? It is probable that the default gateway is not being set.0.0.0.0 172.17.11.1 0.0.0.0 UG 0 0 0 eth1