⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tyt05fi.htm

📁 一个学习tcp/ip协议的教程
💻 HTM
📖 第 1 页 / 共 5 页
字号:
     } ;     proto rip {          noannounce all ;     } ;} ;</FONT></PRE><P>The code above shows a number of configuration details. It starts with a number of options and the switch that turns EGP on and sets the neighbor IP address. This is followed by code that defines the way EGP behaves. Most of the details are of little interest and are seldom (if ever) modified by a user. Instead, configuration routines tend to manage this file&#146;s contents.<BR><P>The UNIX system administrator also has a program called route that enables direct entry of routing table information. The information on a UNIX system regarding routing is usually stored in the file /etc/gateways.<BR><P>It has become common practice to allow a default network Internet address of 0.0.0.0, which refers to a gateway on the network that should be capable of resolving an unknown address. (This is included in the previous sample configuration file as <I>proto default</I>.) The default route is used when the local machine cannot resolve the address properly. Because the routing tables on a gateway are usually more complete than those on a local machine, this helps send packets to their intended destination. If the default address gateway cannot resolve the address, an Internet Control Message Protocol (ICMP) error message is returned to the sender.<BR><BR><A ID=E68E51 NAME=E68E51></A><H3 ALIGN=CENTER><CENTER><FONT SIZE=5 COLOR=#FF0000><B>Routing</B></FONT></CENTER></H3><BR><P>Routing refers to the transmission of a packet of information from one machine through another. Each machine that the packet enters analyzes the contents of the packet header and decides its action based on the information within the header. If the destination address of the packet matches the machine's address, the packet should be retained and processed by higher-level protocols. If the destination address doesn't match the machine's, the packet is forwarded further around the network. Forwarding can be to the destination machine itself, or to a gateway or bridge if the packet is to leave the local network.<BR><P>Routing is a primary contributor to the complexity of packet-switched networks. It is necessary to account for an optimal path from source to destination machines, as well as to handle problems such as a heavy load on an intervening machine or the loss of a connection. The route details are contained in a routing table, and several sophisticated algorithms work with the routing table to develop an optimal route for a packet.<BR><P>Creating a routing table and maintaining it with valid entries are important aspects of a protocol. Here are a few common methods of building a routing table:<BR><UL><LI>A fixed table is created with a map of the network, which must be modified and reread every time there is a physical change anywhere on the network.<BR></LI><BR><LI>A dynamic table is used that evaluates traffic load and messages from other nodes to refine an internal table.<BR></LI><BR><LI>A fixed central routing table is used that is loaded from the central repository by the network nodes at regular intervals or when needed.<BR></LI><BR></UL><P>Each method has advantages and disadvantages. The fixed table approach, whether located on each network node or downloaded at regular intervals from a centrally maintained fixed table, is inflexible and can't react to changes in the network topology quickly. The central table is better than the first option, simply because it is possible for an administrator to maintain the single table much more easily than a table on each node.<BR><P>The dynamic table is the best for reacting to changes, although it does require better control, more complex software, and more network traffic. However, the advantages usually outweigh the disadvantages, and a dynamic table is the method most frequently used on the Internet.<BR><BR><A ID=E69E72 NAME=E69E72></A><H4 ALIGN=CENTER><CENTER><FONT SIZE=4 COLOR=#FF0000><B>Fewest-Hops Routing</B></FONT></CENTER></H4><BR><P>Most networks and gateways to internetworks work on the assumption that the shortest route (in terms of machines traveled through) is the best way to route messages. Each machine that a message passes through is called a <I>hop</I>, so this routing method is known as <I>fewest hops</I>. Although experimentation has shown that the fewest-hops method is not necessarily the fastest method (because it doesn't take into account transmission speed between machines), it is one of the easiest routing methods to implement.<BR><P>To provide fewest-hops routing, a table of the distance between any two machines is developed, or an algorithm is available to help calculate the number of hops required to reach a target machine. This is shown using the sample internetwork of gateways in Figure 5.2 and its corresponding table of distances between the gateways in the figure, which is shown in Table 5.1.<BR><P><B><A HREF=05tyt02.gif>Figure 5.2. An internetwork of gateways.</A></B><BR><BR><P ALIGN=CENTER><CENTER><FONT COLOR=#000080><B>Table 5.1. Table of fewest hops from Figure 5.2</B>.</FONT></CENTER><BR><CENTER><TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>A</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>B</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>C</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>D</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>E</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>F</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>G</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>H</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>I</I></B></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B>A</B><BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B>B</B><BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>5<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>5<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B>C</B><BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B>D</B><BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B>E</B><BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B>F</B><BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B>G</B><BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>5<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B>H</B><BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B>I</B><BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>5<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD></TABLE></CENTER><P>When a message is to be routed using the fewest-hops approach, the table of distances is consulted, and the route with the fewest number of hops is selected. The message is then routed to the gateway that is closest to the destination network. When intermediate gateways receive the message, they perform the same type of table lookup and forward to the next gateway on the route.<BR><P>There are several problems with the fewest-hops approach. If the tables of the gateways through which a message travels to its destination have different route information, it is conceivable that a message that left the source machine on the shortest route could end up following a more circuitous path because of differing tables in the intervening gateways. The fewest-hops method also doesn't account for transfer speed, line failures, or other factors that could affect the overall time to travel to the destination; it is merely concerned with the shortest apparent distance, assuming that all connections are equal. To accommodate these factors, another routing method must be used.<BR><BR><A ID=E69E73 NAME=E69E73></A><H4 ALIGN=CENTER><CENTER><FONT SIZE=4 COLOR=#FF0000><B>Type of Service Routing</B></FONT></CENTER></H4><BR><P>This type of routing depends on the type of routing service available from gateway to gateway. This is called <I>type of service</I> (TOS) routing. It is also more formally called <I>quality of service</I> (QOS) by OSI. TOS includes consideration for the speed and reliability of connections, as well as security and route-specific factors.<BR><P>To effect TOS routing, most systems use dynamic updating of tables that reflect traffic and link conditions. They also take into account current queue lengths at each gateway, because the fastest theoretical route might not matter if the message is backlogged in a queue. This information is obtained through the frequent transfer of status messages between gateways, especially when conditions deteriorate.<BR><P>Dynamic updating of tables can have a disadvantage in that if tables are updated too frequently, a message might circulate through a section of the internetwork without proper routing to its destination, or proceed through a long and convoluted path. For this reason, dynamic updating occurs at regular but not too frequent intervals. To prevent stray datagrams from circulating on the internetwork too long, the Time to Live information in the IP message header is important.<BR><BLOCKQUOTE><BLOCKQUOTE><HR ALIGN=CENTER><BR><NOTE><IMG SRC=note.gif WIDTH = 75 HEIGHT = 46>The IP header's Time to Live (TTL) field is very important to dynamic gateway routing protocols, which is why it is a mandatory field. Without it, datagrams could circulate throughout the network indefinitely.</NOTE><BR><HR ALIGN=CENTER></BLOCKQUOTE></BLOCKQUOTE><P>The dynamic nature of TOS routing can sometimes cause a message's fragments to be routed in different ways to a destination. For example, if a long message of 10 datagrams is being sent by one route, but the routing tables are changed during transmission to reflect a backlog, the remainder of the datagrams might be sent via an alternate route. This doesn't matter, of course, because the receiving machine reassembles the message in the proper order as the datagrams are received.<BR><BR><A ID=E69E74 NAME=E69E74></A><H4 ALIGN=CENTER><CENTER><FONT SIZE=4 COLOR=#FF0000><B>Updating Gateway Routing Information</B></FONT></CENTER></H4><BR><P>A somewhat simplified example of a dynamic update is useful at this stage. The exact communications protocols between gateways are examined in more detail later today.<BR><P>Assume that two autonomous networks are connected to each other at two locations, as shown in Figure 5.3, with connections to different autonomous networks at other locations. The A&#150;C connection and the B&#150;D connection can both be used for routing from within the networks, depending on which is the optimal path. Gateway C has a copy of gateway A's routing table, and vice versa. Gateways B and D each have copies of the other's routing tables, as well. These copies are transmitted at intervals so the gateways can maintain an up-to-date picture of the connections available through the other gateway. The gateways use EGP to send the messages. (They would use GGP if they were core gateways.)<BR><P><B><A HREF=05tyt03.gif>Figure 5.3. Two interconnected networks.</A></B><BR><P>Suppose that a gateway link within one of the networks was broken due to a machine or connection failure, such as that between gateway C and machine X in Figure 5.3. Gateway C would find out about the problem through an IGP message and update its routing table to reflect the break, usually by putting the largest legal value for routing length in that entry. (Remember that IGP is a general term for any internal network protocol for gateway communications, such as RIP or HELLO.) Gateway C transfers its new copy of the routing table to gateway A.<BR><P>Routing a message to machine Y would now be impossible through the C&#150;X connection. However, because gateway A has the routing information from C, and it exchanges routing information with gateway B, which also exchanges with gateway D, any message passing through either D or B for machine Y could be rerouted up through gateway A, then C, and finally to Y. An EGP message between B&#150;D and A&#150;C would indicate that the new route costs less than the maximum value assigned going through C&#150;X (which is broken), so the round-about transfer through the four gateways can be used.<BR><P>EGP messages between gateways are usually sent whenever a connection problem exists and the routing information is set to its maximum (worst) value, or when a better connection alternative has been discovered for some reason. This can be because of an update from a remote gateway's routing table, or the addition of new connections, machines, or networks to the system. Whichever happens, an EGP message informs all the connected gateways of the changes.<BR><BR><A ID=E68E52 NAME=E68E52></A><H3 ALIGN=CENTER><CENTER><FONT SIZE=5 COLOR=#FF0000><B>The IGP and EGPGateway Protocols</B></FONT></CENTER></H3><BR><P>Gateways need to know what is happening to the rest of the network in order to route datagrams properly and efficiently. This includes not only routing information but also the characteristics of subnetworks. For example, if one gateway is particularly slow but is the only access method to a subnetwork, other gateways on the network can tailor the traffic to suit.<BR><P>A GGP is used to exchange routing information between devices. It is important not to confuse routing information, which contains addresses, topology, and details on routing delays, with the algorithms used to make routing information. Usually the routing algorithms are fixed within a gateway and not modified. Of course, as the routing information changes, the algorithm adapts the chosen routes to reflect the new information.<BR><P>GGPs are primarily for autonomous (self-complete) networks. An autonomous system uses gateways that are connected in one large network, such as one might find in a large corporation. Two kinds of gateways must be considered in an autonomous network. The gateways between smaller subnetworks help tie the small systems into the larger corporate network, but the gateways for each subnetwork are usually under the control of one system (usually in the IS department). These gateways are considered autonomous because the connections between gateways are constant and seldom change. These gateways communicate through an IGP.<BR><P>Large internetworks like the Internet are not as static as corporate systems. Gateways can change constantly as the subsidiary networks make changes, and the communications routes between gateways are more subject to change, too. For widely spread companies, there might be gateways spread throughout the country (or the world) that are all part of the same corporate network but use the Internet to communicate. The communications between these gateways are slightly different than when they are all physically connected together. These gateways communicate through an EGP.<BR><P>There are fewer rules governing IGPs than EGPs simply because the IGP can handle custom-developed applications and protocols within its local network. When the Internet is used for gateway-to-gateway communications, the messages must conform to the internetwork standards. Also, when connecting two subnetworks, it is possible to send only one message to the subnetwork gateway through EGP, which can then be duplicated, modified, and propagated to all gateways on the internal system using IGP. EGP has formalized rules governing its use.<BR><BR><A ID=E68E53 NAME=E68E53></A><H3 ALIGN=CENTER><CENTER><FONT SIZE=5 COLOR=#FF0000><B>Gateway-to-Gateway Protocol (GGP)</B></FONT></CENTER></H3><BR><P>GGP is used for communications between core gateways. A recent improvement of the protocol, called SPREAD, is starting to be used but is not yet as common as GGP. Even if GGP is phased out in favor of SPREAD, it is a useful illustration of gateway-to-gateway protocols.<BR><P>GGP is a vector-distance protocol, meaning that messages tend to specify a destination (vector) and the distance to that destination. Vector-distance protocols are also called Bellman-Ford protocols, after the researchers who first published the idea. For a vector-distance protocol to be effective, a gateway must have complete information about all the gateways on the internetwork; otherwise, computing a distance with a fewest-hops type of protocol cannot succeed.<BR><BLOCKQUOTE><BLOCKQUOTE><HR ALIGN=CENTER><BR><NOTE><IMG SRC=note.gif WIDTH = 75 HEIGHT = 46>You might recall from earlier today that core gateways have complete information about all other core gateways, so a vector-distance protocol works. Non-core gateways don't have a complete internetwork map, so GGP-type messages are not useful.</NOTE><BR><HR ALIGN=CENTER></BLOCKQUOTE></BLOCKQUOTE><P>A gateway establishes its connections to other gateways by sending out messages, waiting for replies, and then building a table. This is initially accomplished when a gateway is installed and has no routing information at all. This aspect of communications is not defined within GGP but relies on network-specific messages. Once the initial table has been defined, GGP is used for all messages.<BR><P>Connectivity with another gateway on the Internet is determined using the K-out-of-N method. In this procedure, a gateway sends an echo message to another gateway and waits for a reply. It repeats this every fifteen seconds. According to the Internet standards, if the gateway does not receive three (K) replies out of four (N) requests, the other gateway is considered down, or unusable, and routing messages are not sent to that gateway. This process can be repeated at regular intervals.<BR><P>If a down gateway becomes active again, the Internet standards require two out of four echo messages to be acknowledged. This is called J-out-of-M, where J is two and M is four. The Internet-assigned values for J, K, M, and N can be changed for autonomous networks, but the standard defines the values for use on the Internet itself.<BR><P>Each message between gateways has a sequence number that is incremented with each transmitted message. Each gateway tracks its own sequence number for sending to every other gateway it is connected to, as well as the incoming sequence numbers from that gateway. They are not necessarily the same, because more messages might flow one way than the other, although usually each message should have an acknowledgment or reply of some type.<BR><P>Sequence numbers have important meanings for the messages and are not just for the sake of keeping an incremental count of the traffic volume. When a gateway receives a message from another gateway, it compares the sequence number in that message to the last received sequence number in its internal tables. If the latest message has a higher sequence number than the last message received, the gateway accepts the message and updates its sequence number to the latest received value. If the number was less than the last received sequence number, the message is considered old and is ignored, with an error message containing the just-received message sent back. This process is shown in Figure 5.4.<BR><P><B><A HREF=05tyt04.gif>Figure 5.4. Processing sequence numbers in </B><B>GGP.</A></B><BR><P>The receiving gateway acknowledges the received message by sending a return message that contains the sequence number of the just-received message. The other gateway compares that number with the number of its last sent message, and if they are the same, the gateway knows that the message was properly received. If the numbers do not match, the gateway knows an error occurred and transmits the message again.<BR><P>When a message is ignored by the recipient gateway, the sending gateway receives a message with the sequence number of the ignored message. It can then determine which messages were skipped and adjust itself accordingly, resending messages that need to be sent.<BR><P>The GGP message format is shown in Figure 5.5. After it is constructed, it is encapsulated into an IP datagram that includes source and target addresses. The first field is a message type, which is set to a value of 12 for routing information. The sequence number was discussed earlier and provides an incremental counter for each message. The Update field is set to a value of 0 unless the sending gateway wants a routing update for the provided destination address, in which case it is set to a value of 1. The Number of Distances field holds the number of groups of addresses contained in the current message.<BR><P><B><A HREF=05tyt05.gif>Figure 5.5. The GGP message format.</A></B><BR><P>For each distance group in the message, a distance value and the number of networks that can be reached at that distance are provided, followed by all the network address identifications. According to the GGP standard, not all the distances need to be reported, but the more information supplied, the more useful the message is to each gateway.<BR><P>GGP does not deal with full Internet addresses specifically, so the host portion of the address does not necessarily have to be included in the address, although the network address is always provided. This can result in different lengths of addresses in the identification field (8, 16, or 24 bits, depending on the type of address).<BR><P>Three other formats are used with GGP messages, as shown in Figure 5.6. The acknowledgment message uses the Type field to indicate whether the message is a positive acknowledgment (type is set to 2) or a negative acknowledgment (type is set to 10) . The sequence number, as mentioned earlier today, is used to identify the message to which the acknowledgment applies.<BR><P><B><A HREF=05tyt06.gif>Figure 5.6. Other GGP message formats.</A></B><BR><P>The echo request and echo reply formats are passed between gateways to inform the gateways of status changes and to ensure the gateway is up. An echo request has the Type field set to the value 8, whereas an echo reply has the Type field set to a value of 0. Because the address of the sending gateway is embedded in the IP header, it is not duplicated in the GGP message. The remaining 24 bits of the message are unused.<BR><P>The network interface status message is used by a gateway to ensure that it is able to send and receive messages properly. This type of message can be sent to the originating gateway itself, with the type field set to a value of 9 and the IP address in the header set to the network interface's address.<BR><BR><A ID=E68E54 NAME=E68E54></A><H3 ALIGN=CENTER><CENTER><FONT SIZE=5 COLOR=#FF0000><B>The External Gateway Protocol (EGP)</B></FONT></CENTER></H3><BR><P>As mentioned earlier, an EGP is used to transfer information between non-core neighboring gateways. Non-core gateways contain complete details about their immediate neighbors and the machines attached to them, but they lack information about the rest of the network. Core gateways know about all the other core gateways but often lack the details of the machines beyond a gateway.<BR><P>EGP is usually restricted to information within the gateway's autonomous system. This prevents too much information from passing through the networks, especially when most of the information that relates to external autonomous systems would be unusable to another gateway. EGP therefore imposes restrictions on the gateways about the machines EGP passes routing information about.<BR><BR><A ID=E69E75 NAME=E69E75></A><H4 ALIGN=CENTER><CENTER><FONT SIZE=4 COLOR=#FF0000><B>Neighbors and EGP</B></FONT></CENTER></H4><BR><P>Because EGP was developed to enable remote systems to exchange routing information and status messages, the protocol is heavily based in requests or commands followed by replies. The four EGP commands and their possible responses are shown in Table 5.2.<BR><BR><P ALIGN=CENTER><CENTER><FONT COLOR=#000080><B>Table 5.2. EGP commands.</B></FONT></CENTER><BR><CENTER><TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Command Name</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Command </I></B><B><I>Description</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Response Name</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Response </I></B><B><I>Description</I></B></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Request<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Request that a neighbor become a gateway<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Confirm/Refuse<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Agree or refuse the request<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Cease<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Request the termination of a neighbor<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Cease-Ack<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Agree to termination<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Hello<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Request confirmation of routing to neighbor (neighbor reachability)<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>IHU<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Confirms the routing<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Poll<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Request that the neighbor provide network information (network reachability)<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Update<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Provides network information</FONT></TABLE></CENTER><BR><P>To understand Table 5.2 properly, you must understand the concept of <I>neighbor</I> to an internetwork. Gateways are neighbors if they share the same subnetwork. They might be gateways to the same network (such as the Internet) or work with different networks. When the two want to exchange information, they must first establish communications between each other; the two gateways are essentially agreeing to exchange routing information. This process is called <I>neighbor acquisition.</I><BR><P>Neighbor doesn't mean the networks have to be next to each other. They are connected by a gateway, but the networks can be on different continents. The term neighbor has to do with connections, not geography.<P>The process of becoming neighbors is formal, because one gateway might not want to become a neighbor at that particular time (for any number of reasons, but usually because the gateway is busy). It begins with a Request, which is followed by either an acceptance (Confirm) or refusal (Refuse) from the second machine. If the two gateways are neighbors, either can break the relationship with a Cease message.<BR><P>After two gateways become neighbors, they assure each other that they are still in contact by occasionally sending a Hello message, to which the second gateway responds with an IHU (I Heard You) message as soon as possible. These Hello/IHU messages can be sent at any time. With several gateways involved on a network, the number of Hello messages can become appreciable as the gateways continue to remain in touch. This process is called <I>neighbor reachability.</I><BR><P>The other message pair sent by EGP is network reachability, in which case one gateway sends a Poll message and expects an Update message in response. The response contains a list of networks that can be reached through that gateway, with a number representing the number of hops that must be made to reach the networks. By assembling the Update messages from different neighbors, a gateway can decide the best route to send a datagram.<BR><P>Finally, an error message is returned whenever the gateway cannot understand an incoming EGP message.<BR><BR><A ID=E69E76 NAME=E69E76></A><H4 ALIGN=CENTER><CENTER><FONT SIZE=4 COLOR=#FF0000><B>EGP Messages</B></FONT></CENTER></H4><BR><P>The layout of the different messages used by EGP are shown in Figure 5.7. The fields have the following meanings:<BR><UL><LI>The Version field holds the EGP version number of the sending machine (the current version is 2).<BR></LI><BR><LI>The Type field identifies the type of EGP messages. There are ten message types in EGP.<BR></LI><BR><LI>The Code field contains a value that identifies the subtype of the message.<BR></LI><BR><LI>The Status field is used with the Type and Code fields to reflect the current status of the gateway's state.<BR></LI><BR><LI>The Checksum is calculated for the EGP message in the same manner as other TCP/IP headers.<BR></LI><BR><LI>The System Number is an identification of the autonomous system that the sending gateway belongs to.<BR></LI><BR><LI>The Sequence Number of the message is an incrementing counter for each message, also used to identify a reply to a previous message.<BR></LI><BR></UL><P><B><A HREF=05tyt07.gif>Figure 5.7. EGP message format.</A></B><BR><P>The Reason field of the Error message can contain one of the following integers:<BR><UL><UL><P>0&#151;Unspecified error</UL></UL><UL><UL><P>1&#151;Bad EGP header</UL></UL><UL><UL><P>2&#151;Bad EGP data field</UL></UL><UL><UL><P>3&#151;Reachability information not available</UL></UL><UL><UL><P>4&#151;Excessive polling</UL></UL><BLOCKQUOTE><BLOCKQUOTE><P>5&#151;No response received to a poll<BR></BLOCKQUOTE></BLOCKQUOTE><P>Through a combination of the message Type, Code, and Status fields, the purpose and meaning of the EGP message can be more accurately determined. Table 5.3 shows all codes and status values.<BR><BR><P ALIGN=CENTER><CENTER><FONT COLOR=#000080><B>Table 5.3. EGP messages.</B></FONT></CENTER><BR><CENTER><TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><A ID=I2 NAME=I2></A><B><I>Type</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Description</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Code</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Description</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Status</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Description</I></B></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Update<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Indeterminate<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Up<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Down<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>128<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Unsolicited<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Poll<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Indeterminate<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Up<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Down<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Neighbor Acquisition<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Request<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Not specified<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Confirm<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Active mode<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Refuse<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Passive mode<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Cease<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Insufficient Resources<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Cease-Ack<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Prohibited<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>5<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Shutting Down<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>6<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Parameter Problem<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>7<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Protocol Violation<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>5<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Neighbor Reachability<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Hello<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Indeterminate<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>I Heard You<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Up<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Down<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>8<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Error<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Indeterminate<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Up<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Down<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><BR></FONT></TD><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>128<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Unsolicited</FONT></TABLE></CENTER><BR><P>The Status field can indicate whether a gateway is<A ID=I3 NAME=I3></A> up or down. In the down state, the gateway does not perform any routing. The Neighbor Acquisition status indicator can show whether the machine is active or passive. When passive, the gateway does not generate any Hello commands, but it responds to them. At least one neighbor has to be in the active state to issue the Hellos.<BR><P>When a list of networks and their distances must be added to an EGP header, it is done in the format shown in Figure 5.8. The number of distances in the list is specified, followed by entries with the same format giving the distance (number of hops) to the gateway, the number of networks that can be reached through that gateway, and the network addresses. The number of internal and external gateways in the EGP header tells the gateway how many entries are in the list.<BR><P><B><A HREF=05tyt08.gif>Figure 5.8. Routing information in an EGP </B><B>header.</A></B><BR><P>Using EGP, gateways can update each other and keep their routing tables current. A similar scheme is used for IGP, although the messages can be custom-designed by the network manager and application development team because they are not transmitted over the Internet.<BR><BR><A ID=E70E26 NAME=E70E26></A><H5 ALIGN=CENTER><CENTER><FONT SIZE=4 COLOR=#FF0000><B>Neighbor Acquisition Messages</B></FONT></CENTER></H5><BR><P>A Neighbor Acquisition message (Request, Confirm, and Refuse Acquisition message types) is sent when a neighbor is being checked for acquisition. The same message format is used whether the particular message is a request, a confirmation, or a refusal.<BR><P>The type is set to a value of 3 to indicate that the message is a neighbor acquisition, and the Code field provides the details as to the type of Acquisition message, as shown in Table 5.4.<BR><BR><P ALIGN=CENTER><CENTER><FONT COLOR=#000080><B>Table 5.4. EGP Acquisition message codes.</B></FONT></CENTER><BR><CENTER><TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Code</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Description</I></B></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Request Acquisition<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Confirm Acquisition<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Refuse Acquisition<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Cease<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Cease Acknowledgment</FONT></TABLE></CENTER><BR><P>The Status field in the Acquisition message header is set to one of eight possible values and is used to provide further information about the request. The valid Status field values are shown in Table 5.5.<BR><BR><P ALIGN=CENTER><CENTER><FONT COLOR=#000080><B>Table 5.5. EGP Acquisition message Status values.</B></FONT></CENTER><BR><CENTER><TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Status</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Description</I></B></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Unspecified; used when no other code is applicable<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Active; indicates an active status mode<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Passive; indicates a passive status mode<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>3<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Insufficient resources available<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>4<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Administratively prohibited<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>5<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Going down either because of operator intervention or expiration of the t3 timer<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>6<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Parameter error with incoming message<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>7<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Protocol violation in incoming message or response message is incompatible with current machine state</FONT></TABLE></CENTER><BR><P>The EGP Neighbor Acquisition message adds two new fields to the basic EGP message header. The 16-bit Hello Interval field specifies the minimum interval between Hello command pollings, in seconds. The 16-bit Poll Interval field specifies the minimum interval between Poll command pollings, again in seconds.<BR><BR><A ID=E70E27 NAME=E70E27></A><H5 ALIGN=CENTER><CENTER><FONT SIZE=4 COLOR=#FF0000><B>Neighbor Reachability Messages</B></FONT></CENTER></H5><BR><P>The Neighbor Reachability messages are used to ensure that a neighbor that was previously acquired is still active and communicating. No extra fields are added to the basic EGP message format shown in Figure 5.7.<BR><P>The Type field is set to a value of 5, but the Code field has a value of either 0 for a Hello message or 1 for an IHU (I Heard You) response. The Status field can have one of three values, shown in Table 5.6.<BR><BR><P ALIGN=CENTER><CENTER><FONT COLOR=#000080><B>Table 5.6. EGP Neighbor Reachability Status field values.</B></FONT></CENTER><BR><CENTER><TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Status</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Description</I></B></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Indeterminate; used when no other code is applicable<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Neighbor is in an up state<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Neighbor is in a down state</FONT></TABLE></CENTER><BR><BR><A ID=E70E28 NAME=E70E28></A><H5 ALIGN=CENTER><CENTER><FONT SIZE=4 COLOR=#FF0000><B>Poll Messages</B></FONT></CENTER></H5><BR><P>The Poll messages are used to request network reachability information. An extra two fields are added to the basic EGP message format, which are a 16-bit field reserved for future use and a 32-bit IP Source Network field.<BR><P>The Poll messages have the Type field set to a value of 2 and the Code field set to a value of 0. The Status field is set to one of the same three values used in the Reachability message, shown in Table 5.6.<BR><P>The 16-bit Reserved field attached to the end of the basic EGP message format is ignored in the current versions of EGP. A 32-bit IP Source Network field is used to specify the IP address of the network about which the gateway is requesting reachability information.<BR><BR><A ID=E70E29 NAME=E70E29></A><H5 ALIGN=CENTER><CENTER><FONT SIZE=4 COLOR=#FF0000><B>Update Messages</B></FONT></CENTER></H5><BR><P>Update messages are sent as a reply to a Poll message and provide information about network reachability. The format of the Update message is shown in Figure 5.9 and is similar to the GGP format discussed earlier.<BR><P><B><A HREF=05tyt10.gif>Figure 5.9. EGP Update message format.</A></B><BR><P>The Type of an Update message is set to 1, and the Code is set to 0. The Status field is set to one of the values shown in Table 5.7. (The values are the same as those for Reachability and Poll messages except for the addition of one value.)<BR><BR><P ALIGN=CENTER><CENTER><FONT COLOR=#000080><B>Table 5.7. EGP Update message Status field values.</B></FONT></CENTER><BR><CENTER><TABLE BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Status</I></B></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P><B><I>Description</I></B></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>0<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Indeterminate; used when no other code is applicable<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>1<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Neighbor is in an up state<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>2<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Neighbor is in a down state<BR></FONT><TR><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>128<BR></FONT><TD BGCOLOR=#80FFFF><FONT COLOR=#000080><P>Unsolicited message</FONT></TABLE></CENTER><BR><P>After the familiar EGP header information are three new fields. The number of internal gateways and number of external gateways fields specify the number of interior and exterior gateways that are reported in the message, respectively. The IP Source Network Address field contains the IP address of the network to which the information relates.<BR><P>Following the three gateway summaries and the usual header are one or more sets of information about each gateway the current system is sending information about. These are called gateway blocks because each set of fields refers to one gateway. The first field is the gateway's IP address. The Number of Distances field provides the number of distances that are reported in the gateway block and the number of networks that lie at that distance. Then, for each distance specified, the IP network address of each network is provided. Many blocks of gateway information can be provided in an Update message.<BR><BR><A ID=E70E30 NAME=E70E30></A><H5 ALIGN=CENTER><CENTER><FONT SIZE=4 COLOR=#FF0000><B>Error Messages</B></FONT></CENTER></H5><BR><P>The final EGP message is the Error message, which has the same format as the basic EGP message, with two fields attached. The 16-bit first field is reserved. Following this is a 96-bit field that contains the first 96 bits of the message that generated the error.<BR><BR><A ID=E69E77 NAME=E69E77></A><H4 ALIGN=CENTER><CENT

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -