In this section of the campus network design series we're going to be talking about routing basics. We'll be going through the different routing concepts such as: what are routers? what is routing? what is forwarding? some different definitions regarding routing and also some routing protocols. What is a router? A router is a layer 3 device that is used for interconnecting networks at layer 3. A router generally has at least two interfaces. When you're using VLANs a router can have only one interface known as "router on a stick". A router will look at the destination address of the ip packet and decide how to forward it. What is a routing table? Each router or host has a routing table indicating the path or the next hop of a given destination host or network. The router or host will try to match the destination address of the packet against the entries in the routing table. If there's a match it will forward it to the corresponding gateway router or directly to destination hosts a default route is taken if no other entry matches the destination address. As you can see in the screen this is an example of a routing table. It will consist of a destination address, the next hop and also the interface to be used for forwarding the packet to the destination address. As you can see on the screen this routing table has seven different entries. You have the 10.40.0016 network and you can see that the last line is pointing to the default route what is ip routing ip routing is basically finding the path for the ip packet a routing table entry is created by the administrator or received from a routing protocol. If it's created by the administrator, it's known as a static route; if it's received from the routing protocol, it's known as a dynamic route. More than one routing protocol may run in a router which routing protocol builds its own routing table known as the local routing information base or rip several alternative paths may exist but the best path is selected for the router's global routing table decisions are updated periodically or as topology changes decisions are based on the topology policies and metrics such as hub count filtering delay bandwidth etc what is an iep route lookup ib route loop lookups are based on destination ib addresses long as much routing is typically used this means that more specific prefix is preferred over the less specific prefix for example a packet with destination ip address of 172 32 is sent to the router announcing 172.16.1.0.24 rather than the router announcing 172.60 remember like we said the most specific prefix is preferred over the less specific one as you can see on the screen an ip packet arrives at router r1 with a destination ip address of 172.16.1.1 this packet is forwarded to router r2 and router r2's routing table is displayed on the screen the routing table has four prefixes the first prefix is 172.16.0.0.16 with a next hop of router r3 you also have prefix 172.60 with an xtop of router r4 there's also 172.18.0.0.16 for the next level of router r5 and you have 172.19.0.0 slash 16 with the next top of router r6 as you can see the first prefix 172.16.0.0 16 which is pointing to router r3 is a match because you have the ip address 172.16.1.1 within its range the second prefix 172.16.1.0.24 which is has a next up of router r4 it's also a match since 172.16.1.1 also exists within its range the next prefix 172.18.0.0 16. pointing to a next upper router r5 and the fourth one of 172.19.0.0 slide 16 with the next stop of route r6 do not match so remember the rule is the longest match wins. So the prefix 172 16.1.0 24 is the one that is selected.
© Produced by Philip Smith and the Network Startup Resource Center, through the University of Oregon.
Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
This is a human-readable summary of (and not a substitute for) the license. Disclaimer. You are free to: Share — copy and redistribute the material in any medium or format Adapt — remix, transform, and build upon the material The licensor cannot revoke these freedoms as long as you follow the license terms. Under the following terms: Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. NonCommercial — You may not use the material for commercial purposes. No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.