Chapter 2
Network Models
2.1 Protocol Layering
• A protocol defines the rules that all devices
need to follow to be able to communicate
effectively
– When communication is simple, we may need
only one simple protocol;
• When complex, need to divide the task
between different layers
2.1.1 Scenarios
First Scenario
• communication is so simple that it can occur in only one layer
– face to face
• set of rules needs to be followed
– Greet each other
– confine their vocabulary
– Refrain from speaking when the other party is speaking
– conversation should be a dialog, not a monolog
– exchange some nice words when they leave
• Different communication between a professor and the students in a
lecture hall
Second Scenario
• When both parties are far apart
– using regular mail through the post office
– agree on an encryption/decryption technique
• unreadable by an intruder
• Now Communication takes place in three layers
Advantages of protocol layering
• Change in one layer doesn’t affect on the other
called modularity
• separate the services from the implementation
• intermediate systems that need only some
layers, but not all layers
– intermediate system as complex as the end systems
(otherwise)
2.1.2 Principles of Protocol Layering
First Principle
– each layer is able to perform two opposite tasks
– listen (in one direction) and talk (in the other direction).
– encrypt and decrypt
Second Principle
– Two objects under each layer at both sites should be
identical
– layer 3 at both sites should be a plaintext letter
Logical Connections
• Logical connection between each layer
• Layer to layer communication
2.2 TCP/IP Protocol Suite
• TCP/IP is a protocol suite
– a set of protocols organized in different layers
– hierarchical protocol made up of interactive modules each provides
specific functionalities
• each upper level protocol is supported by the services provided by one or
more lower level protocols
• TCP/IP is a five-layer model
2.2.1 Layered Architecture
Cont’d
• computer A communicates with computer B
– source host (computer A),
– the link-layer switch in link 1,
– the router,
– the link-layer switch in link 2,
– and the destination host (computer B)
• Each device is involved with a set of layers
depending on the role of the device
– Sender and Receiver involves all FIVE Layers
– Switch involves Physical and Data Link Layers
– Router involves Physical, DLL and Network Layers
2.2.2 Layers in TCP/IP
• Application, Transport, Network: End-to-End
• Data Link and Physical Layer: Hop-to-Hop
– Hop is a host or router
• Packets created by host is changed only by
routers
– Fragments the packets at network layer
• Send more packets than received
– Not by the link layer switches
2.2.3 Description of Layers
1. Physical Layer
• Responsible for carrying individual bits in a frame across
the link
• Two devices are connected by a transmission medium
(cable or air).
• Bits received in a frame from the DLL are transformed first
• transmission medium does not carry bits;
– it carries electrical or optical signals
• Several protocols that transform a bit to a signal
2. Data Link Layer (DLL)
• several overlapping sets of links that a datagram can travel
from the host to the destination
• routers are responsible for choosing the best links
– DLL is responsible for moving the datagram across the link
• The link can be a
– wired LAN with a link-layer switch, a wireless LAN,
– a wired WAN, or a wireless WAN.
• DLL takes a datagram and encapsulates it in a packet called
a frame
• DLL protocols provide
– complete error detection and correction,
– some provide only error correction.
3. Network Layer (host-to-host)
• responsible for creating a connection between
the source computer and the destination
computer
– choose the best route for each packet
• Internet Protocol (IP), that defines the
– format of the packet, called a datagram
– format and the structure of addresses
• IP is a connectionless protocol that provides
– no flow control,
– no error control, and
– no congestion control services
Cont’d
• Internet Control Message Protocol (ICMP)
– helps IP to report some problems when routing a
packet
• Internet Group Management Protocol (IGMP)
– helps IP in multitasking
• Dynamic Host Configuration Protocol (DHCP)
– helps IP to get the network-layer address for a host
• Address Resolution Protocol (ARP)
– helps IP to find the link-layer address of a host or
– a router when its network-layer address is given
4. Transport Layer (End-to-End)
• responsible for giving services to the application layer
– a segment or a user datagram
• application program can use the protocol that best matches its
requirement
• Transmission Control Protocol (TCP) (connection-oriented)
– that first establishes a logical connection between transport
– layers at two hosts before transferring data
– flow control
– error control
– Congestion control
• User Datagram Protocol (UDP), (connectionless)
– transmits user datagram without first creating a logical connection
– does not provide flow, error, or congestion control
– small overhead
– No retransmission when a packet is corrupted or lost
5. Application Layer (Process-to-process)
• Communication at the application layer is between two
processes
• To communicate, a process sends a request to the other
process and receives a response
• Hypertext Transfer Protocol (HTTP) is a vehicle for accessing
the World Wide Web (WWW).
• Simple Mail Transfer Protocol (SMTP) is the main protocol
used in electronic mail (e-mail) service
• File Transfer Protocol (FTP) is used for transferring files
from one host to another
Cont’d
• Terminal Network (TELNET) and Secure Shell (SSH) are
used for accessing a site remotely
• Simple Network Management Protocol (SNMP) is used
by an administrator to manage the Internet at global
and local levels
• Domain Name System (DNS) is used by other protocols
to find the network-layer address of a computer
• Internet Group Management Protocol (IGMP) is used
to collect membership in a group
2.2.4 Encapsulation and Decapsulation
Encapsulation at the Source Host
Application layer, the data to be exchanged is referred to as a message
– normally does not contain any header or trailer
Transport layer takes the message as the payload,
– It adds the transport layer header to the payload, which contains the
identifiers of the source and destination application programs
– plus some more information that is needed for the end-to-end
delivery of the message,
– information needed for flow, error control, or congestion control
– Segment (in TCP) and the user datagram (in UDP)
• Network layer takes the transport-layer and adds its own header to
the payload.
– It contains the addresses of the source and destination hosts and
– some more information used for error checking of the header,
fragmentation information
– network-layer packet, called a datagram
• DLL takes the network-layer packet as data and
– adds its own header, which contains the link-layer
addresses of the host or the next hop (the router).
– DLL packet called a frame
– Then passed to the physical layer for transmission.
Decapsulation and Encapsulation at the Router
• Both decapsulation and encapsulation because the
router is connected to two or more links
– DLL decapsulates the datagram from the frame and passes it to
the network layer
– network layer only inspects the source and destination
addresses in the datagram header
• Contents of the datagram should not be changed
by the network layer
– unless there is a need to fragment the datagram
– datagram is then passed to the DLL
– Encapsulates the datagram in a frame and passes it to
the physical layer for transmission
Decapsulation at the Destination Host
• At the destination host,
– each layer only decapsulates the packet received,
– removes the payload,
– and delivers the payload to the next-higher layer
protocol
– until the message reaches the application layer
– host involves error checking as well
2.2.5 Addressing
• Any communication that involves two parties needs
two addresses:
– source address and
– destination address
address used in that layer, and the packet name at that layer
At the application layer,
– we normally use names to define the site that provides
services, such as someorg.com
– or e-mail address
At the transport layer, addresses are called port numbers
– Port numbers are local addresses
– distinguish between several programs running at the same
time
At the network-layer, the addresses are global
– defines the connection of a device
DLL addresses called MAC addresses
– Locally defined addresses
– specific host or router in a network
2.2.6 Multiplexing and Demultiplexing
• Multiplexing means that a protocol at a layer can encapsulate
a packet from several next-higher layer protocols
• demultiplexing means that decapsulate and deliver a packet
to several next-higher layer protocols
2.3 THE OSI MODEL
• Everyone talks about the TCP/IP protocol suite
– Although, another model is Open Systems Interconnection
(OSI) model
– Handled by International Organization for Standardization
(ISO)
– ISO is the organization; OSI is the model
• open system is a set of protocols and allows different
systems to communicate
• The OSI model is not a protocol; it is a model
– that is flexible, robust, and interoperable
– It consists of seven separate but related layers
2.3.1 OSI/TCP/IP
2.3.2 Lack of OSI Model’s Success
• First, OSI was completed when TCP/IP was
fully in place
• Second, some layers in the OSI model were
never fully defined
– Actual protocols are not defined
• Third, when OSI was implemented,
– Performance did not improved at high level
– That enforce authorities to switch from the TCP/IP
protocol suite to the OSI model