-4

I'm trying to understand the meaning of this output:

[user@ip-10-1-3-12 ~]$ ip route 
default via 10.1.3.1 dev eth0 
default via 10.1.0.1 dev eth2  metric 10002 
10.1.0.0/16 dev eth2  proto kernel  scope link  src 10.1.200.200 
10.1.3.0/24 dev eth0  proto kernel  scope link  src 10.1.3.12 
169.254.169.254 dev eth0 
user1071840
  • 125
  • 1
  • 1
  • 8

1 Answers1

1

The default lines indicate where the default routes point. You have more than one, that can have some odd side-effects, most systems only have one. The metric statistic tells the routing table that the second 'default' route is expensive, and means it won't send traffic down it.

eth2 and eth0 appear to be on overlapping subnets, with eth0 on the most specific one. That's suggestive that it is the real one, especially since the default route without a 'metric' on it belongs to that adapter.

You also tagged your question , so in that context "associating a subnet with a network interface" means taking a network interface, which is a discrete thing you attach to Instances, and attaching it to a defined subnet in a VPC somewhere. You can attach multiple network interfaces to a machine and thus different subnets, but the Instance and the Subnets all need to be in the same Availability Zone.

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
  • Thank you for clarification. The issue I'm facing is that the vpc where I created this ENI has the same subnet as the target VPC. So it's possible that the ENI I'm working with has the same IP as the host it is attached to. – user1071840 Aug 19 '14 at 19:50