I have a CentOS 7 vm with two NICs: eth0 and eth1. The second NIC will eventually host seven static IPs defined as: eth1:202..eth1:208.
I presently have eth1:202 up and running. Here's the address:
Code: Select all
# ip a | grep 202
inet 10.0.0.202/24 brd 10.0.0.255 scope global secondary eth1:202
Code: Select all
# ping -I 10.0.0.202 10.0.0.4
PING 10.0.0.4 (10.0.0.4) from 10.0.0.202 : 56(84) bytes of data.
^C
--- 10.0.0.4 ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms
# ping -I 10.0.0.202 10.0.0.5
PING 10.0.0.5 (10.0.0.5) from 10.0.0.202 : 56(84) bytes of data.
^C
--- 10.0.0.5 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
The route-eth1:202 file contains one line:For Linux VMs, when trying to validate outbound connectivity from a secondary NIC, you may need to add appropriate routes.
Code: Select all
10.0.0.0/32 via 10.0.0.202 dev eth1:202 src 10.0.0.202
Code: Select all
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
10.0.0.0 10.0.0.202 255.255.255.255 UGH 0 0 0 eth1
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
168.63.129.16 10.0.0.1 255.255.255.255 UGH 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
169.254.169.254 10.0.0.1 255.255.255.255 UGH 0 0 0 eth0
Continuing, I am still unable to ping my gateway via this device:
Code: Select all
# ping -I 10.0.0.202 10.0.0.4
PING 10.0.0.4 (10.0.0.4) from 10.0.0.202 : 56(84) bytes of data.
^C
--- 10.0.0.4 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
Code: Select all
# ping -I 10.0.0.200 10.0.0.5
PING 10.0.0.5 (10.0.0.5) from 10.0.0.200 : 56(84) bytes of data.
64 bytes from 10.0.0.5: icmp_seq=1 ttl=64 time=1.59 ms
64 bytes from 10.0.0.5: icmp_seq=2 ttl=64 time=1.43 ms
64 bytes from 10.0.0.5: icmp_seq=3 ttl=64 time=0.865 ms
^C
--- 10.0.0.5 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 0.865/1.299/1.597/0.313 ms
Thanks for any help!