You want to run EIGRP on a simple network.
The following commands configure EIGRP on one router in a simple network:
Router1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#interface Ethernet0 Router1(config-if)#ip address 192.168.20.1 255.255.255.0 Router1(config-if)#exit Router1(config)#interface Serial0.1 point-to-point Router1(config-subif)#ip address 172.25.2.2 255.255.255.252 Router1(config-subif)#exit Router1(config)#router eigrp 55 Router1(config-router)#network 172.25.0.0 Router1(config-router)#network 192.168.20.0 Router1(config-router)#end Router1#
Naturally, you need to configure the other routers in this network to also exchange routing information using EIGRP and the same process number (55). For example:
Router2#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router2(config)#interface Serial0.1 point-to-point Router2(config-subif)#ip address 172.25.2.1 255.255.255.252 Router2(config-subif)#exit Router2(config)#router eigrp 55 Router2(config-router)#network 172.25.0.0 Router2(config-router)#end Router2#
This example shows how simple the basic EIGRP configuration is. To get the standard default functionality, you only need to enable EIGRP and add at least one network statement. In the example, we have set the EIGRP process ID numbers on both routers to 55:
Router1(config)#router eigrp 55
This process ID number, which is sometimes referred to as an Autonomous System Number (ASN), is just an arbitrary number between 1 and 65,535. The only restriction is that all of the routers that will be exchanging interior routing information via EIGRP must be configured with the same process number. You can configure multiple EIGRP instances on the same router by specifying different process ID numbers, but the router will keep them separate unless you configure redistribution in between the processes.
As we discuss in Chapter 9, BGP attaches much greater significance to an ASN, using it to label the networks that a path passes through. In BGP, the ASN must be globally unique. The EIGRP process ID number, on the other hand, has no significance outside of the AS.
The network statements in EIGRP serve a dual role, both defining which networks this router will distribute, and which interfaces will take part in the routing protocol. So, the network 172.25.0.0 command in this example means that, if this router has any interfaces that are directly connected to subnets of 172.25.0.0, then it will inject this information into the routing protocol. It also means that it will try to find EIGRP neighbor routers through these same interfaces.
It is important to remember that while EIGRP is a classless routing protocol, the argument of the network statement is classful by default. This isn't actually a problem, though, because you can separately prevent certain interfaces from taking part in the protocol, and you can define classless summarization of subnets along whatever boundaries you like. We will discuss these features in Recipe 7.6 and Recipe 7.7, respectively. There is also a classless version of the network command, which we will discuss later in this recipe.
The show ip protocols command allows you to look at the details of your EIGRP configuration:
Router1#show ip protocols Routing Protocol is "eigrp 55" 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 metric weight K1=1, K2=0, K3=1, K4=0, K5=0 EIGRP maximum hopcount 100 EIGRP maximum metric variance 1 Redistributing: eigrp 55 Automatic network summarization is in effect Automatic address summarization: 192.168.20.0/24 for Loopback0, Serial0.1 172.25.0.0/16 for Ethernet0 Summarizing with metric 128256 Maximum path: 4 Routing for Networks: 172.25.0.0 192.168.20.0 Routing Information Sources: Gateway Distance Last Update 172.25.2.1 90 00:01:49 Distance: internal 90 external 170 Router2#
In this case, you can see that this router is using EIGRP process number 55 to redistribute routing information about 172.25.0.0 and 192.168.20.0. It also shows several other useful pieces of information, such as what filters this router applies when sending and receiving routes, what external information is redistributed into EIGRP, and what neighboring devices we exchange information with. Most of the parameters shown in this particular output reflect the default values for EIGRP, but throughout this chapter you will find other examples showing several different useful variations.
One of the most useful EIGRP commands is show ip eigrp neighbors:
Router1#show ip eigrp neighbors IP-EIGRP neighbors for process 55 H Address Interface Hold Uptime SRTT RTO Q Seq Type (sec) (ms) Cnt Num 0 172.25.2.1 Se0.1 13 00:00:01 1 2000 2 296 Router1#
By default, the router attempts to find adjacent routers on all interfaces included in your network statements. In this case, we see only one EIGRP neighbor router. The router will exchange routing information only with the active neighbors listed in this command.
The show ip route eigrp command lists the routes that have been learned through EIGRP:
Router1#show ip route eigrp D 172.22.0.0/16 [90/2172416] via 172.25.2.1, 00:04:04, Serial0.1 172.25.0.0/16 is variably subnetted, 6 subnets, 4 masks D 172.25.25.6/32 [90/2300416] via 172.25.2.1, 00:04:04, Serial0.1 D 172.25.25.1/32 [90/2297856] via 172.25.2.1, 00:04:04, Serial0.1 D 172.25.1.0/24 [90/2172416] via 172.25.2.1, 00:04:04, Serial0.1 D 172.25.0.0/16 is a summary, 00:06:39, Null0 D 10.0.0.0/8 [90/4357120] via 172.25.2.1, 00:04:04, Serial0.1 Router1#
This output shows that we can reach the destination subnet 172.25.1.0/24 through the neighboring router at 172.25.2.1, which is connected through interface Serial0.1. This route has an EIGRP metric value of 2172416 and an administrative distance of 90. Please refer to Chapter 5 for a more detailed discussion of administrative distance.
Starting in IOS Version 12.0(4)T, Cisco added a netmask argument to the network command, following a similar syntax to the corresponding OSPF command. This gives greater control over which interfaces will take part in the protocol, as well as what networks will be distributed into EIGRP:
Router1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#router eigrp 55 Router1(config-router)#network 172.25.2.2 0.0.0.0 Router1(config-router)#network 192.168.20.0 0.0.0.255 Router1(config-router)#end Router1#
Note that this command uses a wildcard rather than a netmask. So the first command specifies only the single address, 172.25.2.2/32, while the second command includes anything that is a subnet of 192.168.20.0/24.
The output of show ip protocols shows the change:
Router1#show ip protocols Routing Protocol is "eigrp 55" Outgoing update filter list for all interfaces is not set Incoming update filter list for all interfaces is not set Serial0.1 filtered by (prefix-list) Inbound Default networks flagged in outgoing updates Default networks not accepted from incoming updates EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0 EIGRP maximum hopcount 100 EIGRP maximum metric variance 1 Redistributing: static, eigrp 55 Automatic network summarization is not in effect Maximum path: 4 Routing for Networks: 172.25.2.2/32 192.168.20.0/24 Routing Information Sources: Gateway Distance Last Update 172.25.2.1 90 00:17:06 Distance: internal 90 external 170 Router1#
This configuration can be slightly confusing because, for example, we have configured an EIGRP network statement for just the one address, 172.25.2.2/32. Looking at the actual interface you can see that while its IP address does match the configured address, it belongs to a larger subnet, 172.25.2.0/30. So, while we know that this will enable EIGRP for this interface, you might think that the router would advertise the host route, 172.25.2.2/32, instead of the whole subnet, 172.25.2.0/30. If you try it in practice, you will see that the router advertises the larger /30 subnet. This is usually the desired behavior. However, if you want something else, Recipe 7.2 shows how to filter routes with EIGRP.
Recipe 7.2; Recipe 7.6; Recipe 7.7; Chapter 5
Top |