IP addresses Flashcards
Class A, B,C from classful addressing
A- 3 bytes network 1 byte host
B-2 bytes network, 2bytes host
C- 1 byte network, 3 bytes host
What are routable and non-routable ip addresses
A public ip address is a globally unique ip address which allows you to be identified on the internet.
A private ip address is used in LANs to identify individual computers
Difference between routable and non-routable
Routable ip addresses are globally unique whereas non-routable ip addresses can be the same for millions of devices globally.
Why do we have routable and non-routable ip addresses
If everyone has a public ip address then there wouldn’t be enough ip addresses to go around. Thats why most homes and small businesses only have 1 or a few public ip addresses
Why do we need DHCP?
There are a limited number of ip addresses in a private network. If the network assigns on device an ip address, only for that network to leave and never join back, that ip address is wasted. DHCP solves this problem
What does DHCP do
DHCP stores a pool of available private ip addresses and assigns computers that join a network an ip address for the duration of their time on the network. Once the device leaves the network, the ip address is returned to the pool of available addresses.
Why do we need NAT?
A device on the internet cannot communicate directly with a device on a private network because the ip address of that device is non-routable, and hence not globally unique.
What does NAT do?
During NAT, the packets sent by the device on the private network are sent to the router. The router makes a record of the packet, then switches the non-routable source ip address for the routable router’s address. The response will be received by the router, and it will use the record it made earlier to send the response to the right device.