# 11. Route

Router

* connect multiple networks
* determine the best path to send packets&#x20;
  * longest match
  * the path with the lowest metric
    * hop count
    * cost
    * bandwidth, delay, load, reliability
  * administrative distance (AD)&#x20;
    * the lower, the more trustworthy
* forward packets toward their destination (routing table)
  * process switching
  * fast switching
  * express forwarding&#x20;
* forwarding decision
  * Forwards the Packet to a Device on a Directly Connected Network
  * Forwards the Packet to a Next-Hop Router
  * Forwards the Packet to default route
  * Drops the Packet - No Match in Routing Table

Routing Table

* Directly connected routes&#x20;
  * Local Route interfaces&#x20;
* Remote routes&#x20;
* Default route
* Each Route Entry
  * Route source
  * Destination network
  * Administrative distance
  * Metric&#x20;
  * Next-hop
  * Outgoing interface &#x20;
  * timestamp

Routing Protocol

* Static
  * manually configured
    * Stub networks
      * ip route dest-network subnet-mask next-hop
      * ip route dest-network subnet-mask exit-interface&#x20;
      * ipv6 route dest-network/prefix-length next-hop
      * ipv6 route dest-network/prefix-length exit-interface&#x20;
    * summarizing route
    * backup route
      * higher administrative distance than primary route
    * default route
      * ip route 0.0.0.0 0.0.0.0 next-hop
      * ip route 0.0.0.0 0.0.0.0 exit-interface
      * ipv6 route ::/0 next-hop
      * ipv6 route ::/0 exit-interface
* Dynamic
  * automatically updated routing table
    * network discovery
    * maintaining routing tables
  * components
    * Data structures&#x20;
    * Routing protocol messages&#x20;
    * Algo
  * classification
    * Purpose
      * Interior Gateway Protocol (IGP)
        * RIP, OSPF, eIGRP
      * Exterior Gateway Protocol (EGP)
        * BGP
    * Operation
      * distance vector
        * RIPv1, RIPv2, EIGRP
      * link-state
    * OSPF
    * behavior
      * classful
      * classless

![](https://1515939446-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M_AEyEcue-ZdfPiP9yt%2F-MdCmvuj6wUPKmlwHOnB%2F-MdCoeiTo1mykmaUwon9%2Fimage.png?alt=media\&token=87d9782d-48bb-4429-b39e-8bebc2ce1225)

![](https://1515939446-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M_AEyEcue-ZdfPiP9yt%2F-MdCmvuj6wUPKmlwHOnB%2F-MdComh4Uq77F1mr5di_%2Fimage.png?alt=media\&token=5fb554e4-4df1-464d-a584-2fddbc816192)
