© Chris Carthern and William Wilson and Noel Rivera 2021
C. Carthern et al.Cisco Networkshttps://doi.org/10.1007/978-1-4842-6672-4_12

12. Control Plane

Chris Carthern1  , William Wilson2 and Noel Rivera3
(1)
Bangkok, Krung Thep, Thailand
(2)
FPO, AP, USA
(3)
APO, AE, USA
 

Now that we have discussed the chicken, let’s discuss the egg. In earlier chapters, configuration examples and details about several control plane protocols were provided. This chapter discusses what it means to be a control plane protocol, how these protocols interact, and how to secure the control plane and provides additional configuration examples.

The control plane makes the decisions that the data plane uses when forwarding data. Typically, when one thinks about the control plane, routing protocols and the spanning tree come to mind. There are also control plane protocols that support other control plane functions. Two examples are Domain Name System (DNS) and Network Time Protocol (NTP). DNS provides name resolution, which is required to map names to logical addresses prior to making decisions on those addresses. NTP provides time synchronization, which is required by protocols that require time, such as time-based access control lists (ACLs) or authentication key chains.

Our discussion starts with the control plane at layer 2 and then moves up the protocol stack to the layer 3 control plane protocols. Due to the way protocols are intertwined, we will overlap with sections on routing and switching.

Layer 2

Even at layer 2, the data plane and control plane are interdependent. The control plane can’t function without the data plane, and the functionality of the data plane is limited to an inefficient local scope without the assistance of the control plane.

Ethernet loop prevention was discussed in Chapter 5. One technique for loop prevention is to physically design the network so loops aren’t possible. The more common technique is to use the Spanning Tree Protocol (STP ). The Ethernet will function without it, but at a risk of completely saturating the links with broadcast storms. To recap slightly, STP elects a root bridge, and then all other switches calculate the best path to the root bridge and block alternative paths. Per-VLAN Spanning Tree (PVST) helps minimize waste of bandwidth by calculating a tree for each VLAN. This allows for a different root and different paths for each VLAN. However, the resources required for PVST increase with each additional VLAN.

Multiple Spanning Tree (MST ) reduces the resource burden by grouping VLANs into spanning tree instances. This allows administrators to minimize bandwidth waste by having as many MST instances as redundant links, without the overhead of a spanning tree instance per VLAN. Another advantage of MST is that it is an open standard. One downside of MST is that an administrator needs to manually define each MST instance. The VLAN Trunking Protocol version 3 (VTPv3) helps minimize the administrative burden of maintaining consistent MST regions on each switch. In Chapter 5, we discussed VTP in the context of creating and removing VLANs. In this example, we will show how to use VTPv3 for distributing MST changes. In our example, we only configured VTP for MST and not for VLAN distribution:
Switch1(config)#spanning-tree mode mst
Switch1(config)#vtp domain APRESS
Switch1(config)#vtp version 3
Switch1(config)#
*Jun  2 06:20:21.156: %SW_VLAN-6-OLD_CONFIG_FILE_READ: Old version 2 VLAN configuration file detected and read OK.  Version 3 files will be written in the future.
Switch1(config)#vtp mode server mst
Setting device to VTP Server mode for MST.
Switch1(config)#exit
Switch1#vtp primary mst
This system is becoming primary server for feature  mst
No conflicting VTP3 devices found.
Do you want to continue? [confirm]
Switch1#
*Jun  2 06:25:04.611: %SW_VLAN-4-VTP_PRIMARY_SERVER_CHG: aabb.cc80.2100 has become the primary server for the MST VTP feature
Switch1#

PVST is Cisco proprietary. With that said, you can connect a Cisco switch that is part of a PVST domain with another vendor’s switch running MST. They will just use an interoperability mode to connect the trees. In addition to the improved resource utilization of MST over PVST, design limitations of the original Spanning Tree Protocol were addressed. MST includes features to detect changes much faster than the original STP. These changes are also present in Cisco’s Rapid Per-VLAN Spanning Tree. Switches with IOS-XE code greater than 16.x default to Rapid-PVST, even though we often still refer to it as PVST. Switches with earlier versions of code default to legacy PVST and should be changed to either MST or Rapid-PVST using the command spanning-tree mode {mst|rapid-pvst}.

A common issue with any type of spanning tree is in the default method for electing the root bridge. By default, the bridge with the lowest MAC address is elected as the root. This can lead to nonoptimal trees when bridge priorities are not manually configured. An example of this is shown in Figure 12-1. In this example, a low-end switch wins the root bridge election and causes the blocking of high-speed links.
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig1_HTML.jpg
Figure 12-1.

A bad switch design with a bad root bridge

In most cases, the default root bridge election results in a suboptimal choice of root bridges. To improve the tree, the bridge priority should be configured on switches that should win the election. The bridge with the lowest priority wins. To further improve the tree and eliminate the risk of nonoptimal or unknown devices taking the root role, layer 2 protocols such as BPDU Guard and Root Guard can be used.

Bridge Protocol Data Units (BPDUs ) are sent by switches. BPDU Guard protects against unknown switches. When BPDU Guard is enabled on a port, the port will be error disabled if a BPDU is received. This means that when a switch is connected to a port with BPDU Guard enabled, the port ceases to work. It is important to not confuse BPDU Guard with BPDU Filter. When BPDU Filter is configured on a port, the port will ignore any BPDUs. This can create loops when rogue switches are connected to the infrastructure. BPDU Guard can be configured globally or per port. To configure BPDU Guard globally, use the command spanning-tree portfast edge bpduguard default from the global configuration. This will make BPDU Guard a default on access ports. To configure BPDU Guard on a port, regardless of the portfast state, use the interface command spanning-tree bpduguard enable. Do not confuse bpduguard with bpdufilter. The bpdufilter option simply ignores BPDUs and can cause significant problems if used unintentionally.
Switch1(config)#int eth0/0
Switch1(config-if)#spanning-tree bpduguard enable
Switch1(config-if)#
*Mar  8 19:36:08.729: %SPANTREE-2-BLOCK_BPDUGUARD: Received BPDU on port Et0/0 with BPDU Guard enabled. Disabling port.
Switch1(config-if)#
*Mar  8 19:36:08.729: %PM-4-ERR_DISABLE: bpduguard error detected on Et0/0, putting Et0/0 in err-disable state
*Mar  8 19:36:09.734: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to down
Switch1(config-if)#
*Mar  8 19:36:10.73: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to down
If you don’t want to completely block BPDUs, another option is to use Root Guard. Root Guard will only put a port in error-inconsistent mode if it receives a superior BPDU on the port that would make the downstream device the root bridge. This option should not be used unless you have manually configured bridge priorities. If bridge priorities are left at the default setting and a new switch with a lower MAC address is added to the network, it will have a superior BPDU. When Root Guard is in use, it causes the new switch to be isolated from the existing root bridge.
Switch1(config-if-range)#int e0/0
Switch1(config-if)#spanning-tree guard root
Switch1(config-if)#
*Jun  2 06:06:17.347: %SPANTREE-2-ROOTGUARD_CONFIG_CHANGE: Root guard enabled on port Ethernet0/0.
*Jun  2 06:06:18.313: %SPANTREE-2-ROOTGUARD_BLOCK: Root guard blocking port Ethernet0/0 on VLAN0001.
Notice how Ethernet0/0 is now blocked, with the comment ROOT_Inc:
Switch1(config-if)#do show spanning-tree
VLAN0001
  Spanning tree enabled protocol rstp
  Root ID    Priority    24577
             Address     aabb.cc00.3100
             Cost        200
             Port        3 (Ethernet0/2)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     aabb.cc00.2100
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec
Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- -----------------------
Et0/0               Desg BKN*100       128.1    P2p *ROOT_Inc
Et0/1               Desg FWD 100       128.2    P2p
Et0/2               Root FWD 100       128.3    P2p
Et0/3               Desg BLK 100       128.4    P2p
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  15  sec

Layer 2 and 3 Interaction

Layer 2 loop prevention is important, but even with a non-looped layer 2 network, data cannot route to other networks without help from the control plane. The Address Resolution Protocol (ARP) is the glue between layer 2 and layer 3 for IPv4. Without ARP, you can’t really even statically route traffic, because you need ARP or static mapping to find the layer 2 address of the layer 3 next hop. Dynamic routing protocols depend on ARP just as much as static routing. The resulting Routing Information Base from dynamic protocols still needs ARP to determine the layer 2 addresses of the next hops, and you have the extra step of discovering neighbors and forming relationships. As we move to IPv6, ICMP neighbor discovery takes its place, but the concept is roughly the same.

A strictly layer 2 switch may not know about IP addresses of the hosts at all. The command show mac address-table will show you which port should be used to reach a host, but if the switch doesn’t have IP communication with a host, it will not show anything in the ARP table. This example shows a basic switch configuration where other MACs are seen, but it is not aware of any IP addresses:
Switch1#show mac address-table
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    aabb.cc01.a110    DYNAMIC     Et0/1
   1    aabb.cc01.c100    DYNAMIC     Et0/2
Total Mac Addresses for this criterion: 2
Switch1#show arp
Switch1#

Routing Protocols

Routing protocols were discussed in Chapter 6. These are all examples of control plane protocols. This chapter further discusses securing these protocols with access lists and authentication and also discusses a few more aspects about how the protocols function and interact. We will hit routing protocols once again in Chapter 14 where we discuss advanced topics.

Interior Gateway Protocols

Interior Gateway Protocols get their name because they are used between routers on the interior of a network. They operate within an autonomous system (AS ). The interior protocols have limited scalability, and in most cases, they can react quickly to network changes.

The manner in which they react to network changes can actually cause problems for large networks. For example, when a network change is detected by Open Shortest Path First (OSPF), it causes a recalculation on all of the routers in the area. This is a reason to keep areas small.

A way to mitigate the effect of network changes, which are often caused by unstable links, is to use incremental Shortest Path First (iSPF). With incremental SPF, the entire tree does not need to be calculated when a change occurs. Incremental SPF is enabled by simply entering the command ispf in the OSPF process:
Router(config)# router ospf 1
Router(config-router)# ispf

Even with the more efficient incremental calculation, you want to minimize how many LSAs are flooded. To recap from Chapter 6, Area Border Routers (ABRs) summarize the router and network LSAs into summary LSAs. The summaries reduce the effect of flapping links.

Notice in the following output how the ABR is generating summary LSAs for networks that are learned in one area and are passed to the other area:
ABR#debug ip ospf lsa-generation
ABR#clear ip ospf 1 process
*Mar 15 18:16:43.696: %OSPF-5-ADJCHG: Process 1, Nbr 223.2.2.2 on Ethernet0/0 from LOADING to FULL, Loading Done
ABR#
*Mar 15 18:16:43.696: OSPF-1 LSGEN: Scheduling rtr LSA for area 0
*Mar 15 18:16:44.152: OSPF-1 LSGEN: Build router LSA for area 0, router ID 223.1.1.1, seq 0x8000000A
*Mar 15 18:16:44.152: OSPF-1 LSGEN: Not DR on intf Ethernet0/0 to build Net LSA
*Mar 15 18:16:44.191: OSPF-1 LSGEN: Build router LSA for area 1, router ID 223.1.1.1, seq 0x8000000B
ABR#
*Mar 15 18:16:51.127: OSPF-1 LSGEN: Scheduling rtr LSA for area 0
*Mar 15 18:16:51.633: OSPF-1 LSGEN: No change in router LSA, area 0
ABR#
*Mar 15 18:16:53.692: OSPF-1 LSGEN: Build sum 192.168.13.0, mask 255.255.255.0, type 3, age 0, seq 0x80000001 to area 0
*Mar 15 18:16:53.692: OSPF-1 LSGEN: MTID      Metric      Origin          Topology Name
*Mar 15 18:16:53.692: OSPF-1 LSGEN: 0         10          intra-area      Base
*Mar 15 18:16:53.692: OSPF-1 LSGEN: Build sum 5.5.5.0, mask 255.255.255.0, type 3, age 0, seq 0x80000001 to area 1
*Mar 15 18:16:53.692: OSPF-1 LSGEN: MTID      Metric      Origin          Topology Name
*Mar 15 18:16:53.692: OSPF-1 LSGEN: 0         11          intra-area      Base
ABR#
*Mar 15 18:16:53.693: OSPF-1 LSGEN: Build sum 4.4.4.0, mask 255.255.255.0, type 3, age 0, seq 0x80000001 to area 1
*Mar 15 18:16:53.693: OSPF-1 LSGEN: MTID      Metric      Origin          Topology Name
*Mar 15 18:16:53.693: OSPF-1 LSGEN: 0         11          intra-area      Base
*Mar 15 18:16:53.693: OSPF-1 LSGEN: Build sum 192.168.12.0, mask 255.255.255.0, type 3, age 0, seq 0x80000001 to area 1
*Mar 15 18:16:53.693: OSPF-1 LSGEN: MTID      Metric      Origin          Topology Name
*Mar 15 18:16:53.693: OSPF-1 LSGEN: 0         10          intra-area      Base
ABR#
*Mar 15 18:17:23.687: OSPF-1 LSGEN: Scheduling network LSA on Ethernet0/1
*Mar 15 18:17:23.687: OSPF-1 LSGEN: Scheduling rtr LSA for area 1
*Mar 15 18:17:24.192: OSPF-1 LSGEN: No full nbrs on intf Ethernet0/1 to build Net LSA
*Mar 15 18:17:24.192: OSPF-1 LSGEN: No change in router LSA, area 1
ABR#
*Mar 15 18:17:25.620: %OSPF-5-ADJCHG: Process 1, Nbr 223.3.3.3 on Ethernet0/1 from LOADING to FULL, Loading Done
ABR#
*Mar 15 18:17:25.620: OSPF-1 LSGEN: Scheduling rtr LSA for area 1
*Mar 15 18:17:25.620: OSPF-1 LSGEN: Scheduling network LSA on Ethernet0/1
*Mar 15 18:17:26.127: OSPF-1 LSGEN: Build router LSA for area 1, router ID 223.1.1.1, seq 0x8000000C
*Mar 15 18:17:26.127: OSPF-1 LSGEN: Build network LSA for Ethernet0/1, router ID 223.1.1.1
ABR#
*Mar 15 18:17:30.626: OSPF-1 LSGEN: Build sum 7.7.7.0, mask 255.255.255.0, type 3, age 0, seq 0x80000001 to area 0
*Mar 15 18:17:30.626: OSPF-1 LSGEN: MTID      Metric      Origin          Topology Name
*Mar 15 18:17:30.626: OSPF-1 LSGEN: 0         11          intra-area      Base
*Mar 15 18:17:30.626: OSPF-1 LSGEN: Build sum 6.6.6.0, mask 255.255.255.0, type 3, age 0, seq 0x80000001 to area 0
*Mar 15 18:17:30.626: OSPF-1 LSGEN: MTID      Metric      Origin          Topology Name
*Mar 15 18:17:30.626: OSPF-1 LSGEN: 0         11          intra-area      Base
ABR#
The resulting OSPF database on a router in Area 1 shows the summary LSAs generated by the ABR for networks in Area 0, but it does not show the router or network LSAs. If a route or link goes down in Area 0, but the network is still reachable, the summary LSAs generated by the ABR do not change.
A1_Router#show ip ospf database
            OSPF Router with ID (223.3.3.3) (Process ID 1)
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
223.1.1.1       223.1.1.1       624         0x8000000C 0x00F96F 1
223.3.3.3       223.3.3.3       623         0x8000000C 0x007F93 3
                Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.13.1    223.1.1.1       624         0x80000001 0x00AE65
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
4.4.4.0         223.1.1.1       717         0x80000001 0x0073CF
5.5.5.0         223.1.1.1       717         0x80000001 0x004FF0
192.168.12.0    223.1.1.1       655         0x80000001 0x00C317
A1_Router#

To further reduce the effect of topology changes, you can look at different area types. For example, a totally stubby area is used when there is only one way out of an area. In this case, the topology outside of the area isn’t relevant, and the ABR only needs to advertise a default route.

To configure an area as totally stubby, use the area <area_number> stub no-summary command on the ABR and area <area_number> stub on the other routers in the stub area. However, it is important to note that totally stubby areas can’t be a transit area (this is discussed more in Chapter 14). For now, let’s look at the output from an ABR for a totally stubby area. In this example, you can see that the ABR is building a summary LSA for the default network:
ABR#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
ABR(config)#router ospf 1
ABR(config-router)#area 1 stub no-summary
ABR(config-router)#
*Mar 15 18:39:50.408: OSPF-1 LSGEN: Build sum 0.0.0.0, mask 0.0.0.0, type 3, age 0, seq 0x80000001 to area 1
*Mar 15 18:39:50.408: OSPF-1 LSGEN: MTID      Metric      Origin          Topology Name
*Mar 15 18:39:50.408: OSPF-1 LSGEN: 0         1           intra-area      Base
When you look at a router inside the area, you only see the summary LSA for the default network, and all other summaries are suppressed:
A1_Router#show ip ospf database
            OSPF Router with ID (223.3.3.3) (Process ID 1)
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
223.1.1.1       223.1.1.1       776         0x8000000E 0x001455 1
223.3.3.3       223.3.3.3       774         0x8000000E 0x009979 3
                Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
192.168.13.1    223.1.1.1       772         0x80000003 0x00C84B
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         223.1.1.1       803         0x80000001 0x00BD9D
A1_Router#
You know that Area 0 is the backbone area, but what does that mean? From a control plane perspective, it means that all ABRs must have an interface in the backbone area, Area 0. This is part of the loop prevention design. If you attempt to configure an ABR that does not have an Area 0 interface, the route will not be propagated between areas. In the example shown in Figure 12-2, A1_Router is configured as an ABR between Area 1 and Area 2. A1_Router sees the intra-area network advertised by A2_Router, but it does not send it on to the Area 0 ABR.
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig2_HTML.jpg
Figure 12-2.

Area Border Routers

You can see this loop prevention mechanism at work when looking at a route originated in Area 2. In the following snippet, you see the route:
A1_Router#show ip route 8.8.8.0
Routing entry for 8.8.8.0/24
  Known via "ospf 1", distance 110, metric 11, type intra area
  Last update from 192.168.34.4 on Ethernet0/1, 00:01:37 ago
  Routing Descriptor Blocks:
  * 192.168.34.4, from 223.4.4.4, 00:01:37 ago, via Ethernet0/1
      Route metric is 11, traffic share count is 1
A1_Router#
When you look for the route on the ABR between Area 0 and Area 1, it isn’t there. That is because A1_Router could not advertise the route it learned from Area 2 into Area 1:
ABR#show ip route 8.8.8.0
% Network not in table
ABR#

There is a way to work around this scalability issue in OSPF’s control plane; this is with virtual links. A virtual link creates a control plane tunnel that is part of Area 0. This special tunnel only allows OSPF control plane traffic and no data plane traffic. A virtual link is configured by specifying the area over which it will tunnel and the router ID of the peer ABR. These tunnels can even be configured in serial to hop over several areas, but if your design includes a series of areas that are not attached to Area 0, you should rethink your design. Virtual links are usually employed as Band-Aid fixes for merging topologies and are usually dispensed with when an outage can be incurred and the topology reconfigured.

The following example shows the configuration of a virtual link tunneling over Area 1, between the ABRs. In this case, A1_Router is an ABR for Areas 1 and 2; at least it will be once it has an Area 0 virtual link:
ABR(config)#router ospf 1
ABR(config-router)#area 1 virtual-link 223.3.3.3
A1_Router(config)#router ospf 1
A1_Router(config-router)# area 1 virtual-link 223.1.1.1
After adding the virtual link, you see the neighbor relationship for the virtual link:
A1_Router(config-router)#
*Mar 15 19:56:09.645: %OSPF-5-ADJCHG: Process 1, Nbr 223.1.1.1 on OSPF_VL1 from LOADING to FULL, Loading Done
A1_Router(config-router)#do show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
223.1.1.1         0   FULL/  -           -        192.168.13.1    OSPF_VL1
223.1.1.1         1   FULL/DR         00:00:36    192.168.13.1    Ethernet0/0
223.4.4.4         1   FULL/BDR        00:00:31    192.168.34.4    Ethernet0/1
A1_Router(config-router)#
Did you notice the dead time in the neighbor adjacency? It isn’t there because virtual links run as on-demand circuits. This means that it won’t send hellos once the link is up. This can cause some interesting issues when trying to troubleshoot, especially when authentication is changed in Area 0.
A1_Router(config-router)#do show ip ospf virtual-links
Virtual Link OSPF_VL1 to router 223.1.1.1 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface Ethernet0/0
 Topology-MTID    Cost    Disabled     Shutdown      Topology Name
        0           10        no          no            Base
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:04
    Adjacency State FULL (Hello suppressed)
    Index 1/3, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec
A1_Router(config-router)#

Another way to reach the backbone area from a remote area is to use a data plane tunnel. Using this option, you don’t need transit areas, so you can make better use of summarization, but this can also lead to suboptimal routing. Tunneling and the interarea route selection process are discussed in Chapter 15.

The Enhanced Interior Gateway Routing Protocol (EIGRP ) has a different set of control plane advantages and disadvantages than OSPF. One disadvantage of EIGRP is that it was a Cisco proprietary protocol. It was opened by Cisco in 2013, so it hasn’t been fully adopted by other vendors yet. However, that isn’t a control plane issue.

EIGRP is an advanced distance-vector protocol. Chapter 6 mentions that it uses the Diffusing Update Algorithm (DUAL), but that chapter focuses more on implementation than control plane mechanisms. DUAL uses the concept of feasible distance and reported distance to determine optimal routes. The reported distance is the distance reported by a peer to get to a network. The feasible distance is the distance reported by the peer, including the distance to that peer. A route is a successor, which means it is eligible to be put in the routing table, if the reported distance is less than the feasible distance. Sounds confusing, right? When you look at the logic behind it, it is easy to understand. To use a physical example, you can get to Honolulu from Ewa Beach in 21.4 miles if your first turn is onto the H-1. So 21.4 miles would be your feasible distance. Someone tells you that they know a path that is 24 miles from where they are located. This is the reported distance. Not knowing anything other than distance, you can’t guarantee that they aren’t having you do a 2.6-mile loop and then come right back to your starting place. It isn’t necessarily a loop, but you can’t take the chance. On the other hand, if someone tells you that they know a path from their location that is 19 miles, there isn’t any way that they are going through the current location to get there.

In the previous example, you used miles as a distance. A better comparison to the distance used by EIGRP is to include speed limit and congestion. In many cases, it is actually physically further to take the highway than to take side roads, but you go faster on the highway. The same applies to networking. You don’t want to hop through legacy serial links or satellites when you can use an optical transport. With that in mind, the following is the legacy equation for calculating an EIGRP’s distance metric:

metric = ([K1 * scaled minimum bandwidth + (K2 * scaled minimum bandwidth ) / (256 – load) + K3 * scaled delay] * [K5 / (reliability + K4)]) * 256

The K values correspond to binary settings configured on the EIGRP process. The default is K1 = 1 and K3 = 1, and the rest are 0. When K5 = 0, that portion of the equation is ignored, rather than multiplying by 0. This simplifies the default distance metric calculation to the following:

metric = scaled minimum bandwidth + scaled delay
R1#show ip protocols  | section eigrp
Routing Protocol is "eigrp 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Default networks flagged in outgoing updates
  Default networks accepted from incoming updates
  EIGRP-IPv4 VR(APRESS) Address-Family Protocol for AS(1)
    Metric weight K1=1, K2=0, K3=1, K4=0, K5=0 K6=0
    Metric rib-scale 128
    Metric version 64bit
    NSF-aware route hold timer is 240
    Router-ID: 192.168.1.1
    Topology : 0 (base)
      Active Timer: 3 min
      Distance: internal 90 external 170
      Maximum path: 4
      Maximum hopcount 100
      Maximum metric variance 1
      Total Prefix Count: 3
      Total Redist Count: 0
R1#

Take another look at the preceding output from show ip protocols. There are some differences from the output you saw in Chapter 6. This is due to configuring EIGRP using named mode instead of autonomous system mode. In the case of EIGRP, using the different configuration methods makes minor changes to the protocol. The main changes are the introduction of a wide metric and a K6 value. The values for delay and bandwidth in the previously shown equation are actually scaled. The problem with the legacy scaling is that any interface above 1 Gbps will have the same scaled bandwidth. The 64-bit-wide metric improves this limitation by changing the scale by a factor of 65536. This raises the point where links become equal to 4.2 terabits. One issue is that unless all routers in the autonomous system are configured to use the wide metric, they will revert to the legacy metric. A word of caution when you get to redistribution: Many example documents use redistribution metrics of “1 1 1 1 1”. This does not work with wide metrics.

Another issue with the default behavior of EIGRP is seen in tunnels. The default bandwidth for a GRE tunnel is 8000 Kbps, and the default delay is 50000 usec. The primary problem resulting from these default values is the risk that the EIGRP process may choose a path that looks better to it when the tunnel is configured.
R1#show interfaces tunnel 0  | include DLY|bandwidth
  MTU 17916 bytes, BW 100 Kbit/sec, DLY 50000 usec,
  Tunnel transmit bandwidth 8000 (kbps)
  Tunnel receive bandwidth 8000 (kbps)
R1#
Chances are that tunnel defaults are not correct. To improve the accuracy of EIGRP over tunnels, you should estimate the maximum throughput and total delay and then set the values on the tunnel interface.
R1(config)#interface Tunnel 0
R1(config-if)#delay 4000
R1(config-if)#tunnel bandwidth transmit 100000
If you feel that the default K values don’t work for you, they can be easily changed. However, setting K5 to 1 may reduce the stability of EIGRP, as reliability can change. The command to change the K values is simply metric weights 0 K1 K2 K3 K4 K5 K6. If you change the K values anywhere, you need to change them on the entire autonomous system. If you don’t set all the K values consistently, the reported distances will not properly compare. In this case, routing loops and suboptimal routing can occur, assuming EIGRP is stable enough to even converge. Many versions of IOS will prevent this issue by blocking neighbor relationships if the K values do not match.
Router1(config)# interface eth 0/0
Router1(config-if)# ip address 192.168.1.1 255.255.255.0
Router1(config-if)# exit
Router1(config)# router eigrp APRESS
Router1(config-router)# address-family ipv4 autonomous-system 1
Router1(config-router-af)# network 192.168.1.0 0.0.0.255
Router1(config-router-af)# metric weights 0 2 0 1 0 0 1
What happens if EIGRP isn’t stable? When EIGRP routes are calculating, they are considered active. When they are stable, they are called passive. This is not to be confused with a passive interface. In the case of routes, you want them to be passive. When the EIGRP topology grows too large or there are instability issues, routes can become stuck in active. Stuck in active means that EIGRP has sent out queries for a route, but the neighbor hasn’t replied. This can be caused by overloaded router CPUs or oversaturated links. The worst part is that it can cause a rippling effect, where the number of queries keeps increasing. If your EIGRP topology is getting to the point that you are hitting stuck in active problems, you should either break it down into multiple autonomous systems or limit the scope of queries using stubs. With eigrp stub, you can prevent or limit the queries altogether based on criteria such as the source of the network or on administratively defined lists of prefixes. Cisco even helps you a bit with EIGRP design. Some layer 3 switches with basic licenses only support stub routing.
 R2(config-router-af)#eigrp stub ?
  connected      Do advertise connected routes
  leak-map       Allow dynamic prefixes based on the leak-map
  receive-only   Set receive only neighbor
  redistributed  Do advertise redistributed routes
  static         Do advertise static routes
  summary        Do advertise summary routes
  <cr>
A nice feature about EIGRP is its support for multipath routing. By default, it supports Equal Cost Multipath (ECMP) routing. With use of the variance command, you can enable unequal cost path load balancing. The variance command sets the threshold for the difference in metrics. By default, the actual load balancing share is calculated by the actual ratio of metrics. Now to add some confusion.
R2(config-router-af)#topology base
R2(config-router-af-topology)#variance ?
  <1-128>  Metric variance multiplier
R2(config-router-af-topology)#traffic-share ?
  balanced  Share inversely proportional to metric
  min       All traffic shared among min metric paths
Regardless of the value set for variance, a route will not be used in multipath routing if it is not a successor. This is for loop prevention. Otherwise, a router might try to load balance over a looping path. If you are trying to load balance over unequal paths that you know aren’t looped, look at your bandwidth and delay along the paths. You can also force a change to the metrics using route maps.
R1(config)#ip access-list standard MYNETWORKS
R1(config-std-nacl)#permit 10.0.0.0 0.0.0.255
R1(config-std-nacl)#permit 10.1.0.0 0.0.0.255
R1(config-std-nacl)#route-map CHANGE_METRIC
R1(config-route-map)#match ip address MYNETWORKS
R1(config-route-map)#set metric ?
  +/-<metric>     Add or subtract metric
  <0-4294967295>  Metric value or Bandwidth in Kbits per second
R1(config-route-map)#set metric 100000000 1 255 1 1500
R1(config-route-map)#router eigrp APRESS
R1(config-router)# address-family ipv4 unicast autonomous-system 1
R1(config-router-af)#topology base
R1(config-router-af-topology)#distribute-list route-map CHANGE_METRIC in
The feasible successor test isn’t the only loop prevention mechanism in EIGRP. Three other loop prevention mechanisms are split horizon, external administrative distance, and router ID checks. The rule of split horizon is simple. When split horizon is enabled, the router won’t advertise a route out the same interface where it was learned. In cases of point-to-point or broadcast networks, this makes sense. In the case of multipoint non-broadcast networks, this prevents a hub from distributing routes to its spokes. The most common contemporary example where you need to disable split horizon is with Dynamic Multipoint Virtual Private Networks (DMVPNs). These types of networks have hub routers that must learn and distribute the same routes out of a single tunnel interface. Regardless of the reason, the configuration to disable split horizon is simple.
! Legacy (or classic) mode EIGRP
R2(config)#interface Tunnel0
R2(config-if)#no ip split-horizon eigrp 1
!! NOTE: It will accept this command when using named mode, but it won’t work.
! Name mode EIGRP
R2(config-if)#router eigrp APRESS
R2(config-router)# address-family ipv4 unicast autonomous-system 1
! In named mode, we configure the split horizon in the address family interface mode
R2(config-router-af)#af-interface Tunnel0
R2(config-router-af-interface)#no split-horizon

The external administrative distance and EIGRP router IDs are both used for loop prevention during redistribution. The default administrative distance of EIGRP is 90, but when the route is external, it has a default administrative distance of 170. This means that an internal route will always be considered before the external route and will mitigate issues from arbitrary metrics set during redistribution. With EIGRP, the router ID is primarily used with redistributed routes. When a router tries to redistribute a route that has its router ID, it will discard it as a loop. Assuming there aren’t duplicate router IDs, it would be correct in this assumption. In older versions of IOS, the router ID was only checked during redistribution. Starting in 15.x, the router ID was also checked with internal EIGRP.

Last, and in this case least, let’s discuss some control plane aspects of RIP. RIP is rarely used in live networks anymore, and with an administrative distance of 120, it loses to internal EIGRP and OSPF. When dynamic routing was young and routers didn’t have many resources, RIP’s simplicity provided its value. Even in modern networks, where all links are equal, it can be a viable protocol. When the link speeds are not equal, RIP quickly loses value. The simple hop count metric used by RIP is similar to using a count of the number of roads to get to a destination. By RIP’s logic, it is better to take H-1 to Highway 72 to get to Waimanalo from Aiea, because of the road count of two. However, if you take average speed into account, the better route is H-201 to H-3 to Highway 83 to Highway 72, which is a road count of four.

Even though RIP is not a link-state protocol, it still has mechanisms to quickly propagate information about a lost network. RIP has a maximum hop count of 15. A hop count of 16 is considered infinite. To remove a route before it naturally ages off, RIP uses route poisoning. With route poisoning, it will advertise a route that it wants to withdraw using the infinite metric of 16. Figure 12-3 shows a capture of a packet with the route to 1.1.1.0/24 withdrawn. Notice the metric of 16. Since RIP version 2 has triggered updates, this pushes the withdrawn network immediately instead of waiting for the route to be marked as invalid in 3 minutes (by default).
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig3_HTML.jpg
Figure 12-3.

RIP route poisoning

The routing control plane isn’t just about exchanging routes. It also includes security for those route exchanges. Most of the protocols have built-in security controls such as TTL checks and authentication. In addition to those built-in mechanisms, you can also use access lists to protect the control plane.

For example, OSPF packets should typically only be transmitted on a local segment. If there is a concern that an intruder may try to inject information into OSPF, you can check TTL. For protocols that only need a TTL of 1, and they are normally sent with a TTL of 1, an intruder can craft a packet so it has a TTL of 1 by the time it arrives. If you change the rule and say that you expect a packet to arrive with a TTL of 254, it is more difficult for an intruder to inject a packet. This is because the maximum TTL is 255 and the value would be decremented if it passed through any routers.

The following is an example of configuring a TTL check on the OSPF process. It can also be configured on a per-interface basis. In this example, the OSPF neighbor adjacency went down as soon as ttl-security was enabled with a maximum hop count of 1:
R1(config)#router ospf 1
R1(config-router)#ttl-security all-interfaces hops ?
  <1-254>  maximum number of hops allowed
R1(config-router)#ttl-security all-interfaces hops 1
R1(config-router)#
*Mar 19 07:10:56.710: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.23.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
R1(config-router)#do debug ip ospf adj
OSPF adjacency debugging is on
R1(config-router)#
*Mar 19 07:11:41.582: OSPF-1 ADJ   Et0/0: Drop packet from 192.168.12.2 with TTL: 1
R1(config-router)#
*Mar 19 07:11:50.920: OSPF-1 ADJ   Et0/0: Drop packet from 192.168.12.2 with TTL: 1
R1(config-router)#
*Mar 19 07:12:00.593: OSPF-1 ADJ   Et0/0: Drop packet from 192.168.12.2 with TTL: 1
The reason the link went down is because the feature isn’t configured on the neighbor yet, so it is still sending out packets with a TTL of 1. The router with ttl-security assumes that the router is sending packets with a TTL of 255 and that it has gone through 254 hops. In order to implement ttl-security nondisruptively, configure all routers using a maximum hop count of 254. Once the feature has been enabled on all routers, you can remove the hop count parameter.
R1(config-router)#ttl-security all-interfaces hops 254
R1(config-router)#
*Mar 19 07:19:55.976: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.23.2 on Ethernet0/0 from LOADING to FULL, Loading Done
R1(config-router)#
Some security can also be added by using manually configured neighbors. If the OSPF network type is set to non-broadcast, then it won’t be able to find its neighbors unless their unicast addresses are configured.
R2(config-router)#int eth0/0
R2(config-if)#ip ospf network non-broadcast
When changing OSPF network types, make sure to configure them on both sides of the link. Changing the OSPF network type may change timers that must match. In the example of an Ethernet interface, the default network type is broadcast, which has a default timer of 10 seconds.
R2(config-if)#do show ip ospf interface eth0/0 | include Timer
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
R2(config-if)#do show ip ospf interface eth0/1 | include Timer
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
R2(config-if)#
When you add a manual neighbor statement, the OSPF adjacency comes up. An interesting point is that only one side needs to have a neighbor statement. When the other side receives the unicast hello, it will respond and the adjacency will form.
R2(config-if)#router ospf 1
R2(config-router)#neighbor 192.168.12.1
R2(config-router)#
*Mar 19 07:33:10.033: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.12.1 on Ethernet0/0 from LOADING to FULL, Loading Done
To really secure the links, you need to use authentication. OSPFv2 includes three authentication modes: null, plaintext, and MD5 authentication. Null authentication is the default and just means that there isn’t any authentication. Plaintext provides very little security, because the password is actually sent on in plaintext.
R2(config)#router ospf 1
R2(config-router)#area 0 authentication
R2(config-router)#int eth0/0
R2(config-if)#ip ospf authentication-key Apress
If you configured authentication on R2, but you haven’t yet configured it on R1, R1 will see an authentication type mismatch. Once you add authentication to R1, the error changes. The new error says that the key mismatches. This is because R1 still has a blank key.
R1(config)#do debug ospf adj
*Mar 19 07:56:45.947: OSPF-1 ADJ   Et0/0: Rcv pkt from 192.168.12.2 : Mismatched Authentication type. Input packet specified type 1, we use type 0
R1(config)#router ospf 1
R1(config-router)#area 0 authentication
*Mar 19 07:59:06.343: OSPF-1 ADJ   Et0/0: Rcv pkt from 192.168.12.2,  : Mismatched Authentication Key - Clear Text
R1(config-router)#
At least OSPF is secure enough to not show the password it received in the adjacency debug. Unfortunately, the plaintext password is being broadcast, so it isn’t difficult to retrieve.
R1#monitor capture buffer GETPASS circular
R1#monitor capture point ip process-switched OSPF in
R1#monitor capture point associate OSPF GETPASS
R1#monitor capture point start all
R1#show monitor capture buffer GETPASS dump
22:10:49.216 HST Mar 18 2015 : IPv4 Process    : Et0/0 None
B518FBA0: 01005E00 0005AABB CC000200 080045C0  ..^...*;L.....E@
B518FBB0: 004C02F1 00000159 08F9C0A8 0C02E000  .L.q...Y.y@(..`.
B518FBC0: 00050201 002CC0A8 17020000 00004848  .....,@(......HH
B518FBD0: 00014170 72657373 0000FFFF FF00000A  ..Apress........
B518FBE0: 12010000 00                          .....
Message Digest authentication prevents the password from being sent in clear text. It is configured by turning authentication on the area and then setting the key.
R1(config)#router ospf 1
R1(config-router)#area 0 authentication message-digest
R1(config-router)#int eth0/0
R1(config-if)#ip ospf message-digest-key 1 md5 Apress
R2(config)#router ospf 1
R2(config-router)#area 0 authentication message-digest
R2(config-router)#int eth0/0
R2(config-if)#ip ospf message-digest-key 1 md5 Apress
*Mar 19 08:21:19.685: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.12.1 on Ethernet0/0 from LOADING to FULL, Loading Done
R2(config-if)#
Using MD5 authentication, the password, or key, is not sent in plaintext. Instead, the contents of the OSPF packet are hashed using the configured key. The neighbor runs the secure hash algorithm when it receives the packet and verifies that the hash matches. This not only protects the confidentiality of the password, but it also assures the integrity of the OSPF packet. Figure 12-4 shows an example of an authenticated OSPF packet.
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig4_HTML.jpg
Figure 12-4.

OSPF MD5 authentication

Tip

OSPF authentication is enabled on the area. Virtual links are part of Area 0 and must use Area 0’s authentication. This is often forgotten, and due to the on-demand nature of virtual links, the problem likely won’t present itself immediately.

The configuration of OSPFv3 is close to OSPFv2, but it has a few improvements. OSPFv3 does not need to use TTL security because it uses IPv6 link-local addresses for its transport. Link-local addresses only have a local scope. TTL security is only available for virtual links and sham links. It improves authentication using stronger encryption. Instead of using a simple hash, it can either encrypt the entire payload or authenticate the packet using AES or DES.

Similar to OSPF, EIGRP can be configured with static neighbors and with authentication. When static neighbors are configured, multicast hellos are disabled and replaced with unicast hellos. The following example shows a basic EIGRP configuration. Notice that the hello packets have a destination of EIGRP multicast address 224.0.0.10:
Router1#show run | section router eigrp
router eigrp 1
 network 0.0.0.0
Router1#
Router2#show run | section router eigrp
router eigrp 1
 network 0.0.0.0
Router2#debug ip packet
*Mar 22 18:30:47.789: IP: s=192.168.12.1 (Ethernet0/0), d=224.0.0.10, len 60, rcvd 0
*Mar 22 18:30:47.789: IP: s=192.168.12.1 (Ethernet0/0), d=224.0.0.10, len 60, input feature, packet consumed,
When you set up a static neighbor statement on Router1, the static peer replaces the multicast. You can see this both in the console message on Router1 and the debug on Router2:
Router1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#router eigrp 1
Router1(config-router)#neighbor 192.168.12.2 ethernet 0/0
Router1(config-router)#
*Mar 22 18:34:14.837: %DUAL-5-NBRCHANGE: EIGRP-IPv4 1: Neighbor 192.168.12.2 (Ethernet0/0) is down: Static peer replaces multicast
Router2#
*Mar 22 18:34:40.687: IP: s=192.168.12.2 (local), d=224.0.0.10 (Ethernet0/0), len 60, local feature, Logical MN local(14), rtype 0, forus FALSE, sendself FALSE, mtu 0,   fwdchk  FALSE
*Mar 22 18:34:40.687: IP: s=192.168.12.2 (local), d=224.0.0.10 (Ethernet0/0), len 60, sending broad/multicast
*Mar 22 18:34:40.687: IP: s=192.168.12.2 (local), d=224.0.0.10 (Ethernet0/0), len 60, sending full packet
*Mar 22 18:34:42.522: IP: s=192.168.12.1 (Ethernet0/0), d=192.168.12.2, len 60, rcvd 0
*Mar 22 18:34:42.522: IP: s=192.168.12.1 (Ethernet0/0), d=192.168.12.2, len 60, input feature, packet consumed, MCI Check(99), rtype 0, forus FALSE, sendself FALSE, mtu 0, fwdchk FALSE
With EIGRP, both sides need the neighbor statement. The preceding debug output shows that Router1 is sending unicast, but Router2 is sending multicast, so a neighbor adjacency doesn’t form. Once you configure the neighbor statement on both routers, the adjacency is established using unicast:
Router2#undebug all
All possible debugging has been turned off
Router2#show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(1)
Router2# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router2(config)#router eigrp 1
Router2(config-router)#neighbor 192.168.12.1 ethernet 0/0
Router2(config-router)#
*Mar 22 18:50:15.516: %DUAL-5-NBRCHANGE: EIGRP-IPv4 1: Neighbor 192.168.12.1 (Ethernet0/0) is up: new adjacency
Router2(config-router)#do show ip eigrp neighbor
EIGRP-IPv4 Neighbors for AS(1)
H   Address                 Interface            Hold Uptime   SRTT   RTO  Q      Seq
                                                 (sec)         (ms)        Cnt    Num
0   192.168.12.1            Et0/0                13 00:00:06    17    102  0      19
Router2(config-router)#
Router2(config-router)#do debug ip packet
IP packet debugging is on
Router2(config-router)#
*Mar 22 18:50:47.842: IP: s=192.168.12.2 (local), d=192.168.12.1 (Ethernet0/0), len 60, local feature, Logical MN local(14), rtype 0, forus FALSE, sendself FALSE, mtu 0, fwdchk FALSE
*Mar 22 18:50:47.842: IP: s=192.168.12.2 (local), d=192.168.12.1 (Ethernet0/0), len 60, sending
*Mar 22 18:50:47.842: IP: s=192.168.12.2 (local), d=192.168.12.1 (Ethernet0/0), len 60, sending full packet
Router2(config-router)#
*Mar 22 18:50:49.005: IP: s=192.168.12.1 (Ethernet0/0), d=192.168.12.2, len 60, rcvd 0
*Mar 22 18:50:49.005: IP: s=192.168.12.1 (Ethernet0/0), d=192.168.12.2, len 60, input feature, packet consumed, MCI Check(99), rtype 0, forus FALSE, sendself FALSE, mtu 0, fwdchk FALSE
Router2(config-router)#

In modern versions of IOS and IOS-XE, both named mode and classic mode EIGRP are available. This causes some complications with EIGRP authentication. An issue that many engineers encounter with this version is that it allows you to enter classic mode authentication commands, even when the EIGRP process was created in named mode, but it will not apply to the EIGRP process. With named mode EIGRP, all configuration is done under the router EIGRP process.

The following example shows authentication using classic mode EIGRP. In this case, the configuration is applied to the interface:
Router1#show run interface ethernet 0/0
Building configuration...
Current configuration : 147 bytes
!
interface Ethernet0/0
 ip address 192.168.12.1 255.255.255.0
 ip authentication mode eigrp 1 md5
 ip authentication key-chain eigrp 1 MYKEY
end
Router1#
Router2#show run interface ethernet 0/0
Building configuration...
Current configuration : 147 bytes
!
interface Ethernet0/0
 ip address 192.168.12.2 255.255.255.0
 ip authentication mode eigrp 1 md5
 ip authentication key-chain eigrp 1 MYKEY
end
Router2# show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(1)

At this point, you aren’t done. The EIGRP configuration references a key chain. The string at the end of the command is the name of the key chain and not the key itself. This makes it easier to rotate keys. Using a key chain, you can configure keys to have overlapping lifetimes, which reduces the risk of a router sending a key that the other router doesn’t accept.

In the following example, key 1 was accepted for the entirety of 2020, but it was only sent until March 20, 2020. Key 2 was configured to start sending on March 15, 2015, but it was accepted as early as March 1, 2020. Assuming both routers are configured identically and have the correct time, they both should have started sending the new key on March 15. With this overlap, the time doesn’t even need to be perfect. It just needs to be close enough that the other router will still accept the sent key:
Router1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#key chain MYKEY
Router1(config-keychain)#key 1
Router1(config-keychain-key)#key-string Apress
Router1(config-keychain-key)#accept-lifetime 00:00:00 Jan 1 2020 23:59:59 December 31 2020
Router1(config-keychain-key)#$send-lifetime 00:00:00 Jan 1 2020 23:59:59 March 20 2020
Router1(config-keychain)#key 2
Router1(config-keychain-key)#key-string Publisher
Router1(config-keychain-key)#accept-lifetime 00:00:00 March 1 2020 23:59:59 December 31 2021
Router1(config-keychain-key)#$send-lifetime 00:00:00 March 15 2020 23:59:59 March 20 2021
Router2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router2(config)#key chain MYKEY
Router2(config-keychain)#key 1
Router2(config-keychain-key)#key-string Apress
Router2(config-keychain-key)#accept-lifetime 00:00:00 Jan 1 2020 23:59:59 December 31 2020
Router2(config-keychain-key)#$send-lifetime 00:00:00 Jan 1 2020 23:59:59 March 20 2020
Router2(config-keychain)#key 2
Router2(config-keychain-key)#key-string Publisher
Router2(config-keychain-key)#accept-lifetime 00:00:00 March 1 2020 23:59:59 December 31 2021
Router2(config-keychain-key)#$send-lifetime 00:00:00 March 15 2020 23:59:59 March 20 2021
Router1(config-keychain-key)#
*Mar 22 19:50:40.727: %DUAL-5-NBRCHANGE: EIGRP-IPv4 1: Neighbor 192.168.12.2 (Ethernet0/0) is up: new adjacency
If the adjacencies don’t come up, you can verify the key using show key chain <name>. This works even when service password-encryption is enabled on the router. It is also useful because it puts quotes around the password. When looking at the configuration without password encryption, it is difficult to see when there are spaces at the end of the password.
Router1#show key chain MYKEY
Key-chain MYKEY:
    key 1 -- text "Apress"
        accept lifetime (00:00:00 UTC Jan 1 2020) - (23:59:59 UTC Dec 31 2020) [valid now]
        send lifetime (00:00:00 UTC Jan 1 2020) - (23:59:59 UTC Mar 20 2020)
    key 2 -- text "Publisher"
        accept lifetime (00:00:00 UTC Mar 1 2020) - (23:59:59 UTC Dec 31 2021) [valid now]
        send lifetime (00:00:00 UTC Mar 15 2020) - (23:59:59 UTC Mar 20 2021) [valid now]
Router1#
Tip

This is also a good way to recover type 7 encrypted passwords found elsewhere in a configuration. This only works with type 7 encryption, not the stronger type 5 that uses an MD5 hash. Type 7 encryption is the protection obtained when service password-encryption is enabled. If you are using AES to encrypt pre-shared keys, this technique will not work.

    Router2(config)#do show run | inc username
    username Apress password 7 13350210070517222E36
    Router2(config)#key chain DECRYPT
    Router2(config-keychain)#key 1
    Router2(config-keychain)#key-string 7 13350210070517222E36
    Router2(config-keychain-key)#end
    Router2#show key chain DECRYPT
    Key-chain DECRYPT:
    key 1 -- text "Publisher"
    accept lifetime (always valid) - (always valid) [valid now]
    send lifetime (always valid) - (always valid) [valid now]
    Router2#

Named mode EIGRP applies everything to the EIGRP process. All interface-specific configuration is applied to the af-interface under the EIGRP address family. Default configurations for all interfaces are under af-interface default.

In the following example, you configure named mode EIGRP to use hmac-sha-256 authentication. In this case, the string provided in the configuration line is actually the password:
Router1(config)#router eigrp APRESS
Router1(config-router)#address-family ipv4 unicast autonomous-system 1
Router1(config-router-af)#network 0.0.0.0 255.255.255.255 ! Advertise everything
Router1(config-router-af)#af-interface default
Router1(config-router-af-interface)#authentication mode ?
  hmac-sha-256  HMAC-SHA-256 Authentication
  md5           Keyed message digest
Router1(config-router-af-interface)#authentication mode hmac-sha-256 ?
  <0-7>  Encryption type (0 to disable encryption, 7 for proprietary)
  LINE   password
Router1(config-router-af-interface)#authentication mode hmac-sha-256 APRESS
Router1(config-router-af-interface)#
Router2(config)#router eigrp APRESS
Router2(config-router)#address-family ipv4 unicast autonomous-system 1
Router2(config-router-af)#network 0.0.0.0 255.255.255.255 ! Advertise everything
Router2(config-router-af)#af-interface default
Router2(config-router-af-interface)#authentication mode hmac-sha-256 APRESS
Router2(config-router-af-interface)#
SHA256 is stronger than MD5, but the current version of IOS doesn’t support key rotation with SHA256. In the following example, you remove SHA256 and replace it with MD5 and then reference the key chain that you created in the previous example:
Router1(config-router-af-interface)#no authentication mode hmac-sha-256 APRESS
Router1(config-router-af-interface)#authentication key-chain MYKEY
Router1(config-router-af-interface)#authentication mode md5
! After changing Router1, EIGRP will fail to authenticate, until router is changed to match
*Mar 22 20:27:40.270: %DUAL-5-NBRCHANGE: EIGRP-IPv4 1: Neighbor 192.168.12.1 (Ethernet0/0) is down: Auth failure
Router2(config-router-af-interface)#no authentication mode hmac-sha-256 APRESS
Router2(config-router-af-interface)#authentication key-chain MYKEY
Router2(config-router-af-interface)#authentication mode md5
Router2(config-router-af-interface)#
*Mar 22 20:32:07.508: %DUAL-5-NBRCHANGE: EIGRP-IPv4 1: Neighbor 192.168.12.1 (Ethernet0/0) is up: new adjacency
Router2(config-router-af-interface)#
Access lists provide even more security. Using access lists, you can restrict exactly which hosts and protocols can communicate with a router. Let’s not go deep into access lists at this point, but instead show an example of an access that protects the router, but allows all transit traffic:
Router1(config)#ip access-list extended ALLOW_IN
Router1(config-ext-nacl)#remark Allows EIGRP multicast from 192.168.12.2
Router1(config-ext-nacl)#permit eigrp host 192.168.12.2 host 224.0.0.10
Router1(config-ext-nacl)#remark Allows EIGRP unicast from 192.168.12.2
Router1(config-ext-nacl)#permit eigrp host 192.168.12.2 host 192.168.12.1
Router1(config-ext-nacl)#remark Allows ICMP from any host
Router1(config-ext-nacl)#permit icmp any any
Router1(config-ext-nacl)#remark Permit SSH from network 10.1.1.0/24
Router1(config-ext-nacl)#permit tcp 10.1.1.0 0.0.0.255 host 192.168.12.1 eq 22
Router1(config-ext-nacl)#remark Deny all other traffic that is destined to the router
Router1(config-ext-nacl)#deny ip any host 192.168.12.1
Router1(config-ext-nacl)#remark Allow all transit traffic
Router1(config-ext-nacl)#permit ip any any
!Now apply the list to the interface
Router1(config-ext-nacl)#interface ethernet 0/0
Router1(config-if)#ip access-group ALLOW_IN in

In this example, all the traffic you want to go to the router is allowed, and everything else is denied. Specifically, you allowed EIGRP traffic from 192.168.12.2, ICMP traffic from anywhere, and SSH from 10.1.1.0/24. For traffic destined to 192.168.12.1 on the router, traffic that wasn’t previously allowed is blocked by the explicit deny statement. All other traffic going through the router is then explicitly allowed. It is extremely important to include the permit statement at the end. Otherwise, the implicit deny at the end of access lists would prevent the flow of transit traffic.

When writing this type of access list, make sure that you know all the traffic that should be allowed. A tool to help determine if you missed traffic is to temporarily log hits on the deny list. Once you are confident that you are allowing everything you need, remove the log parameter to reduce the performance impact of the access list.

Exterior Gateway Protocols

The Border Gateway Protocol (BGP ) is the exterior gateway protocol of the Internet. It is comprised of an interior component, iBGP, and an exterior component, eBGP.

It is arguable that iBGP is actually an interior protocol and not just the portion of an exterior protocol that communicates within an autonomous system. If you use the definition that an IGP is a protocol for exchanging prefixes within an autonomous system, then it meets the definition when synchronization is disabled. A router with synchronization enabled will not install a route learned through iBGP unless it can validate the route through an IGP. Just stating this implies that iBGP is not an IGP. However, with synchronization disabled, iBGP can be used as the only routing protocol within an autonomous system.

Even when using iBGP as the only routing protocol within the autonomous system, it has some control plane concerns that aren’t present in IGPs. BGP will not advertise prefixes learned through iBGP to another iBGP peer. To ensure that all the iBGP speakers have identical tables, there must either be a full mesh peering all of the speakers in the autonomous system, or a method such as confederations or route reflectors must be used. A full mesh requires n*(n – 1)/2 relationships. In the case of four iBGP speakers, that is six relationships. In this case, you wouldn’t need to reduce the number of peers. How about if you have ten iBGP speakers? You are already up to 45 peers, and it continues to grow quickly.

A BGP confederation essentially breaks an autonomous system into sets of smaller autonomous systems. This reduces the number of peering relationships because the routers connecting the confederation peers behave similarly to eBGP.

In the example shown in Figure 12-5, all the routers are in autonomous system 33070, but they are separated into two smaller autonomous systems using ASN 65001 and ASN 65002. These are commonly selected autonomous system numbers within confederations because they are in the private range of 64512–65535.
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig5_HTML.jpg
Figure 12-5.

iBGP confederation

The configuration of a confederation is straightforward. The routers peering between the sub-autonomous systems need to know that the peer is really part of a confederation and isn’t really an eBGP peer. Routers peering with eBGP neighbors need to know the confederation ID. The eBGP peer is not aware of the sub-autonomous systems in the confederation and will peer using the confederation ID. The following configurations show the steps necessary on the four routers to establish a confederation:
Router1(config)#router bgp 65001
! It is best practice to configure iBGP using Loopback interface
! Since this example isn’t using an underlying IGP,
! we are using the physical interfaces.
Router1(config-router)#neighbor 192.168.13.3 remote-as 65001
Router1(config-router)#neighbor 192.168.12.2 remote-as 65002 !Similar to eBGP behavior
Router1(config-router)#bgp confederation identifier 33070 !Main AS for confederation
Router1(config-router)#bgp confederation peers 65002   !Other ASs in the confederation
Router1(config-router)#network 192.168.12.0 mask 255.255.255.0
Router1(config-router)#network 192.168.13.0 mask 255.255.255.0
Router2(config)#router bgp 65002
Router2(config-router)#bgp confederation identifier 33070
Router2(config-router)#bgp confederation peers 65001
Router2(config-router)#neighbor 192.168.12.1 remote-as 65001
*Mar 26 05:07:28.781: %BGP-5-ADJCHANGE: neighbor 192.168.12.1 Up
Router2(config-router)#neighbor 192.168.24.4 remote-as 65002
Router2(config-router)#network 192.168.24.0 mask 255.255.255.0
Router2(config-router)#network 192.168.12.0 mask 255.255.255.0
Router3(config)#router bgp 65001
Router4(config)#bgp confederation identifier 33070
Router3(config-router)#neighbor 192.168.13.1 remote-as 65001
Router3(config-router)#network 192.168.13.0 mask 255.255
*Mar 26 05:09:34.394: %BGP-5-ADJCHANGE: neighbor 192.168.13.1 Up
Router3(config-router)#network 192.168.13.0 mask 255.255.255.0
Router3(config-router)#
Router4(config)#router bgp 65002
Router4(config)#bgp confederation identifier 33070
Router4(config-router)#neighbor 192.168.24.2 remote-as 65002
*Mar 26 05:12:56.647: %BGP-5-ADJCHANGE: neighbor 192.168.24.2 Up
Router4(config-router)#network 192.168.24.0 mask 255.255.255.0
Router4(config-router)#
If you look at a prefix from a different sub-autonomous system in the confederation, you can see that it is aware that the prefix was learned as confed-external:
Router1#show ip bgp 192.168.24.0
BGP routing table entry for 192.168.24.0/24, version 7
Paths: (1 available, best #1, table default)
  Advertised to update-groups:
     2
  Refresh Epoch 1
  (65002)
    192.168.12.2 from 192.168.12.2 (192.168.24.2)
      Origin IGP, metric 0, localpref 100, valid, confed-external, best
      rx pathid: 0, tx pathid: 0x0
Router1#

Route reflectors use a slightly different approach. In many ways, it is even simpler to configure a route reflector than a confederation. A route reflector still acts like an iBGP peer, except that it reflects iBGP routes to its clients. To configure a router as a reflector, simply add a neighbor statement with the token route-reflector-client.

The following are the rules of route reflection:
  • A prefix learned from an eBGP peer is passed to both clients and non-clients.

  • A prefix learned from a client will be passed to both clients and non-clients.

  • A prefix learned from non-clients will be passed only to clients.

It is best practice to put the route reflectors at the edge of the autonomous system, but nothing in the configuration will force that. You can configure any router to treat any other router as a route reflector client. However, ad hoc assignment of route reflectors is asking for trouble. One case where you would want more than one route reflector is to add redundancy. A problem with this is that, by default, iBGP will use the router ID as the cluster ID for the cluster being reflected. The solution is to use the bgp cluster-id command to override the default and prevent the redundant route reflectors from forming separate clusters. The example in Figure 12-6 shows an iBGP cluster using redundant route reflectors.

Note

Normally, iBGP speakers connect through IGP routers. They are directly connected in this example for simplicity.

../images/336497_2_En_12_Chapter/336497_2_En_12_Fig6_HTML.jpg
Figure 12-6.

Router reflection

RR1#show run | section router bgp
router bgp 65000
 bgp cluster-id 1
 bgp log-neighbor-changes
 redistribute connected ! Note: this will cause incomplete origin code
 neighbor ibgp_peers peer-group ! Using peer groups, but not necessary
 neighbor ibgp_peers remote-as 65000
 neighbor ibgp_peers route-reflector-client
 !route reflectors are clients of each other
 neighbor 192.168.12.2 peer-group ibgp_peers
 neighbor 192.168.111.11 peer-group ibgp_peers
 neighbor 192.168.112.22 peer-group ibgp_peers
 neighbor 192.168.113.33 peer-group ibgp_peers
RR1#
RR2#show run | section router bgp
router bgp 65000
 bgp cluster-id 1
 bgp log-neighbor-changes
 redistribute connected
 neighbor ibgp_peers peer-group
 neighbor ibgp_peers remote-as 65000
 neighbor ibgp_peers route-reflector-client
 neighbor 192.168.12.1 peer-group ibgp_peers
 neighbor 192.168.221.11 peer-group ibgp_peers
 neighbor 192.168.222.22 peer-group ibgp_peers
 neighbor 192.168.223.33 peer-group ibgp_peers
RR2#
RC1#show running-config | section router bgp
router bgp 65000
 bgp log-neighbor-changes
 redistribute connected
 neighbor 192.168.111.1 remote-as 65000
 neighbor 192.168.221.2 remote-as 65000
RC1#
RC2#show running-config | section router bgp
router bgp 65000
 bgp log-neighbor-changes
 redistribute connected
 neighbor 192.168.112.1 remote-as 65000
 neighbor 192.168.222.2 remote-as 65000
RC2#
RC3#show running-config | section router bgp
router bgp 65000
 bgp log-neighbor-changes
 redistribute connected
 neighbor 192.168.113.1 remote-as 65000
 neighbor 192.168.223.2 remote-as 65000
RC3#
Now that you set up iBGP with route reflection, you look at a routing table entry. The prefix was learned both from the other route reflector and from the originating router. When there aren’t any network failures, each route reflector is peered with every client. It only needs to learn a path from the peer route reflector when there is a failure between a route reflector and one of its clients.
RR1#show ip bgp 192.168.221.0
BGP routing table entry for 192.168.221.0/24, version 15
Paths: (2 available, best #1, table default)
  Advertised to update-groups:
     1
  Refresh Epoch 1
  Local, (Received from a RR-client)
    192.168.111.11 from 192.168.111.11 (192.168.111.11)
      Origin incomplete, metric 0, localpref 100, valid, internal, best
      rx pathid: 0, tx pathid: 0x0
  Refresh Epoch 1
  Local, (Received from a RR-client)
    192.168.12.2 from 192.168.12.2 (192.168.223.2)
      Origin incomplete, metric 0, localpref 100, valid, internal
      rx pathid: 0, tx pathid: 0
RR1#
You can have confederations and route reflectors, as shown in Figure 12-7. In this configuration, one may have route reflectors at the edge of each sub-autonomous system. This configuration is not common, but the control plane will support it.
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig7_HTML.jpg
Figure 12-7.

Reflectors and confederations

Now that the preliminaries of iBGP have been discussed, let’s discuss eBGP. eBGP is a path-vector protocol. Its primary measure is the number of autonomous systems that must be traversed. BGP doesn’t directly track the number of router hops, bandwidth, or latency. It is focused more on policy, so it often requires more administrator control for route optimization than an IGP. Some of these controls are discussed in Chapter 15. At this point, think about the criteria for route selection in Table 12-1 and how you can use these factors to influence routing.
Table 12-1.

BGP Decision Process

Metric

Preferred Choice

Weight (Cisco proprietary)

Highest

Local preference

Highest

Origination

Local

AS_PATH

Lowest

Origin type

IGP, then EGP, then Incomplete

MED

Lowest

BGP type

eBGP

IGP metric to next hop

Lowest

Prefix age

Oldest

Router ID

Lowest

Cluster length

Lowest

Neighbor address

Lowest

Table 12-1 may seem like a lot, but it uses a top-down approach and stops once decision criteria are met. It is also important to note that many of the decisions are relevant to the direction. For example, local preference is used when administrators prefer a specific path out of their networks. The length of the autonomous system path can be manipulated by prepending your autonomous system to influence others to choose a certain path by making an alternate path longer.

The Multiple Exit Discriminator (MED) is often used when all else is equal. The MED is a hint to external peers about which path they should prefer. It is often determined by the metric from the IGP. By default, the MED is compared when the AS PATH is the same length and the first autonomous system in the path is the same. However, it can be configured to not require the same first autonomous system. It also has some issues with missing MEDs. By default, a missing MED has a value of 0, which is considered best. To fix this issue, the command bgp bestpath med missing-as-worst reverses the behavior.

Once BGP makes the decision about which prefix it wants to put in the routing table, you could have problems if you actually want an IGP to win. Think about the case where tunnel endpoints are learned through an IGP; but when the tunnel comes up, they get advertised through eBGP as going through the tunnel. In this case, eBGP wins due to its administrative distance of 20. When a routing protocol claims that the tunnel endpoints are reachable through the tunnel, the tunnel flaps. In the case of BGP, this is an easy fix. When you want to advertise a network, but you want it to lose to IGPs, you advertise it as a backdoor network. This sets the administrative distance to 200, even when it is advertised to an external peer.

Similar to other protocols, BGP has built-in security features. One of them is a check on the receiving interface. BGP uses TCP and needs to make a connection using consistent addresses. With eBGP, this is usually not a problem because the links are frequently point to point. With iBGP, the peers may be connecting across a campus. In the case of iBGP, it is usually recommended to set the update source as a loopback interface and peer to that interface. In the case of eBGP, it is best to use the physical interface addresses. One reason is that eBGP has a security feature that restricts the TTL to 1. If an eBGP peer is not directly connected, you need to manually configure ebgp-multihop with the TTL on the neighbor statement. This feature shouldn’t be confused with TTL security, and they cannot be used together. Setting ttl-security on a neighbor works similarly as with OSPF TTL security. The hop count is subtracted from 255. BGP packets are sent out with a TTL of 255. If they have a TTL less than (255 – hop count), they are discarded.

Loopbacks provide a slightly different case than traditional multihop. By default, eBGP will not peer using loopback. You could set ebgp-multihop to 2 or ttl-security hops to 2, but with loopback, disable-connected-check on the eBGP neighbor is a more secure option. This option enforces the TTL of 1 to get to the peer, but it essentially won’t count the extra hop to the loopback. Just don’t forget to make the loopback reachable from the peer. You usually don’t use IGPs with eBGP peers, so they may need a static route to the loopback.

Protocol-Independent Multicasting

Protocol-Independent Multicasting (PIM) is a family of control plane protocols used for multicast routing. Multicast routing doesn’t have fixed endpoints like with unicast. It can have multiple hosts in different networks receiving a multicast stream. The protocols need to figure out the most efficient tree to build to get data from the sender to all of the receivers. It uses the unicast routing protocols and multicast messages from participating hosts to accomplish this.

The PIM variants are dense mode, sparse mode, bidirectional PIM, and Source-Specific Multicast (SSM ). Each variant builds trees for multicast groups, also known as multicast addresses, but they use different mechanisms.

PIM dense mode is used when the assumption is that there are multicast receivers at most locations. When PIM dense mode is in use, it builds trees for a multicast group to get to every participating router in the network. When a router doesn’t want to receive traffic for a multicast group, it sends a prune message. This is a simple-to-configure method, but it isn’t scalable and it can cause network degradation when there are several high-bandwidth multicast streams, in which most segments don’t want to participate.

The following example shows a simple network with a multicast source, an intermediate router, and a multicast listener. Multicast is configured by using the global command ip multicast-routing, and then ip pim dense-mode is enabled on the interfaces of the participating routers. For the purposes of the test, the destination is a router that is configured to listen for a multicast group. The source will send a ping to that group:
MSource#show running-config | section multicast|Ethernet0/0
ip multicast-routing
interface Ethernet0/0
 ip address 192.168.12.1 255.255.255.0
 ip pim dense-mode
 ip ospf 1 area 0
MSource#
MRouter#show running-config | section multicast|Ethernet0/0|Ethernet0/1
ip multicast-routing
interface Ethernet0/0
 ip address 192.168.12.2 255.255.255.0
 ip pim dense-mode
 ip ospf 1 area 0
interface Ethernet0/1
 ip address 10.0.0.1 255.255.255.0
 ip pim dense-mode
 ip ospf 1 area 0
MRouter#
!This router is acting like a host listening to Multicast gruop 225.225.225.225
MDestination#show running-config interface Ethernet 0/0
Building configuration...
Current configuration : 102 bytes
!
interface Ethernet0/0
 ip address 10.0.0.100 255.255.255.0
 ip igmp join-group 225.225.225.225
end
MDestination#
A ping test from MSource to the multicast group 225.225.225.225 receives a response from the multicast receiver on MDestination. If more than one host is configured as a receiver for a multicast group, the ping gets a response from each receiver. This concept is actually a good way to troubleshoot routing protocols on a multipoint network. For example, if EIGRP neighbors don’t come up and you have already verified unicast connectivity, try pinging the EIGRP group address 224.0.0.10.
MSource#ping 225.225.225.225
Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 225.225.225.225, timeout is 2 seconds:
Reply to request 0 from 10.0.0.100, 2 ms
MSource#
After the data is sent, routers along the path build the trees. In the following show ip mroute output, you can see two dense mode entries. The one without a source is going to both PIM-enabled interfaces on the router. The other entry reflects a shortest path tree entry for the source 192.168.12.1. This entry shows that the incoming interface is Ethernet0/0 and that it passed the reverse path forward:
MRouter#show ip mroute 225.225.225.225
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
       L - Local, P - Pruned, R - RP-bit set, F - Register flag,
       T - SPT-bit set, J - Join SPT, M - MSDP created entry, E - Extranet,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report,
       Z - Multicast Tunnel, z - MDT-data group sender,
       Y - Joined MDT-data group, y - Sending to MDT-data group,
       G - Received BGP C-Mroute, g - Sent BGP C-Mroute,
       N - Received BGP Shared-Tree Prune, n - BGP C-Mroute suppressed,
       Q - Received BGP S-A Route, q - Sent BGP S-A Route,
       V - RD & Vector, v - Vector, p - PIM Joins on route
Outgoing interface flags: H - Hardware switched, A - Assert winner, p - PIM Join
 Timers: Uptime/Expires
 Interface state: Interface, Next-Hop or VCD, State/Mode
(*, 225.225.225.225), 00:04:14/stopped, RP 0.0.0.0, flags: DC
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    Ethernet0/1, Forward/Dense, 00:04:14/stopped
    Ethernet0/0, Forward/Dense, 00:04:14/stopped
(192.168.12.1, 225.225.225.225), 00:04:14/00:02:34, flags: T
  Incoming interface: Ethernet0/0, RPF nbr 192.168.12.1
  Outgoing interface list:
    Ethernet0/1, Forward/Dense, 00:04:14/stopped
MRouter#

PIM sparse mode operates on the opposite assumption of dense mode. Sparse mode assumes that most network segments don’t have multicast receivers. This can scale better over a WAN than dense mode. It uses rendezvous points (RPs) to help manage the trees. In large networks, there can be multiple RPs that share information, and RPs can be dynamically selected. In smaller networks, static RPs are often assigned. Even in large networks, a static address can be used for the RP, and unicast routing can provide the path to the closest active RP.

Figure 12-8 shows a basic example of a sparse mode network. In this example, a multicast source forwards information. The rendezvous point manages the tree for the multicast group. A multicast destination requests to join the group by sending an IGMP message. The multicast enabled switch will see the IGMP join message and will know to send multicast traffic for the group onto that destination.
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig8_HTML.jpg
Figure 12-8.

Sparse mode multicasting

The following shows an example of a small network using a static RP:
MRouter(config)#ip multicast-routing
MRouter(config)#int lo200
MRouter(config-if)#ip pim  sparse-mode
MRouter(config-if)#int e0/0
MRouter(config-if)#ip pim  sparse-mode
MRouter(config-if)#int eth0/1
MRouter(config-if)#ip pim  sparse-mode
MRouter(config-if)#exit
MRouter(config)#ip pim rp-address 2.2.2.2
*Mar 29 18:45:36.765: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to up
*Mar 29 18:45:36.765: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to up
Notice the tunnel interfaces that appeared when the RP address was set in the preceding example. The process picks the lowest available tunnel numbers. This can cause interesting issues when you are copying a configuration using tunnels. For example, let’s say a source configuration used Tunnel0 for GRE, but when the configuration was copied, the router created the PIM tunnel before it got to the line for the GRE tunnel; it will generate an error that Tunnel0 is in use by PIM and can’t be configured.
MSource#show running-config | section rp-address|Ethernet0/0
interface Ethernet0/0
 ip address 192.168.12.1 255.255.255.0
 ip pim sparse-mode
 ip ospf 1 area 0
ip pim rp-address 2.2.2.2
MSource#
MRouter#show interfaces tunnel 0
Tunnel0 is up, line protocol is up
  Hardware is Tunnel
  Description: Pim Register Tunnel (Encap) for RP 2.2.2.2
  Interface is unnumbered. Using address of Loopback200 (2.2.2.2)
  MTU 17912 bytes, BW 100 Kbit/sec, DLY 50000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation TUNNEL, loopback not set
  Keepalive not set
  Tunnel source 2.2.2.2 (Loopback200), destination 2.2.2.2
   Tunnel Subblocks:
      src-track:
         Tunnel0 source tracking subblock associated with Loopback200
          Set of tunnels with source Loopback200, 2 members (includes iterators), on interface <OK>
  Tunnel protocol/transport PIM/IPv4
  Tunnel TOS/Traffic Class 0xC0,  Tunnel TTL 255
  Tunnel transport MTU 1486 bytes
  Tunnel is transmit only
  Tunnel transmit bandwidth 8000 (kbps)
  Tunnel receive bandwidth 8000 (kbps)
  Last input never, output never, output hang never
  Last clearing of "show interface" counters 00:09:56
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/0 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts (0 IP multicasts)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 0 collisions, 0 interface resets
     0 unknown protocol drops
     0 output buffer failures, 0 output buffers swapped out
MRouter#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
MRouter(config)#interface tunnel 0
%Tunnel0 used by PIM for Registering, configuration not allowed
MRouter(config)#
MSource#ping 225.225.225.225
Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 225.225.225.225, timeout is 2 seconds:
Reply to request 0 from 10.0.0.100, 31 ms
MSource#show ip pim  ?
  all-vrfs    All VRFs
  autorp      Global AutoRP information
  boundary    debug boundary comand
  bsr-router  Bootstrap router (v2)
  interface   PIM interface information
  mdt         PIM MDT information
  neighbor    PIM neighbor information
  rp          PIM Rendezvous Point (RP) information
  rp-hash     RP to be chosen based on group selected
  tunnel      Register tunnels
  vc          ATM VCs opened by PIM
  vrf         Select VPN Routing/Forwarding instance
MSource#show ip pim rp
Group: 224.0.1.40, RP: 2.2.2.2, uptime 00:10:08, expires never
MSource#

When a multicast packet is sent out of an interface to receivers, it is translated to multicast frames. This layer 2 destination starts with 01:00:5E and then uses the 23 lowest-order bits from the layer 3 address. If the switch doesn’t know which ports are listening on a multicast group, it will send the frames to all of the ports, except the port on which the frames were received. This is where IGMP snooping comes in to play. The Internet Group Management Protocol (IGMP) is the protocol used by hosts to notify a router when they join and leave multicast groups. IGMP snooping is a protocol that allows layer 2 devices to peek at IGMP messages that pass through them and use the information to determine which switchports want multicast frames for particular groups. It is enabled by default, but can be disabled using the global command no ip igmp snooping. It can also be disabled on a per-VLAN basis, but if it is disabled globally, it cannot be enabled on a VLAN.

Before leaving the topic of the multicast control plane, we should point out an often problematic security feature for the multicast control plane: reverse path forwarding (RPF) checks. RPF checks use the unicast routing table to verify that the multicast source address is reachable through the interface where it received the packet. Problems can occur when PIM isn’t enabled on all the interfaces or there is some asymmetry to the routing. The quick fix when you receive RPF check failure messages is to use the ip mroute global configuration command to add a path to the multicast routing table. This, however, is often just a Band-Aid fix; and it doesn’t address the root of the problem. To properly fix the problem, you need to analyze your unicast routing to determine why it is failing the RPF checks.

Domain Name System

The Domain Name System (DNS) is a hierarchal system that maps human-readable names to logical addresses. For example, when you type www.apress.com in your web browser, DNS determines an IP address for the fully qualified domain name (FQDN ). The application then makes a network connection request using the IP address. For troubleshooting, it is often useful to manually look up the name resolution. Two common utilities for name resolution are dig and nslookup.
user@ubuntu-vm:~$ dig www.apress.com
; <<>> DiG 9.9.5-4.3ubuntu0.2-Ubuntu <<>> www.apress.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35084
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; MBZ: 0005 , udp: 4096
;; QUESTION SECTION:
;www.apress.com.                   IN       A
;; ANSWER SECTION:
www.apress.com.             5     IN      A        207.97.243.208
;; Query time: 33 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Mon Mar 30 08:49:47 HST 2015
;; MSG SIZE  rcvd: 59
user@ubuntu-vm:~$ nslookup www.apress.com
Server:                   127.0.1.1
Address:           127.0.1.1#53
Non-authoritative answer:
Name:    www.apress.com
Address: 207.97.243.208
user@ubuntu-vm:~$
DNS is usually used for communication between clients and servers, so how does that affect a router’s control plane? In many cases, it doesn’t. In fact, when you look at router configurations, it is common to see the global configuration command no ip domain lookup. This command turns off DNS lookups. This is frequently done because Cisco IOS interprets an unknown string typed at the privileged and user exec modes as a request to Telnet to that hostname. When DNS is not set up and a typographical error is made, it will make your command line interface unresponsive while it attempts to look up the hostname.
DNS_Client#connf
Translating "connf"...domain server (255.255.255.255)
 (255.255.255.255)
Translating "connf"...domain server (255.255.255.255)
! One minutes later
% Bad IP address or host name
% Unknown command or computer name, or unable to find computer address
DNS_Client#
Even when some name resolution is needed on a router, full DNS is often not used. The local host table can be used to store hostnames and IP addresses and provide resolution for those hostnames. A problem with this is that it isn’t scalable, and when a change needs to be made to a hostname or IP address, it needs to be updated on all of the routers that are using it.
DNS_Client(config)#ip host Router1 ?
  <0-65535>   Default telnet port number
  A.B.C.D     Host IP address
  X:X:X:X::X  Host IPv6 Address
  additional  Append addresses
  mx          Configure a MX record
  ns          Configure an NS record
  srv         Configure a SRV record
DNS_Client(config)#ip host Router1 192.168.12.1
DNS_Client(config)#exit
DNS_Client#ping Router1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/2/6 ms
DNS_Client#
For better scalability, point the router to a DNS server using the ip name-server command. Cisco IOS allows a list of up to six domain name servers. If you only configure a name server, FQDNs must be used in queries. If you want to enable a search list of domain names, use the ip domain list and ip domain name commands to add domains as needed. The domain name command sets the domain name of the router that is used as the default suffix. If DNS doesn’t find a match using a hostname and the default domain name, it will look through the domain list.
DNS_Client(config)#ip domain lookup
DNS_Client(config)#ip name-server 192.168.12.1 ?
  A.B.C.D     Domain server IP address (maximum of 6)
  X:X:X:X::X  Domain server IPv6 address (maximum of 6)
  <cr>
DNS_Client(config)#ip name-server 192.168.12.1
DNS_Client(config)#ip domain name apress.com
DNS_Client(config)#ip domain list somedomain.com
DNS_Client(config)#ip domain list ?
  WORD  A domain name
  vrf   Specify VRF
DNS_Client(config)#ip domain list anotherdomain.com
DNS_Client(config)#do show run | include domain list
ip domain list somedomain.com
ip domain list anotherdomain.com
DNS_Client(config)#
Even though servers are usually used as DNS servers, a router can also serve this purpose. A router is enabled as a DNS server using the ip dns server command. Entries are configured in the same way as without DNS using the ip host command. Optionally, forwarding servers can be configured by using the ip name-server command .
DNS_Server(config)#! Enable DNS Server
DNS_Server(config)#ip dns server
DNS_Server(config)#! Configuring forwarding DNS
DNS_Server(config)#ip name-server 8.8.8.8
DNS_Server(config)#! Add entries into DNS
DNS_Server(config)#ip host R1-L0.example.com 1.1.1.1
DNS_Server(config)#! Configure SOA record
DNS_Server(config)#ip dns primary example.com soa ns1.example.com example.com
DNS_Server(config)#
Now that you have configured a DNS server, you will test it from the client. In the following example, you first try to ping using only the hostname. It fails because it is not appending a domain name. When using the FQDN, it successfully resolves the name. After adding the domain name to the search list, it successfully resolves the name, but it first attempts to resolve the name without adding the domain from the search list:
DNS_Client#ping R1-L0
Translating "R1-L0"...domain server (192.168.12.1)
% Unrecognized host or address, or protocol not running.
DNS_Client#ping R1-L0.example.com
Translating "R1-L0.example.com"...domain server (192.168.12.1)
% Unrecognized host or address, or protocol not running.
DNS_Client#ping R1-L0.example.com
Translating "R1-L0.example.com"...domain server (192.168.12.1)
% Unrecognized host or address, or protocol not running.
DNS_Client#ping R1-L0
Translating "R1-L0"...domain server (192.168.12.1)
% Unrecognized host or address, or protocol not running.
DNS_Client#ping R1-L0.example.com
Translating "R1-L0.example.com"...domain server (192.168.12.1) [OK]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
DNS_Client#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
DNS_Client(config)#ip domain list example.com
DNS_Client(config)#exit
DNS_Client#ping
*Mar 30 20:12:21.825: %SYS-5-CONFIG_I: Configured from console by console
DNS_Client#ping R1-L0
Translating "R1-L0"...domain server (192.168.12.1) [OK]
Translating "R1-L0"...domain server (192.168.12.1) [OK]
Translating "R1-L0"...domain server (192.168.12.1) [OK]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg /max = 1/1/2 ms

Network Time Protocol

The Network Time Protocol (NTP) is a protocol for synchronizing time between devices. Accurate—or least synchronized—time is important for the management of network devices. The basic functionality of routing and switching doesn’t require synchronized time, but it is important for management tasks such as analysis of log files. It is also important for use in security features, such as time-based access control lists and cryptologic key rotation.

NTP uses strata as a measure of the reliability of a time server. A device with a stratum value of 0 is considered to be the most accurate time source. Each NTP hop adds a stratum number until the maximum stratum value of 15. If a device tries to synchronize to a stratum 15 device, it will receive an error stating that the stratum is too high.

To configure a router as an NTP server, use the command ntp master with an optional stratum number. If a stratum number is not supplied and the device isn’t obtaining time from a lower stratum number time server, it will default to a stratum value of 8.
Router1(config)#ntp update-calendar
Router1(config)#ntp master ?
  <1-15>  Stratum number
  <cr>
Router1(config)#ntp master
Router1(config)#exit
Router1#show ntp
Mar 30 21:36:07.699: %SYS-5-CONFIG_I: Configured from console by console
Router1#show ntp ?
  associations  NTP associations
  information   NTP Information
  packets       NTP Packet statistics
  status        NTP status
Router1#show ntp status
Clock is synchronized, stratum 8, reference is 127.127.1.1
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**10
ntp uptime is 4200 (1/100 of seconds), resolution is 4000
reference time is D8C44041.47EF9E78 (11:36:01.281 HST Mon Mar 30 2015)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 1939.58 msec, peer dispersion is 1938.47 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000000000 s/s
system poll interval is 16, last update was 10 sec ago.
Router1#
When you look at NTP associations, you see an association with a local reference clock that is stratum 7. This is because the network device is considered to be a hop away from the hardware clock. This is even the case with stratum 0 devices. If a clock is stratum 0, the device advertising time is stratum 1.
Router1#show ntp associations
  address         ref clock       st   when   poll reach  delay  offset   disp
*~127.127.1.1     .LOCL.           7      1     16   377  0.000   0.000  1.204
 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured
Router1#
Next, you configure Router2 as an NTP master with a stratum value of 6 and configure Router1 to use it as a time source. Notice that Router1 is reporting a stratum value of 7 now. This is because it is synchronized with a stratum 6 device.
Router2(config)#ntp update-calendar
Router2(config)#ntp master 6
Router2(config)#ntp source loopback 0
Notice that Router1 is showing that Router2 is stratum 6, but it is still advertising stratum 8 to its clients. This is because NTP can take a while to fully synchronize.
Router1#configure terminal
Router1(config)#ntp server 20.20.20.20 source Loopback0
Router1(config)#exit
Router1#show ntp associations
  address         ref clock       st   when   poll reach  delay  offset   disp
*~127.127.1.1     .LOCL.           7     11     16   377  0.000   0.000  1.204
 ~20.20.20.20     127.127.1.1      6     10     64     1  1.000   0.500 189.45
 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured
Router1#
Router1#show ntp status
Clock is synchronized, stratum 8, reference is 127.127.1.1
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**10
ntp uptime is 145300 (1/100 of seconds), resolution is 4000
reference time is D8C445C1.483127B0 (11:59:29.282 HST Mon Mar 30 2015)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 2.36 msec, peer dispersion is 1.20 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000000000 s/s
system poll interval is 16, last update was 12 sec ago.
Router1#
Eventually, NTP should show that it is synchronized to Router2. When using NTP on GNS3, the virtualization can cause excessive delay and jitter, which can result in the NTP not synchronizing.
Router1#show ntp associations
  address         ref clock       st   when   poll reach  delay  offset   disp
 ~127.127.1.1     .LOCL.           7      3     16     1  0.000   0.000 7937.9
*~20.20.20.20     127.127.1.1      6     21    128   377  1.000   0.500  2.933
 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured
Router1#
Router1#show ntp status
Clock is synchronized, stratum 7, reference is 20.20.20.20
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**10
ntp uptime is 323500 (1/100 of seconds), resolution is 4000
reference time is D8C44CB8.48B43A20 (12:29:12.284 HST Mon Mar 30 2015)
clock offset is -0.5000 msec, root delay is 1.00 msec
root dispersion is 6.30 msec, peer dispersion is 2.46 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000000000 s/s
system poll interval is 256, last update was 12 sec ago.
Router1#
Next, you configure NTP on Router3. Initially, it selected Router1 as the peer even though its stratum number is worse. This is only because it was configured first.
Router3(config)#ntp server 10.10.10.10 source Loopback0
Router3(config)#ntp server 20.20.20.20 source Loopback0
Router3(config)#exit
Router3#show nt
Mar 30 22:33:00.111: %SYS-5-CONFIG_I: Configured from console by console
Router3#show ntp association
  address         ref clock       st   when   poll reach  delay  offset   disp
*~10.10.10.10     20.20.20.20      7     38     64     1  1.000  -0.500 189.50
 ~20.20.20.20     127.127.1.1      6     27     64     1  1.000   0.500 189.50
 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured
Router3#
When NTP converged, it changed peering to use Router2.
Router3#show ntp association
  address         ref clock       st   when   poll reach  delay  offset   disp
+~10.10.10.10     20.20.20.20      7     47     64     3  1.000  -0.500 65.366
*~20.20.20.20     127.127.1.1      6     37     64     3  1.000   0.500 64.892
 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured
Router3#
Router3#show ntp association
  address         ref clock       st   when   poll reach  delay  offset   disp
 ~10.10.10.10     20.20.20.20      7     57     64     7  1.000  -0.500  3.639
*~20.20.20.20     127.127.1.1      6     46     64     7  1.000   0.500  2.678
 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured
Router3#
In some cases, you don’t have an authoritative time server, or a device can’t act authoritatively. Many top-of-rack switches do not have a hardware clock, which is required to be an NTP server. In these cases, you typically want to make the device a client of an NTP server. If there aren’t any devices that can act as an NTP server on the network, but time still needs to be synchronized between devices, you can use ntp peer. When two devices are configured as peers, neither of them is authoritative, and they converge on a middle time value. This can lead to incorrect but synchronized clocks. Even in a network with an authoritative time source, peering has its place. Consider a network with a stratum 1 clock and then a series of stratum 2 devices distributing time. If the stratum 1 clock goes down temporarily, you still want synchronized time. Peering the stratum 2 devices will accomplish this.
Router1(config)#no ntp server 20.20.20.20
Router1(config)#ntp peer 20.20.20.20 source loopback0
Router2(config)#ntp peer 10.10.10.10 source loopback0

So far, only unrestricted NTP has been discussed. To add a layer of security, you can use access lists and authentication.

To enable authentication for NTP, enable authentication and set a key on the NTP server.
Router2(config)#ntp master
Router2(config)#ntp authenticate
Router2(config)#ntp trusted-key 1
Router2(config)#ntp authentication-key 1 md5 Apress
From the client, configure the server keys that are trusted. NTP authentication is initiated from the client. If the server is configured to allow authentication, but the client does not request it, the session will be unauthenticated.
Router1(config)#ntp authenticate
Router1(config)#ntp authentication-key 1 md5 Apress
Router1(config)#ntp trusted-key 1
Router1(config)#ntp server 20.20.20.20 key 1
In addition to authentication, the access list can be used to limit access based on the IP address. The options are peer, query-only, server, and server-only:
  • Peer: This allows all types of peering with time servers in the access list. Routers can synchronize with other devices and can be used as time servers.

  • Query-only: This restricts devices in the access list to only use control queries. Responses to NTP requests are not sent, and local time is not synchronized with time servers specified in the access list. No responses to NTP requests are sent, and no local system time synchronization with remote system is permitted.

  • Server: This allows the device to receive time requests and NTP control queries from the servers specified in the access list, but not to synchronize itself to the specified servers.

  • Server-only: This allows the router to respond to NTP requests only. It does not allow attempts to synchronize local system time.

Router3(config)#ntp access-group ?
  ipv4        ipv4 access lists
  ipv6        ipv6 access lists
  peer        Provide full access
  query-only  Allow only control queries
  serve       Provide server and query access
  serve-only  Provide only server access

Tools for Control Plane Management

We discussed the management plane in Chapter 10, but it is worth revisiting in terms of tools. Some software-defined networking architectures completely manage the control plane. The typical Cisco architecture is to allow each device to run control plane protocols, but we may configure parameters used by those protocols with tools.

Cisco Prime Infrastructure is a good choice when there is a mix of manual configuration and configuration pushed by the tool. Prime Infrastructure logs into the device and periodically pulls the configuration. This allows you to make changes from the current state of the device. It also allows Prime Infrastructure to validate compliance. If you want to get extremely fancy, you can even have Prime automatically run show commands and push configuration changes based on the result. However, that is not recommended unless you have extremely fine-tuned templates and have tested all your automatic configuration rules.

A more common use of Prime Infrastructure is to push configurations to multiple devices using templates. Prime Infrastructure comes with several built-in templates for common tasks. Many of these templates use scripts to pull information for devices, use global variables or the configuration database, or use per-device variables that are provided in a form when the template is deployed. Figure 12-9 shows an example of a script for a built-in template that configures an access port. This example uses a somewhat complex script.
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig9_HTML.jpg
Figure 12-9.

Access port template script

Figures 12-10 and 12-11 show what the form and variables look like for the template. The form is built from the variables. They represent things that will differ on each device. When you deploy a template to a device, it will ask you to fill out the form for any deployment-specific variables.
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig10_HTML.jpg
Figure 12-10.

Template variables

../images/336497_2_En_12_Chapter/336497_2_En_12_Fig11_HTML.jpg
Figure 12-11.

Template form preview

In the following example, we inspect the current state of routing protocols in the managed routers. We then apply a template and validate that the changes have been made. Please note that the example provided here can be disruptive. It should not be used on a live network without testing. Our example is simple and does not use variables. It is intended to just give you an idea of how simple a template can be.

Figure 12-12 starts by showing you the state of routing configuration before we push the template. In Figure 12-13, we show the template to change the configuration. In Figure 12-14, we deploy the template to three routers.
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig12_HTML.jpg
Figure 12-12.

Router initial state

../images/336497_2_En_12_Chapter/336497_2_En_12_Fig13_HTML.jpg
Figure 12-13.

CLI template

../images/336497_2_En_12_Chapter/336497_2_En_12_Fig14_HTML.jpg
Figure 12-14.

Deploy the template

As soon as the template runs, we can see the changes in the console logs of the router. Depending on the configuration of your routers and Prime Infrastructure, you may need to either wait until the next synchronization or force a synchronization to see the changes in the Prime device inventory. If your device is sending traps when configuration changes, then it should be close to immediate. Figure 12-15 shows the console logs of R29 when the template is deployed.
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig15_HTML.jpg
Figure 12-15.

Console logs after template deployment

Exercises

The exercises in this section are cumulative. If you have problems with an exercise, use the answer to get to the end state before moving on to the next exercise.

Preliminary Work

Set up eight routers, as shown in the diagram (see Figure 12-16).
../images/336497_2_En_12_Chapter/336497_2_En_12_Fig16_HTML.jpg
Figure 12-16.

Exercise network typology

Configure the IP addresses using Table 12-2. Verify connectivity by pinging peer routers on directly connected networks.
Table 12-2.

Router Interface Addresses

Router

Interface

Address

Router1

Ethernet0/0

192.168.12.1/24

Router1

Loopback10

10.1.1.1/24

Router1

Loopback172

172.16.1.1/32

Router2

Ethernet0/0

192.168.12.2/24

Router2

Ethernet0/1

192.168.24.2/24

Router2

Ethernet0/2

192.168.23.2/24

Router2

Loopback172

172.16.2.2/32

Router3

Ethernet0/0

192.168.23.3/24

Router3

Ethernet0/1

192.168.35.3/24

Router3

Loopback172

172.16.3.3/24

Router4

Ethernet0/0

192.168.24.4/24

Router4

Ethernet0/1

192.168.46.4/24

Router4

Loopback172

172.16.4.4./24

Router5

Ethernet0/0

192.168.35.5/24

Router5

Ethernet0/1

192.168.56.5/24

Router5

Ethernet0/2

192.168.57.5/24

Router5

Loopback172

172.16.5.5/32

Router6

Ethernet0/0

192.168.56.6/24

Router6

Ethernet0/1

192.168.46.6/24

Router6

Loopback10

10.6.6.6/24

Router6

Loopback172

172.16.6.6/32

Router7

Ethernet0/0

192.168.57.7/24

Router7

Ethernet0/1

192.168.78.7/24

Router7

Loopback172

172.16.7.7/32

Router8

Ethernet0/0

192.168.78.8/24

Router8

Loopback10

10.8.8.8/24

Router8

Loopback172

172.16.8.8/32

OSPF

Configure OSPF using the information in Table 12-3. Verify that you can reach the 192.168.23.0/24 network from Router6.
Table 12-3.

OSPF Areas

Router

Interface

Area

Router2

Ethernet0/2

Area 1

Router2

Loopback172

Area 1

Router2

Ethernet0/1

Area 2

Router3

Ethernet0/0

Area 1

Router3

Loopback172

Area 1

Router3

Ethernet0/1

Area 2

Router4

Ethernet0/0

Area 2

Router4

Ethernet0/1

Area 0

Router4

Loopback172

Area 0

Router5

Ethernet0/0

Area 2

Router5

Ethernet0/1

Area 0

Router5

Loopback172

Area 0

Router6

Ethernet0/0

Area 0

Router6

Ethernet0/1

Area 0

Router6

Loopback172

Area 0

Router6

Loopback10

Area 3

BGP

Configure BGP using Table 12-4. Use physical interfaces for eBGP peers and loopback interfaces for iBGP.
Table 12-4.

BGP Configuration Parameters

Router

Autonomous System

Advertised Networks

Router1

65001

10.1.1.0 mask 255.255.255.0

192.168.12.0

Router2

65256

192.168.12.0

192.168.23.0

192.168.24.0

Router5

65256

192.168.35.0

192.168.56.0

192.168.57.0

Router6

65256

192.168.46.0

192.168.56.0

10.6.6.0 mask 255.255.255.0

Router7

65078

192.168.57.0

192.168.78.0

Router8

65078

192.168.78.0

10.8.8.0 mask 255.255.255.0

Peer routers are as follows:
  • Router1 and Router2

  • Router2 and Router5

  • Router5 and Router6

  • Router5 and Router7

  • Router7 and Router8

Redistribute BGP into OSPF at Router2 and Router5:
router ospf 1
  redistribute bgp 65256 subnets

Verify routing to all Ethernet interfaces and Loopback10 interfaces.

NTP

Configure Router2 as a stratum 3 time source. Configure Router3, Router4, Router5, and Router6 as clients. Use Loopback172 interfaces for NTP. Use an authentication key of “Apress.”

Named Mode EIGRP with Authentication

You are already running OSPF. You will run EIGRP on top of it. Since EIGRP has a better administrative distance than OSPF, you should see that networks are learned over EIGRP instead of OSPF.

For this exercise, use Router2, Router3, Router4, Router5, and Router6:
  1. 1.

    On each router, create a key with a send and receive lifetime of January 1, 2015, through December 31, 2030. Use “Apress” as the key.

     
  2. 2.

    Create a named mode EIGRP instance.

     
  3. 3.

    Use autonomous system 10.

     
  4. 4.

    Configure EIGRP to advertise any networks in 192.0.0.0/8.

     
  5. 5.

    Enable authentication and reference the key that you pre-staged.

     

Multicast

Configure Loopback172 on Router6 as a listener for multicast group 229.1.1.1.

Configure the multicast domain such that a sender on Router2 can take any path to get to the listener on Router6. Use a technique that will assume that most router segments will have listeners.

Exercise Answers

This section contains the solutions to the exercises. Overview explanations are provided for each solution.

Preliminary Configurations

The preliminary configurations contain the snippets required to start working on the exercises. This section addresses the interfaces and creates the necessary loopback interfaces.

Configuration Snippets

Router1#show running-config | section interface
interface Loopback10
 ip address 10.1.1.1 255.255.255.0
interface Loopback172
 ip address 172.16.1.1 255.255.255.255
interface Ethernet0/0
 ip address 192.168.12.1 255.255.255.0
interface Ethernet0/1
 no ip address
 shutdown
interface Ethernet0/2
 no ip address
 shutdown
interface Ethernet0/3
 no ip address
 shutdown
Router1#
Router2#show running-config | section interface
interface Loopback172
 ip address 172.16.2.2 255.255.255.255
interface Ethernet0/0
 ip address 192.168.12.2 255.255.255.0
interface Ethernet0/1
 ip address 192.168.24.2 255.255.255.0
interface Ethernet0/2
 ip address 192.168.23.2 255.255.255.0
interface Ethernet0/3
 no ip address
 shutdown
Router2#
Router3#show running-config | section interface
interface Loopback172
 ip address 172.16.3.3 255.255.255.255
interface Ethernet0/0
 ip address 192.168.23.3 255.255.255.0
interface Ethernet0/1
 ip address 192.168.35.3 255.255.255.0
interface Ethernet0/2
 no ip address
 shutdown
interface Ethernet0/3
 no ip address
 shutdown
Router3#
Router4#show running-config | section interface
interface Loopback172
 ip address 172.16.4.4 255.255.255.0
interface Ethernet0/0
 ip address 192.168.24.4 255.255.255.0
interface Ethernet0/1
 ip address 192.168.46.4 255.255.255.0
interface Ethernet0/2
 no ip address
 shutdown
interface Ethernet0/3
 no ip address
 shutdown
Router4#
Router5#show running-config | section interface
interface Loopback172
 ip address 172.16.5.5 255.255.255.255
interface Ethernet0/0
 ip address 192.168.35.5 255.255.255.0
interface Ethernet0/1
 ip address 192.168.56.5 255.255.255.0
interface Ethernet0/2
 ip address 192.168.57.5 255.255.255.0
interface Ethernet0/3
 no ip address
 shutdown
Router5#
Router6#show running-config | section interface
interface Loopback10
 ip address 10.6.6.6 255.255.255.0
interface Loopback172
 ip address 172.16.6.6 255.255.255.255
interface Ethernet0/0
 ip address 192.168.56.6 255.255.255.0
interface Ethernet0/1
 ip address 192.168.46.6 255.255.255.0
interface Ethernet0/2
 no ip address
 shutdown
interface Ethernet0/3
 no ip address
 shutdown
Router6#
Router7#show running-config | section interface
interface Loopback172
 ip address 172.16.7.7 255.255.255.255
interface Ethernet0/0
 ip address 192.168.57.7 255.255.255.0
interface Ethernet0/1
 ip address 192.168.78.7 255.255.255.0
interface Ethernet0/2
 no ip address
 shutdown
interface Ethernet0/3
 no ip address
 shutdown
Router7#
Router8#show running-config | section interface
interface Loopback10
 ip address 10.8.8.8 255.255.255.0
interface Loopback172
 ip address 172.16.8.8 255.255.255.255
interface Ethernet0/0
 ip address 192.168.78.8 255.255.255.0
interface Ethernet0/1
 no ip address
 shutdown
interface Ethernet0/2
 no ip address
 shutdown
interface Ethernet0/3
 no ip address
 shutdown
Router8#

Verification

For verification, start by looking at show ip interface brief and exclude interfaces with unassigned IP addresses. This is a quick way to spot-check that all the interfaces are configured:
Router1#show ip interface brief | exclude unassigned
Interface          IP-Address      OK? Method Status          Protocol
Ethernet0/0        192.168.12.1    YES manual up              up
Loopback10         10.1.1.1        YES manual up              up
Loopback172        172.16.1.1      YES manual up              up
For a more thorough test, ping the router on the other side of each Ethernet link. You used a simple addressing scheme, so it is easy to keep track of the connections. If the IP address on a local interface is 192.168.24.4, the 24 value in the third octet means you are connecting Router2 and Router4. The 4 in the last octet means you are on Router4. In this case, the router on the other side of the link is Router2. Following the same numbering scheme, the IP of the neighbor router’s interface is 192.168.24.2:
Router1#ping 192.168.12.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/2 ms
Router1#
Router2#ping 192.168.23.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.23.3, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
Router2#ping 192.168.24.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.24.4, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
Router2#
Router3#ping 192.168.35.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.35.5, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
Router3#
Router4#ping 192.168.46.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.46.6, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
Router4#
Router5#ping 192.168.57.7
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.57.7, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
Router5#
Router7#ping 192.168.78.8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.78.8, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/2 ms
Router7#

OSPF

The purpose of this exercise is to demonstrate the use of virtual links. When you configure the areas per the table, you attempt to transit a non-backbone area. To fix this, you need to create a virtual link. A virtual link between either Router2 and Router4 or Router3 and Router5 will fix the problem. For redundancy, you created a virtual link for each path.

Configuration Snippets

Router2#show running-config | section router ospf|interface
interface Loopback172
 ip address 172.16.2.2 255.255.255.255
 ip ospf 1 area 1
interface Ethernet0/0
 ip address 192.168.12.2 255.255.255.0
interface Ethernet0/1
 ip address 192.168.24.2 255.255.255.0
 ip ospf 1 area 2
interface Ethernet0/2
 ip address 192.168.23.2 255.255.255.0
 ip ospf 1 area 1
interface Ethernet0/3
 no ip address
 shutdown
router ospf 1
 ispf
 area 2 virtual-link 172.16.4.4
Router3#show running-config | section router ospf|interface
interface Loopback172
 ip address 172.16.3.3 255.255.255.255
 ip ospf 1 area 1
interface Ethernet0/0
 ip address 192.168.23.3 255.255.255.0
 ip ospf 1 area 1
interface Ethernet0/1
 ip address 192.168.35.3 255.255.255.0
 ip ospf 1 area 2
interface Ethernet0/2
 no ip address
 shutdown
interface Ethernet0/3
 no ip address
 shutdown
router ospf 1
 ispf
 area 2 virtual-link 172.16.5.5
Router3#
Router4#show running-config | section router ospf|interface
interface Loopback172
 ip address 172.16.4.4 255.255.255.0
 ip ospf 1 area 0
interface Ethernet0/0
 ip address 192.168.24.4 255.255.255.0
 ip ospf 1 area 2
interface Ethernet0/1
 ip address 192.168.46.4 255.255.255.0
 ip ospf 1 area 0
interface Ethernet0/2
 no ip address
 shutdown
interface Ethernet0/3
 no ip address
 shutdown
router ospf 1
 ispf
 area 2 virtual-link 172.16.2.2
Router4#
Router5#show running-config | section router ospf|interface
interface Loopback172
 ip address 172.16.5.5 255.255.255.255
 ip ospf 1 area 0
interface Ethernet0/0
 ip address 192.168.35.5 255.255.255.0
 ip ospf 1 area 2
interface Ethernet0/1
 ip address 192.168.56.5 255.255.255.0
 ip ospf 1 area 0
interface Ethernet0/2
 ip address 192.168.57.5 255.255.255.0
interface Ethernet0/3
 no ip address
 shutdown
router ospf 1
 ispf
 area 2 virtual-link 172.16.3.3
Router5#
Router6#show running-config | section router ospf|interface
interface Loopback10
 ip address 10.6.6.6 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 3
interface Loopback172
 ip address 172.16.6.6 255.255.255.255
 ip ospf 1 area 0
interface Ethernet0/0
 ip address 192.168.56.6 255.255.255.0
 ip ospf 1 area 0
interface Ethernet0/1
 ip address 192.168.46.6 255.255.255.0
 ip ospf 1 area 0
interface Ethernet0/2
 no ip address
 shutdown
interface Ethernet0/3
 no ip address
 shutdown
router ospf 1
 ispf
Router6#

Verification

The show ip ospf neighbor and show ip route commands can be used to verify the configuration. If properly configured, you will see output similar to what is shown in the following snippets:
Router3#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
172.16.5.5        0   FULL/  -           -        192.168.35.5    OSPF_VL0
172.16.2.2        1   FULL/DR         00:00:31    192.168.23.2    Ethernet0/0
172.16.5.5        1   FULL/BDR        00:00:35    192.168.35.5    Ethernet0/1
Router3#
Router4#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
172.16.2.2        0   FULL/  -           -        192.168.24.2    OSPF_VL1
172.16.6.6        1   FULL/BDR        00:00:32    192.168.46.6    Ethernet0/1
172.16.2.2        1   FULL/DR         00:00:35    192.168.24.2    Ethernet0/0
Router4#
Router6#show ip route 192.168.23.0
Routing entry for 192.168.23.0/24
  Known via "ospf 1", distance 110, metric 30, type inter area
  Last update from 192.168.56.5 on Ethernet0/0, 00:01:05 ago
  Routing Descriptor Blocks:
    192.168.56.5, from 172.16.3.3, 00:01:05 ago, via Ethernet0/0
      Route metric is 30, traffic share count is 1
  * 192.168.46.4, from 172.16.2.2, 00:01:05 ago, via Ethernet0/1
      Route metric is 30, traffic share count is 1
Router6#ping 192.168.23.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.23.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Router6#ping 192.168.23.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.23.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Router6#

BGP

There are two potential pitfalls in this exercise. One of them is that there isn’t a full mesh for the iBGP peers in AS 65256. Either a confederation or route reflection would work. In this case, route reflection makes more sense.

The following snippet shows that Router1 does not know about the 10.6.6.0/24 network that is advertised by Router6. This is because Router1 and Router6 aren’t peered. If you make either Router1 or Router6 a route reflector client of Router5, the route will be reflected:
Router1#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override
Gateway of last resort is not set
      10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C        10.1.1.0/24 is directly connected, Loopback10
L        10.1.1.1/32 is directly connected, Loopback10
B        10.8.8.0/24 [20/0] via 192.168.12.2, 00:00:46
      172.16.0.0/32 is subnetted, 1 subnets
C        172.16.1.1 is directly connected, Loopback172
      192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.12.0/24 is directly connected, Ethernet0/0
L        192.168.12.1/32 is directly connected, Ethernet0/0
B     192.168.23.0/24 [20/0] via 192.168.12.2, 00:03:45
B     192.168.24.0/24 [20/0] via 192.168.12.2, 00:03:45
B     192.168.35.0/24 [20/0] via 192.168.12.2, 00:02:16
B     192.168.56.0/24 [20/0] via 192.168.12.2, 00:02:16
B     192.168.57.0/24 [20/0] via 192.168.12.2, 00:02:16
B     192.168.78.0/24 [20/0] via 192.168.12.2, 00:00:46
Router1#
Router1#show ip route 10.6.6.0
% Network not in table
Router1#
After adding route reflection on Router5, you can see the network from Router1:
Router5(config-router)#neighbor 172.16.6.6 route-reflector-client
Router5(config-router)#
*Apr  1 20:20:10.711: %BGP-5-ADJCHANGE: neighbor 172.16.6.6 Down RR client config change
*Apr  1 20:20:10.711: %BGP_SESSION-5-ADJCHANGE: neighbor 172.16.6.6 IPv4 Unicast topology base removed from session  RR client config change
*Apr  1 20:20:11.237: %BGP-5-ADJCHANGE: neighbor 172.16.6.6 Up
Router5(config-router)#
Router1#show ip route 10.6.6.0
Routing entry for 10.6.6.0/24
  Known via "bgp 65001", distance 20, metric 0
  Tag 65256, type external
  Last update from 192.168.12.2 00:00:25 ago
  Routing Descriptor Blocks:
  * 192.168.12.2, from 192.168.12.2, 00:00:25 ago
      Route metric is 0, traffic share count is 1
      AS Hops 1
      Route tag 65256
      MPLS label: none
Router1#
The other potential pitfall is the peering in AS 65078. Per the instructions, you are to peer using the loopbacks for iBGP neighbors, but there isn’t a route between Router7’s and Router8’s loopbacks. Adding static routes for the loopbacks will solve the problem:
Router7#show running-config | include ip route
ip route 172.16.8.8 255.255.255.255 192.168.78.8
Router7#Configuration Snippets
Router8#show running-config | include ip route
ip route 172.16.7.7 255.255.255.255 192.168.78.7
Router8#

Configuration Snippets

router bgp 65001
 bgp log-neighbor-changes
 network 10.1.1.0 mask 255.255.255.0
 network 192.168.12.0
 neighbor 192.168.12.2 remote-as 65256
Router1#
Router2#show run | section router bgp|router ospf
router ospf 1
 ispf
 area 2 virtual-link 172.16.4.4
 redistribute bgp 65256 subnets
router bgp 65256
 bgp log-neighbor-changes
 network 192.168.12.0
 network 192.168.23.0
 network 192.168.24.0
 neighbor 172.16.5.5 remote-as 65256
 neighbor 172.16.5.5 update-source Loopback172
 neighbor 192.168.12.1 remote-as 65001
Router2#
Router5#show run | section router bgp|router ospf
router ospf 1
 ispf
 area 2 virtual-link 172.16.3.3
 redistribute bgp 65256 subnets
router bgp 65256
 bgp log-neighbor-changes
 network 192.168.35.0
 network 192.168.56.0
 network 192.168.57.0
 neighbor 172.16.2.2 remote-as 65256
 neighbor 172.16.2.2 update-source Loopback172
 neighbor 172.16.2.2 route-reflector-client
 neighbor 172.16.6.6 remote-as 65256
 neighbor 172.16.6.6 update-source Loopback172
 neighbor 172.16.6.6 route-reflector-client
 neighbor 192.168.57.7 remote-as 65078
Router5#
Router6#show running-config | section router bgp
router bgp 65256
 bgp log-neighbor-changes
 network 10.6.6.0 mask 255.255.255.0
 network 192.168.46.0
 network 192.168.56.0
 neighbor 172.16.5.5 remote-as 65256
 neighbor 172.16.5.5 update-source Loopback172
Router6#
Router7#show running-config | section router bgp|ip route
router bgp 65078
 bgp log-neighbor-changes
 network 192.168.57.0
 network 192.168.78.0
 neighbor 172.16.8.8 remote-as 65078
 neighbor 172.16.8.8 update-source Loopback172
 neighbor 192.168.57.5 remote-as 65256
ip route 172.16.8.8 255.255.255.255 192.168.78.8
Router7#
Router8#show running-config | section router bgp|ip route
router bgp 65078
 bgp log-neighbor-changes
 network 10.8.8.0 mask 255.255.255.0
 network 192.168.78.0
 neighbor 172.16.7.7 remote-as 65078
 neighbor 172.16.7.7 update-source Loopback172
ip route 172.16.7.7 255.255.255.255 192.168.78.7
Router8#

Verification

To verify full connectivity, you should ping every address. That can be repetitious. TCL is commonly used for this purpose:
tclsh
foreach address {
192.168.12.1
10.1.1.1
192.168.12.2
192.168.24.2
192.168.23.2
192.168.23.3
192.168.35.3
192.168.24.4
192.168.46.4
192.168.35.5
192.168.56.5
192.168.57.5
192.168.56.6
192.168.46.6
10.6.6.6
192.168.57.7
192.168.78.7
192.168.78.8
10.8.8.8
} { ping $address }
tclquit
For brevity, let’s only include the output from Router1, but all routers should show only successful pings:
Router1#tclsh
Router1(tcl)#foreach address {
+>192.168.12.1
+>10.1.1.1
+>192.168.12.2
+>192.168.24.2
+>192.168.23.2
+>192.168.23.3
+>192.168.35.3
+>192.168.24.4
+>192.168.46.4
+>192.168.35.5
+>192.168.56.5
+>192.168.57.5
+>192.168.56.6
+>192.168.46.6
+>10.6.6.6
+>192.168.57.7
+>192.168.78.7
+>192.168.78.8
+>10.8.8.8
+>} { ping $address }
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/5 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/5 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.24.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/5 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.23.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/5 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.23.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.35.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.24.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/6 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.46.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.35.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.56.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.57.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.56.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.46.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.6.6.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.57.7, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/2 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.78.7, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.78.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms
Router1(tcl)#tclquit
Router1#

NTP

The configuration of NTP is mostly straightforward, but can be prone to error. The configuration is identical on each client, as they all point to the same NTP server.

One issue that can cause concern when configuring NTP is that it can take time for time sources to synchronize. Don’t be concerned if associations don’t immediately reflect that they are synchronized; however, if a substantial amount of time passes and there still isn’t a synchronized association, you need to start troubleshooting.

Configuration Snippets

The NTP server is the only router with a different configuration:
Router2#show running-config | include ntp
ntp authentication-key 1 md5 Apress
ntp trusted-key 1
ntp source Loopback172
ntp master 3
Router2#
The clients all have the same NTP configuration:
ntp authenticate
ntp authentication-key 1 md5 Apress
ntp trusted-key 1
ntp server 172.16.2.2 key 1 source Loopback172

Verification

The NTP server shows that it is stratum 3. The reference is a stratum 2 internal clock:
Router2#show ntp status
Clock is synchronized, stratum 3, reference is 127.127.1.1
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**10
ntp uptime is 39300 (1/100 of seconds), resolution is 4000
reference time is D8C6E627.F6041B38 (11:48:23.961 HST Wed Apr 1 2015)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 2.40 msec, peer dispersion is 1.20 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000000000 s/s
system poll interval is 16, last update was 15 sec ago.
Router2#
Router2#show ntp associations
  address         ref clock       st   when   poll reach  delay  offset   disp
*~127.127.1.1     .LOCL.           2      0     16   377  0.000   0.000  1.204
 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured
Router2#
The clients should show that they are synchronized with 172.16.2.2. If you are using GNS3, don’t be too concerned if the association doesn’t come up. A limitation of the virtual routers is that some NTP is thrown off. In this example, the configuration is correct, but the association is considered invalid. Sometimes removing and readding the ntp server statement will fix the problem:
Router5#show ntp associations detail
172.16.2.2 configured, ipv4, authenticated, insane, invalid, unsynced, stratum 16
After removing and readding the ntp server statement, the association formed:
Router5(config)#no ntp server 172.16.2.2 key 1 source Loopback172
Router5(config)#ntp server 172.16.2.2 key 1 source Loopback172
Router5(config)#do show ntp asso
  address         ref clock       st   when   poll reach  delay  offset   disp
*~172.16.2.2      127.127.1.1      3      1     64     1  2.000   0.000 1939.2
 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured
Router5(config)#do show ntp status
Clock is synchronized, stratum 4, reference is 172.16.2.2
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**10
ntp uptime is 295300 (1/100 of seconds), resolution is 4000
reference time is D8C6F0E8.D4395A58 (12:34:16.829 HST Wed Apr 1 2015)
clock offset is 0.0000 msec, root delay is 2.00 msec
root dispersion is 192.71 msec, peer dispersion is 189.45 msec
loopfilter state is 'CTRL' (Normal Controlled Loop), drift is 0.000000033 s/s
system poll interval is 64, last update was 1 sec ago.
Router5(config)#
It is also possibly failed authentication. Turn on debugging to ensure that it isn’t receiving authentication failures. This example changed the key to create a failure:
Router5#debug ntp all
NTP events debugging is on
NTP core messages debugging is on
NTP clock adjustments debugging is on
NTP reference clocks debugging is on
NTP packets debugging is on
*Apr  1 22:07:23.608: NTP message sent to 172.16.2.2, from interface 'Loopback172' (172.16.5.5).
*Apr  1 22:07:23.609: NTP message received from 172.16.2.2 on interface 'Loopback172' (172.16.5.5).
*Apr  1 22:07:23.610: NTP Core(DEBUG): ntp_receive: message received
*Apr  1 22:07:23.610: NTP Core(DEBUG): ntp_receive: peer is 0xB5334100, next action is 1.
*Apr  1 22:07:23.610: NTP Core(INFO): 172.16.2.2 C01C 8C bad_auth crypto_NAK

Named Mode EIGRP with Authentication

The main purpose of this exercise was to experiment with EIGRP in named mode. This style of configuring EIGRP pulls all of the configuration into the EIGRP process and allows for configuration of multiple address families.

In this exercise, you used MD5 authentication with a key chain. The key chain provides the ability to easily change keys. Another option with named mode EIGRP is to use SHA256, but as of IOS 15.4, that method does not allow the use of key chains.

Configuration Snippets

In this configuration, all of the participating routers have the same EIGRP configuration:
Router2(config)#key chain FOR_EIGRP
Router2(config-keychain)#key 1
Router2(config-keychain-key)#send-lifetime 00:00:00 1 Jan 2000 23:23:59 31 Dec 2030
Router2(config-keychain-key)#key-string Apress
Router2(config-keychain-key)#router eigrp Apress
Router2(config-router)#address-family ipv4 autonomous-system 10
Router2(config-router-af)#network 192.0.0.0 0.255.255.255
Router2(config-router-af)#af-interface default
Router2(config-router-af-interface)#
Router2(config-router-af-interface)#authentication mode md5
Router2(config-router-af-interface)#authentication key-chain FOR_EIGRP

Verification

After configuring EIGRP, the EIGRP routes should replace the OSPF routes for anything in the 192.0.0.0/8 network. When you look at show ip route ospf, the only 192.0.0.0/8 network you should see is for the link between Router7 and Router8. This is because it is not part of the EIGRP autonomous system and is only in OSPF because it was redistributed from BGP:
Router2#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override
Gateway of last resort is not set
      10.0.0.0/24 is subnetted, 3 subnets
O IA     10.6.6.0 [110/21] via 192.168.24.4, 03:21:23, Ethernet0/1
O E2     10.8.8.0 [110/1] via 192.168.24.4, 01:52:17, Ethernet0/1
      172.16.0.0/32 is subnetted, 5 subnets
O        172.16.3.3 [110/11] via 192.168.23.3, 03:21:23, Ethernet0/2
O        172.16.4.4 [110/11] via 192.168.24.4, 03:21:23, Ethernet0/1
O        172.16.5.5 [110/31] via 192.168.24.4, 01:52:17, Ethernet0/1
O        172.16.6.6 [110/21] via 192.168.24.4, 03:21:23, Ethernet0/1
O E2  192.168.78.0/24 [110/1] via 192.168.24.4, 01:52:17, Ethernet0/1
Router2#
When you look at show ip route eigrp, you should see all the networks advertised in EIGRP, other than the locally connected networks:
Gateway of last resort is not set
D     192.168.35.0/24 [90/1536000] via 192.168.23.3, 00:03:57, Ethernet0/2
D     192.168.46.0/24 [90/1536000] via 192.168.24.4, 00:03:55, Ethernet0/1
D     192.168.56.0/24 [90/2048000] via 192.168.24.4, 00:03:55, Ethernet0/1
                      [90/2048000] via 192.168.23.3, 00:03:55, Ethernet0/2
D     192.168.57.0/24 [90/2048000] via 192.168.23.3, 00:03:55, Ethernet0/2
Router2#
The command show ip eigrp topology can be used to also see EIGRP topology information for connected routes:
Router2#show ip eigrp topology
EIGRP-IPv4 VR(Apress) Topology Table for AS(10)/ID(172.16.2.2)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
P 192.168.23.0/24, 1 successors, FD is 131072000
        via Connected, Ethernet0/2
P 192.168.24.0/24, 1 successors, FD is 131072000
        via Connected, Ethernet0/1
P 192.168.35.0/24, 1 successors, FD is 196608000
        via 192.168.23.3 (196608000/131072000), Ethernet0/2
P 192.168.12.0/24, 1 successors, FD is 131072000
        via Connected, Ethernet0/0
P 192.168.46.0/24, 1 successors, FD is 196608000
        via 192.168.24.4 (196608000/131072000), Ethernet0/1
P 192.168.57.0/24, 1 successors, FD is 262144000
        via 192.168.23.3 (262144000/196608000), Ethernet0/2
P 192.168.56.0/24, 2 successors, FD is 262144000
        via 192.168.23.3 (262144000/196608000), Ethernet0/2
        via 192.168.24.4 (262144000/196608000), Ethernet0/1
Router2#

Multicast

A key to this exercise is that most segments will have listeners. This makes PIM dense mode the best choice.

If you look at unicast routing, you see that the best path is through Router4, but you want it to work for any path. If Router4 is not available or not selected for some reason, you need to be able to go through Router3 and Router5 to get to Router6.

Configuration Snippets

To create the listener on Router6, you can use ip igmp join-group 229.1.1.1 on Loopback172:
Router6(config)#ip multicast-routing
Router6(config)#interface lo172
Router6(config-if)#ip igmp join-group 229.1.1.1
Router6(config-if)#ip pim dense-mode
Router6(config-if)#
Apr  1 23:08:08.770: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 172.16.6.6 on interface Loopback172
Router6(config-if)#int range eth0/0 - 1
Router6(config-if-range)#ip pim dense-mode
Router6(config-if-range)#
Then you need to enable multicast routing and PIM on the routers between the source and destination. Since you are using dense mode, you don’t need to configure a rendezvous point:
Router2(config)#ip multicast-routing
Router2(config)#int range eth0/1-2
Router2(config-if-range)#ip pim dense-mode
Router2(config-if-range)#
Router3(config-if-range)#ip pim dense-mode
Router3(config-if-range)#
Apr  1 23:11:23.764: %PIM-5-NBRCHG: neighbor 192.168.23.2 UP on interface Ethernet0/0
Router3(config-if-range)#
Apr  1 23:11:25.732: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 192.168.23.3 on interface Ethernet0/0
Apr  1 23:11:25.732: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 192.168.35.3 on interface Ethernet0/1
Router3(config-if-range)#
Router4(config)#ip multicast-routing
Router4(config)#interface range eth0/0 - 1
Router4(config-if-range)#ip pim dense-mode
Router4(config-if-range)#
Apr  1 23:12:42.162: %PIM-5-NBRCHG: neighbor 192.168.24.2 UP on interface Ethernet0/0
Apr  1 23:12:42.176: %PIM-5-NBRCHG: neighbor 192.168.46.6 UP on interface Ethernet0/1
Apr  1 23:12:42.190: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 192.168.46.6 on interface Ethernet0/1
Router4(config-if-range)#
Router5(config)#ip multicast-routing
Router5(config)#interface range eth0/0 - 1
Router5(config-if-range)#ip pim dense-mode
Router5(config-if-range)#
Apr  1 23:13:39.735: %PIM-5-NBRCHG: neighbor 192.168.56.6 UP on interface Ethernet0/1
Apr  1 23:13:39.753: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 192.168.56.6 on interface Ethernet0/1
Apr  1 23:13:39.754: %PIM-5-NBRCHG: neighbor 192.168.35.3 UP on interface Ethernet0/0
Router5(config-if-range)#

Verification

The best verification is ping. If ping fails, then you can start troubleshooting:
Router2(config)#do ping 229.1.1.1
Type escape sequence to abort.
Sending 1, 100-byte ICMP Echos to 229.1.1.1, timeout is 2 seconds:
Reply to request 0 from 172.16.6.6, 2 ms
Reply to request 0 from 172.16.6.6, 3 ms
Reply to request 0 from 172.16.6.6, 2 ms
Router2(config)#
If you need to troubleshoot, look at the mroute tables on routers in the path. If you were using spare mode, you would also look at the RP information. In this case, you can see that Router3 built trees for the multicast group. If you forgot to enable PIM on an interface, you might be missing mroute entries, and you might end up with reverse path forwarding check errors:
Router3#show ip mroute 229.1.1.1
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
       L - Local, P - Pruned, R - RP-bit set, F - Register flag,
       T - SPT-bit set, J - Join SPT, M - MSDP created entry, E - Extranet,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report,
       Z - Multicast Tunnel, z - MDT-data group sender,
       Y - Joined MDT-data group, y - Sending to MDT-data group,
       G - Received BGP C-Mroute, g - Sent BGP C-Mroute,
       N - Received BGP Shared-Tree Prune, n - BGP C-Mroute suppressed,
       Q - Received BGP S-A Route, q - Sent BGP S-A Route,
       V - RD & Vector, v - Vector, p - PIM Joins on route
Outgoing interface flags: H - Hardware switched, A - Assert winner, p - PIM Join
 Timers: Uptime/Expires
 Interface state: Interface, Next-Hop or VCD, State/Mode
(*, 229.1.1.1), 00:01:57/stopped, RP 0.0.0.0, flags: D
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    Ethernet0/1, Forward/Dense, 00:01:57/stopped
    Ethernet0/0, Forward/Dense, 00:01:57/stopped
(192.168.24.2, 229.1.1.1), 00:01:57/00:01:02, flags: PT
  Incoming interface: Ethernet0/0, RPF nbr 192.168.23.2
  Outgoing interface list:
    Ethernet0/1, Prune/Dense, 00:01:57/00:01:02, A
(172.16.2.2, 229.1.1.1), 00:01:57/00:01:02, flags: PT
  Incoming interface: Ethernet0/0, RPF nbr 192.168.23.2
  Outgoing interface list:
    Ethernet0/1, Prune/Dense, 00:01:57/00:01:02
(192.168.23.2, 229.1.1.1), 00:01:57/00:01:02, flags: T
  Incoming interface: Ethernet0/0, RPF nbr 192.168.23.2
  Outgoing interface list:
    Ethernet0/1, Forward/Dense, 00:01:57/stopped
Router3#

Summary

This chapter provided a review of protocols, but added new information and theory about the protocols as they pertain to the control plane. It also introduced a few additional control plane protocols, such as PIM, DNS, and NTP.

The next chapter tightens the focus as you delve into availability.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.61.142