kritt
July 24th, 2014, 09:49 AM
Triple NIC config:
p6p4: public IP
em1: behind router private IP (NAT)
em2: behind router private IP (NAT)
With the current settings, all NICs can ping their gateways through ping -I. Only p6p4 can ping public IPs (8.8.8.8).
If I comment out the p6p4 gateway line and I uncomment the em1, em1 can ping 8.8.8.8 but p6p4 can't.
How can I ping public IPs from both interfaces? Any advise would be greatly appreciated!
interfaces:
auto p6p4
iface p6p4 inet static
address 82.x.x.x
netmask 255.255.x.x
gateway 82.x.x.x
auto em1
iface em1 inet static
address 192.168.207.11
netmask 255.255.255.0
network 192.168.207.0
dns-nameservers x.x.x.x x.x.x.x
#gateway 192.168.207.1
up route add -net 192.168.207.0 netmask 255.255.255.0 gw 192.168.207.1 dev em1
auto em2
iface em2 inet static
address 192.168.208.11
netmask 255.255.255.0
network 192.168.208.0
dns-nameservers x.x.x.x x.x.x.x
up route add -net 192.168.208.0 netmask 255.255.255.0 gw 192.168.208.1 dev em2
up route add -net 224.0.0.0/8 dev em2
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 82.102.93.77 0.0.0.0 UG 0 0 0 p6p4
82.102.93.76 0.0.0.0 255.255.255.252 U 0 0 0 p6p4
192.168.207.0 192.168.207.1 255.255.255.0 UG 0 0 0 em1
192.168.207.0 0.0.0.0 255.255.255.0 U 0 0 0 em1
192.168.208.0 192.168.208.1 255.255.255.0 UG 0 0 0 em2
192.168.208.0 0.0.0.0 255.255.255.0 U 0 0 0 em2
224.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 em2
//edit: I've tried a couple of solutions that I've found, using a table and adding ip route/rules for traffic originating from em1 IPs without avail.
p6p4: public IP
em1: behind router private IP (NAT)
em2: behind router private IP (NAT)
With the current settings, all NICs can ping their gateways through ping -I. Only p6p4 can ping public IPs (8.8.8.8).
If I comment out the p6p4 gateway line and I uncomment the em1, em1 can ping 8.8.8.8 but p6p4 can't.
How can I ping public IPs from both interfaces? Any advise would be greatly appreciated!
interfaces:
auto p6p4
iface p6p4 inet static
address 82.x.x.x
netmask 255.255.x.x
gateway 82.x.x.x
auto em1
iface em1 inet static
address 192.168.207.11
netmask 255.255.255.0
network 192.168.207.0
dns-nameservers x.x.x.x x.x.x.x
#gateway 192.168.207.1
up route add -net 192.168.207.0 netmask 255.255.255.0 gw 192.168.207.1 dev em1
auto em2
iface em2 inet static
address 192.168.208.11
netmask 255.255.255.0
network 192.168.208.0
dns-nameservers x.x.x.x x.x.x.x
up route add -net 192.168.208.0 netmask 255.255.255.0 gw 192.168.208.1 dev em2
up route add -net 224.0.0.0/8 dev em2
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 82.102.93.77 0.0.0.0 UG 0 0 0 p6p4
82.102.93.76 0.0.0.0 255.255.255.252 U 0 0 0 p6p4
192.168.207.0 192.168.207.1 255.255.255.0 UG 0 0 0 em1
192.168.207.0 0.0.0.0 255.255.255.0 U 0 0 0 em1
192.168.208.0 192.168.208.1 255.255.255.0 UG 0 0 0 em2
192.168.208.0 0.0.0.0 255.255.255.0 U 0 0 0 em2
224.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 em2
//edit: I've tried a couple of solutions that I've found, using a table and adding ip route/rules for traffic originating from em1 IPs without avail.