I recently added a second NIC and IP address to one of my VPS but I am having troubles getting it to setup properly and getting it respond to inquiries.
Here is my setup for /etc/network/interfaces
Code:
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
metric 2
address 209.141.43.211
netmask 255.255.255.0
gateway 209.141.43.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8 8.8.4.4
dns-search mt-gaming.com
auto eth1
iface eth1 inet static
metric 3
address 198.251.80.25
netmask 255.255.255.0
gateway 198.251.80.1
dns-nameservers 8.8.8.8 8.8.4.4
Here is what ifconfig displays
Code:
eth0 Link encap:Ethernet HWaddr 00:16:3c:d1:70:e2
inet addr:209.141.43.211 Bcast:209.141.43.255 Mask:255.255.255.0
inet6 addr: fe80::216:3cff:fed1:70e2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:16706 errors:0 dropped:0 overruns:0 frame:0
TX packets:4192 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16856502 (16.8 MB) TX bytes:555020 (555.0 KB)
eth1 Link encap:Ethernet HWaddr 00:16:3c:df:54:6d
inet addr:198.251.80.25 Bcast:198.251.80.255 Mask:255.255.255.0
inet6 addr: fe80::216:3cff:fedf:546d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2870 errors:0 dropped:0 overruns:0 frame:0
TX packets:236 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1042288 (1.0 MB) TX bytes:12016 (12.0 KB)
route -n and ip route show
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 209.141.43.1 0.0.0.0 UG 2 0 0 eth0
0.0.0.0 198.251.80.1 0.0.0.0 UG 3 0 0 eth1
198.251.80.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
209.141.43.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Code:
default via 209.141.43.1 dev eth0 metric 2
default via 198.251.80.1 dev eth1 metric 3
198.251.80.0/24 dev eth1 proto kernel scope link src 198.251.80.25
209.141.43.0/24 dev eth0 proto kernel scope link src 209.141.43.211
I can ping google.com with eth0 (ping -I eth0 google.com) and everything works fine, but attempting to do with eth1 results in From 198.251.80.25 icmp_seq=1 Destination Host Unreachable.
I suspect part of the problem may be that I have two default routes, but I get the same icmp error when I remove the gateway for the second NIC in /etc/network/interfaces. Also, no matter what I do, I am unable to ping the second IP address from the rest of the internet. Could the problem be that I have not yet setup reverse DNS for the second IP address? I didn't think this would be necessary but I'm starting to grasp at straws here.
For what it's worth, the goal here is to have the second NIC/IP address be used as a GRE tunnel to another server. Any and all help would be greatly appreciated.
Bookmarks