networking - What local IP would you be given if all are in use? -


this questions hypothetical, situation never happen nor router handle it

situation 1

lets example (somehow) managed put 255 devices onto network. lets refer 255th device d255 and, later reference, router's ip address 192.168.0.1. if correct d255's local ip address should 192.168.1.255. if buy new device (d256) , connect home internet along other 255 devices. d256's local ip address become? thought , assume 192.168.2.1. correct?

situation 2

after thinking situation 1 came situation. if had 65025 (255 * 255 = 65025, if see i'm going this.) devices connected internet? last device's (i refer d65025) local ip adress should 192.168.255.255 (that assuming situation1's solution correct.). if go out , buy device (d65026) it's local ip address be? can't become 192.168.256.1 because numbers can not exceed 255 , can't become 192.169.1.1 because 192.168.x.x local ip reserve , 192.169.1.1 exceeds local ip limit , (correct me if i'm wrong) external ip address. happen?

i appreciate feedback!

a local network typically configured dhcp server hand out ipv4 address leases along name server addresses , gateway address.

residential , small commercial routers configured network address translation , have dhcp server configured hand out private ipv4 addresses , router's private ip gateway , nameserver. size of local subnet determined router's configuration.

a typical configuration 192.168.0.0/24 provides 254 host addresses.

the dhcp server has configuration specifies address pool can hand out leases for, how dhcp server behaves if asked lease when addresses in pool assigned depends on configuration, in situations not respond there "no free leases".

in situation host select link-local zero-configuration address 169.254.0.0/16 , not have internet access or other hosts on network except 0 conf addresses. may retry dhcp @ later point.

the rfc1918 private address block 192.168.0.0/16 has capacity 65534 uniquely addressed hosts. ignoring issues of having layer 2 broadcast domain of size, same constraints apply: when there no leases left assign, none assigned.

if these private addresses have internet access network address translated 1 or more public ip addresses (usually one) router. 1 public address unlikely sufficient large number of private network hosts, constrained availability of local tcp / udp port numbers.

i suggest read on ip networking fill in basic knowledge.


Comments