Protocols and Protocol Suit Review Lecture 13
Dec 22, 2015
Protocols and Protocol SuitReview
Lecture 13
Overview Network Access Layer Transport Layer Protocols Protocol Data Unit Protocol Architecture TCP/IP Stack Layered Approach and its Advantages Router
2
Network Access LayerQ:- What is the major function of the network access layer?
3
OSI Model
Physical
Data link
Network
Transport
Session
Presentation
Application
Layer 1
Layer 2
Layer 3
Layer 4
Layer 5
Layer 6
Layer 7
7 layers OSI model 4
Physical Layer Functions Establishment and termination of a connection to a
communication medium Process for effective use of communication
resources (e.g., contention resolution and flow control)
Conversion between representation of digital data in the end user’s equipment
5The physical layer is responsible for movements of individual bits from one hop (node) to the next.
Data Link Layer Functions Responds to service requests from the network layer and
issues requests to the physical layer. Provides functional and procedural means to transfer data
between network entities and to detect and correct errors that may occur in the physical layer.
Concerned with: Framing Physical addressing (MAC address) Flow Control Error Control Access Control
6The data link layer is responsible for moving frames from one hop (node) to the next.
Hop-to-hop Delivery
7
Network Layer Functions Provides for transfer of variable length sequences from
source to destination via one or more networks Responds to service requests from the transport layer and
issues requests to the data link layer Concerned with:
Data Packet Logical addressing (IP address) Routing
8The network layer is responsible for the delivery of individual packets from the source host to the destination host.
Source to Destination Delivery
9
Transport Layer Functions Provides transparent data transfer between end users Responds to service requests from the session layer and
issues requests to the network layer. Concerned with:
Service-point addressing Segmentation and reassembly Connection control and Flow Control (end-to-end) Error Control
10The transport layer is responsible for the delivery of a message from one process to another.
Reliable Process to Process Delivery
11
Session Layer Functions Provides mechanism for managing a dialogue between end-
user application processes Responds to service requests from the presentation layer
and issues requests to the transport layer Supports duplex or half- duplex operations. Concerned with:
Dialogue control Synchronization (Check point)
12The session layer is responsible for dialog control and synchronization.
Presentation Layer Functions
Relieves application layer from concern regarding syntactical differences in data representation with end-user systems
Responds to service requests from the application layer and issues requests to the session layer
Concerned with: Translation Encryption Compression
13
The presentation layer is responsible for translation, compression, and encryption.
Application Layer Functions Interfaces directly to and performs common application services
for application processes Issues service requests to the Presentation layer Specific services provided:
Network virtual terminal File transfer, access and management Mail services Directory services HTTP, FTP, DHCP…
14The application layer is responsible for providing services to the user.
OSI Layered Model
15
TCP/IP Protocol The lower four layers correspond to the layer of the OSI
model The application layer of the TCP/IP model represents
the three topmost layers of the OSI model. The layers in the The layers in the TCP/IP protocol suiteTCP/IP protocol suite do not exactly do not exactly
match those in the OSI model. The original TCP/IP match those in the OSI model. The original TCP/IP protocol suite was defined as having four layers: protocol suite was defined as having four layers: host-host-to-networkto-network, , internetinternet, , transporttransport, and , and applicationapplication. . However, when TCP/IP is compared to OSI, we can say However, when TCP/IP is compared to OSI, we can say that the TCP/IP protocol suite is made of five layers: that the TCP/IP protocol suite is made of five layers: physicalphysical, , data linkdata link, , networknetwork, , transporttransport, and , and applicationapplication..
16
TCP/IP Protocol stack
OSI layers TCP/IP layers
Application
Presentation
Session
FTP,Telnet,SMTP
DNS
Application
Transport TCP UDP
Network
Data link
PhysicalLower level vendor implementations
IP OSPF IGMPDHCP ICMP
17
18
19
Four levels of addresses are used in an internet Four levels of addresses are used in an internet employing the TCP/IP protocols: physical, logical, port, employing the TCP/IP protocols: physical, logical, port, and specific.and specific.
Physical AddressesLogical AddressesPort AddressesSpecific Addresses
Topics discussed in this section:Topics discussed in this section:
Addressing
20
Addressing
21
Addressing
22
In Figure below a node with physical address 10 sends a frame to a node with physical address 87. The two nodes are connected by a link (bus topology LAN). As the figure shows, the computer with physical address 10 is the sender, and the computer with physical address 87 is the receiver.
Example
23
Most local-area networks use a 48-bit (6-byte) physical address written as 12 hexadecimal digits; every byte (2 hexadecimal digits) is separated by a colon, as shown below:
07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical address.
Example
24
Figure shows a part of an internet with two routers connecting three LANs. Each device (computer or router) has a pair of addresses (logical and physical) for each connection. In this case, each computer is connected to only one link and therefore has only one pair of addresses. Each router, however, is connected to three networks (only two are shown in the figure). So each router has three pairs of addresses, one for each connection.
Example
25
Figure below shows two computers communicating via the Internet. The sending computer is running three processes at this time with port addresses a, b, and c. The receiving computer is running two processes at this time with port addresses j and k. Process a in the sending computer needs to communicate with process j in the receiving computer. Note that although physical addresses change from hop to hop, logical and port addresses remain the same from the source to destination.
The physical addresses will change from hop to hop, but the logical addresses usually remain the same.
Example
26
TCP/IP Protocol stack
OSI layers TCP/IP layers
Application
Presentation
Session
FTP,Telnet,SMTP
DNS
Application
Transport TCP UDP
Network
Data link
PhysicalLower level vendor implementations
IP OSPF IGMPDHCP ICMP
27
Internet Protocol (IP) Provides connection-less, best-effort service
for delivery of packets through the inter-network
Best-effort: No error checking or tracking done for the sequence of packets (datagrams) being transmitted
Upper layer should take care of sequencing Datagrams transmitted independently and
may take different routes to reach same destination
Fragmentation and reassembly supported to handle data links with different maximum – transmission unit (MTU) sizes
28
Internet Control Message Protocol (ICMP) Companion protocol to IP Provides mechanisms for error reporting
and query to a host or a router Query message used to probe the status
of a host or a router Error reporting messages used by the host
and the routers to report errors
29
Internet Group Management Protocol (IGMP)
Used to maintain multicast group membership within a domain
Similar to ICMP, IGMP query and reply messages are used by routers to maintain multicast group membership
Periodic IGMP query messages are used to find new multicast members within the domain
A member sends a IGMP join message to the router, which takes care of joining the multicast tree
30
Dynamic Host Configuration Protocol (DHCP)
Used to assign IP addresses dynamically in a domain
Extension to Bootstrap Protocol (BOOTP) Node Requests an IP address from DHCP
server Helps in saving IP address space by using
same IP address to occasionally connecting hosts
31
Internet Routing Protocols Routing Information Protocol (RIP)
An intra-domain distance vector routing protocol Uses the Bellman-Ford algorithm to calculate routing
table Distance information about all the nodes is conveyed
to the neighbors. Open Shortest Path First (OSPF)
Based on shortest path algorithm, sometimes also known as Dijkstra algorithm
Hosts are partitioned into autonomous systems (AS) AS is further partitioned into OSPF areas that helps
boarder routers to identify every single node in the area
Link-state advertisements sent to all routers within the same hierarchical area
32
Internet Routing Protocols
Border Gateway Protocol (BGP) Intra-autonomous systems communicate
with each other using path vector routing protocol
Each entry in the routing table contains the destination network, the next router, and the path to reach the destination
33
ExampleInterior RouterBGP Router
34
TCP
Application Layer Top three layers (session,
presentation, and application) merged into application layer
Routing using Bellman-Ford Algorithm
A routing table maintained at each node, indicating the best known distance and next hop to get there
Calculate w(u,v), is the cost associated with edge uv
Calculate d(u), the distance of node u from a root node
For each uv, find minimum d(u,v) Repeat n-1 times for n-nodes
6
Root24
3 2
0
1
31-1
3
4
3
Abstract model of a wireless network in the form of a graph35
TCP (ctd)
To Node 0 1 2 3 4
Pass 0 0
Pass 1 0 3 2
Pass 2 0 7 3 1 2
Pass 3 0 4 3 1 2
Pass 4 0 4 3 1 2
To Node 0 1 2 3 4
Pass 0 *
Pass 1 * 0 0
Pass 2 * 2 0 4 0
Pass 3 * 3 0 4 0
Pass 4 * 3 0 4 0
Abstract model of a wireless network in the form of a graph
1
2
1
31-1
3
46
3
Root
23
04
Successive calculation of distance D(u) from node 0
88888 8
8 8
8 88 8
Predecessor from node 0 to other network nodes 36
TCP over Wireless The wireless domain is not only plagued by the
mobility problem, but also by high error rates and low BW
Traditional TCP: provides a connected-oriented, reliable, and byte stream service
TCP functions: flow-control (controlled by sliding window), congestion-control (congestion window), data segmentation, retransmission, and recovery
Slow Start: resets the congestion window (CW) size to one and let threshold to half of the current CW size Double the CW on every successful transmission
until the CW reach threshold and after that increases the CW by one for each successful transmission 37
Solutions for Wireless Environment
Networking layering provides good abstraction in the network design
Wireless networks are interference limited, and the information delivery capability is closely dependent on current channel quality
Adoption in physical and link layer broadcast could lead to efficient resource usage
Protocol changes need to be made in MSs and mobile access points to ensure compatibility with existing TCP applications
38
End-to-End Solutions TCP-SACK
Selective Acknowledgement and Selective Retransmission.
Sender can retransmit missing data due to random errors/mobility
WTCP Protocol Separate flows for wired (Sender to AP) and
wireless (AP to MS) segments of TCP connections Local retransmission for mobile link breakage AP sends ACK to sender after timestamp
modification to avoid change in round trip estimates
Freeze-TCP Protocol Mobile detects impending handoff Advertises Zero Window size, to force the sender
into Zero Window Probe mode39
End-to-End Solutions (Cont’d)
Explicit Band State Notification (EBSN) Local Retransmission from BS (AP) to shield
wireless link errors EBSN message from BS to Source during local
recovery Source Resets its timeout value after EBSN
Fast Retransmission Approach Tries to reduce the effect of MS handoff MS after handoff sends certain number of
duplicate ACKs Avoids coarse time-outs at the sender,
accelerates retransmission
40
Link Layer Protocols Snoop Protocol
Transport layer aware Snoop Agent at BS Agent monitors all TCP segments destined to
MS, caches it in buffer Also monitors ACKs from MS Loss detected by duplicate ACKs from MS or
local time-out Local Retransmission of missing segment if
cached Suppresses the duplicate ACKs
41
Split TCP Approach Indirect TCP: splits the TCP connection into
two distinct connections, one is MS and BS and another is BS and corresponding node (CN) The AP acts as a proxy for MS The AP acknowledges CN for the data sent to
MS and buffers this data until it is successfully transmitted to MS
Handoff may take a longer time as all the data acknowledged by AP and not transmitted to MS must be buffered at the new AP
42
MS AP CN
(Acts as proxy)
Wireless link
Wired Domain
Indirect TCP
43
Split TCP Approach (Cont’d)
M-TCP Protocol Split the connection into wired component and
wireless component BS relays ACKs for sender only after receiving
ACKs from MS In case of frequent disconnections, receiver
can signal sender to enter in persist mode by advertising Zero Window size
44
Impact of Mobility Handoffs occur in wireless domains when
an MN moves into a new BS’s domain The result of the packet loss during
handoff is slow start The solution involves artificially forcing the sender to
go into fast retransmission mode immediately, by sending DUP ACK after the handoff, instead of go into slow start
Using multicast: the MN is required to define a group of BSs that it is likely to visit in the near future
Reduce the handoff latency: Only one BS is in contact with the MN and the others buffer the packets addressed to the multicast address
45
Internet Protocol Version 6 (IPv6)
Designed to address the unforeseen growth of the internet and the limited address space provided by IPv4
Features of IPv6:
• Enhanced Address Space: 128 bits long, can solve the problem created by limited IPv4 address space (32 bits)
• Resource Allocation: By using “Flow Label”, a sender can request special packet handling
• Modified Address Format: Options and Base Header are separated which speeds up the routing process
• Support for Security: Encryption and Authentication options are supported in option header
46
IPv4 Header FormatVersio
n(4 bits)
Header length (4
bits)
Type of service (8
bits)
Total length (16 bits)
Identification (16 bits) Flags (3 bits)
Fragment offset (13 bits)
Time to live (8 bits)
Protocol (8 bits)
Header checksum (16 bits)
Source address (32 bits)
Destination address (32 bits)
Options and padding (if any)47
IPv6 Header Format
Version
Traffic Class Flow Label
Payload Length Next Header
Hop Limit
Source Address
Destination Address
Data
Address SpaceResource AllocationModified Header FormatSupport for Security
48
Format of IPv6Name Bits Function
Version 4 IPv6 version number
Traffic Class 8 Internet traffic priority delivery value
Flow Label 20 Used for specifying special router handling from source to destination(s) for a sequence of packets
Payload Length 16, unsigne
d
Specifies the length of the data in the packet. When set to zero, the option is a hop-by-hop Jumbo payload
Next Header 8 Specifies the next encapsulated protocol. The values are compatible with those specified for the IPv4 protocol field
Hop Limit 8, unsigne
d
For each router that forwards the packet, the hop limit is decremented by 1. When the hop limit field reaches zero, the packet is discarded. This replaces the TTL field in the IPv4 header that was originally intended to be used as a time based hop limit
Source Address 128 The IPv6 address of the sending node
Destination Address
128 The IPv6 address of the destination node49
Differences between IPv4 and IPv6 Expanded Addressing Capabilities
Simplified Header Format
Improved Support for Options and Extensions
Flow Labeling Capabilities
Support for Authentication and Encryption
50
Network Transition from IPv4 to IPv6
• Dual IP-Stack: IPv4-hosts and IPv4-routers have an IPv6-stack,
this ensures full compatibility to not yet updated systems
• IPv6-in-IPv4 Encapsulation (Tunneling): Encapsulate IPv6 datagram in IPv4 datagram
and tunnel it to next router/host
51
52
The Internet Protocol Suite (commonly known as TCP/IP) is the set of communications protocols used for the Internet and other similar networks.
Transmission Control Protocol (TCP) and the Internet Protocol (IP)
The Internet Protocol Suite may be viewed as a set of layers. Each layer solves a set of problems involving the transmission of data, and provides a well-defined service to the upper layer protocols based on using services from some lower layers.
The TCP/IP model consists of four layers. This layer architecture is often compared with the seven-layer OSI Reference Model. From lowest to highest, these are
• the Network Access Layer,
• the Internet Layer,
• the Transport Layer,
• and the Application Layer
The TCP/IP Network Access Layer can
encompass the functions of two lower layers
of theOSI reference Model:
Data Link, and Physical.
Network Access Layer
53
Network Access LayerQ:- What is the major function of the network access layer?
54
Ans: The network access layer is concerned with the exchange of data between a computer and the network to which it is attached.
55
Transport Layer RecapQ:- What tasks are performed by the transport layer?
56
Isolates messages from lower and upper layers Breaks down message size Monitors quality of communications channel Selects most efficient communication service necessary
for a given transmission
Transport Layer Concerned with reliable transfer of information between
applications Independent of the nature of the application Includes aspects like flow control and error checking
57
58
Transport Layer RecapQ:- What tasks are performed by the transport layer?
Ans:- The transport layer is concerned with data reliability and correct sequencing.