APIPA - Explained
Credit: GeeksforGeeks

APIPA - Explained

Hello good people. In this brief article, I am going to be talking about?APIPA. And this stands for?Automatic Private IP Addressing. Every computer has to have an IP address to communicate on a network. When a computer is set to automatically obtain an IP address, it gets the IP from a?DHCP?server but what happens if the computer can't reach the server.?

So for example, what happens if a DHCP server goes down or if the communication to the server is lost? Now, if this happens, the computers that are running Microsoft Windows, the computers themselves will self assign their own IP address. And these IP addresses will be in this range, starting with?169.254.0.1. This type of self-assigned IP addressing is what's called?Automatic Private IP Addressing. And in addition, they will also assign themselves a 16-bit subnet mask.?

Now the reason why computers do this is that even though they cannot get an IP address from a DHCP server, they will still be able to communicate with other computers on the same local network or to be specific on the same subnet that also has self-assigned IP addresses.

?However, the computers will not be able to access the internet or access other devices on a different subnet with this type of IP address. So if you're on a computer, and you suspect that there was a networking issue, and you can't access the internet, just open up a command prompt and type in IP config, and then check your configuration.?

No alt text provided for this image

And as you can see, this computer has configured itself with an automatic private IP address next to the category of autoconfiguration IPv4 address. So you can see the IP address of 169.254.47.4. So step by step, let's say in an office, we have 3 computers. And they're all connected to a switch that's connected to the DHCP server. And let's say for example, that the DHCP server cannot be reached, whether it's due to a malfunction or disconnected cable, or maybe even the server caught on fire. So, when we turn on these computers; they are going to ask the?DHCP?server for an IP address. However, since the server cannot be reached because it's on fire, the computers are going to have to self-assign their own IP address from this range of IP addresses (169.254.0.1 - 169.254.255.254). But IP addresses have to be unique for each computer. So in order to ensure that the computers don't pick the same IP address, their computers will broadcast an?AARP?message on the network to make sure that no other computer picks the same IP address. Then once they have all their IP addresses, they will then be able to communicate with each other on the same subnet.?

Now every few minutes, the computers will check to see if it can contact a DHCP server, hopefully, one that's not on fire. And if it detects one, the computer will replace the self-assigned IP address with the one obtained from the DHCP server.?

要查看或添加评论,请登录

社区洞察

其他会员也浏览了