IP protocol Xiangjie two: in-depth understanding of IP routing process

2010-07-21  来源:本站原创  分类:Internet  人气:166 

IP routing, Cisco network engineers need to understand a basic knowledge. In fact, IP routing is not as complicated as you think. The author in this article, through a case, to help our in-depth understanding of IP routing in the selection process. Hope this article will help you clear the IP routing on some of the errors.

Following figure, is now such a network. Host A and host B are on two different segments, the middle of the connection through a router. Now suppose Host A Host B to communicate keep up, then host A to host B only to find the place? I now by this example, explain in detail the whole process of IP routing. Here, the author describes an example Cisco routers.

IP protocol Xiangjie two: in-depth understanding of IP routing process

Suppose now hosts a user using Ping command to verify the connectivity of the host B issues. The network architecture is a relatively simple, but the routing process step is not missing a step. Mainly through the following steps:

The first step: when the user enter PING host A, the host A has an Internet Control Message Protocol, the English referred to as ICMP. This agreement will create a response to the request packet, in its data field contains only letters.
Step Two: Internet Control Message Protocol will be the effective load (ie, newly created data packet) to the Internet Protocol (abbreviation IP). Then the Internet Protocol will create a packet. Created in the Internet protocol packet, the contents contained than the Internet Control Message Protocol packets created by the rich more. In this package, including the host A's IP address, the destination host has the IP address and the protocol field value of 01h. When a packet arrives when the host B, the content is to tell each other, should be the effective load to the Internet Control Message Protocol to deal with.
The third step: IP protocol will determine the purpose IP address belongs to a remote network, or in the local network. As the IP address under the planning rules, the host A and host is belonging to different networks. At this point, just the Internet protocol (IP) packets created will be sent to the default gateway to go. A network of properties in the host configuration, in addition to its own logic IP address, there is a default gateway address. Gateway addresses are used for different networks to communicate between the hosts a door. Only through the gateway, the host A packet can be sent to host B in different networks.
Step Four: Make sure the router MAC address of the corresponding interface. Suppose Host A (IP address the default gateway is configured as If the host to send a packet to the default gateway, you must know the corresponding physical address of the router interface, or MAC address. Because only this, packet can be passed to the next lower level of the data link layer and to generate frames according to certain rules. Then the host A can send packets to to network router interface connected. In the local area network, the host hardware address can only communicate between each other. So when the host should send packets to a specific gateway, the gateway must know the corresponding MAC address. This process is inevitable. To this end, the host A will first check its own ARP cache to see a default gateway IP address if the interface has been resolved to the corresponding hardware address. If the ARP cache table has a corresponding record, that have been successfully resolved. At this point, packets will be released and delivered to the data link layer and generates the frame. The square of the hardware address which will be transmitted with the packet data link layer with the next. Typically, the host A, you can see through the ARP command to the host's current IP address and MAC address mapping table. As shown below. I now set the computer's default gateway is, behind the 16-bit character corresponding to the default gateway is the hardware address.
Step Five: Build the frame. When the data packet and destination hardware addresses passed square to the data link layer, the device will be used to provide LAN Qudong media access services to Ethernet for data Chuanshu. Will produce a data frame, with some control information to encapsulate the packet. In this data frame will contain destination and source hardware address side. And the Ethernet type field. The Ethernet type field is mainly used to describe the delivery of the packet to the data link layer of the network layer protocol. The end of this frame is a known as the Frame Check Sequence field, which is calculated CRC loading area. In other words, in this frame, including the purpose MAC address (corresponding to the router interface MAC address), the source MAC address (Host A's MAC address), Ethernet type field, packet, frame check sequence of five parts content. Note that in this case the destination address is not the address of host B, but in a recent host default gateway address. In the first communication, the host A does not know the MAC address of host B. Once the frame of the package, then the frame will be delivered to the physical layer. If the enterprise network is formed using twisted pair, then a way will be sent to a physical media.

The above five steps are mostly done on a host. After completion of these five steps, IP routing process, even if the preliminary work completed. Next depends on the router show.

Step six: the conflict in the host a domain where each network device will take over these spaces and re-merged into the data frame. Has been received, they will run the process and check the CRC stored in the frame check sequence field content. If these two values do not match, then the frame will be discarded. If two values are the same (host A's default gateway, a router that is close to the host interface), the network device receiving the frame, and hardware address verification purposes side to check whether they match. If the objective side of the hardware address is matched, then the router will see the frame of the Ethernet type field in order to understand the network layer Caiyong any agreement, and Lu Youqi will be out of frame packet, part of the Qi Yu contents discarded. Then out of the packet transmitted to the Ethernet type field in the upper layer protocol is listed, such as the Internet network protocol (IP) and so on.
Step Seven: Determine the routing table entries. Internet Internet Protocol (IP) will receive the packet, and check the purpose of IP addresses. In this case, since the package in the destination address and receiving router is not configured to match any address. At this point, the router will be in its own routing table, view the purpose of IP network address. In this case, because the router while connected to the network. Therefore, in this router's routing table, there are related records. If no records, then the packet will be directly discarded. If the router discards the packet, then it will send a "destination unreachable" error message to host a.
Step eight: the router to forward packets. If the router does the routing table in his network to find the corresponding record, the data packet will be forwarded to the output interface. In this case, the host B is connected to the interface. The packet switching router will interface to the corresponding buffer.
Ninth step: processing the data in the buffer. Router buffer corresponding need to understand the purpose interface hardware address of the host side. Because the packet has a purpose-side IP address, so the router will first check the ARP cache table. If the host A's hardware address is parsed and stored in the router's ARP cache, then the data packet and the hardware address will be passed to the data link layer in order to re-build the frame. Typically, if the router before communication with the host B over the case, then the IP address and MAC address of the corresponding records will be buffered in the Cisco routers ARP table, save four hours. Four consecutive hours without communication, then the corresponding record will be deleted. If the router's ARP table buffer record is not relevant, then connect the router interface to the network in its internal, send an ARP request. The ARP request as a broadcast, I need to know the IP address of the MAC address of At this time. Other network devices discovered they were not the IP address, it will discard the packet. B is seen in the host's MAC address to ask ourselves, will respond. To tell the router, my IP address is this, my MAC address is. Routers know the destination host B's MAC address, it will put the packet together with the objective side of the MAC address is passed to the next level in the data link.
10th Step: router will repeat the above fifth step operation to generate data frames. And send to the physical layer to the first one way and then sent to the physical media. In the network for transmission.

In the completion of work on the router. Through the above analysis, we can see the router's role is mainly for data exchange. To the received data packets transmitted according to certain rules to another up to the interface. Router is like a crossroads, each data packet are based on the destination they need, right now the export.

10th step: Host B would receive the data frame and run the CRC process. If the operation results in the field with the frame check sequence content of the same, the purpose of this frame in the side of the MAC address will be read. Host B will determine the MAC address is the same with its own MAC address. If the same words which the packet will be extracted and, based on the Ethernet type field is specified in the agreement, the data packets passed to the corresponding agreement. For this case, the packet is a response to the request. Host B will put the packet to the ICMP protocol processing. ICMP protocol will answer the request at the same time to discard the packet and quickly generate a new and effective response capacity to respond. Then host B will use the same process the data packet and the target MAC address (physical address of the router corresponding interface) passed to the next level, allowed to build the frame. In the data frame, the MAC address will be with the purpose of, source MAC address, packet, Ethernet type field, frame check sequence field and other content sent to the next level. And then a bit transfer to the physical media.
12th step: Repeat steps six through the router and then the tenth step of the process, the exchange of data packets from one interface into another interface. Then the host would receive a response to a message that the path to the host B is through the.

Above the 12 steps to complete the whole process of IP routing. Complex network again, only a few more intermediate nodes, more than just repeat a few steps. Network administrator to understand this process of IP routing, then troubleshoot network problems in the future, will be even more handy.

  • IP protocol Xiangjie two: in-depth understanding of IP routing process 2010-07-21

    IP routing, Cisco network engineers need to understand a basic knowledge. In fact, IP routing is not as complicated as you think. The author in this article, through a case, to help our in-depth understanding of IP routing in the selection process. H

  • One IP protocol Xiangjie: IP address of the knowledge 2010-07-21

    IP is the TCP / IP protocol suite lies at the core of the agreement. All of the TCP, UDP, ICMP and IGMP for IP packet data format for transmission. IP provides unreliable, connectionless datagram delivery service. Not reliable (unreliable) means that

  • The third IP protocol Xiangjie: IP addressing. Subnet address and subnet mask 2010-07-21

    1, IP addressing rules 1, the network addressing rules A, the network address must be unique. B, the network identifies the number 127 can not start. In A Class address, number 127 reserved for internal loopback function. C, the network identifies th

  • netfilter to track the IP protocol and NAT to achieve 2011-01-10

    This document Copyleft owned yfydz all use under the GPL, can be freely copied, reproduced, reprinted, please maintain the integrity of the document, for any commercial purposes is strictly prohibited. msn: [email protected] Source: http://yfydz.

  • [] HTTP protocol Xiangjie 2010-03-22

    Original Source: http://blog.csdn.net/gueter/archive/2007/03/08/1524447.aspx A very detailed description of the HTTP protocol to explain. Author: Jeffrey Introduction HTTP is a part of object-oriented application layer protocol, because of its simple

  • SNMP protocol Xiangjie 2010-06-23

    SNMP protocol Xiangjie Simple Network Management Protocol (SNMP: Simple Network Management Protocol) is the Internet Engineering Task Force (IETF: Internet Engineering Task Force) defined a set of network management protocol. The protocol is based on

  • Acquaintance TCP / IP protocol 2011-08-09

    TCP / IP protocol, before I had heard before, but do not understand what is what, what role, while the study of knowledge communication, and ultimately access to this most widely used network communication protocols. So, now considered as the TCP / I

  • Reload about tcp / ip protocol approach 2010-03-16

    In the default installation of Windows XP in a TCP / IP. However, if a network problem to uninstall and reinstall TCP / IP is not easy: in the "local connection" properties displayed in the This connection uses the following items list, click In

  • IP protocol stack for Linux (1) 2010-07-21

    IP protocol ipfag structure provides support for the reorganization of the fragment, ipq structure represents a queue, the queue buffer are of the same slice of a source. When the IP protocol received when the first slice to create a slice from a tim

  • TCP / IP protocol overview 2010-09-16

    1. TCP / IP protocol of four levels: a) link layer (data link layer, network interface layer), usually including the operating system device drivers and the corresponding computer network interface card. Together, they deal with the cable (or any oth

  • An Analysis On the TCP / IP protocol and UDP protocol 2010-10-05

    Just beginning to learn the network, and transferred to the reviewing Overview: Simply put, TCP (Transmission Control Protocol) is a reliable protocol, UDP (User Datagram Protocol) is an unreliable protocol. TCP is a reliable connection-oriented prot

  • TCP / IP protocol suite 2010-11-17

    TCP - Transmission Control Protocol TCP from the application to the network for data transmission control. TCP is responsible for the data before sending them to split into IP packets, and then when they reach their restructuring. IP - Internet Proto

  • TCP / IP protocol explained 2011-01-09

    TCP / IP is different from the large collection of communication protocols. -------------------------------------------------- ------------------------------ Protocol family TCP / IP is based on TCP and IP protocols on the two initial different set o

  • netfilter IP protocol in the implementation tracking and NAT 2011-01-10

    Copyleft this document owned by yfydz all, the use of GPL, free to copy, reprint, reproduced keep the documents for completeness, for any commercial purposes is strictly prohibited. msn: [email protected] Source: http://yfydz.cublog.cn 1. Preface

  • Transport layer IP protocol number and port number [Z] 2010-12-29

    Network layer - packet packet format which has a very important field called protocol number. For example, in the transport layer if it is tcp connection, then the ip packets inside the network layer protocol number will be a value of 6, so that if t

  • Linux TCP / IP protocol stack of the key data structures Socket Buffer (sk_buff) 2011-04-08

    sk_buff structure may be the most important linux networking code data structure that represents the receive or transmit data packet's header information. It <include/linux/skbuff.h> defined and contains a lot of member variables for each sub-networ

  • A. TCP / IP protocol introduction - transferred 2011-06-16

    One, TCP / IP protocol introduced Introducing the HTTP protocol, before briefly about the TCP / IP protocol-related content. TCP / IP protocol is layered, from the bottom to the application layer are: the physical layer, link layer, network layer, tr

  • OSI seven layer model and TCP / IP protocol 2011-07-24

    From the hierarchical model in terms of protocol, TCP / IP consists of four layers: network interface layer, network layer, transport layer, application layer. TCP / IP protocol does not fully comply with the OSI seven layer reference model. Traditio

  • Depth understanding of the principles of database log system 2010-12-30

    Depth understanding of the principles of database log system A: transaction system 1 affairs working model Transaction must meet the atomicity, the package or the whole operation or do not do all. Transaction management system needs to do two things,

  • TCP / IP protocol stack of the link layer 2011-08-27

    Looked at in recent days off Stevens's "TCP / IP Detailed Volume," As I read more slowly, only to see the TCP / IP protocol link layer cluster of some of the content on this part of the first do some record or a note it Link layer includes the o