Nothing Special   »   [go: up one dir, main page]

Module III Session II

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Module 3

Session 2
TCP/IP Protocol Suite
Standard Protocol Architectures
 Two approaches (standard)
 OSI Reference model
 never used widely
 but well known

 TCP/IP protocol suite


 Most widely used
 Another approach (proprietary)
 IBM’s Systems Network Architecture (SNA)
OSI Reference Model
 Open Systems Interconnection (OSI)
 Reference model
 provides a general framework for standardization
 defines a set of layers and services provided by each layer
 one or more protocols can be developed for each layer

 Developed by the International Organization for


Standardization (ISO)
 alsopublished by ITU-T (International Telecommunications
Union)
OSI Reference Model
 A layered model
 Sevenlayers – seven has been presented as the optimal
number of layer
 Delivered too late (published in 1984)!
 by that time TCP/IP started to become the de facto standard
 Although no OSI-based protocol survived, the model is
still valid (in the textbooks)
 For Data Link Layer (that we will see later) OSI protocols are
still valid
OSI - The Layer Model
 Each layer performs a subset of the required
communication functions
 Each layer relies on the next lower layer to perform
more primitive functions
 Each layer provides services to the next higher layer
 Changes in one layer should not require changes in other
layers
OSI as Framework for Standardization

layer functionalities are


described by ISO; different
standards can be
developed based on these
functionalities
Layer Specific Standards
Elements of Standardization
 Protocol specification
 Operates between the same layer on two systems
 May involve different platforms
 Protocol specification must be precise
 Format of data units
 Semantics of all fields

 Service definition
 Functional description of what is provided to the next upper
layer
 Addressing
 Referenced by SAPs
The OSI Environment
OSI Layers (1)
 Physical
 Physicalinterface between devices
 Characteristics
 Mechanical - interface specs
 Electrical - voltage levels for bits, transmission rate, coding,
etc.
 Data Link
 Basic services: error detection and control, flow control
at the link level (point to point)
 Higher layers may assume error free transmission
 Later a sublayer is added to Data Link Layer
 MAC (Medium Access Control) sublayer
 to deal with broadcast networks
OSI Layers (2)
 Network
 Transfer of information through communication network
 network related issues
 Network nodes (relays/routers) should perform switching and
routing functions
 QoS (Quality of Service) and congestion control are also
addressed in this layer
 Several other internetworking issues
 e.g. differences in addressing, max. data length, etc.
 Higher layers do not need to know about underlying networking
technology
 Not needed on direct links
Use of a Relay/Router
OSI Layers (3)
 Transport
 End to end exchange of data
 In sequence, no losses, no duplicates

 If needed, upper layer data are split into smaller units

 Session
 Control of dialogues
 whose turn to talk?
 Dialogue discipline (full-duplex, half-duplex)

 Checkpointing and recovery


OSI Layers (4)
 Presentation
 Data formats
 Data compression

 Encryption

 Application
 Support for various applications
Overview OSI Model
Data Format at Each layer
IETF Modified-OSI Six Layers Architecture
for IOT/M2M
• Data stack receives at the device end (layer 1) and to an Application, Service or
Process end (Layer 6)
• Data stack processes during the communication between the physical and
application layers
• Layer 1: smart sensing and data-link circuit with each streetlight for transferring
the sensed data to the layer 2
• Layer 2: Data Adaptation the group controller receives data of each group
through Bluetooth or ZigBee, then aggregates and compacts the data for
communication to Internet,
• Layer 3: Network stream on the Internet to next layer
• Layer 4: Transport layer for device identity management, identity registry and
data routing to next layer
• Layer 5: Application support by data managing, acquiring, organising and
analyzing
• Layer 6: Application a remotely stored service program which issues the
commands or programs the firmware at the service controllers
IETF Modified-OSI Six Layers Architecture
TCP/IP Protocol Suite

• The TCP/IP protocol stack is at the heart of the Internet. The top
three layers are grouped together, which simplifies the model.
• Most widely used interoperable network protocol architecture
Specified and extensively used before OSI
• OSI was slow to take place in the market
• Funded by the US Defense Advanced Research Project Agency
(DARPA) for its packet switched network (ARPANET)
• DoD (Department of Defense) automatically created an enormous
market for TCP/IP
• Used by the Internet and WWW
TCP/IP Protocol Suite

 TCP/IP does not have an official layer structure


 But protocols imply one
 Application layer
 Transport (host to host / end to end) layer
 Internet layer
 Network access layer
 Physical layer

 Actually TCP/IP reference model has been built on its protocols


 That is why that reference model is only for TCP/IP protocol suite
 and this is why it is not so important to assign roles to each layer in
TCP/IP; understanding TCP, IP and the application protocols would be
enough
OSI vs. TCP/IP

HTTP,
SMTP, …

TCP, UDP

IP
Network Access and Physical Layers
 TCP/IP reference model does not discuss these layers too
much
 the node should connect to the network with a protocol such
that it can send IP packets
 this protocol is not defined by TCP/IP

 mostly in hardware

 a well known example is Ethernet


Internet Layer

 Connectionless, point to point internetworking


protocol (uses the datagram approach)
 takescare of routing across multiple networks
 each packet travels in the network independently of
each other
 they may not arrive (if there is a problem in the network)
 they may arrive out of order
a design decision enforced by DoD to make the system
more flexible and responsive to loss of some subnet
devices
 Implemented in end systems and routers as the
Internet Protocol (IP)
Network Layer
 Function:
 Routepackets end-to-end on a
Application
network, through multiple hops
Presentation  Key challenge:
Session  How to represent addresses
Transport  How to route packets
 Scalability
Network
 Convergence
Data Link
Physical
Routers
 How to connect multiple
LANs?
 LANs may be
Routers
incompatible
 Ethernet, Wifi, etc…
 Connected networks
form an internetwork
 The Internet is the best
known example
Structure of the Internet
Network 3
Network 1

Network 4
Network 2

 Ad-hoc interconnection of networks


 No organized topology
 Vastly different technologies, link capacities
 Packets travel end-to-end by hopping through networks
 Routers “peer” (connect) different networks
 Different packets may take different routes
Internetworking Issues
 Naming / Addressing
 How do you designate hosts?
 Routing
 Must be scalable (i.e. a switched Internet won’t work)
 Service Model
 What gets sent?
 How fast will it go?

 What happens if there are failures?

 Must deal with heterogeneity


 Remember, every network is different
IP (Internet Protocol)
 The core of the TCP/IP protocol suite
 Two versions co-exist
 v4 – the widely used IP protocol
 v6 – has been standardized in 1996, but still not widely deployed
 IP (v4) header minimum 20 octets (160 bits)
IPv6
 IPv6
 Enhancements over IPv4 for modern high speed networks
 Support for multimedia data streams

 But the driving force behind v6 was to increase address


space
 128-bit as compared to 32-bit of v4
 Not backward compatible
 all equipment and software must change
Transport Protocols
 Provide logical communication between
application processes running on application
different hosts transport
network
data link network
 Run on end hosts physical
network
data link
physical
data link
 Sender: breaks application physical
network

messages into segments, data link


physical network
data link
and passes to network layer physical

network

 Receiver: reassembles segments data link


physical

into messages, passes to application


transport
application layer network
data link
physical
 Multiple transport protocol available to
applications
30
 Internet: TCP and UDP
Internet Transport Protocols
 Datagram messaging service (UDP)
 No-frillsextension of “best-effort” IP
 connectionless service
 delivery is not guaranteed

 Reliable, in-order delivery (TCP)


 connection oriented
 reliable delivery of data
 ordering of delivery

 Other services not available


 Delayguarantees
 Bandwidth guarantees
TCP basics
 Why invented ?
 Repair packet losses
 Save application from doing it.
 What does TCP do ?
 TCP guarantees that all data is delivered in sequence and without loss, unless the
connection is broken;
 TCP should work for all applications that transfer data, either in small or large
quantities
 TCP does not work with multicast IP addresses, UDP does.
 TCP also does flow control
 TCP also does congestion control (not seen in this module)
 How does TCP work ?
 first, a connection (=synchronization of sequence numbers) is opened between two
processes
 then TCP implements ARQ (for error recovery) and credits (for flow control)
 in the end, the connection is closed
TCP
 Transmission Control Protocol
 end to end protocol
 Reliable connection = provides flow and error control

 In TCP terms, a connection is a temporary association


between entities in different systems
 TCP PDU
 Called “TCP segment”
 Includes source and destination port
 Identifyrespective users (applications)
 pair of ports (together with the IP addresses) uniquely identify
a connection; such an identification is necessary in order TCP to
track segments between entities.
Transmission Control Protocol (TCP)

 Connection oriented
 Explicit set-up and tear-down of TCP session
 Stream-of-bytes service
 Sends and receives a stream of bytes, not messages
 Reliable, in-order delivery
 Checksums to detect corrupted data
 Acknowledgments & retransmissions for reliable delivery
 Sequence numbers to detect losses and reorder data
 Flow control
 Prevent overflow of the receiver’s buffer space
 Congestion control
 Adapt to network congestion for the greater good 34
TCP Header
The UDP service
 UDP service interface
 one message, up to 8K
 destination address, destination port, source address, source port

 UDP service is message oriented


 delivers exactly the message or nothing
 several messages may be delivered in disorder

 Message may be lost, application must implement loss recovery.

 If a UDP message is larger than (Maximum Transferable unit)


MTU, then fragmentation occurs at the IP layer
UDP
 User Datagram Protocol
 Alternative to TCP
 end-to-end protocol
 Not guaranteed delivery
 No preservation of sequence
 No protection against duplication
 Minimum overhead
Why Would Anyone Use UDP?
 Finer control over what data is sent and when
 Assoon as an application process writes into the socket
 … UDP will package the data and send the packet

 No delay for connection establishment


 UDPjust blasts away without any formal preliminaries
 … which avoids introducing any unnecessary delays

 No connection state
 Noallocation of buffers, parameters, sequence #s, etc.
 … making it easier to handle many active clients at once

 Small packet header overhead


 UDP header is only eight-bytes long 38
Popular Applications That Use UDP
 Multimedia streaming
 Retransmitting lost/corrupted packets is not worthwhile
 By the time the packet is retransmitted, it’s too late

 E.g., telephone calls, video conferencing, gaming

 Simple query protocols like Domain Name System


 Overhead of connection establishment is overkill
 Easier to have application retransmit if needed
“Address for www.cnn.com?”

“12.3.4.15”
39
PDUs in TCP/IP

Dest. Port
Sequence number
Checksum
….

Dest. Address
Source address
….

Dest. Network Address


Priority info
Operation of TCP and IP
Some Protocols in TCP/IP Suite
TCP Support for Reliable Delivery
 Checksum
 Usedto detect corrupted data at the receiver
 …leading the receiver to drop the packet

 Sequence numbers
 Used to detect missing data
 ... and for putting the data back in order

 Retransmission
 Sender retransmits lost or corrupted data
 Timeout based on estimates of round-trip time
 Fast retransmit algorithm for rapid retransmission
43
Application Layer
 Support for user applications
 A separate module for each different application
 e.g. HTTP, SMTP, telnet

You might also like