ARP and the working principle in LAN
As we know at the Network layer of the OSI model, we often use conventional types of addresses such as IP, IPX ... These addresses are divided into two separate parts: the network address part (NetID). and machine address part (HostID). Such numbering addresses help to find links from the system
As we know at the Network layer of the OSI model, we often use conventional types of addresses such as IP, IPX . These addresses are divided into two separate parts: the network address part (NetID). and machine address part (HostID).Such an addressing scheme makes it easier to find links from one network to another.These addresses can be changed according to user preferences.
In fact, network cards (NICs) can only connect to each other according to the MAC address, fixed and unique addresses of the hardware.So we must have a mechanism to convert these types of addresses back and forth.From there we have the address resolution protocol: Address Resolution Protocol (ARP).
Working principle of ARP in a LAN
When a network device wants to know the MAC address of a network device that already knows the address at the network layer (IP, IPX .) it sends an ARP request including its MAC address and IP address. of the device it needs to know the MAC address across an entire broadcast domain.Each device receiving this request compares the IP address in the request with its network layer address.If the address is the same, the device must send it back to the device to send a packet ARP request (which contains its MAC address).In a simple network, for example, PC A wants to send the packet to PC B and it only knows the IP address of PC B. Then PC A will have to send an ARP broadcast to the entire network to ask "where What is the PC's MAC with this IP address? "When the PC B receives this broadcast, it compares the IP address in this packet with its IP address.Realizing that the address is your address, PC B will return a packet to PC A which contains the MAC address of B. Then PC A will begin transmitting packets to B.
ARP operating principle in network environment:
Theoperation of ARP in a more complex environment is that the two networks are tied together by a Router C.Machine A belongs to Network A that wants to send the packet to machine B of the B network. The router should then see machine A as a bridge or an intermediary (Agent) for data transmission.Previously, machine A will know the IP address of Router C (Gateway address) and know that to transmit packets to B must go through C. All such information will be contained in a table called a table routing (routing table).Routing table according to this mechanism is kept in each machine.The routing table contains information about the Gateway to access a certain network.The example in the above case in the table will indicate that to go to LAN B must go through port X of Router C. The routing table will contain the IP address of port X. The data transfer process follows these steps:
· Machine A sends an ARP request (broadcast) to find the MAC address of port X.
· Router C answers, give the machine A MAC address of port X.
· Machine A transmits the packet to the X port of the Router.
· The router receives the packet from machine A, and transmits the packet to the router's Y port.The packet contains the IP address of machine B. The router sends an ARP request to find the MAC address of machine B.
· Machine B will respond to the router knowing its MAC address.After receiving the MAC address of machine B, Router C sends the packet of A to B.
In fact, in addition to this routing table format, the proxyARP method is also used, including a device that performs address resolution for all other devices. Accordingly, the workstations do not need to hold the routing table. again Router C will perform the task, responding to all ARP requests of all machines.
You should read it
- 192.168.1.2: Common router IP address
- Set up a new router using IP address 192.168.1.1
- How to find the router IP address on any platform
- How to access IP address 192.168.100.1
- Does your router use IP address 10.0.0.1?
- How to find the default IP address of a Belkin router
- IP, Subnet mask, installation and configuration for 1 server
- Ways to find IP Router address on Windows 10
- Learn 192.168.0.100 IP address for local network
- Instructions for using IP address 192.168.2.2
- 192.168.2.1 - Default IP address for some home network routers
- How to Find Your IP Address on a Mac
Maybe you are interested
'Daryl' Norman Reedus explains why The Walking Dead is 'alive' after 10 years of broadcast How to send files from Google Drive, Dropbox on Zalo PC These tips are useful when using Zalo on PC 19 ideas to decorate warm and creative lights at home at Christmas 20 ideas for making Christmas decorations from spoons, old socks or excess wool 13 things will happen when you start pursuing your dreams