Routing Tables (IOS)
- Displays all known IP routes the routers uses to send packets.
- Details Each Route. It lists the destination network, mask, the next hop(or interface), and potentially the admin distance and metric.
- Shows routes sources, indicating how each was learned, and connection. For example, directly connected(C), static(S), or dynamic (EIGRP(D)/OSPF(O)). Use
<?>For full list. - Displays metric for listed route
- Ordered top to by bottom by protocol with low to high in each
Vocabulary
-
Directly Connected(C) - As expected, when two IP interfaces(ports on router/L3 switch) are assigned IP’s and are UP. For example, Ether/FastEther/GigabitEther, point to point connections, SVI’s, subinterfaces, port/ether channels, these are all networks directly connected to the given interface. It does not mean what’s connected to the device, it is the interface itself.
-
Local(L) - Tied to direct connections receiving and loopbacks. If any traffic needs to go to the router for processing it will be sent to the (L) address. For example, if (C) is 192.168.1.0/24, (L) will fill as 192.168.1.1/32. /32 being used as only one allowable IP address. (C) is the interface forwarding, (L) is meant for the router itself Always has a /32 mask
-
Static(S) - An manually assigned route. Used for small networks when a topology doesn’t change often, networks with only one way in/ out(stub networks), default routes to ISP’s, security/high control, backup routes, and lab/testing environments.
-
Default Route - . Also known as Gateway of Last Resort. It is where traffic will be sent if there’s no specific match in the routing table. If there is no default route, that packet will be dropped. Essentially “Send everything I don’t know here”. * denotes a candidate for the default, there can be multiple. 0.0.0.0 = Any network /0 = no specific bits.
-
Network Prefix - Also known as the network ID. The portion of an IP address that identifies a network. It specifies the network portion of an IP address, guiding routers to the correct network for data transmission. Expressed in CIDR.
-
Administrative Distance - The trustworthiness score for routing information sources. If multiple sources say OSPF, RIP, Static are all telling a router to “go this way”, AD will make the decision. If routes have the same AD score, metric will make break the tie. It is only used when routing info is coming from multiple sources. AD is local to each router. Lower = Better.
-
Metric - AD is which route should I trust, while Metric is which path is best within what I’m trusting(this OSPF route vs this OSPF route.) Metrics differ by protocol. Lower = Better.
-
RIP(R) - Largely obsolete, but still used due to simplicity, resource usage, and with small networks. Has a max hop of 16, takes a long time to adapt to topology changes, sends entire routing table every 30 seconds. Mostly seen in legacy networks, small simple networks, teaching. Uses hop count only as Metric.
-
OSPF(O) - Open Shortest Path First/Link-State interior gateway. OSPF works by the finding the best route based on bandwidth/speed(cost), not just hop count and always choosing that path. Routers share info about the network, building a map, then calculates the best route. Routing tables only update when something changes. Has a fast convergence, great for medium-large internal networks. Metric used is cost, based on Bandwidth.
Administrative Distance
| Route | AD | |
|---|---|---|
| Default | 0 | |
| Static | 1 | |
| BGP | 20 | |
| EIGRP | 90 | |
| OSPF | 110 | |
| RIP | 120 | |
| iBGP | 200 | |
Notes
- Routers cannot add a connected route to the routing table unless the interface is in an “up and up” state. The following steps enable R2’s two interfaces.