Network Reachability Protocol

When the neighbor state is Up, the EGP neighbors can begin exchanging reachability information. Each gateway periodically sends a Poll message to its neighbor, containing some sequence number. The neighbor responds with an Update message that contains the same sequence number and a list of reachable networks. Example 1-5 shows how Cisco's IOS Software uses the sequence numbers.

Example 1 -5 EGP Neighbors Poll Each Other Periodically for Network Reachability Updates

EGP: from to, version-2, asystem=l, sequence-120

Type=REACH, Code=HELL0, Status=1 (UP) EGP: from to 192,168.16.1, version-2, asystem=2, sequence=l20

Type=REACH, Code=I-HEARD-YOU, Status=1 (UP) EGP: from to, versions, asystem=1, sequenced 20

Type=REACH, Code=HELLO, Status=1 (UP) EGP: from to, version=2, asystem=2, sequenced20

Type=REACH, Code=I-HEARD-YOU, Status=1 (UP) EGP: from to, version^, asystem=1, sequence=120

Type=POLL, Code=0, Status=1 (UP), Net= EGP: from to, version=2, asystem=2, sequence=120 Type=UPDATE, Code=0, Status=1 (UP), IntGW=2, ExtGW=1, Net= Network via in 0 hops Network via in 0 hops Network via in 3 hops Network via in 0 hops Network via in 3 hops Network via in 3 hops Network via in 3 hops EGP: updated 7 routes

EGP: from to, version=2, asystem=2, sequence=3

Type=P0LL, Code=0, Status=1 (UP), Net= EGP: from to, version=2, asystem=1, sequence=3

Type=UPDATE, Code=0, Status=1 (UP), IntGW=1, ExtGW=0, Net= Network via in 0 hops EGP: from to, version=2, asystem=1, sequenced 21

Type=REACH, Code=HELLO, Status=1 (UP) EGP: from to, version-2, asystem=2, sequence=121 Type=REACH, Code=I-HEARD-YOU, Status=1 (UP)

Every Hello/I-H-U pair exchanged between neighbors contains the same sequence number until a Poll is sent. The Poll/Update pair also uses the same sequence number. After the Update has been received, the active neighbor increments the sequence number. In Example 1-5, the sequence number is 120 through the Poll/Update, and it then is incremented to 121. Notice that both neighbors send a Poll; in this example, the Poll from the passive neighbor ( has an entirely different sequence number (3). A neighbor always responds with an Update containing the same sequence number as the Poll.

The default polling interval used by Cisco's IOS Software is 180 seconds and can be changed with the command timers egp. Normally, a gateway sends an Update only when it is polled; however, this means a topology change might go unannounced for up to 3 minutes. EGP provides for this eventuality by allowing a gateway to send one unsolicited Update—that is, an Update that is not in response to a Poll—each Poll interval. Cisco, however, does not support unsolicited Updates.

NOTE The timers egp command is also used to change the Hello interval. The format of the command is timers egp hello polltime.

Both the Poll and the Update messages include the address of a source network. For example, the Poll and Update messages in Example 1-5 show a source network of The source network is the network from which all reachability information is measured—that is, all networks requested or advertised can be reached via a router attached to the source network. Although this network is usually the network to which the two neighbors are both attached, it is more accurately the network about which the Poll is requesting information, and the network about which the Update is supplying information. EGP is a purely classful protocol, and the source network—as well as the network addresses listed in the Updates—are always major class network addresses, and never subnets.

Following the source network address is a list of one or more routers and the networks that can be reached via those routers. The common characteristic of the routers on the list is that they are all attached to the source network. If a router on the list is not the EGP gateway that originated the Update, the router is an indirect or third-party neighbor.

Figure 1-3 illustrates the concept of indirect EGP neighbors. One router, Moe, is a core gateway and is peered with three other gateways.

The debug messages in Example 1-5 are taken from Shemp, the router in AS1. Notice in the Update originated by Moe ( that three networks are listed as reachable via Moe, but also, four networks are listed as reachable via Larry ( and Curly ( These two routers are Shemp's indirect neighbors, via Moe. Joe, in AS3, is not an indirect neighbor, because it is not attached to the source network. Its networks are merely advertised as being reachable via Moe.

The advertisement of indirect neighbors saves bandwidth on a common link, but more importantly, indirect neighbors increase efficiency by eliminating an unnecessary router hop. In Figure 1-3, for example, Shemp is not peered with any router other than Moe. In fact, Larry is not even speaking EGP, but is advertising its networks to Moe via RIP. Moe is performing a sort of "preemptive redirect" by informing Shemp of better next-hop routers than itself.

In fact, it is possible for an EGP Update to contain indirect neighbors only—that is, the originator might not include itself as a next hop to any network. In this scenario, the originator is a route server. It has learned reachability information from an IGP or from static routes, and it advertises this information to EGP neighbors without itself performing any packet-forwarding functions.

Figure 1 -3 Indirect EGP Neighbors

Figure 1 -3 Indirect EGP Neighbors

From the perspective of an EGP gateway, a neighbor is either an interior gateway or an exterior gateway. A neighbor is an interior gateway if it is in the same AS, and it is an exterior gateway if it is in a different AS. In Figure 1-3, all the EGP gateways see all their neighbors as external gateways. If Larry were speaking EGP and peered with Moe, those two routers would see each other as interior gateways.

An EGP Update message includes two fields for describing whether the routers in its list are interior or exterior gateways (see the following section, "EGP Message Formats"). Looking at the first Update message in Example 1-5, you can see these fields just before the source network: IntGW=2 and ExtGW=l. The sum of these two fields tells how many routers are listed in the Update. All the interior gateways specified are listed first; therefore, if IntGW=2 and ExtGW=l, the first two routers listed are interior gateways and the last router listed is an exterior gateway. If you compare the Update message from in Example 1-5 with Figure 1-3, you will see that the three networks reachable via Curly are listed last in the Update and are marked as exterior—that is, they are reachable via a gateway exterior to Moe. Because stub gateways cannot advertise networks outside of their own AS, only Updates from core gateways can include exterior gateways.

The EGP Update message associates a distance with each network it lists. The distance field is 8 bits, so the distance can range from 0 to 255. RFC 904 does not specify how the distance is to be interpreted, however, other than that 255 is used to indicate unreachable networks. Nor does the RFC define an algorithm for using the distance to calculate shortest inter-AS paths. Cisco chooses to interpret the distance as hops, as shown in Example 1-5. The default rales are very basic:

• A gateway advertises all networks within its own AS as having a distance of 0.

• A gateway advertises all networks within an AS other than its own as having a distance of 3.

• A gateway indicates that a network has become unreachable by giving it a distance of


For example, you can see in Example 1-5 and Figure 1-3 that although network is one router hop away from Moe, Moe is advertising the network with a distance of 0—the same distance as network, which is directly attached. Network is also one router hop away, and network is two hops away, but both are in different autonomous systems and are therefore advertised with a distance of 3. The point is that the distance used by EGP is virtually useless for determining the best path to a network.

Example 1-6 shows the routing table of Shemp and the route entries resulting from the Update in Example 1-5.

Example 1-6 Shemp's Routing Table

Shemp#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, 0 - 0SPF, IA - 0SPF inter area E1 - OSPF external type 1, E2 - 0SPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

Gateway of last resort is not set

E [140/4] via, 00:00:52, Ethernet® C is directly connected, Ethernet® E [140/1] via, 00:00:52, Ethernet© E [140/4] via, 00:00:52, Ethernet© E [140/1] via 192,168.16.4, 00:00:52, Ethernet© E [140/4} via, 00:00:52, Ethernet© E [140/1] via, 00:00:52, Ethernet© E [140/4] via, 00:00:52, Ethernet© is subnetted, 1 subnets C is directly connected, Loopback©


There are two points of interest in the routing table. First, notice that the EGP entries have an administrative distance of 140. This is higher than the administrative distance of any IGP (with the exception of External EIGRP), so a router will always choose an IGP route over an EGP advertisement of the same network.

Second, notice that the distances to each of the EGP-advertised networks are one higher than the distances shown in the Update of Example 1-5. Cisco's EGP process increments the distance by one, just as a RIP routing algorithm does.

Was this article helpful?

0 0
100 SEO Tips

100 SEO Tips

100 SEO Tips EVERY SEO Enthusiast Should Know. This Report 100 SEO Tips will help you to Utilize These Tips to Dominate The Search Engine Today.

Get My Free Ebook

Post a comment