Advanced Networking - BOOK
Advanced Networking - BOOK
Structure:
1.0 Learning Objectives
1.1 Introduction
1.2 IP Addresses
1.11 Summary
1.12 Keywords/Abbreviations
1.15 References
Explain IP addresses.
1.1 Introduction
The Internet community originally defined address classes to accommodate different
types of addresses and networks of varying sizes. IP address is an address having
information about how to reach a specific host, especially outside the LAN. An IP
address is a 32 bit unique address having an address space of 232. IP routing is the
process of moving data packets between different networks. By default, two different IP
networks cannot communicate with each other. They need a mediator device that can
switch packet between them. Router takes this responsibility. Routers interfaces are
associated with different networks. This association is kept in routing table. Routers use
it to take switching decision.
A Router is a networking device that forwards data packets between computer networks.
This device is usually connected to two or more different networks. When a data packet
comes to a router port, the router reads address information in packet to determine out
which port the packet will be sent. A packet normally represents the smallest amount of
data that can traverse over a network at a single time. A TCP/IP network packet contains
several pieces of information, including the data it is carrying, source and destination IP
addresses, and other constraints required for quality of service and packet handling.
1.2 IP Addresses
Internet Address Classes
The Internet community originally defined address classes to accommodate different
types of addresses and networks of varying sizes.
The class of address defined which bits were used for the network ID and which bits
were used for the host ID.
It also defined the possible number of networks and the number of hosts per network. Of
five address classes, class A, B, and C addresses were defined for IPv4 unicast addresses.
Class D addresses were defined for IPv4 multicast addresses and class E addresses were
defined for experimental uses.
IP address is an address having information about how to reach a specific host, especially
outside the LAN. An IP address is a 32-bit unique address having an address space of
232.
Generally, there are two notations in which IP address is written, dotted-decimal notation
and hexadecimal notation.
8 bits 75 95 1D EA
The IP address is a 32-bit number that uniquely identifies a network interface on a machine.
An IP address is typically written in decimal digits, formatted as four 8-bit fields separated by
periods. Each 8-bit field represents a byte of the IP address. This form of representing the bytes of
an IP address is often referred to as the dotted-decimal format.
Network Part
This part specifies the unique number assigned to your network. It also identifies the class of
network assigned. In Figure 1.2(a), the network part takes up two bytes of the IP address.
Host Part
This is the part of the IP address that you assign to each host. It uniquely identifies this
machine on your network. Note that for each host on your network, the network part of the
address will be the same, but the host part must be different.
Classful Addressing
The 32-bit IP address is divided into five sub-classes. These are:
Class A
Class B
Class C
Class D
Class E
Each of these classes has a valid range of IP addresses.
Classes D and E are reserved for multicast and experimental purposes respectively.
The order of bits in the first octet determine the classes of IP address.
Network ID
Host ID
Given an IP address, its class can be
determined from the three high-order
Class A NET ID HOST ID
bits. Figure 1.4 shows the significance
Class B NET ID HOST ID
in the three high-order bits and the
Class C NET ID HOST ID
range of addresses that fall into each
Class D MULTICAST ADDRESS
class. For informational purposes,
Class E RESERVED
Class D and Class E addresses are also
shown. Fig. 1.3: Classes of IP Address with
Hostid and Netid
In a Class A address, the first octet is the network portion. So, the Class A example in
Figure 1.4 has a major network address of 1.0.0.0.127.255.255.255. Octets 2, 3 and 4
(the next 24 bits) are for the network manager to divide into subnets and hosts as he/she
sees fit. Class A addresses are used for networks that have more than 65,536 hosts
(actually, up to 16777214 hosts!).
In a Class B address, the first two octets are the network portion. So, the Class B
example in Figure 1.4 has a major network address of 128.0.0.0.191.255.255.255. Octets
3 and 4 (16 bits) are for local subnets and hosts. Class B addresses are used for networks
that have between 256 and 65534 hosts.
In a Class C address, the first three octets are the network portion. So, the Class C
example in Figure 1.4 has a major network address of 192.0.0.0.233.255.255.255. Octet
4 (8 bits) is for local subnets and hosts – perfect for networks with less than 254 hosts.
0 1 2 3
01 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7
Net ID
0 1 2 3
0 1 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7
Net ID
1 2 3
0
1 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0
Net ID
0 1 2 3
0 1 2 3 4 5 6 7 01 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
Multicast
0 1 2 3
01 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7 01 2 3 4 5 6 7
Experimental
In a netmask, two of the possible addresses, represented as the final byte, are always pre-
assigned and unavailable for custom assignment. For example, in 255.255.225.0, “0” is the
assigned network address. In 255.255.255.255, the final “255” is the assigned broadcast address.
These two values cannot be used for IP address assignment.
Counting out the bits in the binary conversion allows you to determine the netmask length.
Above is an example of a 32-bit address. However, this address is a broadcast address and does
not allow any hosts (computers or other network devices) to be connected to it.
A simple formula can be used to determine the capable amount of networks a netmask can
support.
For example, if we used a netmask length of 24, having a netmask of 255.255.255.0 with
three used segments, subtract three from the netmask length, e.g., 24 – 3 = 21. With this number
determined, plug it into the above formula to get 2^21 – 2 = 2,097,150 total number of networks.
You are subtracting two from this number because of the broadcast and network addresses that
are already being used.
Another example is a netmask length of 16, having a netmask of 255.255.0.0 with two used
segments. Using the above formula, you would get 2^14 – 2 = 16,382 total number of networks.
To determine the number of hosts a netmask is capable of supporting, use the following
formula.
2^(# of zeroes) - 2
For example, with a netmask length of 24, as shown in the above chart, there are eight zeroes.
Therefore, using the formula above, this would be 2^8 – 2 = 254 total number of hosts. Again, two
is subtracted from this number to account for the broadcast and network addresses.
Again, another example of a netmask length of 16, there would be 16 zeroes. The formula, in
this case, would be 2^16 – 2 = 65,534 total number of hosts.
16,777,214
A 1 – 126* 0 N.H.H.H 255.0.0.0 126 (27 – 2)
(224 – 2)
65,534
B 128 – 191 10 N.N.H.H 255.255.0.0 16,382 (214 – 2)
(216 – 2)
254
C 192 – 223 110 N.N.N.H 255.255.255.0 2,097,150 (221 – 2)
(28 – 2)
D 224 – 239 1110 Reserved for Multicasting
E 240 – 254 1111 Experimental; used for research
Broadcast Address
A broadcast is a multipoint connection in a computer network. A data packet is transmitted
from one point to all users of a messaging network in this way. This occurs with the use of the
broadcast address.
Each network or subnet has a dedicated broadcast address, through which all users of the
network can broadcast.
In a broadcast address, all the host bits are set to the binary value 1. So, if all host bits are set
to the value 0, this is the subnet address.
192.128.64.7 is the IP address and 24 is the subnet mask. The /24 corresponds to the subnet
mask 255.255.255.0. The IP address consists of 4 decimals – called octets – which are separated
by points. One octet contains 8 bits, which is why IPv4 is a 32-bit address. Each octet can
represent a number between 0 and 255. In this case, the whole of the last octet consists of host
bits. Therefore, in this example, the broadcast address would be 192.128.64.255 – so, all host bits
at 1.
Network IP
1-255
Where can you find the broadcast address? The IP address is a 4-digit series of numbers with
values from 0 to 255. A broadcast IP address is only assigned once in each network. It is always
the last IP address of the subnet.
w.x.y.z
Class A
Class A network IDs were assigned to networks with a very large number of hosts.
The high-order bit in a class A address is always set to zero, which makes the address
prefix for all class A networks and addresses 0.0.0.0/1 or 128.0.0.0.
The next seven bits (completing the first octet) are used to enumerate class A network
IDs.
Therefore, address prefixes for class A network IDs have an 8-bit prefix length (/8 or
255.0.0.0).
The remaining 24 bits (the last three octets) are used for the host ID. The address prefix
0.0.0.0/0 or 0.0.0.0, 0.0.0.03 is a reserved network ID and 127.0.0.0/8 or 127.0.0.0 or
255.0.0.03 is reserved for loopback addresses.
Out of a total of 128 possible class A networks, there are 126 networks and 16,777,214
hosts per network.
Class A
Network ID Host ID
Class B
Class B network IDs were assigned to medium- to large-sized networks.
The two high-order bits in a class B address are always set to 10, which makes the
address prefix for all class B networks and addresses 128.0.0.0/2 or 128.0.0.0 or
192.0.0.0.
The next 14 bits (completing the first two octets) are used to enumerate class B network
IDs.
Therefore, address prefixes for class B network IDs have a 16-bit prefix length (/16 or
255.255.0.0).
The remaining 16 bits (last two octets) are used for the host ID. With 14 bits to express
class B network IDs and 16 bits to express host IDs, this allows for 16,384 networks and
65,534 hosts per network.
Class B
Network ID Host ID
Class C
This addresses were assigned to small networks.
The three high-order bits in a class C address are always set to 110, which makes the
address prefix for all class C networks and addresses 192.0.0.0/3 or 192.0.0.0 or
224.0.0.0.
The next 21 bits (completing the first three octets) are used to enumerate class C network
IDs.
Therefore, address prefixes for class C network IDs have a 24-bit prefix length (/24 or
255.255.255.0).
The remaining 8 bits (the last octet) are used for the host ID. With 21 bits to express class
C network IDs and 8 bits to express host IDs, this allows for 2,097,152 networks and 254
hosts per network.
Class C
Network ID Host ID
Class D
Class D addresses are reserved for IPv4 multicast addresses.
The four high-order bits in a class D address are always set to 1110, which makes the
address prefix for all class D addresses 224.0.0.0/4 or 224.0.0.0.
Class E
Class E addresses are reserved for experimental use.
The high-order bits in a class E address are set to 1111, which makes the address prefix
for all class E addresses 240.0.0.0/4 or 240.0.0.0.
2. 127.0.0.1
Known as the IPv4 loopback address, it is assigned to an internal loopback interface,
enabling a node to send packets to itself.
IP Routing
IP routing is the process of moving data packets between different networks. By default, two
different IP networks cannot communicate with each other. They need a mediator device that can
switch packet between them. Router takes this responsibility. Router interfaces are associated
with different networks. This association is kept in routing table. Routers use it to take switching
decision.
Static Routing
When routers learn from an administrator, it is called static routing. In static routing, we have
to add all network locations manually. If any change occurs in network, administrator is
responsible to update it by hand in all routers.
Dynamic Routing
When routers learn from neighboring router through the routing protocols, it is called
dynamic routing. In dynamic routing, routers add network locations automatically from the
routing information. If any change occurs in network, affected routers update others via routing
information.
Routing Updates
Routing update is a mechanism of sharing information with neighboring routers. In a
particular time duration, router advertise its routing information through broadcast or multicast.
Different protocols have different time intervals. Some protocols use broadcast for routing
updates while some use multicast. Routing updates contain all necessary information for routing
protocol such as learned network, timers, AS, AD, matrix values, interface details, etc.
Routing Table
A table is maintained by the internal router called as Routing table. It helps the internal
router to decide on which interface the data packet should be forwarded
A routing table is a set of rules, often viewed in table format, that is used to determine where
data packets traveling over an Internet Protocol (IP) network will be directed. All IP-enabled
devices, including routers and switches, use routing tables.
Network ID:
The network ID or destination corresponding to the route.
Subnet Mask:
The mask that is used to match a destination IP address to the network ID.
Next Hop:
The IP address to which the packet is forwarded.
Outgoing Interface:
Outgoing interface the packet should go out to reach the destination network.
Metric:
A common use of the metric is to indicate the minimum number of hops (routers crossed)
to the network ID.
Routing table entries can be used to store the following types of routes:
Default Route
Destination
A packet normally represents the smallest amount of data that can traverse over a network at
a single time. A TCP/IP network packet contains several pieces of information, including the data
it is carrying, source and destination IP addresses, and other constraints required for quality of
service and packet handling.
Error correction
Organizing the data according to its data type, such as a frame, segment or block
Of course, the packet that matters the most for us is an Internet packet: when you
send a request for information from a website, for instance.
2. First, your computer creates a packet, organized in a very specific way that the receiving
computer can understand and use. This entire packet or “stream of data” is broken down
to a specific number of “bytes” (eight bits of zeros or ones), which are individual packets
that are part of the big data packet. Each packet holds about 1,000 to 1,500 bytes.
3. The packet has a “header”; to the packet, your computer adds the IP address of the
computer that your data is supposed to get to, and puts your IP address on it to.
4. Your computer adds two identifying numbers to each of the smaller packets. The first
number represents the number of packets that all of the information is divided into. The
second number represents the number of each individual packet among the total
sequence of packets.
5. Your computer’s internal networking hardware and software follow guidelines for
bundling the data that you are sending out...the “payload.” Those guidelines are spelled
out in the Transmission Control Protocol/Internet Protocol (TCP/IP).
6. Each packet also has a trailer or footer, which contains a few electronic bits that tell the
receiving computer when it reached the end of the packet sequence. It also might include
the results of a Cyclic Redundancy Check (CRC). The CRC contains the sum of all the
“1s” in the packet, added up by your computer. The receiving also does the same math,
and if the math doesn’t add up, it may ask your computer to retransmit the packet.
7. Your computer sends each packet onto the Internet separately, and each packet takes the
best route available at the time when it can go. Why does it happen this way? So that the
network can spread data traffic evenly, and all your data won’t get stuck or slowed down
in one spot. (Keep in mind, a traffic jam might only last a fraction of a second.)
1. Unicast: This type of information transfer is useful when there is a participation of single
sender and single recipient. So, in short, you can term it as a one-to-one transmission.
2. Broadcast: Broadcasting transfer (one-to-all) techniques can be classified into two types:
Limited Broadcasting: Suppose you have to send stream of packets to all the
devices over the network that you reside, this broadcasting comes handy.
1.11 Summary
The IP addresses are used to identify systems on a TCP/IP network. The IP address is an
absolute identifier of both the individual machine and the network on which it resides.
Every IP datagram packet transmitted over a TCP/IP network contains the IP addresses
of the source system that generated it and the destination system for which it is intended
in its IP header.
To send a packet across an internet, the sender places the destination’s protocol address
in the packet and passes the packet to protocol software for delivery. To provide uniform
addressing in an internet, protocol software defines an abstract addressing scheme that
assigns each host a unique protocol address. Users, application programs and higher
layers of protocol software use the abstract protocol addresses to communicate.
IP addressing is specified by the Internet Protocol (IP). The IP standard specifies that
each host is assigned a unique 32-bit number known as the host ’ s Internet Protocol
address, which is often abbreviated IP address, or Internet address. Each packet sent
across an internet contains the 32-bit IP address of the sender (source) as well as the
intended recipient (destination). Thus, to transmit information across a TCP/IP internet, a
computer must know the IP address of the remote computer to which the information is
being sent. IPv4 and IPV6 both can be configured either manually or through DHCP. It
does not require manual configuration or DHCP. It uses host address (A) resource
records in the Domain Name System (DNS) to map host names to IPv4 addresses.
1.12 Keywords/Abbreviations
Subnet Mask: A number that defines a range of IP addresses available within a network.
IP (Internet Protocol): The fundamental protocol for communications on the Internet.
Static Routing: The process in which the system network administrator would manually
configure network routers with all the information necessary for successful packet
forwarding.
Dynamic Routing: A process where a router can forward data via a different route or
given destination based on the current conditions of the communication circuits within a
system.
Router: A networking device that forwards data packets between computer network.
Routing Table: A set of rules, often viewed in table format, that is used to determine
where data packets traveling over an Internet Protocol (IP) network will be directed.
Packet: The smallest amount of data that can traverse over a network at a single time.
Abbreviations
IP: Internet Protocol
IPv4: Internet Protocol version 4
TCP/IP: Transmission Control Protocol/Internet Protocol
Answers
1. (c), 2. (b), 3. (a), 4. (d), 5. (a)
1.15 References
1. https://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf
2. https://resources.saylor.org/wwwresources/archived/site/wp-content/uploads/2012/02/
Computer-Networking-Principles-Bonaventure-1-30-31-OTC1.pdf
3. Computer Network (Third Edition) by Andrew S. Tanenbaum.
4. Computer Network Top-down Approach by James F. Kurose and Keith W. Ross.