Routers manage IP addresses by using a process called DHCP (Dynamic Host Configuration Protocol). When a device connects to a network, it sends a request for an IP address to the router. The router then assigns an available IP address to the device from the pool of IP addresses that it maintains.
The router keeps track of the devices on the network and assigns them unique IP addresses to ensure that each device can communicate with the others. It also manages the allocation of IP addresses to ensure that there are no conflicts or duplicate addresses assigned to multiple devices.
If there are not enough IP addresses available in the router’s pool, it may request additional addresses from a central server. Additionally, routers can also be configured to reserve or assign specific IP addresses to particular devices, such as printers or servers, to ensure their consistent availability on the network.