Network-packets in the Routing and forwarding process MAC address and IP address, change and constant

Source: Internet
Author: User

Questions about MAC addresses and IP addresses that change and are not changed during transmission:

Conclusion: MAC address is invariant in the same broadcast domain, it will change when it crosses broadcast domain, while IP address will not change during transmission (except NAT), it is summed up as route forwarding Mac unchanged, IP variable .

We know a few concepts:

First of all we need to know that the MAC address is used to consent to the physical or logical layer 2nd network communication between devices;

Third-tier addresses (IP addresses) can communicate across multiple network devices.

Let's take a look at the following:

MAC address is valid in the same broadcast domain, then go to another broadcast domain (network segment) MAC address must be changed;

The MAC address of the data frame in the same broadcast domain will not change, because all switches should know the MAC address of all the hosts in the broadcast domain (if they do not know how to learn by passive broadcasting). Now that I know all the MAC addresses, I'll look at the target MAC address when the switch receives the data frame, and then check the MAC Address table to get out of the corresponding interface.

IP address is effective throughout the network, the entire Internet network is the equivalent of a large map, also know how to get all the IP address, then in the transmission of the source IP and destination IP will not change. When the router receives the packet, check the destination IP address of the packet, then look for the routing table (routing forwarding) and choose the appropriate interface to send out.

The figure A-r4-r2-b assumes that there is a data frame x, during the transfer:

A to R4:mac address (if present) the source address is a, the destination address is R4;

R4 to R2:mac address (if present) the source address is R4, the destination address is R2;

R2 to B:mac address (if present) the source address is R2, the destination address is B;

In the absence of NAT, the source IP address and destination IP address cannot be changed throughout the transfer process.

A to R4:IP address source address is a, the destination address is R4;

R4 to R2:ip address source address is a, the destination address is R4;

R2 to B:ip address source address is a, the destination address is R4;

Network-packets in the Routing and forwarding process MAC address and IP address, change and constant

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.