I have dual NIC machine running CentOS 6.7 and asterisk. First NIC is for LAN & Internet connectivity and second is for trunk provider's connectivity. Both of these have gateways configured. I don't seem to be able to access the Internet as the traffic is routed thru the Second NIC's gateway, also the second NIC is taken as default route by the kernel. I do not understand how default gateway is assigned in this case and what correction should I do.
Eth0 Config:
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.0.1
NETMASK=255.255.255.0
GATEWAY=192.168.0.100
DNS1=8.8.8.8
DNS2=8.8.4.4
Eth1 Config:
DEVICE=eth1
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=10.165.11.139
NETMASK=255.255.255.248
GATEWAY=10.165.11.137
Ping Internet
ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 10.165.11.137 icmp_seq=1 Destination Net Unreachable
Ping SIP Trunk
ping 10.232.130.170
PING 10.232.130.170 (10.232.130.170) 56(84) bytes of data.
64 bytes from 10.232.130.170 (10.232.130.170): icmp_seq=1 ttl=253 time=3.14 ms
Routing Table
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.165.11.136 * 255.255.255.248 U 0 0 0 eth1
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 1002 0 0 eth0
link-local * 255.255.0.0 U 1003 0 0 eth1
default 10.165.11.137 0.0.0.0 UG 0 0 0 eth1
Asked by user1263746
(516 rep)
Jan 1, 2019, 06:29 PM
Last activity: Apr 17, 2019, 07:48 AM
Last activity: Apr 17, 2019, 07:48 AM