0% found this document useful (0 votes)
49 views

Unit 5 Complete Notes

The document discusses reference models used in computer networks. It describes the OSI model and TCP/IP model as the two main reference models that standardize communication between heterogeneous networks. The OSI model is a conceptual model that defines network communication and divides it into seven layers, with each layer performing a specific task. It aims to provide a standard framework for hardware and software developers to ensure compatibility between current and future technologies.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Unit 5 Complete Notes

The document discusses reference models used in computer networks. It describes the OSI model and TCP/IP model as the two main reference models that standardize communication between heterogeneous networks. The OSI model is a conceptual model that defines network communication and divides it into seven layers, with each layer performing a specific task. It aims to provide a standard framework for hardware and software developers to ensure compatibility between current and future technologies.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

Unit 5 Reference Models

✓ In the world of web and internet, the term "reference model" defined a standard means of
communication architecture which is accepted worldwide.
✓ As users are using the network of a system and are situated over a broad physical range
and even the network devices users are using might have different architecture.
✓ So, for providing a standard communication between these heterogeneous devices, a
standardized model (also termed as a reference model) is necessary for providing us the
way how different devices have to communicate despite their diverse architecture.
✓ For this reason, two models were designed where one is based on hypothetical
communication architecture (OSI model) while the other is based on a fully practical
model (TCP/IP model).
✓ In computer networks, reference models give a conceptual framework that standardizes
communication between heterogeneous networks.
✓ The two popular reference models are −
(i)OSI Model (ii)TCP/IP Protocol Suite

What is OSI Model?


• The OSI (open system interconnection) Model is a logical and conceptual model that
defines network communication used by systems open to interconnection and
communication with other systems.
• The Open System Interconnection (OSI Model) also defines a logical network and
effectively describes computer packet transfer by using various layers of protocols.
• OSI model describes how information from a software application (such as
spreadsheet) in one computer moves through a physical medium (such as wire) to the
software application in another computer.
• The OSI model is a theoretical blueprint that helps us understand how data gets from
one user’s computer to another.
• It is also a model that helps develop standards so that all of our hardware and software
talks nicely to each other.
• It aids standardization of networking technologies.
• It provides an organized structure for hardware and software developers to follow,
to insure their products are compatible with current and future technologies.
• OSI model divides the whole task into seven smaller and manageable tasks. Each layer
is assigned a particular task.
• Each layer is self-contained, so that task assigned to each layer can be performed
independently.

Why of OSI Model?


• Helps you to understand communication over a network
• Troubleshooting is easier by separating functions into different network layers.
• Helps you to understand new technologies as they are developed.
• Allows you to compare primary functional relationships on various network layers.

Why Layered Architecture?


• Layer architecture simplifies the network design.
• It is easy to debug network applications in a layered architecture network.
• The network management is easier due to the layered architecture.
• Network layers follow a set of rules, called protocol.
• The protocol defines the format of the data being exchanged, and the control and timing
for the handshake between layers.

• The OSI reference model is as shown in the figure. There are seven layers in the model.
Physical layer, Data link layer, Network layer, Transport layer, Session layer,
Presentation layer, Application layer.
• Each layer performs unique and specific task and it offers services to the layer above
it. Each computer on a network uses a series of protocols to perform the functions
assigned to each layer.
• At the top of the stack is the application layer and at the bottom is the physical medium
which actually connects the computers to form a network.
• The figure shows the OSI model with two hosts A and B, communicating with each
other.
• Interface: an interface defines the operations and services offered by lower layer to the
upper layer. This is an interface between each pair of adjacent layers as shown in the
figure.
• Peer: the entities comprising the corresponding layers on different machines are called
as peers. The communication actually takes place between the peers using the protocols.
• Exchange of information: at the physical layer the communication is direct that is,
machine A sends a stream of bits to machine B. At higher layers each layer in the
sending machines adds its own information to the message it receives from the layer
just above it and passes the whole package to the layer just below it. The information
added by each layer is in the form of headers or trailers. At layer 1 the entire package
is converted to a form that can be transferred to the receiving machine.

Peer-to-Peer processes:
• The processes on each machine that communicate at a given layer are called peer-to-peer
processes.
•At the physical layer, communication is direct: Device A sends a stream of bits to device B
(through intermediate nodes).
• At higher layers each layer in the sending machines adds its own information to the message
it receives from the layer just above it and passes the whole package to the layer just below it.

Interfaces between Layers:


• An interface defines the operations and services offered by lower layer to the upper layer.
This is an interface between each pair of adjacent layers.
• The passing of the data and network information down through the layers of the sending
device and receiving device is made possible by an interface between each pair of adjacent
layers.

Encapsulation

• The outgoing information will travel down through the layers to the lowest layer.
• While moving down on the source machine, it acquires all the control information which is
required to reach the destination machine.
• The control information is in the form of Headers and Trailer which surrounds the data
received from the layer above.
• This process of adding headers and trailers to the data is called as data encapsulation.
• The information added by each layer is in the form of headers or trailers.
• At layer 1 the entire package is converted to a form that can be transferred to the receiving
machine. • At the receiving machine, the message is unwrapped layer by layer, with each
process receiving and removing the data meant for it.
• For example, layer 2 removes the data meant for it, then passes the rest to layer 3.
• Layer 3 then removes the data meant for it and passes the rest to layer 4, and so on.
•The headers and trailers contain control information. The headers and trailers form the
envelope which carries the message to the desired destination.
Example of Data Encapsulation

Functions/ Features of OSI model Layers


OSI model has 7 layers as shown in the figure.

1. Physical layer:
• It co-ordinates the functions required to transmit bit stream over physical medium.

• Provides physical interface for transmission of information.


• Defines rules by which bits are passed from one system to another on a physical
communication medium.
• Covers all - mechanical, electrical, functional and procedural - aspects for physical
communication.

Functions:
1. Bit synchronization: provides the synchronization of the bits by providing a clock. This
clock controls both sender and receiver thus providing synchronization at bit level.
2. Bit rate control: defines the transmission rate i.e. the number of bits sent per second.
3. Line configuration: defines the way in which the devices are connected to the medium.
Two different line configurations are used (i)point to point configuration and (ii) multipoint
configuration to activate, maintain and deactivate the physical connection.
4. Physical topologies: bus, star or mesh topology.
5. Transmission mode: Simplex, half-duplex and full-duplex.
6. Multiplexing: uses different techniques of multiplexing, in order to improve the channel
efficiency.

2. Data link layer:


✓ Data link layer is the second layer of the OSI model.
✓ It accepts the data from the Network layer, attaches header & trailer and send it to the
physical layer.
✓ At receives side it accepts the data from the physical layer snip of header & footer & give
back to network layer the way it has taken.
✓ IEEE has divided data link layer into two sub layers 1) Logical link control (LLC) 2)
Media access control (MAC)
✓ LLC sublayer provides interface between the media access methods and network layer
protocols such as Internet protocol which is a part of TCP/IP protocol suite.
✓ LLC sublayer determines whether the communication is going to be connectionless or
connection-oriented at the data link layer.
✓ MAC sublayer is responsible for connection to physical media. At the MAC sublayer
of Data link layer, the actual physical address of the device, called the MAC address is
added to the packet. Such a packet is called a Frame that contains all the addressing
information necessary to travel from source device to destination device.
MAC address is the 12 digit hexadecimal number unique to every computer in this world. A
device’s MAC address is located on its Network Interface Card (NIC). In these 12 digits of
MAC address, the first six digits indicate the NIC manufacturer and the last six digits are
unique. For example, 32-14-a6-42-71-0c is the 12 digit hexadecimal MAC address. Thus MAC
address represents the physical address of a device in the network.

DLL is divided into two Sub-Layers • LLC Sub Layer • MAC Sub Layer
Logical Link Control Sub Layer
• It is upper portion of the Data Link layer.
• Performs Flow control and management of connection errors.
• LLC supports three types of connections:
1. Unacknowledged connectionless service: • does not perform reliability checks or
maintain a
connection, very fast, most commonly used
2. Connection oriented service: • once the connection is established, blocks of data can be
transferred between nodes until one of the node terminates the connection.
3. Acknowledged connectionless service: • provides a mechanism through which individual
frames can be acknowledged.
Media Access Control Sub Layer
• This sub layer contains methods to regulate the timing of data signals and eliminate collisions.
• The MAC sub layer determines where one frame of data ends and the next one starts
- frame synchronization.
• There are four means of frame synchronization:
• Time based,
• Character counting,
• Byte stuffing and
• Bit stuffing.
Functions of data link layer:
• Framing: Divides the stream of bits into manageable data units called frames.

• Physical addressing- Adds a header to the frame to define the sender and/or receiver of the
frame.

• Synchronization: When data frames are sent on the link, both machines must be
synchronized in order to transfer to take place.

• Flow control: Imposes a flow control mechanism to avoid overwhelming the


receiver. Synchronization between fast sender and slow receiver.

• Error control: Adds mechanisms to detect and retransmit damaged or lost frames (CRC).

• Access control: Determine which device has control over the link at any given time.

• Link establishment and termination: Establishes and terminates the logical link between two
nodes.

• Frame sequencing: Transmits/receives frames sequentially.

• Frame acknowledgment: Provides/expects frame acknowledgments.

3. Network Layer
• This layer is incharge of packet addressing , converting logical addresses into
physical addresses.
• It is responsible for the source-to-destination delivery of a packet across multiple
networks (links).
• This layer provides switching and routing technologies, creating logical paths, known as
virtual circuits, for transmitting data from node to node.
• Routing and forwarding are functions of this layer, as well as addressing, internetworking,
error handling, congestion control and packet sequencing.
• The packets will use to arrive at their destination, based on factors like traffic and
priorities. The network layer determines that how data transmits between the
network devices.
Functions of the Network layer are as follows:

• Routing: It is responsible for routing packets from the source host to the destination host.
The routes can be based upon static tables that are rarely changed, or they can be automatically
updated depending upon network conditions.
• Logical Addressing: The data link layer assigns the physical address locally. When the data
packets are routed to remote locations, a logical addressing scheme is required to differentiate
between the source system and the destination system. This is provided by the network layer.

• Internetworking: One of the main responsibilities of network layer is to provide


internetworking between different networks. It provides logical connection between different
types of network. It is because of this layer, we can combine various different networks to
form a bigger network.

• Packetizing: The network layer receives the data from the upper layers and creates its own
packets by encapsulating these packets. The process is known as packetizing. This packetizing
in done by Internet Protocol (IP) that defines its own packet format.

• Fragmentation: Fragmentation means dividing the larger packets into small fragments.

4. Transport Layer : Transport layer (also called end-to-end layer) manages end to end
(source to destination) (process to process) message delivery in a network and also provides
the error checking and hence guarantees that no duplication or errors are occurring in the data
transfers across the network. It makes sure that all the packets of a message arrive intact and
in order.
Transport layer also provides the acknowledgement of the successful data transmission and
retransmits the data if error is found.

Functions of Transport Layer

• Service Point Addressing: Transport Layer header includes service point address which is
port address. This layer gets the message to the correct process on the computer unlike Network
Layer, which gets each packet to the correct computer.

• Segmentation and Reassembling: A message is divided into segments; each segment


contains sequence number, which enables this layer in reassembling the message. Message is
reassembled correctly upon arrival at the destination and replaces packets which were lost in
transmission.
• Connection Control: It includes 2 types:
Connection Oriented Transmission

(a) In this type of transmission the receiving device sends an acknowledgment, back to the
source after a packet or group of packet is received.
(b) This type of transmission is also known as reliable transport method.
(c) Because connection oriented transmission requires more packets be sent across network,
it is considered a slower transmission method.
(d) If the data that is sent has problems, the destination requests the source for retransmission
by acknowledging only packets that have been received and are recognizable.
(e) Once the destination computer receives all of the data necessary to reassemble the packet,
the transport layer assembles the data in the correct sequence and then passes it up, to the
session layer.

Connectionless Transmission

(a) In this type of transmission the receiver does not acknowledge receipt of a packet.
(b) Sending device assumes that packet arrive just fine.
(c) This approach allows for much faster communication between devices.
(d) The trade-off is that connectionless transmission is less reliable than connection oriented.

• Flow Control: In this layer, flow control is performed end to end.

• Error Control: Error Control is performed end to end in this layer to ensure that the complete
message arrives at the receiving transport layer without any error. Error Correction is done
through retransmission.

5. Session layer : It has the primary responsibility of beginning, maintaining and ending the
communication between two devices, which is called Session. It also provides for orderly
communication between devices by regulating the flow of data.
The session protocol defines the format of the data sent over the connections. Session
layer establish and manages the session between the two users at different ends in a network.
Session layer also manages who can transfer the data in a certain amount of time and for how
long.
The examples of session layers and the interactive logins and file transfer sessions. Session
layer reconnect the session if it disconnects. It also reports and logs and upper layer errors. The
session layer allows session establishment between processes running on different stations.
The dialogue control and token management are responsibility of session layer.
The functions of the Session layer are :
1. Session establishment, maintenance and termination : allows two application processes
on different machines to establish, use and terminate a connection, called a session.
2. Session support : performs the functions that allow these processes to communicate over the
network, performing security, name recognition, logging and so on.
3. Dialog Controller: Dialog control is the function of session layer that determines which
device will communicate first and the amount of data that will be sent.
When a device is contacted first, the session layer is responsible for determining which device
participating in the communication will transmit at a given time as well as controlling the
amount of data that can be sent in a transmission. This is called dialog control. The session
layer allows two systems to start communication with each other in half-duplex or full-duplex.
4. Dialog separation or Synchronization: The session layer is also responsible for adding
checkpoint or markers within the message. This process of inserting markers to the stream of
data is known as dialog separation.
6. Presentation Layer
Presentation Layer is also called Translation layer. The presentation layer presents the data
into a uniform format and masks the difference of data format between two dissimilar systems.
The presentation layer formats the data to be presented to the application layer. It can be
viewed as the translator for the network. This layer may translate data from a format used by
the application layer into a common format at the sending station, and then translate the
common format to a format known to the application layer at the receiving station.

The functions of the presentation layer are :


1. Translation: Character code translation, For example, ASCII to EBCDIC.
2. Encryption/ Decryption: Data encryption translates the data into another form or code. The
encrypted data is known as the cipher text and the decrypted data is known as plain text. A key
value is used for encrypting as well as decrypting data.
3. Data Compression: Reduces the number of bits that need to be transmitted on the network.

7. Application Layer : Application layer interacts with application programs and is the highest
level of OSI model.
• Application layer contains management functions to support distributed applications.
• Examples of application layer are applications such as:File Transfer, Electronic Mail,
Remote Login Etc.
Functions of Application layer:
1. Network virtual terminal 2. File transfer access and management 3. Mail services and
directory services.
Horizontal communication
Bit stuffing:
Bit stuffing is the process of adding one extra 0 whenever five consecutive 1‟s in the data, so that the
receiver does not mistake the pattern 0111110 or a flag.
At sender side the bit is stuffed and at receiver side stuffed bit is removed.
As shown in following

Example: Sequence 011111111000 becomes 0111110111000. This extra bit is inserted regardless of
sixth bit 0 or 1.

Explain horizontal and vertical communication


**(Any one diagram can be considered)
Fig: Horizontal & Vertical communication in TCP/IP model

1) The horizontal communication is the logical connection between the layers, there is no direct
communication between them.
2) Information included in each protocol header by the transmitting system is a message that will be
carried to the same protocol in the destination system.
3) For two computers to communicate over a n/w, the protocol used at each layer of the OSI model in
the transmitting system must be duplicated at the receiving system.
4) The packet travels up through the protocol stack and each successive header is stripped of by the
appropriate protocol & processed.
5) When the packet arrived at its destination, the process by which the headers are applied at the
source is repeated in server.
Fig: Vertical communication in OSI model

1) In addition to communicating horizontally with the same protocol in the other system, the header
information also enables each layer to communicate with the layer above & below it.
2) Eg. The network layer will communicate with the data link layer & transport layer.
3) This interlayer communication is called communication vertical.
4) When a system receives a packet & passes it up through various layers the data link layer protocol
header includes a field which specifies the name of network layer protocol to be used to process the
packet. 5) The network layer protocol header will specify the name of transport layer protocol to be
used to process the packet.

Define ‘Packet’ in concern with computer communication.


It is the complete unit transmitted by sending computer over the network medium.
OR
A packet is the unit of data that is routed between an origin and a destination on the Internet or any
other packet-switched network.

State name of protocol used at different layers of OSI model.


The following are the OSI protocols used in the seven layers of the OSI Model:
1. Physical Layer: Bluetooth, PON, OTN, DSL, IEEE.802.11, IEEE.802.3, L431 and TIA 449.
2. Data Link Layer: ARP, CSLIP, HDLC, IEEE.802.3, PPP, X-25, SLIP, ATM, SDLS and PLIP.
3. Network Layer: Internet Protocol (IPv4), Internet Protocol (IPv6), IPX, AppleTalk, ICMP, IPSec
and IGMP.
4. Transport Layer: Transmission Control Protocol (TCP), UDP, SPX, DCCP and SCTP.
5. Session Layer: PPTP, SAP, L2TP and NetBIOS.
6. Presentation Layer: XDR, TLS, SSL and MIME.
7. Application Layer: HTTP, SMTP, DHCP, FTP, Telnet, SNMP and SMPP.

Name the protocols used in:


(i) Data Link layer (ii) Network layer (iii) Transport layer (iv) Presentation layer
1.Data Link layer:
• Ethernet
• FDDI Fibre Distributed Data Interface
• Frame Relay
• L2TP Layer 2 Tunnelling Protocol
• PPP Point-to-Point Protocol
• SLIP Serial Line Internet Protocol
• Token ring
2. Network layer
• ICMP Internet Control Message Protocol
• IGMP Internet Group Management Protocol
• IGRP Interior Gateway Routing Protocol
• IPv4 Internet Protocol version 4
• IPv6 Internet Protocol version 6
• IPSec Internet Protocol Security
3. Transport layer
• AHAH Authentication Header over IP or IPSec
• TCP Transmission Control Protocol
• UDP User Datagram Protocol
4. Presentation layer
• Network Data Representation
• Netware Core Protocol
• MIDI (Musical Instrument Digital Interface)
• Telnet (a remote terminal access protocol)
• X.25 Packet Assembler/Disassembler Protocol (PAD)
Structure of the TCP / IP Model
TCP/IP Reference Model:
TCP/IP means transmission control protocol and internet protocol. Protocols are set of rules which
govern every possible communication over the internet. These protocols describe the movement of
data between the host computers or internet. These offer simple naming and addressing schemes.
Overview of TCP/IP reference model
TCP/IP that is transmission control protocol and the internet protocol was developed by Department
of Defense’s Project Research Agency (ARPA, later DARPA) under the project of network
interconnection.
Originally it was created to connect military networks together, later it was used by government
agencies and universities. It is robust to failures and flexible to diverse networks. Most widely used
protocol for interconnecting computers and it is the protocol of the internet.
TCP/IP that is Transmission Control Protocol and Internet Protocol has following
features
●Support for a flexible architecture. Adding more machines to a network was easy.
●The network is robust, and connections remained intact until the source and destination machines
were functioning. The main idea was to allow one application on one computer to talk to (send data
packets) another application running on different computer.
Different Layers of TCP/IP Reference Model Below:

Layer 1: Host-to-network Layer


1. Lowest layer of the all.
2. Protocol is used to connect to the host, so that the packets can be sent over it.
3. Varies from host to host and network to network.
Layer 2: Internet layer
1. Selection of a packet switching network which is based on a connectionless internetwork
layer is called a internet layer.
2. It is the layer which holds the whole architecture together.
3. It helps the packet to travel independently to the destination.
4. Order in which packets are received is different from the way they are sent.
5. IP (Internet Protocol) is used in this layer.
6. The various functions performed by the Internet Layer are:
✓ Delivering IP packets
✓ Performing routing
✓ Avoiding congestion
Layer 3: Transport Layer
1. It decides if data transmission should be on parallel path or single path.
2. Functions such as multiplexing, segmenting or splitting on the data is done by transport
layer.
3. The applications can read and write to the transport layer.
4. Transport layer adds header information to the data.
5. Transport layer breaks the message (data) into small units so that they are handled more
efficiently by the network layer.
6.Transport layer also arrange the packets to be sent, in sequence
Layer 4: Application Layer
The TCP/IP specifications described a lot of applications that were at the top of the protocol
stack. Some of them were TELNET, FTP, SMTP, DNS etc.
1. Telnets a two-way communication protocol which allows connecting to a remote machine
and run applications on it.
2. FTP (File Transfer Protocol) is protocol that allows File transfer amongst computer users
connected over a network. It is reliable, simple and efficient.
3. SMTP (Simple Mail Transport Protocol) is a protocol, which is used to transport electronic
mail between a source and destination, directed via a route.
4. DNS (Domain Name Server) resolves an IP address into a textual address for Hosts
connected over a network.
5. It allows peer entities to carry conversation.
6.It defines two end-to-end protocols: TCP and UDP.

TCP / IP Protocol Suite:

Fig: TCP/ IP Protocol Suite


Describe Host-to-Network Layer Protocols (SLIP & PPP)
1. SLIP
1. Serial Line Protocol is an encapsulation of the Internet Protocol designed to work over serial ports
and modem connections.
2. This packet-framing protocol and defines a sequence of bytes that frame IP packets on a serial line.
3. SLIP is commonly used for point-to-point serial connections running TCP/IP
4. It is designed to transmit signals over a serial connection and has very low overhead.
5. SLIP is serial line internet protocol
6. SLIP does not perform error detection and correction.
7. SLIP does not provide any authentication.
8. SLIP is not approved internet standard.
9. SLIP supports static IP address assignment
2. PPP
1. PPP is point to point protocol.
2. It is a much more developed protocol than SLIP(which is why it is replacing it).
3. It transfers additional data, better suited to data transmission over the Internet (the addition of data
in a frame is mainly due to the increase in bandwidth).
4. PPP perform error detection
5. PPP provides authentication and security.
6. PPP is approved internet standard.
7. PPP supports IP and other protocols.
8. PPP supports Dynamic IP address assignment
9. PPP is a collection of three protocols:
❖ A datagram encapsulation protocol
❖ LCP i.e. Link Control Protocol, enabling testing and communication configuration.
❖ A collection of NCPs i.e. Network Control Protocols allowing integration control of PPP within the
protocols of the upper layers.
Describe Internet Layer Protocols (ARP, RARP, IP, ICMP, IGMP)
1. ARP-Address Resolution Protocol
 ARP takes the IP address of a host as input & gives its corresponding physical
address as the output.
◼ The Internet is based on IP addresses
◼ Data link protocols (Ethernet, FDDI, ATM) may have different (MAC)
addresses
 The ARP and RARP protocols perform the translation between IP addresses and
MAC layer addresses.

 ARP sends the IP broadcast message to all the computer on the network.
 The computer whose IP address matches the broadcast IP address sends a reply and along
with, its physical address to the broadcasting computer.
 All other computers ignore the broadcast message.
Address Translation with ARP
Example:
ARP request: Argon broadcasts an ARP request to all stations on the network: “What is the
hardware address of Router137?”
ARP Reply: Router137 responds with an ARP Reply which contains the hardware address

2. RARP (Reverse Address Resolution Protocol)


• This is used to obtain the IP address of a host based on its physical address.
• This performs the job exactly opposite to that of ARP (Address Resolution Protocol)
• In RARP, a host in LAN can request to learn its IP address from a gateway server's
Address Resolution Protocol (ARP) table or cache.
• A network administrator creates a table in a local area networks gateway router that
maps the physical machine (or Media Access Control - MAC address) addresses to
corresponding Internet Protocol addresses.
• When a new machine is set up, its RARP client program requests from the RARP server
on the router to be sent its IP address.
• Assuming that an entry has been set up in the router table, the RARP server will return the IP
address to the machine which can store it for future use.
3. Internet Protocol (IP)
➢ IP is internet Protocol.
➢ It is unreliable protocol because it does not provide any error control and flow
control.
➢ Packets in IP are called “Datagram”.
➢ Datagram is variable length packet with two parts –header and data

Functions of the IP
1. Addressing:
◼ In order to perform the job of delivering datagrams, IP must know where to
deliver them to. For this reason, IP includes a mechanism for host addressing.
2. Data Encapsulation and Formatting/ Packaging:
◼ IP accepts data from the transport layer protocols UDP and TCP.
◼ It then encapsulates this data into an IP datagram using a special format prior
to transmission.
3. Fragmentation and Reassembly:
◼ IP fragment IP datagrams into pieces.
◼ The receiving device uses the reassembly function to recreate the whole IP
datagram again.
4. Routing / Indirect Delivery:
◼ When an IP datagram must be sent to a destination on the same local
network, this is done using direct delivery.
◼ However, if the final destination is on a distant network not directly attached to
the source datagram must be delivered indirectly.
4. ICMP (Internet control message protocol.)
• ICMP is a error reporting protocol.
• This protocol is responsible for providing diagnostic functions and reporting errors due to
the unsuccessful delivery of IP packets.
• It is used by network devices, like routers, to send error messages indicating, for example,
that a requested service is not available or that a host or router could not be reached.
• ICMP can also be used to relay query messages.
• ICMP enables the detection and reporting of problems in the Internet.
5. (Internet Group Management Protocol)
• It Is Responsible For The Management Of IP Multicast Groups.
• It Is Used By Hosts And Adjacent Routers On Ipv4 Networks To Establish Multicast
Group Memberships.
• IGMP Is An Integral Part Of IP Multicast.
• IGMP Can Be Used For One-To-Many Networking Applications Such As Online
Streaming Video And Gaming, And Allows More Efficient Use Of Resources When
Supporting These Types Of Applications.
• IGMP Is Used On Ipv4 Networks.

Describe Transport Layer Protocols (TCP & UDP)


 Transport Layer Works on top of Internet Layer.
 It is concerned with transport of packets from the source to destination.
 In TCP/IP the transport layer is represented by two Protocols:
◼ TCP
◼ UDP

1. Transmission Control Protocol (TCP)


 TCP is transmission control protocol.
 It Provides:
◼ Connection oriented service
◼ Reliable service
◼ Stream delivery service
◼ Sending and receiving buffers
◼ Bytes and segments
◼ Full duplex service

➢ TCP is a connection oriented protocol.


 Connection oriented means that a virtual connection is established before any user
data is transferred.
 If the connection cannot be established, the user program is notified.
 If the connection is ever interrupted, the user program finds out there is a problem.

➢ TCP is Reliable-
 Reliable means that every transmission of data is acknowledged by the receiver.
 Reliable does not mean that things don't go wrong, it means that we find out when
things go wrong.
 If the sender does not receive acknowledgement within a specified amount of time, the
sender retransmits the data.
➢ Stream delivery service:
◼ TCP is a stream oriented protocol.
◼ It allows the sending and receiving process to obtain as a stream of bytes.
◼ TCP creates a working environment in such a way that the sending and
receiving processes seem to be connected by an imaginary “tube” This is
called as stream delivery service.
➢ TCP : Flow Control
◼ Sending and receiving buffers:
◼ The sending and receiving process may not produce and receive data at the
same speed.
◼ Hence TCP needs buffers for storage.
◼ There are two types of buffers used in each direction:
1) Sending buffer
2) Receiving buffer
➢ Full duplex service:
◼ TCP offers full duplex service where the data can flow in both the direction
simultaneously.
◼ The TCP segments are sent both the directions.

Process to process communication:


◼ The TCP uses port numbers as transport layer addresses.
◼ Also called as Port to Port communication.
TCP Header

2. UDP
 UDP is user datagram protocol.
 It is connectionless protocol because data is sent without establishing a connection
between sender and receiver before sending the data.
 UDP is unreliable because data is delivered without acknowledgement.
 UDP does not perform Auto retransmission.
 UDP does not use flow control .
 UDP has high transmission speed.
UDP Datagram Format

TCP vs UDP
Describe Application Layer Protocols(SMTP, FTP, TELNET & DNS)
SMTP
 SMTP is simple mail transfer protocol.
 It is connection oriented text based protocol.
 Sender communicates with receiver using a command and supplying data over
reliable TCP connection.
 SMTP is standard application layer protocol for delivery of email over TCP/IP
network.
 SMTP establish a TCP connection between sender and port number 25 of receiver.
 Electronic Mail

 Three major components:


 user agents
 mail servers
 simple mail transfer protocol: SMTP
User Agent
 Also called as “mail reader”
 composing, editing, reading mail messages e.g., Eudora, Outlook, Mozilla
Thunderbird
 outgoing, incoming messages stored on server.
Mail Servers
 mailbox contains incoming messages for user
 message queue of outgoing (to be sent) mail messages
SMTP
 protocol between mail servers to send email messages
 client: sending mail server
 “server”: receiving mail server
Scenario: Alice sends message to Bob
1) Alice uses UA to compose message and “to” bob@yahoo.com
2) Alice’s UA sends message to her mail server; message placed in message queue
3) Client side of SMTP opens TCP connection with Bob’s mail server
4) SMTP client sends Alice’s message over the TCP connection
5) Bob’s mail server places the message in Bob’s mailbox
6) Bob invokes his user agent to read message
Control connection:
◼ Control connection remains alive during the entire process.
◼ The IP uses minimize delay type services because this is an interactive
connection between a user and server.

Data Connection:
◼ Data connection uses the port 20 at the site.
◼ This connection is opened when data to be transferred is ready and it is
closed when transfer of data is over.
◼ The service types used by IP is maximize throughput.

FTP (File transfer Protocol)


https://youtu.be/XXp8ixOtFjI

Explanation: 1. File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for
copying a file from one host to another. Figure shows the basic model of FTP.
2. The client has three components: user interface, client control process, and the client data transfer
process. The server has two components: the server control process and the server data transfer
process.
3. The control connection is made between the control processes. The data connection is made
between the data transfer processes.
4. The control connection remains connected during the entire interactive FTP session.
5. The data connection is opened and then closed for each file transferred. It opens each time
commands that involve transferring files are used, and it closes when the file is transferred. In other
words, when a user starts an FTP session, the control connection opens. While the control connection
is open, the data connection can be opened and closed multiple times if several files are transferred.
6. Separation of commands and data transfer makes FTP more efficient. FTP uses the services of
TCP. It needs two TCP connections.
7. FTP uses two well-known TCP ports: Port 21 and Port 20.
TELNET
TELNET is a protocol that allows you to connect to remote computers (called hosts) over a TCP/IP
network (such as the Internet). Using telnet client software on your computer, you can make a
connection to a telnet server (i.e., the remote host)
1. TELNET is a specialized service that lets you use one computer to access the contents of another
computer a telnet host.
2. A telnet program creates a “Window” into the host so you can access files, issue commands, and
exchange data.
3. Telnet is widely used by libraries to allow visitors to look up information, find articles and so on
4. Telnet allows a user who login on any other computer on the network. 5. Telnet sends data in clear
text.
Domain Name Space.
1. A domain namespace is a name service provided by the Internet for Transmission Control Protocol
networks/Internet Protocol (TCP/IP).
2. DNS is broken up into domains, a logical organization of computers that exist in a larger network.
3. The DNS database hierarchical naming scheme is called a domain name space.
4. Each node in the hierarchy represents a partition of the DNS database.
5. The nodes are known as domains, and each of them must have a name as the DNS database is
indexed by name. When you add domains to the hierarchy, the name of the parent domain is
appended to the domain, which becomes a child domain or subdomain.
6. The hierarchical structure of the domain name space consists of a root domain, top-level domains,
second level domains, subdomains, and host names.
• The Root Domain is at the top of the hierarchy and is represented by a period (.).
• Top-Level Domains are two or three-character name codes, representing organisation type
or geographic location, eg: .com, .gov, .edu, .uk, .es etc. Toplevel domains can contain
second-level domains and host names.
• Second-Level Domains are registered to individuals and organisations for use on the
Internet. A second-level name has two name components: a toplevel name and a unique
second-level name, eg: coatbank.com.
• Subdomains are created when organisations extend their DNS tree to represent departments,
divisions, or other geographic locations. Subdomains have three name components: a top-
level name, a unique second-level name, and a unique name representing the department or
location, eg: admin.coatbank.com.
7. Below is an example of the hierarchy of domain naming on the Internet

33
8. In the above example, all websites are broken into regional sections based on the TLD (top-level
domain). In the example of http://support.computerhope.com it has a ".com" TLD, with
"computerhope" as its second level domain that is local to the .com TLD, and "support" as its
subdomain, which is determined by its server.

Comparison between OSI and TCP / IP Network Model.


OSI reference model TCP/IP network model
1)It has 7 layers 1)It has 4 layers
2)Transport layer guarantees delivery of 2)Transport layer does not guarantees
packets delivery of packets
3)Horizontal approach 3)Vertical approach
4)Separate presentation layer 4)No session layer, characteristics are
provided by transport layer
5)Separate session layer 5)No presentation layer, characteristics are
provided by application layer
6)Network layer provides both 6)Network layer provides only
connectionless and connection connection less services
oriented services
7)It defines the services, interfaces and 7)It does not clearly distinguishes between
protocols very clearly and makes a clear service interface and protocols
distinction between them

34
8)The protocol are better hidden and can 8)It is not easy to replace the protocols
be easily replaced as the technology
changes
9)OSI truly is a general model 9)TCP/IP cannot be used for any other
application
10)It has a problem of protocol 10) The model does not fit any protocol
filtering into a model stack.

Explain structure of IP frame header.


IPv4 header: The IP datagram contains header and data. The header consists of around 20 to
60bytes consists of information about routing and delivery. The header is like an envelope i.e., it
contains information about the data. The structure of the standard format is as shown below

Fig: IPv4 Header Format

The various fields are as described below:

Version: This field identifies the version of IP, which contains a value 4, which indicates IP version
4. It may contain 6 for IPv6

Header length (HLEN): This indicates the size of the header in a multiple of 4 byte words. When
the header size is 20 bytes, HLEN = 5, and HLEN = 15 when maximum size (60 bytes).

Service Type (Type of Service): This field is used to define service parameters such as the priority
of the datagram and the level of reliability desired.

Total Length: This field contains the total length of the IP datagram. IP datagram cannot be more
than 65,536 since this filed size is 2 bytes or 16 (216 = 65,536).

Identification: This field is used in the situations when a datagram is fragmented. The sub datagram
are sequenced using identification field so that later it can be used to reconstruct the original
35
datagram.

Flags: This field corresponds to identification field. It indicates whether a datagram can be
fragmented and if fragmented, the position of the fragment (first, last or middle).

Fragmentation Offset: If a datagram is fragmented, this field indicates the offset of the data in the
original datagram before segmentation. This is used while reconstructing.

Time to Live (TTL): This filed is initialized by some value and decremented each time it passes
through routers. If the value becomes zero or negative, the data is not forwarded. Thus it decides the
lifetime of the data.

Protocol: This field identifies the transport protocol running on top of IP. The upper layer software
piece can be TCP or UDP. This field specifies which piece of software at the destination node the
datagram should be passed on to.

Source address: This field contains the 32 bit IP address of the sender.

Destination address: This field contains the 32 bit IP address of the final destination.

IPv6 header:

Fig: IPv6 Header Format

IPv6 fixed header is 40 bytes long and contains the following information.

Version (4 bit): It represents the version of Internet Protocol, i.e. 0110

Traffic Class (8-bits): These 8 bit are divided into two parts. The most significant 6 bits are used for Type of
Service to let the Router Known what services should be provided to this packet. The least significant 2 bits
are used for Explicit Congestion Notification (ECN).

Flow label (20-bits): This label is used to maintain the sequential flow of the packets belonging to a
communication. The source labels the sequence to help the router identify that a particular packet belongs to
a specific flow of information. This field helps avoid reordering of data packets. It is designed for
36
streaming/real –time media.

Payload Length (16-bits): This field is used to tell the routers how much information a particular packet
contains in its payload. Payload is composed of Extension Headers and Upper Layer data. With 16 bits, up to
65535 bytes can be indicated, but if the Extension Headers contain Hop-by-Hop Extension Header, then the
payload may exceed 65535 bytes and this field is set to 0.

Next Header (8-bits): This field is used to indicate either the type of Extension Header, or if the Extension
Header is not present then it indicates the Upper Layer PDU. The values for the type of Upper Layer.

Hop Limit (8-bits): This field is used to stop packet to loop in the network infinitely. This is same as TTL in
IPV4. The value of Hop Limit field is decremented by 1 as it passes a link (router/hop). When the field
reaches 0 the packets is discarded.

Source Address (128-bits): This field indicates the address of originator of the packet.

Destination Address (128–bits): This field provides the address of intended recipient of the packet.

Compare IPv4 & IPv6

37
Explain registered and unregistered IP address.
Registered IP:
1. A public address that is visible on the Internet. Contrast with an "unregistered IP" address, which is
private and not exposed to anyone outside of the company or home network. Except for very large
companies, registered IPs are allocated to the Internet service provider (ISP), which assigns them to its
customers.
Unregistered IP:
1. An Internet Protocol (IP) address set aside for use within a LAN, intranet, or other private network
and not for use in a public network such as the Internet.
2. An IP address within three ranges of numbers that are set aside for the computers in local networks.
Typically assigned to the machines by a DHCP server, these private addresses are not routed over the
Internet. In order to gain access to the Internet, the private addresses are converted to a public IP
address that is exposed to the Internet by a network address translation (NAT) service

Describe the process of DHCP server configuration.

38
Explain the process of DHCP server configuration.

39
40
Explain configuration of TCP/IP protocol in network.
Before beginning configuration procedure, the following are the prerequisites.
1. Network hardware is installed and cabled. .
2. TCP/IP software is installed. To configure your TCP/IP network, the following steps are followed:
3. Read TCP/IP protocols for the basic organization of TCP/IP.
4. Minimally configure each host machine on the network. This means adding a network adapter,
assigning an IP address, and assigning a host name to each host, as well as defining a default route to
your network. For background information on these tasks, refer to TCP/IP network interfaces, TCP/IP
addressing, and Naming hosts on your network.
5. Configure and start the intend daemon on each host machine on the network. Read TCP/IP daemons
and then follow the instructions in Configuring the intend daemon.
6. Configure each host machine to perform either local name resolution or to use a name server. If a
hierarchical Domain Name networks being set up, configure at least one host to function as a name
server.
7. If the network needs to communicate with any remote networks, configure at least one host to
function as a gateway. The gateway can use static routes or a routing daemon to perform inters network
routing.
8. Decide which services each host machine on the network will use. By default, all services are
available. Follow the instructions in Client network services if you wish to make a particular service
unavailable.
9. Decide which hosts on the network will be servers, and which services a particular server will
provide. Follow the instructions in Server network services to start the server daemons you wish to
run.
10. Configure any remote print servers that are needed.
11. Optional: If desired, configure a host to use or to serve as the master time server for the network.

Describe features of application server and mail servers.


Definition of server: The central computer which is more powerful than the clients & which allows the
clients to access its software & database is called as the server.
Types of server:
1. File server
2. Print server
3. Application server
41
4. Mail server
Application server:
• The expensive software & additional computing power can be shared by the computers in a
network with the help of application servers.
• The application servers provide security & efficiency.
• It also provide software application with servers such as security, data services, transaction
support, load balancing, & management of large distributed system.
• To perform above tasks, application server must have high configuration.
• Examples: SUN Java application server, weblogic server
Mail servers:
• A mail server (sometimes also referred to an e-mail server) is a server that handles and
delivers e-mail over a network, usually over the Internet.
• A mail server can receive e-mails from client computers and deliver them to other mail
servers.
• A mail server can also deliver e-mails to client.
• Examples: Yahoo, Gmail, Rediffmail etc.

What is segmentation and reassembly?


Segmentation:
1. Segmentation is the term used to describe the process of dividing streams of data into smaller chunks.
2. Segmentation usually occurs fairly early in the communication process and it is almost always
software that performs the segmentation process.
3. The segmentation process is performed prior to transfer of data across a network or before storage
on a peripheral device.
4. Segmentation is necessary because today's communication systems use what is called packetized
communication.
5. A message is divided into segments; each segment contains sequence number, which enables this
layer in reassembling the message.
Reassembly:
1. Reassembly is the reverse of segmentation. Protocol Data Units are put back together in the correct
order to reassemble a stream of data in its original form.
2. Message is reassembled correctly by arranging them sequence number wise; upon arrival at the
destination and replaces packets which were lost in transmission.

State the limitation of IPV4


• Source and destination addresses are 32 bits (4 bytes) in length.
• Security is another aspect where IPv4 had a push back. With all devices not accessing the Internet,
there needs to be some security mechanism to protect the data and perform cryptography services etc.
• No identification of payload for QoS handling by routers is present within the IPv4 header.
• The routing tables will become large. A separate routing table entry is needed for each network
resulting in a large number of routing table entries.
• IPv4 addresses are either configured manually or automatically using the DHCP (Dynamic Host
42
Configuration Protocol). These days as almost all devices are IP enabled, we should have simpler
means to configure rather have these devices configured automatically without majorly relying on
some administration.

List two DHCP protocols.


• RARP
• BOOTP
• TFTP
• TCP/IP

Types of Servers:
• File and print Servers
• Application Servers
• Email servers
• Networking Servers like DHCP, VPN etc.
• Internet Servers like web, internet email, Proxy Server etc.
• Remote Access Servers

State features of IPv6:


• An IPv6 address consists of 16 bytes (octets)
• It is 128 bits long.
• IPv6 specifies hexadecimal colon notation.
• Therefore, the address consists of 32 hexadecimal digits, with every four digits separated by a colon
• IPv6 has a much larger address space
• It gives greater flexibility in address allocation.
• There are three types of addresses in IPv6: unicast, anycast, and multicast.
• In an IPv6 address, the variable type prefix field defines the address type or purpose

Explain the various fields in the frame format of UDP with a neat diagram.

Source port number: This field identifies the sender's port when meaningful and should be assumed
to be the port to reply to if needed. If not used, then it should be zero. If the source host is the client,
the port number is likely to be an ephemeral port number. If the source host is the server, the port
number is likely to be a well-known port number.
Destination port number: This field identifies the receiver's port and is required. Similar to source
port number, if the client is the destination host then the port number will likely be an ephemeral port
43
number and if the destination host is the server then the port number will likely be a well-known port
number.
Length: A field that specifies the length in bytes of the UDP header and UDP data. The minimum
length is 8 bytes because that is the length of the header. The field size sets a theoretical limit of 65,535
bytes (8 byte header + 65,527 bytes of data) for a UDP datagram. The practical limit for the data length
which is imposed by the underlying IPv4 protocol is 65,507 bytes (65,535 − 8 byte UDP header − 20
byte IP header). In IPv6 jumbogram it is possible to have UDP packets of size greater than 65,535
bytes. RFC 2675 specifies that the length field is set to zero if the length of the UDP header plus UDP
data is greater than 65,535.
Checksum: The checksum field may be used for error-checking of the header and data. This field is
optional in IPv4, and mandatory in IPv6. The field carries all-zeros if unused.

Describe the major functions of network layer in TCP/IP protocol suite


Internetworking: This is the main duty of network layer. It provides the logical connection between
different types of networks.
Addressing: Addressing is necessary to identify each device on the internet uniquely. This is similar
to telephone system. The address used in the network layer should uniquely and universally define
the connection of a computer.
Routing: In a network, there are multiple roots available from a source to a destination and one of
them is to be chosen. The network layer decides the root to be taken. This is called as routing.
Packetizing: The network layer encapsulates the packets received from upper layer protocol and
makes new packets. This is called as packetizing. It is done by a network layer protocol called IP
(Internetworking Protocol).

44
Introduction –Addressing mechanism in the Internet

https://www.youtube.com/watch?v=_ISu9f8ofZk IP Addressing

https://www.youtube.com/watch?v=DqU3KVCyFNg Subnetting-part1

https://www.youtube.com/watch?v=NuVqcOq9YtY Subnetting-part2

https://www.youtube.com/watch?v=0sBEJiUoTPI Subnetting-part3

An IP address is an address used in order to uniquely identify a device on an IP


network.
The address is made up of 32 binary bits, which can be divisible into a network
portion and host portion with the help of a subnet mask.
The 32 binary bits are broken into four octets (1 octet = 8 bits). Each octet is
converted to decimal and separated by a period (dot).
For this reason, an IP address is said to be expressed in dotted decimal format (for
example, 172.16.81.100).
The value in each octet ranges from 0 to 255 decimal, or 00000000 − 11111111
binary.
The Internet Assigned Numbers Authority (IANA) assigns network identifiers to
avoid duplications.

IP Addressing – IP Address classes, classless IP addressing, Subnetting, supernetting,


Masking.
IPv4 addresses are unique.
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.

Address Space:
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.

Notations
There are two prevalent notations to show an IPv4 address: Binary notation and Dotted decimal
notation.

➢ Binary Notation:
o In binary notation, the IPv4 address is displayed as 32 bits.
o Each octet is often referred to as a byte.
o So it is common to hear an IPv4 address referred to as a 32-bit address or a 4-
45
byte address.
o The following is an example of an IPv4 address in binary notation:
01110101 10010101 00011101 00000010

➢ Dotted-Decimal Notation:
o 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.
o Each byte is identified by a decimal number in the range [0..255].
o The following is the dotted decimal notation of the above address:
117.149.29.2
o Example:

Example: Change the following IPv4 addresses from binary notation to dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
Solution:
We replace each group of 8 bits with its equivalent decimal number and add dots for separation.
a. 129.11.11.239
b. 193.131.27.255

IP Address classes
• IPv4 addressing, at its inception, used the concept of classes.
• This architecture is called classful addressing.
• In classful addressing, the address space is divided into five classes: A, B, C, D,
and E.
• Each class occupies some part of the address space.
• We can find the class of an address when given the address in binary notation or
dotted-decimal notation.
• If the address is given in binary notation, the first few bits can immediately tell us
the class of the address.

46
Fig: Finding the class in binary notation.

• If the address is given in decimal-dotted notation, the first byte defines the
class.

Fig: Finding the class in decimal notation


Example: Find the class of each address.
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111
Solution:
a. The first bit is O. This is a class A address.
b. The first 2 bits are 1; the third bit is O. This is a class C address.
c. The first byte is 14 (between 0 and 127); the class is A.
d. The first byte is 252 (between 240 and 255); the class is E.
Classes and Blocks
One problem with classful addressing is that each class is divided into a fixednumber of
blocks with each block having a fixed size.

Fig: Number of blocks and block size in classful IPv4 addressing.

47
Class A:
• The high-order (First) bit in a class-A address is always set to zero.
• The next seven bits complete the network ID.
• The remaining 24 bits represent the host ID.
• This allows for 128 networks and 16,777,214 hosts per network.
• In this 7 bits are used for network field and 24 bits for host field.
• Class A IP address range includes 1.0.0.0 to 127.255.255.255

Note: Millions of class A addresses are wasted.

Class B:
• Class B addresses are assigned to medium-sized to large-sized networks.
• The two high-order bits in a class B address are always set to binary 1 0.
• The next 14 bits complete the network ID.
• The remaining 16 bits represent the host ID.
• This allows for 16,384 networks and 65,534 hosts per network.
• Class B IP address range includes 128.0.0.0 to 191.255.255.255

Class C:
• Class C addresses are used for small organizations with a small number of attached
hosts or routers.
• The three high-order bits in a class C address are always set to binary 1 1 0.
• The next 21 bits complete the network ID.
• The remaining 8 bits (last octet) represent the host ID.
• This allows for 2097152 networks and 256 hosts per network.
• Class C IP address range includes 192.0.0.0 to 223.255.255.255.

Class D:
• Class D addresses are reserved for IP multicast addresses.
• The four high-order bits in a class D address are always set to binary 1 1 1 0.
• The remaining bits recognize hosts.
• Class D IP address range includes 224.0.0.0 to 239.255.255.255

48
Class E:
• Class E is an experimental address that is reserved for future use.
• The high-order bits in a class E address are set to binary 1111.
• Class E IP address range includes 240.0.0.0 to 255.255.255.255

Netid and Hostid


• In classful addressing, an IP address in class A, B, or C is divided into netid and
hostid.
• These parts are of varying lengths, depending on the class of the address.

• Note that the concept does not apply to classes D and E.


• In class A, one byte defines the netid and three bytes define the hostid.
• In class B, two bytes define the netid and two bytes define the hostid.
• In class C, three bytes define the netid and one byte defines the hostid.

M
a
s
k

49
• Although the length of the netid and hostid (in bits) is predetermined in classful addressing,
we can also use a mask (also called the default mask/natural masks), a 32- bit number made of
contiguous 1’s followed by contiguous 0’s.
• The masks for classes A, B, and C are shown in Table.
• The concept does not apply to classes D and E.

• The mask can help us to find the netid and the hostid.
• 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 netid; the next 24 bits define the hostid.

Subnetting
• 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 1’s in the mask.
• To create multiple logical networks that exist within a single Class A, B, or C network.
• If you do not subnet, you are only able to use one network from your Class A, B, or C
network, which is unrealistic.
• The subnet mask follows two rules:
o If a binary bit is set to a 1 (or on) in a subnet mask, the corresponding bit in the
address identifies the network.
o If a binary bit is set to a 0 (or off) in a subnet mask, the corresponding bit in the
address identifies the host.

Finding The Subnet Address: We use binary notation for both the address and the mask and then
apply the AND operation to find the subnet address.
Example: What is the subnetwork address if the destination address is 200.45.34.56 andthe subnet
mask is 255.255.240.0?

Solution :
Step 1: Convert given IP and Subnet mask to Binary Step 2:
Perform AND Operation on these two.
11001000 00101101 00100010 00111000 Binary 200.45.34.56
11111111 11111111 11110000 00000000 Subnet Mask 255.255.255.0
11001000 00101101 00100000 00000000
The subnetwork address is 200.45.32.0.

50
Step 3: Convert the result of AND operation to Dotted Decimal format which is Subnet mask.

Example 2: (VIMP)
A company is granted the site address 201.70.64.0 (class C). The company needs six
subnets. Design the subnets.
Solution:
• The number of 1s in the default mask is 24 (class C).
• The company needs six subnets.
• This number 6 is not a power of 2.
• The next number that is a power of 2 is 8 (23).
• We need 3 more 1’s in the subnet mask.
• The total number of 1’s in the subnet mask is 27 (24 + 3).
• The total number of 0’s is 5 (32 - 27).
• The mask is
11111111 11111111 11111111 11100000
or
255.255.255.224
• The number of subnets is 8.
• The number of addresses in each subnet is 25 (5 is the number of 0s) or 32.

• Subnet 1:
The bit combination is 001.
Taking last octet in binary:0 0 1 0 0 0 0 0 = 32 (10)Hence
the subnet address is, 201.70.64. 32
• Subnet 2:
The bit combination is 01 0.
Taking last octet in binary:0 0 1 0 0 0 0 0 = 64(10)Hence
the subnet address is, 201.70.64. 64
• Subnet 3:
The bit combination is 011.
Taking last octet in binary:0 1 1 0 0 0 0 0 = 96(10)Hence
the subnet address is, 201.70.64. 96
• Subnet 4:
The bit combination is 100.
Taking last octet in binary :1 0 0 0 0 0 0 0 = 128(10)Hence
the subnet address is, 201.70.64. 128
• Subnet 5:
The bit combination is 101.
Taking last octet in binary :1 0 1 0 0 0 0 0 = 160(10)Hence
the subnet address is, 201.70.64. 160
• Subnet 6:
The bit combination is 110.
Taking last octet in binary :1 1 0 0 0 0 0 0 = 192 (10)Hence
the subnet address is, 201.70.64. 192
51
Example 3:
A company is granted the site address 181.56.0.0 (class B). The company needs 1000subnets.
Design the subnets.

Solution:

• The number of 1s in the default mask is 16 (class B).


• The company needs 1000 subnets.
• This number is not a power of 2.
• The next number that is a power of 2 is 1024 (210).
• We need 10 more 1’s in the subnet mask.
• The total number of 1’s in the subnet mask is 26 (16 + 10).
• The total number of 0’s is 6 (32 - 26).
• The mask is
11111111 11111111 11111111 11000000
or
255.255.255.192
• The number of subnets is 1024.
• The number of addresses in each subnet is 26 (6 is the number of 0s) or 64.

Supernetting
• The most of the class A and class B addresses were exhausted; however, there was still a huge
demand for midsize blocks.
• The size of a class C block with a maximum number of 256 addresses did not satisfy the
needs of most organizations.
• One solution was supernetting.
• In supernetting, an organization can combine several class C blocks to create a larger range of
addresses.
52
• In other words, several networks are combined to create a supernetwork or a supernet.
• An organization can apply for a set of class C blocks instead of just one.
• For example, an organization that needs 1000 addresses can be granted four contiguous class
C blocks.
• The organization can then use these addresses to create one supernetwork.
• Supernetting decreases the number of 1’s in the mask.
• For example,
o if an organization is given four class C addresses, the mask changes from 24 to 22.
Example:
• We need to make a supernetwork out of 16 class C blocks. What is the supernet mask?
Solution:
• We need 16 blocks.
• For 16 blocks we need to change four 1s to 0s in the default mask. So the mask is
11111111 11111111 11110000 00000000
Or

53
255.255.240.0
Address Depletion
• The flaws in classful addressing scheme combined with the fast growth of the
Internet lead to the near depletion of the available addresses.
• Yet the number of devices on the Internet is much less than the 232 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.

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 of addresses
based on the number of customers it may serve.
Restriction: To simplify the handling of addresses, the Internet authorities imposethree restrictions
on classless address blocks:
1. The addresses in a block must be contiguous, one after another.
2. The number of addresses in a block must be a power of 2 (1, 2, 4, 8, ...).
3. The first address must be evenly divisible by the number of addresses.
Example:
A company needs 600 addresses. Which of the following set of class C blocks can be used to form a
supernet for this company?
1. 198.47.32.0 198.47.33.0 198.47.34.0
2. 198.47.32.0 198.47.42.0 198.47.52.0 198.47.62.0
3. 198.47.31.0 198.47.32.0 198.47.33.0 198.47.52.0
4. 198.47.32.0 198.47.33.0 198.47.34.0 198.47.35.0
Solution:
1: No, there are only three blocks.
2: No, the blocks are not contiguous.
3: No, 31 in the first block is not divisible by 4.
4: Yes, all three requirements are fulfilled.

54

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy