IP address in action
Last updated
Was this helpful?
Last updated
Was this helpful?
Network ID = 202.120.10.0
Host ID = e.g. 42, or 164 (in this case)
IP = Network ID + Host ID
In order to interconnect LANs we need a router (interconnection happens through router).
The router interface that connects LAN to the router is called default gateway
must have same Network ID
usually has the lowest host address in LAN
in above case it will have IP 202.120.10.1
Ranges of addresses that are designed as private IP addresses:
127.0.0.0/8 subnet is reserved as loopback address
Every TCP/IP host needs to know whether the destination IP is local or long distance. Subnet mask helps here.
Short notation for subnet masks:
11111111.11111111.11111111.00000000 = /24 (24 ones)
11111111.11111111.00000000.00000000 = /16 (16 ones)
Below picture shows how Subnet mask helps to understand that Computer A and B are in the same LAN.
If we need to send a request to another LAN:
send ARP request to realise MAC address of default gateway
IP packet will be sent to default gateway
CIDR and subnetting are virtually the same thing.
Subnetting enables much more efficient use of IP addresses compared to class blocks.
Usually routers are blocking broadcasting traffic, but what if in big company there are many subnets and just one DHCP server for convenience =>
DHCP relay enables DHCP traffic (broadcast) to cross routers.