I came across a question in Self Test Software for MS Exam 70-642
Which command adds route to destination server, with IP address 10.51.0.0 and subnet mask of 255.255.0.0. Next hop should be 10.23.0.1 in the IP routing table
Choices
- route add 10.51.0.0. mask 255.255.0.0 10.23.0.1 if 0x3
- route add 10.51.0.0. mask 255.255.0.0 10.23.0.1 metric 7
- route add 10.51.0.0. mask 255.255.0.0 10.23.0.1
- route =p add 10.51.0.0. mask 255.255.0.0 10.23.0.1
I understand that
- route add 10.51.0.0. mask 255.255.0.0 10.23.0.1
Is the correct answer
But I do not understand what is interface 0x3
I thought that the IPv4 address of a computer just goes into a single interface. When I google this, I get https://answers.yahoo.com/question/index?qid=20080517041705AAOmJPu, where it explains
if you're on a windows machine Press Start > Run > Type : CMD > Type : Route Print , Press Enter
now as you see before the active routes table (routing table) you see your interface list , normally the first one is for loopback and the rest of your network interfaces are listed after that like this 0x1............................MSTCP Loopback Interface 0x2 [MAC Address] [Model of NIC] 0x3 [MAC Address] [Model of NIC] 0x4 [MAC Address] [Model of NIC] and so on (depending on how many NIC's you have)
1,2,3,4, ... are the index numbers of your interface card
normally they are used for adding routes to the route table , when adding routes make sure you choose the right index number for the NIC youre trying to add the route for !!
Since when do we need to add interface when adding a route to IP table? I never heard of this before. Please clarify.