You'd normally have other devices that connect to the interfaces of the router which is why routers have interfaces in the first place. Routers are actually devices that connect different networks and so, the interfaces to which the other devices are connected use that interface as a gateway to get out onto other networks.
Routers do have an ip address for themself too....this is an IP that is configured on an interface but can be used to connect to the router remotely. It is known as a management IP and is normally the loopback IP.
There are seval reasons why each interface on a router has an IP address assigned:
1. The router serves as the default gateway on an IP subnet containing host devices. Therefore, it needs to have an IP address on the subnet so that the hosts on that subnet can communicate with hosts on other subsets.
2. Each link between adjacent routers is a separate IP subset, and so each router needs to have an IP address assigned to it. This IP address is used by the routing protocol for adjacency establishment, source IP of routing advertisements, next-hop information for routes, etc.
3. Links used to interconnect routers can utilize a feature called 'IP unnumbered', where the router uses a IP address configured on another interface as the IP address assigned to the particular interface. The primary issue with this deals with troubleshooting. If the interface does not have a unique IP address assigned to the interface, how can you verify connectivity via ping, traceroute, etc?
4. A physical interface on a router can have multiple IP addresses, if needed, by using 'secondary' IP addresses, or by creating sub interfaces on the physical interface. Again, this is used to provide distinct default gateway addresses for multiple IP subnets connecting to the router on a physical interface, or for a hub-spoke WAN topology.
Regarding an IP address for identifying the router: as others have said, any IP address in the router also identifies the router. However, a issue with this approach is that the router will use the outbound address closest to the destination as its' source IP, so the source address may change, depending on the destination. A best practice is to establish a Loopback interface (with a host or /32 IP address) as the Router ID, and configure various services on the router to use this IP address for the source address of packets originated by the router. An examples, assume that you create interface 'Loopback2' as your router ID. Then, use the following commands to use this as the source IP address for various services:
- ip tacacs source-interface loopback2
- ip flow-export source interface loopback2
- logging source-interface loopback2
- snmp-server trap-source loopback2
- ntp source loopback2
- ip telnet source-interface loopback2
Hope this helps.
- Every device running TCP/IP has an IP address for the TCP/IP stack. Only the interfaces require an IP address not the devices.
- So the interface of TCP/IP itself has the LOCALHOST IP address i.e. 127.0.0.1
- The device would have a connected route with physical interface IP as the next hop
- The localhost address (127.0.0.1) is not for testing and troubleshooting but for routing the packet from TCP/IP to the physical interface
- How often did we come across a situation when TCP/IP has failed and we nrequired to test and troubleshoot TCP/IP itself?
- The TCP/IP stack has no other way to directly learn about the phycial interfaces and their logical addresses
- The TCP/IP stack has no other way to directly learn whether a physical interface IP address is on the same device or out of it. So the TCP/IP itself has the LOCALHOST IP address i.e. 127.0.0.1 which is home address for itself
- It requires A CONSTANT ADDRESS AS THE ORIGIN, THE HOME ADDRESS TO INITIALIZE
For the TCP/IP stack, every other address, even the addresses of physical or logical interfaces on the same device are foreign to it.
Experts' opinion please?
Actually you are quite right, you dont need an IP address on an interface. All thats really required is the router be able to resolve the exit interface for a particular destination. all route is a table with a hop or a hole, once a destination prefix is determined, all the router determines is the exit interface (hole) to que the packet on.
only broadcast, multi access protocols technologies need to resolve a destination layer 2 address. ie IP uses arp to resolve a destination MAC.
point to point links dont need a destination MAC, and non broadcast multi access protocols use other technologies like Lane services for ATM. to map destinations to interfaces.
configuration is fairly simple, search "ip unnumbered" and the cisco site will kick out dozens of applications
here is a link to a tech note that might help: http://www.cisco.com/c/en/us/support/docs/ip/hot-standby-router-protocol-hsrp/13786-20.html