GNS3 Analog ICMP redirection

Source: Internet
Author: User

A gateway is essentially an IP address of a network to another network. For example, network A and network B, network A's IP address range is "192.168.1.1~192." 168.1.254 ", the subnet mask is 255.255.255.0; The IP address range for Network B is" 192.168.2.1~192.168.2.254 "and the subnet mask is 255.255.255.0. In the absence of a router, TCP/IP communication between the two networks is not possible, even if the two network connections on the same switch (or hub), the TCP/IP protocol will determine the subnet mask (255.255.255.0) on the two network hosts in a different network. To achieve communication between the two networks, you must pass through the gateway. If the host in Network a discovers that the destination host for the packet is not on the local network, forwards the packet to its own gateway, which is then forwarded by the gateway to Network B's gateway, and the gateway of Network B is forwarded to a host on network B.

ICMP redirect packets are one of the ICMP control messages. In a particular case, when the router detects that a machine is using a non-optimized route, it sends an ICMP redirect message to the host requesting the host to change the route. The router also forwards the initial packet to its destination. There are two common scenarios in which ICMP redirection occurs: 1) When the router receives data from an interface and needs to forward that data from the same interface, 2) when the router discovers that the source IP address and the next hop belong to the same network segment from an interface to the data from the remote network. r1:conf tint f0/0no shutdownip add 192.168.1.1 255.255.255.0no IP routingend r2:conf tint f0/0no shutdownip add 192.168.1. 254 255.255.255.0int lo1ip Add 2.2.2.2 255.255.255.255end r3:conf tint f0/0no shutdownip add 192.168.1.2 255.255.255.0ip R  Oute 2.2.2.2 255.255.255.255 192.168.1.254end then R3 ping R2. Ping 2.2.2.2 is guaranteed to be able to connect. R1:ip Default-gateway 192.168.1.2ping 2.2.2.2 three-line grab package is as follows:

GNS3 Analog ICMP redirection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.