Networking Part 1 IP Default gateway APIPA
Networking Part 1
“The virtual name and address of a device”
IP addresses are logical addresses that are used for identifying devices on a network. IP addresses can be found where devices are connected to a network. For example, a phone, a computer, a router or a switch. It can either be static (Manually set and can not be changed automatically) or dynamic (automatically assigned by a DHCP).
We have two versions of IP addresses called IPv4 and IPv6.
IPv4 is the most common used IP address. They give information about specific things like what network we are on and which computer on that network we are using.
Each octet represents a number in binary ranging from 0-255. These binary 0s and 1s make up 32 different bits, making it a 32-bit binary address.
We use two different types of IPs called public and private addresses.
Private addresses are used within a router’s network. They are assigned by the DHCP and only talk to devices within the same network.
Classes10.0.0.0 - 10.255.255.255 | 255.0.0.0 (/8) ← Class A127 | Local172.16.0.0 - 172.31.255.255 | 255.240.0.0 (/12) ← Class B192.168.0.0 - 192.168.255.255 | 255.255.0.0 (/16) ← Class C
Public addresses are used outside the default gateway and speak to other networks. This could be other servers or computers for instance.
1 - 126 | 255.0.0.0 ← Class A127 | Local128 - 191 | 255.255.0.0 ← Class B192 - 223 | 255.255.255.0 ← Class C224 - 239 | Multicasting ← Class D255.255.255.255 | Experimental ← Class E
“The way of separating networks in different segments”
In order to know which network and which host we are on, it’s necessary to give a subnet mask to our IP. Like said earlier, we need information about two specific things: What network we are on and which computer on that network we are using.
Subnetting is the strategy used to partition an IP address into a Network ID and a Host ID. The Network ID is the address for our network and the Host ID is the address pointing to our particular computer on that same network. If the subnet mask is 255.255.0.0, 192.168 is the Network ID and 1.1 is the Host ID.
CIDR Subnetting is also a very common structure of subnet masks. It tells us how many of the last bits are used for Host ID.
In example “255.255.0.0”, our subnet masks have two octets containing 0. This means that we can just count how many bits are subnetted in that octet and rewrite them into bits. leaving us with 16 In that manner, our subnet mask is now 192.168.1.1/16.
This is useful because we don’t have to write the 255.255 to represent the Network ID and 0.0 to represent the Host ID. Instead we can just add the bits and add a slash 192.168.1.1/16.
“The brother of IPv4”
IPv4 is the less commonly used IP address. They are 128-bit hexadecimal addresses and 32 characters long. They range from 0-9 and A-F. This way you will always know whether it’s an IPv6 or not based on if it’s containing a letter after F.
An IPv6 can look like this 2001:0DB8:AC10:FE01:0000:0000:0000:0000. Usually when 4 sections of zeros occur, we can replace them with a double colon :: and it will then look like this 2001:0DB8:AC10:FE01::. This can only happen once in an address.
We Divide our addresses into Site-local addresses, Unique local, Global unicast, Unicast, Multicast, Broadcast and Anycast.
• Site-local (Private addresses) not globally routedFEC, FED, FEE, FEF ← Site Local addresses• Unique Local (Private addresses)FCO, FDO• Global Unicast (public)-Specific for a single device, Automatically globally connects to one specific device-Single globally routable interface-Similar to IPv4 Public001 binary header + 45 bit global routing + 16 bit net ID + 64 bit Individual• Unicast-A single computer (or node) talking to another single computer (or node).-Link-local (IPv6 APIPA) Can't be routed over the internet.FE8_, FE9, FEA, FEB• Multicast-One computer (or node) talking to many computers (or nodes).-one-to-manyFFxx:____________• Broadcast-One computer (or node) to anyone of anything in the broadcast domain.
-Can be reached just by talking to the MAC address.• Anycast-one-to-nearest (fastest connection found to another computer)
“The non routable IP”
Automatic Private Internet Protocol Addressing
An APIPA is automatically assigned to our IP address when no DHCP is received. An APIPA address is unable to connect to the Internet and is unable to communicate with other computers. The service checks regularly for the presence of a DHCP server. If it is detected APIPA will be replaced with the DHCP and the network addresses with the dynamically assigned addresses.169.254.0.0 ← APIPA Automatic Private Internet Protocol Addressing(“Could not find IP/Could not receive from router/Could not connect”)