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.
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 18.104.22.168 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 22.214.171.124) the default gateway is configured as 126.96.36.199. 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 188.8.131.52 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 192.168.0.254, 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 172.16.80.0 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 184.108.40.206. 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.