Fundamentals of Networking Module (Only For Exit Exam) Dawit
Fundamentals of Networking Module (Only For Exit Exam) Dawit
FUNDAMENTALS OF
NETWORKING [SEng7022]
1
TCP Transmission Control Protocol ....................................................................................................... 27
Chapter Six: Application Layer .................................................................................................................. 27
2
Chapter One: Introduction to Data Communications and computer networks
Data Communication
Information is defined as a collection of facts from which conclusions may be drawn is an important
resource .The need of information has increased from time to time leads to the need of sharing of
information among different agents Data communication is the exchange of information between two
agents. In the Old paradigm A single powerful computer serving all the needs of an organization i.e.
Sneaker-net a Method of sharing data by copying it to a disk and carrying it from computer to computer.
On the contrary of the New paradigm Computer networks is a large number of separate (autonomous)
but internetworked (being able to exchange information) computers doing the job. A computer network
is an interconnected collection of autonomous computers. Interconnected means two computers have the
ability to exchange information using some transmission media. Autonomous refers where no one
computer controls any other computer (i.e. no computer can forcibly start or stop another computer).
Computers can be PC’s, workstations and other “specialized” computers such as hubs, switches and
routers, and they can be geographically located anywhere.
Network Topology
Network Topology refers to the way in which multiple devices are interconnected via communication links.
There are two types of topology i.e. the physical and logical. Physical Topology Refers to the way in which
a network is laid out physically. It refers to the arrangement or physical layout of computers, cables, and
other components on the network. Physical Topology Can be referred as Physical layout, Design, Diagram,
Map and in this topology two or more devices connect to a link; two or more links form a topology. Logical
topology is bound to network protocols and describe how data is moved across the network. The choice of
one topology over another will have an impact on: The types of equipment that the network needs, the
growth of the network – scalability, the way the network managed and etc. four well known network
3
topologies are possible for the implementation of a given network design. This are the bus, star, ring,
mesh, and hybrid network topology.
Modes of transmission
Refers to the direction of signal flow between two linked devices It can be Simplex: unidirectional, only
one of the devices can transmit E.g. TV transmission, radio, Half-duplex: both can transmit and receive,
but not at the same time E.g. wireless handset (walkie -Talkie) or Full-duplex: both can transmit and receive
at the same time E.g. Telephone transmission.
Transmission media
It is physical media that carries a signal from the transmitter to the receiver. The information or signal
transmitted from one device to another is through electromagnetic signals. Electromagnetic signals
include power, voice, radio, waves, infrared light, visible light, ultraviolet light, X-rays, and gamma rays.
Guided transmission media: uses a cabling system that guides the signals along a specific path. E.g. Fiber
Optics, Twisted Pair, Coaxial Cable etc. Unguided: consists of a means for the data signals to travel but
nothing to guide them along a specific path - wireless . E,g., Radio wave, Satellite, etc.
4
Uses of Computer Networks
for resource sharing including programs, equipment, data (mostly databases on central
servers)
a communication medium – e-mail, writing a report together by making changes on an
online document
videoconferencing – to hold meetings by hearing and seeing each other
electronic business
business to business - placing orders, …
business with consumers, usually called e-commerce – home shopping
Transmission Impairments
Noise: additional signals inserted between transmitter and receiver is known as noise Noises can be caused
by Thermal: Due to thermal worry of electrons in a conductor, Crosstalk: A signal from one line is picked
up by another, Impulse Noise : is sharp quick spikes on the signal caused from electromagnetic interference,
lightning, sudden power switching, electromechanical switching, etc and inter-modulation noise means a
noise may occurred during changing from digital to analog or from analog to digital.
Attenuation: it is a phenomenon which occurs when signal strength falls off with distance. It depends
on medium, such as Fiber optic cables carries signal without attenuation up to 2Km. In communicating
entities, received signal strength must be enough to be detected and again it must be sufficiently higher than
noise to be received without error.
Delay Distortion: this distortion can only occur in guided media. Propagation velocity varies with
frequency. Various frequency components of a signal will arrive at the receiver at different times.
Multiplexing
It is a term used to refer to a process where multiple analog message signals or digital data streams are
combined into one signal over a shared medium to share an expensive resource. Multiplexing divides the
capacity of the low-level communication channel into several higher-level logical channels, one for each
message signal or data stream to be transferred. A reverse process, known as demultiplexing, can extract
the original channels on the receiver side. The two most basic forms of multiplexing are :
Time-division multiplexing (TDM) –for digital signal
Frequency-division multiplexing (FDM) –for analog signal
5
Network Design Models
There are basically have 2 network design models. The first one is called Flat
model. it is single collision domain and not hierarchical divided. It has some
advantage like Easy to design, Easy to implement, it good for small network,
and it is easy to maintain and diagnosis. Its disadvantage includes Poor
security, No redundancy, less speed, No scalability and there are no networks
layers. Flat switch network
The Second design model is called Hierarchical Model. It is a
network model that has three network layers or divisions and each
layers has their own specific functions.
Thus the model has three layers called
I. Access layer: used for service availably port security on
layer 2 switch.
II. Distribution layer: aggregate data received from access
layer and switches from sending to core layer, redundancy
and load balancing, control broadcast domain.
III. Core layer control: it is a network backbone, it is fast
speed layer it connect multiple campus network and data
center. Such kind of network design is Difficult to design
and Difficult to implement Hierarchical Model
6
They were incompatible and it became difficult for networks using different specifications to
communicate with each other. The layers are separated from each other by boundaries called
interfaces. All requests are passed from one layer, through the interface, to the next layer.
Why layering?
Layering reduces complexity (one big problem to smaller ones). It standardizes interfaces (between layers)
facilitates modular engineering (different teams work on different modules) and assures interoperable
technology. Layering also accelerates evolution of networking technology.
Each layer should perform a well-defined function. A layer should be created where a different
abstraction is needed. The function of each layer should be chosen with an eye toward defining
internationally standardized protocols. The layer boundaries should be chosen to minimize the
information flow across the interfaces. The number of layers should be large enough that distinct
functions need not be thrown together in the same layer out of necessity and small enough that the
architecture does not become unwieldy.
7
Layer 7: Application
The application layer is the OSI layer that is closest to the user.
It provides network services to the user’s applications.
contains all the higher level protocols that are commonly needed by users
Layer 6: Presentation
The presentation layer ensures that the information that the application layer of one system
sends out is readable by the application layer of another system.
If necessary, the presentation layer translates between multiple data formats by using a
common format.
Provides encryption and compression of data.
Examples :- JPEG, MPEG, ASCII, EBCDIC, HTML
Layer 5: Session
The session layer defines how to start, control and end conversations (called sessions)
between applications.
This includes the control and management of multiple bi-directional messages using
dialogue control.
keeping track of whose turn it is to transmit
It also synchronizes dialogue between two hosts' presentation layers and manages their data
exchange.
preventing two parties from attempting the same critical operation at the same
time
The session layer offers provisions for efficient data transfer.
Check pointing long transmissions to allow them to continue from where they
were after a crash
Examples: - SQL, ASP (AppleTalk Session Protocol).
Layer 4: Transport
It accepts data from above, splits it up into smaller units if need be, passes them to the
network layer, and ensure that the pieces all arrive correctly at the other end
The transport layer segments data from the sending host's system and reassembles the data
into a data stream on the receiving host's system.
End-to-end error free delivery of entire message
Services include:
Service port addressing : Port number
Segmentation /reassembly
Connection control: Connectionless or connection oriented
Flow and error control
Layer 3: Network
Defines end-to-end delivery of packets.
Defines logical addressing so that any endpoint can be identified.
Defines how routing works and how routes are learned so that the packets can be delivered.
The network layer also defines how to fragment a packet into smaller packets to
accommodate different media.
Examples: - IP, IPX, AppleTalk.
8
Layer 2: Data Link
The data link layer provides access to the networking media and physical transmission
across the media and this enables the data to locate its intended destination on a network.
The data link layer provides reliable transit of data across a physical link by using the
Media Access Control (MAC) addresses.
The data link layer uses the MAC address to define a hardware or data link address in order
for multiple stations to share the same medium and still uniquely identify each other.
Concerned with network topology, network access, error notification, ordered delivery of
frames, and flow control.
Examples: - Ethernet, Frame Relay, FDDI.
Layer 1: Physical
The layer that actually interacts with the transmission media
the physical part of the network that connects network components together
involved in physically carrying information from one node in the network to the next
The physical layer deals with the physical characteristics of the transmission medium.
It defines
mechanical: the size and shape of the network connector, how many pins does the
network connector has and what each pin is used for
electrical: how many volts represent a 1 and how many a 0
timing: how many nanoseconds a bit lasts
Whether communication is one way or in both directions simultaneously
Such characteristics as voltage levels, timing of voltage changes, physical data rates,
maximum transmission distances, physical connectors, and other similar attributes are
defined by physical layer specifications.
Examples :- EIA/TIA-232, RJ45, BNC
Summary of OSI model
There was no standard for networks in the early days and as a result it was difficult for networks
to communicate with each other. The International Organization for Standardization (ISO)
recognized this. and researched various network schemes, and in 1970 introduced the Open
Systems Interconnection (OSI) reference model. The OSI reference model has standards which
ensure vendors (sellers) greater compatibility and interoperability between various types of
network technologies. The OSI reference model organizes network functions into seven
numbered layers. Each layer provides a service to the layer above it in the protocol specification
and communicates with the same layer’s software or hardware on other computers. Layers 1-4 are
concerned with the flow of data from end -to- end through the network and Layers 5-7 are
concerned with services to the applications.
TCP/IP Reference Model
Used in the grandparent of all wide area computer Networks, the ARPANET. Developed by
Department of Defense (DoD) to ensure and preserve data integrity as well as maintain
communication in the event of Catastrophic war. Condensed version of OSI model contains four
layers instead of seven The Process/Application protocols for node-to-node application
communication and also controls user-interface specifications. The Host-to-Host parallels the
functions of the OSI’s Transport layer, defining protocols for setting up the level of transmission
service for applications. The Internet layer corresponds to the OSI’s Network layer, designating
9
the protocols relating to the logical transmission of packets over the entire network. Network
Access layer is the equivalent of the Data Link and Physical layers of the OSI model. It oversees
hardware addressing and defines protocols for the physical transmission of data.
The model does not clearly distinguish the concepts of service, interface, and protocol. The TCP/IP
model is not at all general and is poorly suited to describing any protocol stack other than TCP/IP. The
host-to-network layer is not really a layer at all. The model does not distinguish (or even mention) the
physical and data link layers.
Protocols
Application/Process layer
Telnet - allows a user on a remote client machine, called the Telnet client, to access the resources of another
machine, the Telnet server. Telnet makes client machine appear as though it were a terminal directly
attached to the server.
File Transfer Protocol (FTP) - is the protocol that actually lets us transfer files, and it can accomplish this
between any two machines using it. Usually users are subjected to authentication.
10
Network File System (NFS) - a protocol specializing in file sharing allowing two different types of file
systems to interoperate.
Simple Mail Transfer Protocol (SMTP) - uses a spooled, or queued, method of mail delivery. POP3 is
used to receive mail.
Simple Network Management Protocol (SNMP) - collects and manipulates valuable network
information. This protocol stands as a watchdog over the network, quickly notifying managers of any
sudden turn of events.
Domain Name Service (DNS) – resolves hostnames—specifically, Internet names, such as
www.amu.edu.et to the IP address 10.6.10.3
Dynamic Host Configuration Protocol (DHCP) - gives IP addresses to hosts. It allows easier
administration and works well in small-to-even-very large network environments.
Host-to-Host layer
Transmission Control Protocol (TCP) - takes large blocks of information from an application and breaks
them into segments. It numbers and sequences each segment so that the destination’s TCP protocol can put
the segments back into the order the application intended. Uses three way handshaking
User Datagram Protocol (UDP) - does not sequence the segments and does not care in which order the
segments arrive at the destination. But after that, UDP sends the segments off and forgets about them. It
doesn’t follow through, check up on them, or even allow for an acknowledgment of safe arrival — complete
abandonment. TCP for reliability and UDP for faster transfers.
TCP and UDP must use port numbers to communicate with the upper layers, because they’re what keeps
track of different conversations crossing the network simultaneously. These port numbers identify the
source and destination application or process in the TCP segment. There are 216 = 65536 ports available.
Well-known ports range from 0 to 1023. Registered ports range from 1024 to 49151. Registered ports are
used by applications or services that need to have consistent port assignments. Dynamic or private ports
range from 49152 to 65535. These ports are not assigned to any protocol or service in particular and can be
used for any service or application.
11
If a port is closed/blocked, you cannot communicate with the computer by the protocol using that port. Eg.
If port 25 is blocked you cannot send mail. Firewalls by default block all ports.
Internet Layer
Internet Protocol (IP) essentially is the Internet layer.The other protocols found here merely exist to
support it. It can do this because all the machines on the network have a software, or logical, address called
an IP address.
Internet Control Message Protocol (ICMP) works at the Network layer and is used by IP for many
different services. ICMP is a management protocol and messaging service provider for IP. The following
are some common events and messages that ICMP relates to:
Destination Unreachable If a router can’t send an IP datagram any further, it uses ICMP
to send a message back to the sender, advising it of the situation.
Buffer Full If a router’s memory buffer for receiving incoming datagrams is full, it will use
ICMP to send out this message until the congestion abates.
Hops Each IP datagram is allotted a certain number of routers, called hops, to pass through.
If it reaches its limit of hops before arriving at its destination, the last router to receive that
datagram deletes it.
The executioner router then uses ICMP to send a message, informing the sending
machine of the end of its datagram.
Ping (Packet Internet Groper) uses ICMP echo messages to check the physical and logical
connectivity of machines on a network.
Trace route Using ICMP timeouts, Traceroute is used to discover the path a packet takes
as it traverses an internetwork.
Address Resolution Protocol (ARP) finds the hardware address of a host from a known IP address. ARP
interrogates the local network by sending out a broadcast asking the machine with the specified IP address
to reply with its hardware address
Reverse Address Resolution Protocol (RARP) discovers the identity of the IP address for diskless
machines by sending out a packet that includes its MAC address and a request for the IP address assigned
to that MAC address. A designated machine, called a RARP server, responds with the answer, and the
identity crisis is over.
12
If two systems are connected to the same local network, there is usually no need for a network layer.
However, if the two systems are attached to different networks with connecting devices between the
networks, there is often a need for the network layer to accomplish source-to-destination delivery.
Routing Basics
The network layer of the OSI model provides routing functions and establishes the route between the source
and destination through intermediary nodes (routers). Routing is one of the fundamental aspects of
networking. The ability of routers to learn possible routes (rather than make you manually configure and
constantly update the routes) is one of the primary reasons that ARPANET which originally connected
seven sites, scaled into the modern Internet in only a few short years. A router is connected to at least two
networks, and forwards data packets from a network to another. When it receives an incoming packet, it
decides the next router (hop) to which the packet should be forwarded towards its destination. A routing
table maintains the best routes to various network destinations.
The construction of routing tables is very important for efficient routing, and any corruption of the table
may lead to significant routing problems. To create and maintain a routing table, a router communicates
with other routers using routing protocols. A routing protocol allows routers to share information about
networks and their proximity to each other. The routing protocol running in a router will learn all available
paths to a network (based on the information advertised from different routers), but only determine the best
path to be stored in the routing table. Whenever the topology of a network changes (e.g., a new link is added
or removed), the routing protocol will determine another best path (if needed) and update the routing table
accordingly for the routing table in the updated topology. Routing involves two basic activities:
determining optimal routing paths and
Transporting packets through a network.
Path determination occurs at Layer 3, the network layer. The path determination function enables a
router to evaluate the available paths to a destination and to establish the best path. Routing services use
network topology information when evaluating network paths. This information can be configured by the
network administrator (static routes) or collected through dynamic processes (routing protocols) running
in the network. To route, a router needs to know:
Destination addresses
13
Sources it can learn from
Possible routes
Best route
Routed networks are often large and complex, and it would be excessively difficult to manage and
update network information on all routers all the time. Several algorithms have been developed to help
address these difficulties. These algorithms allow the routers to learn about the network and then make
decisions based on that information. To learn paths (or routes) through a network, and make decisions on
where to send packets, a router use:
Destination address - Typically the Internet Protocol (IP) address of the data’s (packet)
destination.
Source address - Where the information came from (typically an IP address).
Possible routes - Routes that can get information from its present location or source to some
other location (the destination or closest known point).
Best route - The best path to the intended destination. (“Best” can mean many things.)
Status of routes - The current state of routes, which routers track to ensure timely delivery of
information.
Routers often make decisions about the best possible path to get information from a source to a destination.
“Best,” however, is loosely defined, and it depends on what is valued by the network. These measurements
of value are referred to as metrics. Several metrics are listed here:
Hop count - Number of times a packet goes through a router.
Delay time - Time required to reach the destination.
Reliability - Bit-error rate of each network link.
Maximum transmission unit (MTU) - Maximum message length (or packet size) allowed on
the path.
Cost - Usually some combination of other metrics.
To forward network traffic to the proper locations, the routers on your network must have the
correct entries in their routing tables. To do so routers will use either static or dynamic routing
techniques. With static routing, network administrators must manually create and modify the routing table
entries. Dynamic routing uses a specialized routing protocol to update the table entries automatically.
Static routes use a programmed route that a network administrator enters into the router. A network
administrator configures information about remote networks manually
Benefits
No overhead on the router CPU
No bandwidth usage between routers
Adds security
Disadvantage
Administrator must really understand the internetwork
If a network is added to the internetwork, the administrator has to add a route to it on all routers
Not feasible in large networks
Dynamic route uses a route that a routing protocol adjusts automatically for topology or/and traffic
changes. When routers use dynamic routing, this information is learned from other routers.
Benefits
scalability and adaptability
can grow more quickly and larger
adapt to changes in the network topology
Disadvantage
complex structure
Adds overhead on the router CPU
14
Routers uses bandwidth to send routing table updates
Security issue
Internet Routing
The Internet comprises a large number of interconnected heterogeneous routing domains called
autonomous system (AS). AS is essentially a collection of IP networks and routers under the same
administration that share a common routing strategy. An Internet service provider (ISP) is the typical
example of an AS. For the outside world, an AS is regarded as a single routing entity. Each AS must has a
16-bit AS number, which is unique and assigned by a regional Internet registry such as the American
Registry of Internet Numbers (http://www.arin.net). Some routing protocols require the AS number to
make routing decisions.
15
Internet Protocol (IP)
IP is a protocol used for communicating data across a packet-switched internetwork using the Internet
Protocol suite, also referred to as TCP/IP. IP is the primary protocol in the Internet Layer of the Internet
Protocol Suite and has the task of delivering datagrams (packets) from the source host to the destination
host solely based on their addresses. For this purpose the IP defines addressing methods and structures
for datagram encapsulation. The first major version of addressing structure, now referred to as IP Version
4 (IPv4) is still the dominant protocol of the Internet, although the successor, IP Version 6 (IPv6), is being
deployed actively worldwide (128 bits).
IPv4 Addresses
An IPv4 address is a 32-bit address. It uniquely and universally defines the connection of a device (for
example, a computer or a router) to the Internet. IPv4 addresses are unique and universal. They are unique
in the sense that each address defines one, and only one, connection to the Internet. Two devices on the
Internet can never have the same address at the same time.
A protocol such as IPv4 that defines addresses has an address space. An address space is the total number
of addresses used by the protocol. If a protocol uses N bits to define an address, the address space is 2N
because each bit can have two different values (0 or 1) and N bits can have 2N values. IPv4 uses 32-bit
addresses, which means that the address space is 232 or 4,294,967,296 (more than 4 billion). This means
that, theoretically, if there were no restrictions, more than 4 billion devices could be connected to the
Internet. We will see shortly that the actual number is much less because of the restrictions imposed on
the addresses.
There are two prevalent notations to show an 1Pv4 address: binary notation and dotted-decimal notation.
Binary Notation: In binary notation, the IPv4 address is displayed as 32 bits. So it is common to hear an
IPv4 address referred to as a 32-bit address or a 4-byte address. The following is an example of an IPv4
address in binary notation: 01110101 10010101 00011101 00000010
Dotted-Decimal Notation : To make the IPv4 address more compact and easier to read, Internet
addresses are usually written in decimal form with a decimal point (dot) separating the bytes. The
following is the dotted-decimal notation of the above address: 117.149.29.2.
16
Exercise: Find class of the following IP addresses?
1. 00000001 00001011 00001011 11101111
2. 11000001 10000011 00011011 11111111
3. 14.23.120.8
4. 252.5.15.111
Solution
1. The first bit is 0. This is a class A address.
2. The first 2 bits are 1; the third bit is 0. This is a class C address.
3. The first byte is 14; the class is A.
4. The first byte is 252; the class is E.
One problem with classful addressing is that each class is divided into a fixed number of blocks with each
block having a fixed size.
Previously, when an organization requested a block of addresses, it was granted one in class A, B, or C.
Class A addresses were designed for only large organizations such as the military, government agencies,
universities, and large corporations with a large number of attached hosts or routers. Class B addresses
were designed for midsize organizations with tens of thousands of attached hosts or routers. Class C
addresses were designed for small organizations with a small number of attached hosts or routers. A block
in class A address is too large for almost any organization. This means most of the addresses in class A
were wasted and were not used. A block in class B is also very large, probably too large for many of the
organizations that received a class B block. A block in class C is probably too small for many organizations.
Network ID and Host ID
In classful addressing, an IP address in class A, B, or C is divided into network ID and host ID. These
parts are of varying lengths, depending on the class of the address. In class A, 1 byte defines the network
17
ID & 3 bytes define the host ID. In class B, 2 bytes define the network ID & 2 bytes define the host ID.
In class C, 3 bytes define the network ID & 1 byte defines the host ID.
Default Mask
The length of the network ID and host ID (in bits) is predetermined in classful addressing. we can also use
a mask (also called the default mask), a 32-bit number made of contiguous 1s followed by contiguous 0s.
The mask can help us to find the network ID and the host ID. For example, the mask for a class A address
has eight 1s, which means the first 8 bits of any address in class A define the network ID; the next 24 bits
define the host ID.
IP address shortage
In the early days of the Internet, IP addresses were allocated to organizations based on request rather than
actual need. No medium size - Hosts:
Class A: 16 million
Class B: 65,536
Class C: 256
Subnet Mask
The solution to the IP address shortage was thought to be the subnet mask. Formalized in 1985 , the subnet
mask breaks a single class A, B or C network in to smaller pieces.
The flaws in classful addressing scheme combined with the fast growth of the Internet led to the near
depletion of the available addresses. Yet the number of devices on the Internet is much less than the 2 32
address space. We have run out of class A and B addresses, and a class C block is too small for most midsize
organizations. One solution that has alleviated the problem is the idea of classless addressing.
18
Subnetting
During the era of classful addressing, subnetting was introduced. If an organization was granted a large
block in class A or B, it could divide the addresses into several contiguous groups and assign each group
to smaller networks (called subnets) or, in rare cases, share part of the addresses with neighbors.
Subnetting increases the number of 1s in the mask. Subnetting is the process of borrowing bits from
the HOST bits, in order to divide the larger network into small subnets. Subnetting does NOT give
you more hosts, but actually costs you hosts.
You lose two host IP Addresses for each subnet, and perhaps one for the subnet IP address and one for the
subnet broadcast IP address. You lose the last subnet and all of it’s hosts’ IP addresses as the broadcast for
that subnet is the same as the broadcast for the network. In older networks, you would have lost the first
subnet, as the subnet IP address is the same as the network IP address. (This subnet can be used in most
networks.)
Classless Addressing
To overcome address depletion and give more organizations access to the Internet, classless addressing
was designed and implemented. In this scheme, there are no classes, but the addresses are still granted in
blocks.
Address Blocks
In classless addressing, when an entity, small or large, needs to be connected to the Internet, it is granted a
block (range) of addresses. The size of the block (the number of addresses) varies based on the nature and
size of the entity. For example, a household may be given only two addresses; a large organization may be
given thousands of addresses. An ISP, as the Internet service provider, may be given thousands or hundreds
of thousands based on the number of customers it may serve.
To simplify the handling of addresses, the Internet authorities impose three restrictions on classless
address blocks:
The addresses in a block must be contiguous, one after another.
The number of addresses in a block must be a power of 2 (1, 2, 4, 8 .... ).
The first address must be evenly divisible by the number of addresses.
19
The above figure shows a block of addresses, in both binary and dotted-decimal notation, granted to a small
business that needs 16 addresses. We can see that the restrictions are applied to this block. The addresses
are contiguous. The number of addresses is a power of 2 (16 = 24), and the first address is divisible by 16.
The first address, when converted to a decimal number, is 3,440,387,360, which when divided by 16 results
in 215,024,210.
Classless addressing Mask
A better way to define a block of addresses is to select any address in the block and the mask. As we
discussed before, a mask is a 32-bit number in which the n leftmost bits are 1s and the 32 - n rightmost bits
are 0s. However, in classless addressing the mask for a block can take any value from 0 to 32. It is very
convenient to give just the value of n preceded by a slash (CIDR – Classless Inter Domain Routing
notation). The address and the /n notation completely define the whole block (the first address, the last
address, and the number of addresses).
The first address in the block can be found by setting the 32 - n rightmost bits in the binary notation of the
address to 0s. E.g. 1, A block of addresses is granted to a small organization. We know that one of the
addresses is 205.16.37.39/28. What is the first address in the block?
Solution:
The binary representation of the given address is
11001101 00010000 00100101 00100111 If we set 32−28 rightmost bits to 0, we get
11001101 00010000 00100101 00100000
or
205.16.37.32.
The last address in the block can be found by setting the 32 - n rightmost bits in the binary notation of the
address to 1s. E.g., Find the last address for the block in above E.g., 1.
Solution:
The binary representation of the given address is
11001101 00010000 00100101 00100111 If we set 32 − 28 rightmost bits to 1, we get
11001101 00010000 00100101 00101111
or
205.16.37.47
The number of addresses in the block is the difference between the last and first address. It can easily be
found using the formula 232-n. Example Find the number of addresses in E.g., 1.
Solution
The value of n is 28, which means that number of addresses is 2 32−28 or 16
Another way to find the first address, the last address, and the number of addresses is to represent the mask
as a 32-bit binary (or 8-digit hexadecimal) number.
This is particularly useful when we are writing a program to find these pieces of
information.
In the above example the /28 can be represented as:
11111111 11111111 11111111 11110000 (twenty-eight 1s and four 0s).
Find
a. The first address
b. The last address
c. The number of addresses.
20
The number of addresses can be found by complementing the mask, interpreting it as a decimal number,
and adding 1 to it.
Network Addresses
A very important concept in IP addressing is the network address. When an organization is given a block
of addresses, the organization is free to allocate the addresses to the devices that need to be connected to
the Internet. The first address in the class, however, is normally (not always) treated as a special address.
The first address is called the network address and defines the organization network. It defines the
organization itself to the rest of the world. The first address is the one that is used by routers to direct the
message sent to the organization from the outside.
Address Allocation
The next issue in classless addressing is address allocation. How are the blocks allocated? The ultimate
responsibility of address allocation is given to a global authority called the Internet Corporation for
Assigned Names and Addresses (ICANN). However, ICANN does not normally allocate addresses to
individual organizations. It assigns a large block of addresses to an ISP. Each ISP, in turn, divides its
assigned block into smaller sub blocks and grants the sub blocks to its customers. In other words, an ISP
receives one large block to be distributed to its Internet users. This is called address aggregation: many
blocks of addresses are aggregated in one block and granted to one ISP.
An ISP is granted a block of addresses starting with 190.100.0.0/16 (65,536 addresses). The ISP needs to
distribute these addresses to three groups of customers as follows:
a. The first group has 64 customers; each needs 256 addresses.
b. The second group has 128 customers; each needs 128 addresses.
c. The third group has 128 customers; each needs 64 addresses.
Design the sub blocks and find out how many addresses are still available after these allocations?
21
Solution
22
IPv6 Addresses
Internet Protocol (IP) version 4 is the most commonly used communication protocol for both the Internet
and internal network environments. Although IPv4 is robust and scalable, new technologies and higher
demand have paved the way for the eventual adoption of IPv6. Despite all short-term solutions, address
depletion is still a long-term problem for the Internet. This and other problems in the IP protocol itself have
been the motivation for IPv6. An IPv6 address is 128 bits or 32 hexadecimal digits long.
23
Stateful address configuration refers to host IP configuration that uses a DHCP server.
IPv6 supports both stateless and stateful address configuration.
With stateless address configuration, hosts automatically configure themselves with IPv6 link-local
addresses along with additional addresses advertised by local routers.
4. Built-in security:- IPv6 has built-in IP security, which facilitates configuration of secure network
connections.
5. Prioritized delivery:- IPv6 contains a field in the packet that allows network devices to determine the
specified rate at which the packet should be processed.
This allows traffic prioritization or QoS. For example, when streaming video traffic, it is critical that
the packets arrive in a timely manner. You can set this field to ensure that network devices determine
that the packet delivery is time-sensitive.
6. Neighbor detection:- IPv6 uses the Neighbor Discovery protocol to manage the interaction between
nodes within the same network link.
Neighbor Discovery replaces the broadcast-based Address Resolution Protocol (ARP) with more
efficient multicast and unicast communication within the same network segment.
7. Extensibility:- IPv6 has been designed so that it can be extended with fewer constraints than IPv4.
24
Abbreviated IPv6 addresses
25
Media Access (Link) Control: Channel access if medium is shared. Examples of link layer
protocols: Ethernet, 802.11 wireless LAN, token ring, and PPP. A datagram may be carried by
different protocols on the different links in the path, e.g., Ethernet on first link, frame relay on
intermediate links, 802.11 on last link.
26
TCP Transmission Control Protocol
It creates a virtual connection between two TCPs to send data. It uses flow control and error control
mechanism at the transport layer level. Because the sending and receiving processes may not produce and
consume data at the same speed, TCP needs buffers for storage. There are two buffers, the sending buffer
and the receiving buffer, for each direction. Buffers are of hundreds or thousands of bytes, depending on
implementation and not of same size. Byte locations are recycled and made available for further use.
````````````End```````````
27