Can the same network segment have the same IP and MAC address?

Source: Internet
Author: User
Tags server port

Whether the same network segment can do the same IP and MAC address,

In fact, you can completely change the IP of the two computers to the same as the Mac, not only the internet but also no IP conflict. This method can not only break through the routing blockade used in the ADSL shared Internet, but also can be used in the IEEE802.1X authentication environment, but the premise must be the same account to dial the Internet (the Premise authentication server does not have to verify the repeatability of the account), My machine is connected to the Internet through the school campus network, the client uses 802.1X Authentication client software "STAR supplicant dial Software" to dial the Internet, In our school can be two machine IP and Mac to the same and then use the same account to achieve the purpose of sharing the Internet, but in our school can only be in the same dorm two machines can share the Internet, because our school server not only verify the account, IP, Mac also verifies the Access server IP (NAS IP), and the Access server port (NAS port), different dormitories are connected to different ports on the school switch, so it is limited to sharing the Internet with this method in the same dorm.
As to why IP conflicts are not caused and can also be Internet, this is because of the shortcomings of ARP work, the system will find the network has a phase of the IP and prompt "IP conflict", because the system at startup, TCP/IP arp will broadcast a free ARP request packet to the network segment, This arp (free ARP) package contains its own IP and Mac, if the network segment has a response to the packet, the broadcast of the machine will assume that the LAN has other machines use and their own IP,
For example: PC A and PC B's IP and Mac are exactly the same, when the PCA system starts broadcasting a free ARP Request packet containing its own IP and Mac to the network segment, if the PCB responds to this request, PCA will think its IP and the IP on the network conflict and send a hint (this is why the IP conflict generally occurs when the system just started to complete), the problem is that the PCB will not respond to this request package, this is because the IP of the request package and the Mac and the PCB itself, and the PCB will be considered to be the package , so will not respond, since there will be no response to the natural IP conflict will not occur.
OK, let me explain the next question, is the two machine IP and Mac will not lead to the Internet:
Since you can, then the network of hardware equipment is how the data exactly what machine?? We all know that the LAN is a hardware address to the communication, the local area network of two-layer devices (such as switches) maintain a table of addresses, the Address table records the device each port corresponding to the Mac (note: Not the port of the Mac, but the port of the device's Mac), The device to go through the address learning state to know these ports corresponding to the Mac, when a frame through a device port, the device will check the frame source address and destination address, and then against their own address table, the Address table to see if there is a corresponding item of the source address, if not, the port will become "address learning State", Save the address in the Address table to form a new table entry, if the PCA and PCB are connected to the same switch, the switch after the "Address learning State", the Address table has two identical address entries, but they are the corresponding port is different, When the switch receives a frame externally with a destination address (the same MAC address as the PCA and PCB), it examines the Address table, checks the Address table and discovers that there are two table entries of the same address, and the switch forwards the frame to the port corresponding to the two table entries ( As to whether the switch is multicast or a frame is sent two times to the two ports forwarded to the port I am not very clear, if you say to tell me, OK QQ404393745).
Routers are the same, unlike the router's address table, which is the routing table that holds the IP instead of the hardware address.
Both the PCA and PCB connected to both ports receive the same frame, and since they receive the same frame, how does the computer know which frames are what they want? This depends on working on the TCP/IP upper layer protocol, although the NIC is receiving this frame, but the upper layer of the Protocol for further separation, can also be said to be filtered, when the TCP/IP network interface layer (also called the link layer) receives a frame, will check the frame in the header of the frame type, If the ARP type is given to the ARP protocol to deal with, if the Rarp type will be given to the RARP protocol processing, if the IP type will remove the frame header and pass this frame to the previous layer (that is, the network layer to process), the network layer will be based on the header (remove the frame header called IP packet) in the protocol type, If the tcmp type is given to the ICMP protocol processing, if the IGMP type is given to the IGMP protocol processing, if it is TCP or UDP to remove the Baotou and to the upper layer (that is, the transport layer) to chip, remove the IP header is called the message segment (transmission layer units), The same transport layer will also check the packet header for further separation, if the TCP type is given to the TCP protocol processing, if the UDP type is given to the UDP protocol processing, TCP or UDP based on the message fragment of the header in the "Destination port" To the application layer (to the application layer before the message fragment of the head removed), and then the application layer of the user process will be based on the "port number" to determine whether to receive this data, such as QQ a process opened UDP 1324 this port, the transport layer of the UDP protocol will be all received and "Destination port number" For 1324 of the message segment to the QQ process, so that the complete process of receiving data. Although both computers will receive a data frame that is not their own, but in the frame to the upper layer protocol chip can be lost, such as the application layer of the QQ process will not be in addition to the "Destination port number" of 1324 other packets, because the data is discarded before the application layer.

Can the same network segment have the same IP and MAC address?

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.