Internet protocol explained
Internet protocol addresses are used to identify and differentiate computers on a LAN. They also include information that allows routers to route packets from a computer in one LAN to a computer in a different LAN.
Two main function of IP address
IP addresses are used to differentiate one computer from another and act as a value that is used when attempting to locate a computer.
Another function of IP address is to segment or organize, computers into separate LANs.
IP address classes.
When IPv4 was first designed, the IP addresses were organized into what are called classes. Five classes of address were defined, and the value of the first octet determines the class in which an IP address resides.
Three of the classes are intended for application to individual devices, one class is reserved for multicasting and the fifth is labeled experimental. When expressed in decimal format, the ranges of possible values for first octet of the five classes are as follow:
- class A: 1 to 126
- class B: 128 to 191
- class C: 192 to 223
- class D: 224 to 239
- class E: 240 to 255
The most important classes to learn is class A, B and C. Because, these classes are used for individual devices.
- class A: 188.8.131.52 - 184.108.40.206
- class B: 220.127.116.11 - 18.104.22.168
- class C: 192.0.0.1 - 22.214.171.124
You may have noticed that some numbers are missing. The entire networks from 0.0.0.0 - 0.255.255.255 and 127.0.0.0 - 127.255.255.255 are not used. The first is called zero network is not used and the other one is reserved for network diagnostics. Any of the IP addresses in the 127.0.0.0 network can be used to test a computer.
The most famous of the IP addresses in the 127.0.0.0 network is 127.0.0.1 is called the localhost. It is also known as the loopback address, as it loops the signal back through the network card for an answer if you ping.
Identifying network and host addresses from IP address
Each IP address has two parts, the network part and the host part. The network portion determines the LAN, in which the computer is located, and the host portion identifies the computer in that LAN. The network portion begins at the far-left side of the IP address and continues uninterrupted until it meets the host portion. The host portion then continues to the far-right side of the IP address.
The point in the address at which the network portion ends and the host portion begins is determined by the class of the IP address. The computer uses a second value called the subnet mask to determine which portion is network and which portion is host. When computer reads the subnet mask, each octet that is 255 is considered to be network, and each octet that is 0 is considered to be host.
Subnet mask for all three classes.
- class A (255.0.0.0)
- class B (255.255.0.0)
- class C (255.255.255.0)
Default subnet mask is one that conforms to the rules of classful subnetting.
There are two address that can't be used and those are network ID 126.96.36.199 and brodcast 188.8.131.52. The network ID is used to identify the network as a group.
The combination of IP address and port number is called socket.
Executing the traceroute command
In cisco to determine the path to another network we ca use the command traceroute to trace the path of the network. To execute this command in windows we use the tracert, it will display each hop. A hop is a route traversed and the time taken to cross the router.
Dynamic host configuration protocol, is a service that can run on either a router or a server. It function is to automate the process of assigning IP addresses, subnet masks, default gateways, and other settings to computers.
Before a DHCP server or router can function, the service must be enabled and an IP address range or scope must be created. A scope is a set of IP addresses that the DHCP server or router will use to issue IP addresses. The DHCP server will issue these addresses on a first-come, first served basis and will mark an address when it is assigned to prevent duplicates.
Many settings can be issued using DHCP. The most common are:
- IP address
- Subnet mask
- default gateway
- DNS server location
A cisco router also has the ability to act as a DHCP server for the computers on the local LAN. DHCP is configured on the router and will function on the interface that is the same as the scope.
Introduction to IPv6
IPv6 is an IP addressing scheme designed to provide a virtually unlimited number of IP addresses. It uses 128 bits rather than 32 bits in IPv4, and it is represented in hexadecimal rather than dotted decimal format.
IPv6 address format
An IPv6 address looks different from an IPv4 address, when viewed in non-binary format, it is organized into eight selections, or fields, instead of tour as in IPv4.
The IPv5 address has two logical parts, a 64-bit network prefix and a 64-bit host address. The host address is automatically generated from the MAC address of the device. The left most four sections are the network portion. This portion can be further subdivided. The first section to the left of the host portion can be used by organizations to identify a site within the organization. The other three far-left sections are assigned by the ISP or in some cases are generated automatically based on the address type.
There are some allowed methods of shortening the representation of the IPv6 address.
- leading zeros in each section can be omitted, but each section must be represented by at least one character unless you are making use of rule 2. By applying this rule, the previous example of IPv6 address could be written as follows. 2000:0db7:87a3:0:0:8a4e:0370:7531.
- One or more consecutive sections with only a 0 can be represented with a single empty section (double colons).
- The second rule can be applied only once within an address.
IPv6 address types
There are three types of IP addresses in IPv6. One of the benefits of IPv6 is that there are no broadcasts in IPv6.
Uni-cast addresses: packet is delivered to one interface. This is the same concept as in IPv4
Multicast addresses: packet is delivered to multiple interfaces. This is the same concept as in IPv4.
Any-cast addresses: packet is delivered to the nearest of multiple interfaces (in terms of routing distance). This is unique to IPv6 and allows an IPv6 address to be applied to multiple interfaces, with the packet going to the interface that is closet.
Global addresses these are publicly routable addresses. That means the prefixes were assigned by an ISP and the address is unique globally. Global addresses start with 2000: the host portion is composed of the MAC address.
Link local addresses both the network and host portions of these addresses are automatically generated and are unique only on the LAN or sub-net on which they are generated. The always start with FE80:
Unique local addresses these addresses have manually configured network portion by an administrator, and the host portion is composed of the MAC address. The network portion can either be set computer by computer or it can be issued by DHCPv6 server. These addresses operate much like private addresses in IPv4 in that they allow an organization to create LAN and route between the LANs. However, these addresses are unique only within the organization. The prefix for site local addresses is FECO:
Special IPv6 addresses
Just as in IPv4, there are some IPv6 addresses that are reserved to represent specific things. These special addresses are listed here:
0:0:0:0:0:0:0:0 also written as :: this is the source address of a host when it is trying to locate a DHCPv6 server.
0:0:0:0:0:0:0:1 also written as ::1 this is the IPv6 loop back address 127.0.0.1 in IPv4
FF00: addresses that start with FF00 are in the multicast range. Most operating systems today runs IPv6 at the same time IPv4 is running.