2
2
0 Introduction
You can build networks with different architecture. One approach is to build a
network based on monolithic architecture. In monolithic architecture, the whole
system functions as single unit. Another approach is to build networks in layer s. In
this approach, different payers perform different tasks of the network. Each layer is
responsible for a set of well-defined tasks.
Open System Interconnect (OSI) reference model developed by International
Organization for Standardization (ISO) is a standard network reference model. OSI
reference model sets a standard against which all other models are explained and
benchmarked.
The TCP/IP model or Internet reference model, sometimes called the DoD
model (DoD, Department of Defense) ARPANET reference model, is a layered
abstract description for communications and computer network protocol design. It was
created in the 1970s by DARPA for use in developing the Internet's protocols, and the
structure of the Internet is still closely reflected by the TCP/IP model.
4.1 OSI Reference Model:
The ISO (International Standards Organization) has created a layered model
called the OSI (Open Systems Interconnect) model to describe defined layers in a
network operating system. The purpose of the layers is to provide clearly defined
functions to improve inter network connectivity between "computer” manufacturing
companies. Each layer has a standard defined input and a standard defined output.
The OSI reference model is a conceptual model composed of seven layers, each
specifying particular network functions. The model was developed by the International
Organization for Standardization (ISO) in 1984, and it is now considered the primary
architectural model for inter computer communications. The OSI model divides the
tasks involved with moving information between networked computers into seven
smaller, more manageable task groups. A task or group of tasks is then assigned to
each of the seven OSI layers. Each layer is reasonably self-contained so that the tasks
assigned to each layer can be implemented independently. This enables the solutions
offered by one layer to be updated without adversely affecting the other layers. The
following list details the seven layers of the Open System Interconnection (OSI)
reference model:
Layer 7—Application
Layer 6—Presentation
Layer 5—Session
Layer 4—Transport
Layer 3—Network
Layer 1—Physical
(Remember the sentence "All People Seem To Need Data Processing.” Each
capital bold letter indicates name of seven layers.)
The principles that were applied to arrive at the seven layers are as follows:
1. A layer should be created where a different level of abstraction is needed.
2. Each layer should perform a well defined function.
3. The function of each layer should be chosen to define internationally
standardized protocols.
4. The layer boundaries should be chosen to minimize the information flow across
the interfaces.
5. 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.
4.1.1 Characteristics of the OSI Layers
The seven layers of the OSI reference model can be divided into two
categories: upper layers and lower layers. Figure 4-1 illustrates the division between
the upper and lower OSI layers.
The upper layers of the OSI model deal with application issues and generally
are implemented only in software. The highest layer, the application layer, is closest to
the end user. Both users and application layer processes interact with software
applications that contain a communications component. The term upper layer is
sometimes used to refer to any layer above another layer in the OSI model.
The lower layers of the OSI model handle data transport issues. The physical
layer and the data link layer are implemented in hardware and software. The lowest
layer, the physical layer, is closest to the physical network medium (the network
cabling, for example) and is responsible for actually placing information on the
medium.
Application
Application Presentation
Session
Transport
Network
Data Transport
Data link
Physical
Name of unit
Layer exchanged
Application Protocol
7 Application Application ADPU
Interface
Presentation Protocol Presentation PPDU
6 Presentation
Interface
Session Protocol
5 Session Session SPDU
Transport Protocol
4 Transport Transport DPDU
Communication Subnet Boundary
Internal Subnet Protocol
Figure
4.2.1 The Physical Layer 4.2 The
(Layer 1) OSI reference model
The lowest layer of the OSI Reference Model is layer 1, the physical layer; it is
commonly abbreviated “PHY”. This layer deals with the actual transmission of data
using transmission media.
This layer conveys the bit stream - electrical impulse, light or radio signal --
through the network at the electrical and mechanical level. It provides the hardware
means of sending and receiving data on a carrier, including defining cables, cards and
physical aspects. Fast Ethernet, RS232, and ATM are protocols with physical layer
components.
Physical layer technologies are ones that are at the very lowest level and deal
with the actual ones and zeroes that are sent over the network. For example, when
considering network interconnection devices, the simplest ones operate at the physical
layer: repeaters, conventional hubs and transceivers. These devices have absolutely no
knowledge of the contents of a message. They just take input bits and send them as
output. Devices like switches and routers operate at higher layers and look at the data
they receive as being more than voltage or light pulses that represent one or zero.
Physical Layer Functions
The following are the main responsibilities of the physical layer in the OSI
Reference Model:
Definition of Hardware Specifications:
The details of operation of cables, connectors, wireless radio transceivers,
network interface cards and other hardware devices are generally a function of the
physical layer.
Encoding and Signaling:
The physical layer is responsible for various encoding and signaling
functions that transform the data from bits that reside within a computer or other
device into signals that can be sent over the network.
Data Transmission and Reception:
After encoding the data appropriately, the physical layer actually transmits
the data, and of course, receives it. Note that this applies equally to wired and
wireless networks, even if there is no tangible cable in a wireless network!
Topology and Physical Network Design:
The physical layer is also considered the domain of many hardware-related
network design issues, such as LAN and WAN topology.
Services Provided By Physical Layer
The services offered by the physical layer are:
Setting up of connections:
Before data transmission can be started, a connection must be established
between the sender and receiver. The physical layer is responsible for establishing the
connection.
Data Framing:
The data link layer is responsible for the final encapsulation of higher-level
messages into frames that are sent over the network at the physical layer.
Addressing:
The data link layer is the lowest layer in the OSI model that is concerned
with addressing: labeling information with a particular destination location. Each
device on a network has a unique number, usually called a hardware address or
MAC address, that is used by the data link layer protocol to ensure that data
intended for a specific machine gets to it properly.
Interfacing between the session layer and the application layer: This layer
accept data from the application layer and after suitable operations, such as
data transformation, passes it onto the session layer.
Presenting data for display after formatting: The presentation layer formats
the data appropriately for display on a display device.
File access and transfer: It allows a user to access, download or upload file
from/to a remote host.
World Wide Web (WWW): Accessing the Web pages is also a part of this
layer.
It differs from the other layers in that it does not provide services to any other
OSI layer, but rather, only to applications outside the OSI model.
Application Application
Netwo Netwo
Network Layer Network Layer
Intermediate system rk rk Intermediate system
Lower Layer
layer layer
Data Data Data Data Data Data
Data link Layer Link Link Link Link Link Link Data link Layer
layer layer layer layer layer layer
Data Data Data Data Data Data
Link Link Link Link Link Link
Physical Layer Physical Layer
layer layer layer layer layer layer
Physical Physical Physical Physical
medium medium medium medium
Before going into more detail about Figure 4.3 shall describe very briefly the
main functions of each of the seven layers:
1. Physical layer – provides the mechanical, electrical and procedural means for
transmitting bits over a communication medium.
2. Data link layer – provides services for the transmission of data between directly
connected systems in a communication network.
3. Network layer – handles the routing of data through communication networks.
4. Transport layer – provides reliable end-to-end services without being
concerned about the route through communication networks.
5. Session layer – provides facilities to organise and synchronise dialogues, i.e.
communications that consist of several strands such as audio and video
components.
6. Presentation layer – deals with issues about how data is represented and
ensures that the systems agree on how the information is transferred.
7. Application layer – provides the means for application programs to access the
communication system represented by the OSI reference model. For instance,
the application layer can provide services for supporting file transfer and email.
The lowest three layers are primarily concerned with the problems of
transferring data across physical networks, and the highest four layers are associated
with end-to-end issues and not the specific details of any communication network.
Intermediate systems in Figure 4.3 are shown as pairs of stacks of layers. Diffe rent
conditions may be encountered on the two sides of an intermediate system: for
instance, different transmission media may link two systems together.
4.2.9 Data Encapsulation
Data Encapsulation is a process of taking one Protocol Data Unit (PDU) and
enveloping it within a set of protocol header and trailer. In the OSI 7 layers model,
each layer is primarily responsible for communicating with a peer layer on another
machine. This communication between peers is done in "Protocol Data Units" (PDU),
which consists of this layer's Header, Trailer and Data encapsulated.
Each layer may add a Header and a Trailer to its PDU as it proceeds through
the layers. The Headers contain information that specifically addresses layer-to-layer
communication. Headers, trailers and data are relative concepts, depending on the
layer that analyzes the information unit. For example, the Transport Header (TH)
contains information that only the Transport layer sees. All other layers below the
Transport layer pass the Transport Header as part of their Data. At the network layer,
an information unit consists of a Layer 3 header (NH) and data. At the data link layer,
however, all the information passed down by the network layer (the Layer 3 header
and the data) is treated as data. In other words, the data portion of an information unit
at a given OSI layer potentially can contain headers, trailers, and data from all the
higher layers.
For example, if computer A has data from a software application to send to
computer B, the data is passed to the application layer. The application layer in
computer A then communicates any control information required by the application
layer in computer B by prepending a header to the data. The resulting message unit,
which includes a header, the data and maybe a trailer, is passed to the presentation
layer, which prepends its own header containing control information intended for the
presentation layer in computer B. The message unit grows in size as each layer
prepends its own header and trailer containing control information to be used by its
peer layer in computer B. At the physical layer, the entire information unit is
transmitted through the network medium.
The physical layer in computer B receives the information unit and passes it to
the data link layer. The data link layer in computer B then reads the control
information contained in the header prepended by the data link layer in computer A.
The header and the trailer are then removed, and the remainder of the information unit
is passed to the network layer. Each layer performs the same actions: The layer reads
the header and trailer from its peer layer, strips it off, and passes the remaining
information unit to the next higher layer. After the application layer performs these
actions, the data is passed to the recipient software application in computer B, in
exactly the form in which it was transmitted by the application in computer A. See in
Figure 4.4.
Computer A Computer B
7 L8H Data 7
1 1 00 1 0 11 0 11 00 1 0 11 1
7 Application
Vertical communication is done up and down the protocol stack every time
anything is sent across the network, and of course, whenever anything is received.
This occurs because the higher levels are implemented as logical functions, in
software; there is no actual physical connection. The higher layers package data and
send it down to the lower layers for it to be sent across the network. At the very lowest
level, the data is sent over the network. On the receiving end, the process is reversed,
with the data traveling back up to the higher layers on the receiving device.
4.2.10.3 Communication Elements:
In order to communicate, the following elements are needed:
At least two parties wishing to communicate. These can be the same or
different programs on each machine, or they can be two layers on the same
machine.
A common language, or protocol, with which these parties can communicate.
Horizontally (that is, between machines) the two programs need a common
protocol or an interpreter to translate for each program. Vertically, layers
communicate through APIs (Application Program Interfaces). The APIs define
the available functions for a layer and provide the mechanisms for invoking
these functions.
4.2.11 Data Transmission in the OSI Model
Figure 4.7 shows an example of how data can be transmitted using the OSI
model. Figure 4.7 shows how actual data transmission occurs in OSI model.
Sending
Process Receiving
Process
Data
OSI TCP/IP
Application
Presentation Application
Session
Transport Transport
Network Internet
Data Link Link
Physical
4.5 Addressing:
Four levels of addresses are used in an internet employing the TCP/IP protocols:
physical address, logical address, port address, and application-specific address.
Each address is related to a one layer in the TCP/IP architecture, as shown in the
following Figure 4.5.
Application-Specific Addresses:
Some applications have user-friendly addresses that are designed for that specific
application.
Examples include the e-mail address (for example, co_sci@yahoo.com) and the
Universal Resource Locator (URL) (for example, www.mhhe.com). The first
defines the recipient of an e-mail; the second is used to find a document on the
World Wide Web.
4.4 Protocols.
4.4.1 Host to Network Layer-SLIP, PPP
SLIP (Serial Line Interface Protocol)
Serial Line IP (SLIP) is used for point-to-point serial connections running TCP/IP.
SLIP is commonly used on dedicated serial links and sometimes for dialup purposes,
and is usually used with line speeds between 1200 bps and 19.2 Kbps. SLIP is useful
for allowing mixes of hosts and routers to communicate with one another (host-host,
host-router and router-router are all common SLIP network configurations).
SLIP Data Format:
Data: The actual IP packet being transmitted over the serial link.
End Flag: A special END character (0xC0 in hexadecimal) that marks the end of a
SLIP frame.
Problems with SLIP (Serial Line Internet Protocol)
1. No Error Detection or Correction – SLIP does not include checksums or
CRC, making it prone to data corruption.
2. Supports Only IP Packets – Cannot transmit other protocols like ARP, ICMP,
or IPv6.
3. Inefficient Framing – Uses a single END (0xC0) character for packet
termination, requiring byte stuffing.
4. No Addressing Mechanism – Assumes a direct point-to-point link, making it
unsuitable for multi-device networks.
5. No Authentication or Security – Lacks authentication methods like PAP or
CHAP, making it vulnerable to unauthorized access.
6. No Compression – Does not reduce packet size, leading to inefficient
bandwidth usage.
7. Vulnerable to Noisy Environments – Serial connections often experience
errors, and SLIP has no built-in error recovery.
8. No Multiplexing – Cannot differentiate between multiple data streams like
PPP can.
9. Manual Configuration Required – Lacks automatic configuration options,
making setup complex.
10. Obsolete – SLIP has been replaced by PPP, which offers better features like
error checking, compression, and multi-protocol support.
PPP (Point-to-Point Protocol)
The Point-to-Point Protocol (PPP) suite provides a standard method for transporting
multi-protocol datagrams over point-to-point links. PPP was originally
devised as an encapsulation protocol for transporting IP traffic between two peers. It is
a data link layer protocol (layer 2 in the OSI model) in the TCP-IP protocol suite over
synchronous modem links, as a replacement for the non-standard layer2 protocol
SLIP. However, other protocols other than IP can also be carried over PPP, including
DEC net and Novell’s Internetwork Packet Exchange (IPX).
Flag: indicates the beginning or end of a frame, consists of the binary sequence 01111110.
Address: contains the binary sequence 11111111, the standard broadcast address. (Note:
PPP does not assign individual station addresses.)
Control: contains the binary sequence 00000011, which calls for transmission of user data
in an un sequenced frame.
Protocol: identifies the protocol encapsulated in the information field of the frame.
Information: zero or more octet(s) contains the datagram for the protocol specified in the
protocol field.
FCS: Frame Check Sequence (FCS) Field, normally 16 bits. By prior agreement,
consenting PPP implementations can use a 32-bit FCS for improved error detection.
Termination
Client sends LCP Terminate Request to Server
Server responds with LCP Terminate Ack
4.4.2 Internet Layer-IP, ARP, RARP, ICMP
4.4.2.1 Address Mapping:
An internet is made of a combination of physical networks connected by
internetworking devices such as routers. A packet starting from a source host may
pass through several different physical networks before finally reaching the
destination host. The hosts and routers are recognized at the network level by their
logical (IP) addresses, while at the physical level, they are recognized by their
physical (MAC) addresses. Thus delivery of a packet to a host or a router requires
two levels of addressing: logical (IP) and physical (MAC).
We need to be able to map a logical address to its corresponding physical address and
vice versa. These can be done by using either static or dynamic mapping.
Static mapping
Static mapping involves in the creation of a table that associates a logical address
with a physical address. This table is stored in each machine on the network. Each
machine that knows, for example, the IP address of another machine but not its
physical address can look it up in the table. Static mapping has some limitations
because physical addresses may change in the following ways:
o A machine could change its NIC (Network Interface Card), resulting in a new
physical address.
o In some LANs, such as Local Talk, the physical address changes every time the
computer is turned on.
o A mobile computer can move from one physical network to another, resulting
in a change in its physical address.
To implement these changes, a static mapping table must be updated periodically. This
overhead could affect network performance.
Dynamic mapping
In such mapping each time a machine knows one of the two addresses (logical or
physical), it can use a protocol to find the other one.
Mapping Logical to Physical Address: ARP
ARP stands for Address Resolution Protocol which is one of the most important
protocols of the Network layer in the OSI model. ARP finds the physical address,
also known as Media Access Control (MAC) address, of a host from its known IP address
Figure 4.2.2
RARP:
Reverse Address Resolution Protocol (RARP) finds the logical address for a
machine that knows only its physical address. To create an IP datagram, a host or a
router needs to know its own IP address or addresses. The IP address of a machine
is usually read from its configuration file stored on a disk file. However, a diskless
machine is usually booted from ROM, which has minimum booting information.
The ROM is installed by the manufacturer. It cannot include the IP address
because the IP addresses on a network are assigned by the network administrator.
The machine can get its physical address (by reading its NIC, for example), which
is unique locally. It can then use the physical address to get the logical address by
using the RARP protocol.
RARP Operation:
RARP operation is displayed in Figure 14.
A RARP request is created and broadcast on the local network.
Another machine on the local network that knows all the IP addresses will
respond with a RARP reply.
The requesting machine must be running a RARP client program; the responding
machine must be running a RARP server program.
Figure 14.2.6: RARP Operation
Limitations of RARP:
As broadcasting is done at the data link layer. The physical broadcast address,
all 1’s in the case of Ethernet, does not pass the boundaries of a network.
This means that if an administrator has several networks or several subnets, it
needs to assign a RARP server for each network or subnet.
This is the reason that RARP is almost obsolete.
Two protocols, BOOTP and DHCP, are replacing RARP.
4.4.2.3 Internet Control Message Protocol (ICMP):
ICMP (Internet Control Message Protocol) is a network layer protocol used for
diagnostic and control purposes in IP networks. It's an essential component of the
TCP/IP suite that helps network devices communicate error messages and
operational information.
The Internet Protocol (IP) rules say that any device using IP must also use ICMP
(defined in RFC 792). ICMP helps routers and other computers send messages to your
computer. It mainly tells you when something goes wrong with your internet connection.
For example,
ICMP sends messages when:
Your data can't reach where it's supposed to go
A router doesn't have enough space to handle your data
A router knows a faster way to send your data
Most of the time, an ICMP message is sent back to you because of data you sent out.
This message might come from a router somewhere between you and your destination, or
from the destination computer itself.
ICMP message format:
Type (8 bits):
Code (8 bits):
For error messages: Contains the IP header and first 8 bytes of the original
datagram that caused the error
For Echo Request/Reply: Contains the optional data sent with the ping.
Size
Field Name Description
(Bits)
Source Port 16 Identifies the sender’s port number.
Each flag has a specific function in connection management and data transfer:
Flag Meaning
CWR (Congestion Window Reduced) Used for congestion control.
Signals congestion notification when ECN is
ECE (ECN-Echo)
enabled.
URG (Urgent) Indicates urgent data is being sent.
ACK (Acknowledgment) Acknowledges receipt of data.
PSH (Push) Forces immediate data delivery.
RST (Reset) Resets the connection.
Used in connection establishment (TCP 3-way
SYN (Synchronize)
handshake).
FIN (Finish) Indicates termination of the connection.
Client Side:
1. User Interface:
o The user interacts with the system via a graphical user interface (GUI) or
command-line interface (CLI).
o The user can execute FTP commands such as get, put, ls, mkdir, etc.
2. Control Process:
o Handles commands and responses exchanged with the server.
o Establishes the control connection to send FTP commands.
3. Data Transfer Process:
o Manages file transfers between the client and the server.
o Establishes a data connection separate from the control connection.
4. Disk:
o Represents the client’s local storage, where files can be uploaded from or
downloaded to.
Server Side:
1. Control Process:
o Listens for incoming FTP commands from the client.
o Responds to commands like authentication, file requests, and directory
navigation.
2. Data Transfer Process:
o Handles the actual file transfer operations between the client and server.
o Reads files from or writes files to the server’s disk.
3. Disk:
o Represents the server’s storage, where files are stored or retrieved upon
client requests.
TCP/IP Communication:
1. Control Connection:
o A persistent connection used to exchange FTP commands and responses.
o Uses port 21 in standard FTP.
2. Data Connection:
o A separate temporary connection established for file transfers.
o Uses port 20 in standard FTP.
o Can operate in Active Mode (server initiates connection) or Passive Mode
(client initiates connection).
Component Description
The user who composes and sends an email using an email
Sender
client (e.g., Outlook, Gmail).
Mail Server The outgoing mail server that forwards the email using
(Sender’s Side) SMTP.
The medium through which the email is transferred from the
Internet
sender’s mail server to the receiver’s mail server.
Mail Server The destination mail server that receives the email and stores
(Receiver’s Side) it until the receiver accesses it.
Receiver The user who retrieves and reads the received email.
Component Description
The sender’s Mail Transfer Agent, responsible for initiating email
MTA Client
transfer.
The recipient’s Mail Transfer Agent, which processes and forwards
MTA Server
emails.
The set of instructions sent from the MTA client to the MTA
Commands
server to facilitate email transmission.
The acknowledgments or error messages returned by the MTA
Responses
server after processing the commands.
Commands follow a structure where a Keyword (highlighted in
Command
pink) is followed by arguments, which provide additional details
Format
for execution.
Comparison of HTTP and SMTP:
HTTP (Hypertext SMTP (Simple Mail
Feature
Transfer Protocol) Transfer Protocol)
Used for fetching web Used for sending emails
Purpose pages and transferring between mail servers and
hypertext data. from clients to servers.
Client-Server model, where Push-based protocol that
Communication
a browser (client) requests transfers email from sender
Model
data from a web server. to receiver via mail servers.
Default: Port 80 (HTTP) Default: Port 25 (SMTP),
Port Used and Port 443 (HTTPS - Port 465 (SMTPS), Port
Secure version). 587 (submission).
Transfers web content
Transfers email messages
Data Transfer (HTML, images, videos,
with attachments.
etc.).
Stateful (maintains a
Connection Usually stateless (each
connection during email
Type request is independent).
transfer).
Uses commands and
Uses request and response
Message responses (e.g., HELO,
structure (GET, POST,
Format MAIL FROM, RCPT TO,
PUT, DELETE, etc.).
DATA, QUIT).
Web browsers, search Email clients, mail servers,
Primary Users
engines, APIs. automated email systems.
Ensures email delivery by
Less critical for real-time storing messages in mail
Reliability
communication. servers until successfully
received.
Uses SMTPS or
Uses HTTPS for encryption
Security STARTTLS for secure
and authentication.
email transmission.
Sending an email from
Accessing a website like
Example Usage user1@example.com to
https://www.example.com
user2@example.com
4.4.4.4 TELNET:
TELNET provides a remote logon capability, which enables a user at a terminal or
personal computer to logon to a remote computer and function as if directly connected to
that computer. The protocol was designed to work with simple scroll-mode terminals.
TELNET is actually implemented in two modules:
User TELNET interacts with the terminal I/O module to communicate with a
local terminal. It converts the characteristics of real terminals to the network standard
and vice versa.
Server TELNET interacts with an application, acting as a surrogate terminal handler so
that remote terminals appear as local to the application. Terminal traffic between User
and Server TELNET is carried on a TCP connection.
Component Description
Terminal (User The client system from which a user accesses the remote server
Device) using Telnet.
A software running on the client system that sends user commands
Telnet Client
to the Telnet server.
Terminal Driver A part of the operating system that manages user input and output.
TCP/IP Stack The Transmission Control Protocol/Internet Protocol layers
(Client & Server) that handle communication between client and server.
Telnet Server The remote server that receives and processes Telnet commands.
Pseudo Terminal Simulates a terminal for handling multiple Telnet connections on
Driver the server.
Application The programs or processes that the user executes on the remote
Programs server via Telnet.
The communication medium, where data is transmitted in
Network (NVT
Network Virtual Terminal (NVT) form, ensuring compatibility
Form)
between different systems.
Figure 4.4.4.5 BOOTP client and server on the same and different network
DHCP provides static and dynamic address allocation that can be manual or automatic.
DHCP (Dynamic Host Configuration Protocol) is a protocol that lets network
administrators manage centrally and automate the assignment of Internet Protocol (IP)
addresses in an organization's network. If a machine uses Internet's set of protocol
(TCP/IP), each machine that can connect to the Internet needs a unique IP address.
When an organization sets up its computer users with a connection to the Internet, an IP
address must be assigned to each machine. Without DHCP, the IP address must be
entered manually at each computer and, if computers move to another location in another
part of the network, a new IP address must be entered. DHCP lets a network
administrator supervise and distribute IP addresses from a central point and
automatically sends a new IP address when a computer is plugged into a different place in
the network.
DHCP (Dynamic Host Configuration Protocol) is a client-server protocol that uses DHCP
servers and DHCP clients. A DHCP server is a machine that runs a service that can lease
out IP addresses and other TCP/IP information to any client that requests them. The DHCP
server typically has a pool of IP addresses that it is allowed to distribute to clients, and
these clients lease an IP address from the pool for a specific period of time, usually several
days. Once the lease is ready to expire, the client contacts the server to arrange for renewal.
DHCP clients are client machines that run special DHCP client software enabling them to
communicate with DHCP server.
DHCP clients obtain a DHCP lease for an IP address, a subnet mask, and various
DHCP options from DHCP servers in a four-step process:
DHCP DISCOVER: The client broadcasts a request for a DHCP server.
DHCP OFFER: DHCP servers on the network offer an address to the client.
DHCP REQUEST: The client broadcasts a request to lease an address from one of
the offering DHCP servers.
DHCP ACK: The DHCP server that the client responds to acknowledges the
client, assigns it any configured DHCP options, and updates its DHCP database.
The client then initializes and binds its TCP/IP protocol stack and can begin
network communication.
IP Address Allocation Mechanism
DHCP supports three mechanisms for IP address allocation.
Automatic/ Static allocation: DHCP assigns a permanent IP address to a host.
Dynamic allocation: DHCP assigns an IP address to a host for a limited period
of time (or until the host explicitly relinquishes the address).
Manual allocation: Host's IP address is assigned by the network administrator,
and DHCP is used simply to convey the assigned address to the host. A
particular network will use one or more of these mechanisms, depending on the
policies of the network administrator.
Configuring the DHCP Server
To configure the DHCP server:
1. From the Control Panel, go to Administrative Tools >> Computer
Management >> Services and Application >> DHCP.
2. From the Action menu, select New Scope.
The New Scope wizard is displayed.
3. Enter the following information as prompted:
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.
Class A:
Class A range for first byte is 0-127. Class A type of IP addresses have First byte
consisting of Network address with first bit as 0 and the next 3 bytes with host id.
Hence, number of hosts are more when compared to number of networks. The
default subnet masks for class A networks is 255.0.0.0. Class A networks have
their network addresses from 1.0.0.0 to 126.0.0.0, with the zero's being replaced by
node addresses.
Class B:
Class B range for first byte is 128-191. This type has first two bytes specifying
network ID with starting two bits as 10 and last two bytes referring to host ID. The
default subnet masks for class B is 255.255.0.0. Network addresses for these
ranges from 128.0.0.0 to 191.0.0.0.
Class C:
Class C range for first byte is 192-223. This class has first three bytes referring to
network with starting bits as 110 and last byte signifies Host ID. Here, number of
networks is more when compared to number of hosts in each network.
The default subnet masks for class C is 255.255.255.0 The network IP addresses
for these range from 192.0.0.0 to 223.0.0.0.
Class D:
Class D range for first byte is 224-239 Class D is used for multicasting and its
starting bits are 1110
Class E:
Class E range for first byte is 240-255 .Class E is reserved for future use and its
starting bits are 1111
The subnet address is used to identify the network itself. A routing table contains a list
of known networks, and each network is identified by its subnet address. Subnet
addresses contain all 0 bits in the host portion of the address.
For example, 192.168.1.0/24 is a subnet address. This can be determined by looking at
the address and subnet mask in binary:
IP Address: 11000000.10101000.00000001.00000000
Subnet Mask: 11111111.11111111.11111111.00000000
Note that all host bits in the address are set to 0.
4.7.2 Subnetting:
Conversion of host bits to network bits. Subnetting is the strategy used to partition a
single physical network into more than one smaller logical sub-network, called subnets.
An IP address includes a network segment and a host segment. Subnets are designed by
accepting bits from the IP address's host part and using these bits to assign a number of
smaller sub-networks inside the original network. Subnets were initially designed for
solving the shortage of IP addresses over the Internet. The subnetting process allows
the administrator to divide a single Class A, Class B, or Class C network number into
smaller portions. The subnets can be subnetted again into subsubnets.
Dividing the network into a number of subnets provides the following benefits:
Reduces the network traffic by reducing the volume of broadcasts
Helps to exceed the constraints in a local area network (LAN), for example, the
maximum number of permitted hosts.
Enables users to access a work network from their homes; there is no need to
open the complete network.
Types of Subnetting:
Subnetting of a network may be carried out in the following two ways.
Example-02: Consider-
o We have a big single network having IP Address 200.1.2.0.
o We want to do subnetting and divide this network into 4
subnets. Clearly, the given network belongs to class C.
For creating four subnets and to represent their subnet IDs, we require 2 bits.
So,
Mr.S.Y.Divekar.
Network Communication Models 4. 86
Mr.S.Y.Divekar.
Network Communication Models 4. 87
Mr.S.Y.Divekar.
Network Communication Models 4. 88
4.7.3 Supernetting:
The inverse of subnetting is supernetting. Instead of moving mask bits to the right
of the default mask for subnetting, we move mask bits to the left for supernetting.
With subnetting we create more network address at the host expense of host
address. With supernetting we create more host address at the expenses of network
addresses. Supernetting is not for users, it is only for Internet Service Providers
who are attempting to obtain the most efficient allocation of IP address using the A,
B, C class scheme. In this method networks bits are convert into host bits.
CIDR (Classless Inter-Domain Routing) is scheme used to route the network
traffic across the internet. CIDR is a supernetting technique where the several
subnets are combined together for the network routing. In simpler words, CIDR
allows the IP addresses to be organized in the subnetworks independent of the value
of the addresses. Before CIDR, public IP addresses were assigned based on the
class boundaries:
Class A – the classful subnet mask is /8. The number of possible IP
addresses is 16,777,216 (2 to the power of 24).
Class B – the classful subnet mask is /16. The number of addresses is 65,536
Class C – the classful subnet mask is /24. Only 256 addresses available.
Figure 4.7.3 shows how four separate Class C networks may be combined to create one
large supernetwork.
Mr.S.Y.Divekar.
Network Communication Models 4. 89
The 1s in the mask represent the network ID (Netid) section of the address, and the 0s
represent the host ID (Hostid) section. When a subnetwork is created, we first create the
subnet mask by changing some of the 0s in the Hostid section to 1s
For example, to create four separate subnetworks from one Class C network, we would
simply add two bits (22 = 4) to the default subnet mask. Example A shows how this is
done.
With this new subnet mask, the network has been transformed from one Class C
Mr.S.Y.Divekar.
Network Communication Models 4. 90
network with up to 254 hosts to four separate subnetworks, each with 64 (26 = 64)
hosts. However, because the IP with all host bits set to 0 and the IP address with all bits
set to 1 are both reserved, there is actually a limit of 62 hosts for each subnetwork.
Mr.S.Y.Divekar.