# Cisco Networking/CCENT/Dynamic Routing

This lesson covers dynamic routing using RIP, EIGRP, and OSPF.

## Objectives and Skills

Objectives and skills for the OSPF portion of Cisco CCENT certification include:
* Differentiate methods of routing and routing protocols
** Static vs. dynamic
** Link state vs. distance vector
** Next hop
** Ip routing table
** Passive interfaces (how they work)
* Configure and verify OSPF (single area)
** Benefit of single area
** Configure OSPv2 in a single area
** Configure OSPv3 in a single area
** Router ID
** Passive interface

## Readings

* Wikipedia: Dynamic routing
* Wikipedia: Routing Information Protocol
* Wikipedia: Enhanced Interior Gateway Routing Protocol
* Wikipedia: Open Shortest Path First
* Cisco: Introduction to Dynamic Routing Protocols
* Cisco: Routing Information Protocol
* Cisco: Enhanced Interior Gateway Routing Protocol
* Cisco: Open Shortest Path First

## Multimedia

* YouTube: Static and Dynamic Routing - CompTIA Network+ N10-005: 1.4
* YouTube: Link State, Distance Vector, and Hybrid Routing Protocols - CompTIA Network+ N10-005: 1.4
* YouTube: Routing Metrics - CompTIA Network+ N10-005: 1.4
* YouTube: Convergence - CompTIA Network+ N10-005: 1.4
* YouTube: Understanding RIP - CompTIA Network+ N10-005: 1.4
* YouTube: Understanding EIGRP - CompTIA Network+ N10-005: 1.4
* YouTube: Understanding OSPF - CompTIA Network+ N10-005: 1.4
* Cisco: Introducing the OSPF Protocol
* Cisco: OSPF Troubleshooting Neighbor Adjacencies
* YouTube: How to configure Routing RIP on Cisco Routers
* YouTube: RouterGods - Basic of OSPF configuration on Cisco routers

## Examples
### RIP Configuration
#### router rip

To configure the Routing Information Protocol (RIP) routing process, use the router rip command in global configuration mode.

#### network

To specify a list of networks for the Routing Information Protocol (RIP) routing process, use the network command in router configuration mode. RIP sends updates to the interfaces in the specified networks.

#### Command Sequence

A command sequence to configure dynamic routing using RIP might be similar to the following. Routing must typically be configured on source, intermediate, and destination network routers for responses to be received.

### EIGRP Configuration
#### router eigrp

To configure the Enhanced Interior Gateway Routing Protocol (EIGRP) routing process, use the router eigrp command in global configuration mode.

#### network

To specify the network for an Enhanced Interior Gateway Routing Protocol (EIGRP) routing process, use the network command in router configuration mode or address-family configuration mode.

#### Command Sequence

A command sequence to configure dynamic routing using EIGRP might be similar to the following. Routing must typically be configured on source, intermediate, and destination network routers for responses to be received.

### OSPF Configuration
#### router ospf

To configure an Open Shortest Path First (OSPF) routing process, use the router ospf command in global configuration mode.

#### network area

To define the interfaces on which Open Shortest Path First (OSPF) runs and to define the area ID for those interfaces, use the network area command in router configuration mode.

#### router-id

To use a fixed router ID, use the router-id command in router configuration mode.

#### passive-interface

To disable sending routing updates on an interface, use the passive-interface command in router configuration mode.

#### show ip ospf

To display general information about OSPF routing processes, use the show ip ospf command in EXEC mode.

#### ipv6 ospf area

To enable Open Shortest Path First version 3 (OSPFv3) on an interface, use the ip v6 ospf area command in interface configuration mode.

#### Command Sequence

A command sequence to configure dynamic routing using OSPF might be similar to the following. Routing must typically be configured on source, intermediate, and destination network routers for responses to be received.

## Activities

* Complete the Cisco Open Shortest Path First training tutorial.
* Configure and test RIP routing.
** Add three routers and two VPCS PCs to a new GNS3 project.
** Add links to connect the following.
*** PC1 Ethernet0 <-> R1 FastEthernet0/0
*** R1 FastEthernet0/1 <-> R2 FastEthernet0/0
*** R2 FastEthernet0/1 <-> R3 FastEthernet0/0
*** PC2 Ethernet0 <-> R3 FastEthernet0/1
** Start the devices.
** Set the following IP addresses, subnet masks, and for the PCs, default gateways
*** R1 FastEthernet0/0 = 192.168.1.1 255.255.255.0
*** R1 FastEthernet0/1 = 192.168.2.1 255.255.255.0
*** R2 FastEthernet0/0 = 192.168.2.2 255.255.255.0
*** R2 FastEthernet0/1 = 192.168.3.1 255.255.255.0
*** R3 FastEthernet0/0 = 192.168.3.2 255.255.255.0
*** R3 FastEthernet0/1 = 192.168.4.1 255.255.255.0
*** PC1 Ethernet0 = 192.168.1.11 255.255.255.0 192.168.1.1
*** PC2 Ethernet0 = 192.168.4.11 255.255.255.0 192.168.4.1
** Display the routing tables using the following command.
*** show ip route
** Test the configuration using the following commands from the routers and the PCs. Test all router and PC addresses. Only the connected routes should be successful.
*** ping
*** trace
** Add RIP routing to all routers using the following commands.
*** router rip
*** network
** Display the routing tables using the following command.
*** show ip route
** Test the configuration using the following commands from the routers and the PCs. Test all router and PC addresses. All tests should be successful.
*** ping
*** trace
* Configure and test EIGRP routing.
** Add three routers and two VPCS PCs to a new GNS3 project (or disable RIP from above using no router rip and then skip down to display the routing tables).
** Add links to connect the following.
*** PC1 Ethernet0 <-> R1 FastEthernet0/0
*** R1 FastEthernet0/1 <-> R2 FastEthernet0/0
*** R2 FastEthernet0/1 <-> R3 FastEthernet0/0
*** PC2 Ethernet0 <-> R3 FastEthernet0/1
** Start the devices.
** Set the following IP addresses, subnet masks, and for the PCs, default gateways
*** R1 FastEthernet0/0 = 192.168.1.1 255.255.255.0
*** R1 FastEthernet0/1 = 192.168.2.1 255.255.255.0
*** R2 FastEthernet0/0 = 192.168.2.2 255.255.255.0
*** R2 FastEthernet0/1 = 192.168.3.1 255.255.255.0
*** R3 FastEthernet0/0 = 192.168.3.2 255.255.255.0
*** R3 FastEthernet0/1 = 192.168.4.1 255.255.255.0
*** PC1 Ethernet0 = 192.168.1.11 255.255.255.0 192.168.1.1
*** PC2 Ethernet0 = 192.168.4.11 255.255.255.0 192.168.4.1
** Display the routing tables using the following command.
*** show ip route
** Test the configuration using the following commands from the routers and the PCs. Test all router and PC addresses. Only the connected routes should be successful.
*** ping
*** trace
** Add EIGRP routing to all routers using the following commands.
*** router eigrp
*** network
** Display the routing tables using the following command.
*** show ip route
** Test the configuration using the following commands from the routers and the PCs. Test all router and PC addresses. All tests should be successful.
*** ping
*** trace
* Configure and test OSPF routing.
** Add three routers and two VPCS PCs to a new GNS3 project (or disable RIP or EIGRP from above using no router rip or no router eigrp and then skip down to display the routing tables).
** Add links to connect the following.
*** PC1 Ethernet0 <-> R1 FastEthernet0/0
*** R1 FastEthernet0/1 <-> R2 FastEthernet0/0
*** R2 FastEthernet0/1 <-> R3 FastEthernet0/0
*** PC2 Ethernet0 <-> R3 FastEthernet0/1
** Start the devices.
** Set the following IP addresses, subnet masks, and for the PCs, default gateways
*** R1 FastEthernet0/0 = 192.168.1.1 255.255.255.0
*** R1 FastEthernet0/1 = 192.168.2.1 255.255.255.0
*** R2 FastEthernet0/0 = 192.168.2.2 255.255.255.0
*** R2 FastEthernet0/1 = 192.168.3.1 255.255.255.0
*** R3 FastEthernet0/0 = 192.168.3.2 255.255.255.0
*** R3 FastEthernet0/1 = 192.168.4.1 255.255.255.0
*** PC1 Ethernet0 = 192.168.1.11 255.255.255.0 192.168.1.1
*** PC2 Ethernet0 = 192.168.4.11 255.255.255.0 192.168.4.1
** Display the routing tables using the following command.
*** show ip route
** Test the configuration using the following commands from the routers and the PCs. Test all router and PC addresses. Only the connected routes should be successful.
*** ping
*** trace
** Add OSPF routing to all routers using the following commands.
*** router ospf
*** network area
** Display the routing tables using the following command.
*** show ip route
** Test the configuration using the following commands from the routers and the PCs. Test all router and PC addresses. All tests should be successful.
*** ping
*** trace

## Lesson Summary

* Dynamic or adaptive routing involves automatic updating of routing tables based on information carried by routing protocols.
* Routing protocols are divided into interior and exterior protocols. Interior protocols are further divided into distance-vector protocols and link-state protocols. Distance-vector routing protocols are simple and efficient in small networks. Larger networks use link-state routing protocols.
* Distance-vector routing protocols require that a router informs its neighbors of topology changes periodically. Each link is assigned a numeric distance or cost value, and information is shared among neighboring routers to accumulate a total cost to a given destination.
* Link-state protocols require that a router inform all the nodes in a network of topology changes. Each node shares information regarding the nodes it can connect to with the entire network so that each node can build its own network map and determine for itself the least cost path to any given node.
* Routing Information Protocol (RIP) is a distance-vector routing protocol which employs the hop count as a routing metric. RIP uses the User Datagram Protocol (UDP) as its transport protocol, and is assigned the reserved port number 520.
* Enhanced Interior Gateway Routing Protocol (EIGRP) is a Cisco proprietary advanced distance-vector routing protocol, with optimizations to minimize both the routing instability incurred after topology changes, as well as the use of bandwidth and processing power in the router.
* Open Shortest Path First (OSPF) is a link-state routing protocol. OSPF does not use a TCP/IP transport protocol (UDP, TCP), but is encapsulated directly in IP datagrams with protocol number 89.
* OSPFv2 covers IPv4 networks. OSPFv3 adds support for IPv6.
* To configure the Routing Information Protocol (RIP) routing process, use the router rip command in global configuration mode.
* To specify a list of networks for the Routing Information Protocol (RIP) routing process, use the network command in router configuration mode. RIP sends updates to the interfaces in the specified networks.
* To configure the Enhanced Interior Gateway Routing Protocol (EIGRP) routing process, use the router eigrp command in global configuration mode.
* To specify the network for an Enhanced Interior Gateway Routing Protocol (EIGRP) routing process, use the network command in router configuration mode or address-family configuration mode.
* To configure an Open Shortest Path First (OSPF) routing process, use the router ospf command in global configuration mode.
* To define the interfaces on which Open Shortest Path First (OSPF) runs and to define the area ID for those interfaces, use the network area command in router configuration mode.
* To use a fixed router ID, use the router-id command in router configuration mode.
* To disable sending routing updates on an interface, use the passive-interface command in router configuration mode.
* To display general information about OSPF routing processes, use the show ip ospf command in EXEC mode.
* To enable Open Shortest Path First version 3 (OSPFv3) on an interface, use the ip v6 ospf area command in interface configuration mode.

## Key Terms
### Area Border Router (ABR)

    An OSPF router that maintains separate link state databases for each area it serves and maintains summarized routes for all areas in the network.

### classful routing protocol

    A routing protocol that identifies networks based on the first four bits of the network address.

### classless routing protocol

    A routing protocol that identifies networks based on the network address and a variable length subnet mask.

### convergence

    The state of a set of routers that have the same topological information about the internetwork in which they operate.

### distance vector

    A routing protocol in which each node builds a table of relative distance and/or performance to other networks based on shared routing information.

### interior gateway protocol (IGP)

    A type of protocol used to exchange routing information between routers within an autonomous system.

### link-state

    A routing protocol in which every node constructs a map of network connectivity showing which nodes are connected to which other nodes and then each node independently calculates the best logical path from it to every possible destination network..

### link-state advertisement (LSA)

    The OSPF method of communicating a router's local routing topology to all other local routers in the same OSPF area.

### link-state database (LSDB)

    Contains descriptions of the topology of the OSPF autonomous system or area.

### metric

    The distance vector routing protocol measure of distance or performance for each route.

### neighbor router ID (RID)

    A value used to reference neighbor routers, which will default to neighbor's the highest logical IP address if not explicitly configured.

### routed protocol

    A protocol is used to deliver network traffic.

### routing protocol

    A protocol which specifies how routers communicate with each other, disseminating information that enables them to select routes between any two nodes on a connected network.

### Shortest Path First (SPF) algorithm

    An algorithm used to determine the shortest paths from the source node to all other nodes in the connected network.

## Review Questions

* Dynamic or adaptive routing involves _____. Dynamic or adaptive routing involves automatic updating of routing tables based on information carried by routing protocols.
* Routing protocols are divided into _____ and _____ protocols. _____ protocols are further divided into _____ protocols and _____ protocols. _____ routing protocols are simple and efficient in small networks. Larger networks use _____ routing protocols. Routing protocols are divided into interior and exterior protocols. Interior protocols are further divided into distance-vector protocols and link-state protocols. Distance-vector routing protocols are simple and efficient in small networks. Larger networks use link-state routing protocols.
* Distance-vector routing protocols require _____. Distance-vector routing protocols require that a router informs its neighbors of topology changes periodically. Each link is assigned a numeric distance or cost value, and information is shared among neighboring routers to accumulate a total cost to a given destination.
* Link-state protocols require _____. Link-state protocols require that a router inform all the nodes in a network of topology changes. Each node shares information regarding the nodes it can connect to with the entire network so that each node can build its own network map and determine for itself the least cost path to any given node.
* Routing Information Protocol (RIP) is _____. Routing Information Protocol (RIP) is a distance-vector routing protocol which employs the hop count as a routing metric. RIP uses the User Datagram Protocol (UDP) as its transport protocol, and is assigned the reserved port number 520.
* Enhanced Interior Gateway Routing Protocol (EIGRP) is _____. Enhanced Interior Gateway Routing Protocol (EIGRP) is a Cisco proprietary advanced distance-vector routing protocol, with optimizations to minimize both the routing instability incurred after topology changes, as well as the use of bandwidth and processing power in the router.
* Open Shortest Path First (OSPF) is _____. Open Shortest Path First (OSPF) is a link-state routing protocol. OSPF does not use a TCP/IP transport protocol (UDP, TCP), but is encapsulated directly in IP datagrams with protocol number 89.
* OSPFv2 covers _____ networks. OSPFv3 adds support for _____. OSPFv2 covers IPv4 networks. OSPFv3 adds support for IPv6.
* To configure the Routing Information Protocol (RIP) routing process, use _____. To configure the Routing Information Protocol (RIP) routing process, use the router rip command in global configuration mode.
* To specify a list of networks for the Routing Information Protocol (RIP) routing process, use _____. To specify a list of networks for the Routing Information Protocol (RIP) routing process, use the network command in router configuration mode. RIP sends updates to the interfaces in the specified networks.
* To configure the Enhanced Interior Gateway Routing Protocol (EIGRP) routing process, use _____. To configure the Enhanced Interior Gateway Routing Protocol (EIGRP) routing process, use the router eigrp command in global configuration mode.
* To specify the network for an Enhanced Interior Gateway Routing Protocol (EIGRP) routing process, use _____. To specify the network for an Enhanced Interior Gateway Routing Protocol (EIGRP) routing process, use the network command in router configuration mode or address-family configuration mode.
* To configure an Open Shortest Path First (OSPF) routing process, use _____. To configure an Open Shortest Path First (OSPF) routing process, use the router ospf command in global configuration mode.
* To define the interfaces on which Open Shortest Path First (OSPF) runs and to define the area ID for those interfaces, use _____. To define the interfaces on which Open Shortest Path First (OSPF) runs and to define the area ID for those interfaces, use the network area command in router configuration mode.
* To use a fixed router ID, use _____. To use a fixed router ID, use the router-id command in router configuration mode.
* To disable sending routing updates on an interface, use _____. To disable sending routing updates on an interface, use the passive-interface command in router configuration mode.
* To display general information about OSPF routing processes, use _____. To display general information about OSPF routing processes, use the show ip ospf command in EXEC mode.
* To enable Open Shortest Path First version 3 (OSPFv3) on an interface, use _____. To enable Open Shortest Path First version 3 (OSPFv3) on an interface, use the ip v6 ospf area command in interface configuration mode.

## Assessments

* Flashcards: Quizlet: CCENT - Dynamic Routing
* Quiz: Quizlet: CCENT - Dynamic Routing

## See Also

* Internet Protocol Analysis/Routing