Computer Networks and Internet Protocols Introduction Quiz
COMPUTER NETWORKS AND
INTERNET PROTOCOLS
Introduction
SOUMYA K GHOSH
SANDIP CHAKRABORTY
COMPUTER SCIENCE AND ENGINEERING
IIT KHARAGPUR
COMPUTER SCIENCE AND ENGINEERING
IIT KHARAGPUR
1
Objectives of the Course
•
•
•
•
Understand how two computers in the Internet talk to each other
Go through the basic functionalities of the computer networks
Learn how to program the network
Learn the future of the computer network – Do we need any further
changes in the design?
Functionalities
Network
Architecture
Protocols
So, What is Network Architecture?
• A way to visualize how two remote computers talk to each other
Network Protocol Stack
What is Network Architecture? (contd…)
What is Network Architecture? (contd…)
Requirement: Convert digital data to analog
signal and vice versa
Physical
What is Network Architecture? (contd…)
What is Network Architecture? (contd…)
L2 Switch
Data Link
Requirement: Ensure proper scheduling in
media access
Physical
What is Network Architecture? (contd…)
What is Network Architecture? (contd…)
L3 Switch or Routers
Network
Data Link
Physical
Requirement: Find out a suitable path to forward data
What is Network Architecture? (contd…)
What is Network Architecture? (contd…)
Transport
Network
Data Link
Physical
Requirement: End to end traffic control in the network
What is Network Architecture? (contd…)
Application
Network Protocol
Stack
Transport
Network
Data Link
Physical
Data Transfer between Two Remote Machines
Source
Destination
Data Transfer between Two Remote Machines
Application
Application
Transport
Transport
Network
Network
Network
Data Link
Data Link
Data Link
Data Link
Data Link
Physical
Physical
Physical
Physical
Physical
Protocols at Different Layers
Application
HTTP, FTP, SMTP
Transport
TCP, UDP, RTP
Network
IPv4, IPv6, MPLS
Data Link
Ethernet, WiFi, Bluetooth, UMTS, LTE
Physical
Network Management and Control – Cross Layer Protocols
Application
HTTP, FTP, SMTP
Transport
TCP, UDP, RTP
Network
IPv4, IPv6, MPLS
Data Link
Ethernet, WiFi, Bluetooth, UMTS, LTE
Physical
DNS
SNMP
ARP, DHCP
Two Ways to Learn Computer Networks
Application
Application
Transport
Transport
Network
Network
Data Link
Data Link
Physical
Physical
History of Computer Networks
•
https://www.youtube.com/watch?v=9hIQjrMHTv4
https://www.internetsociety.org/internet/history-internet
History of Internet
Year
Event
1836
Telegraph by Cooke and Wheatstone
Revolutionized human (tele)communications.
Morse Code a series of dots and dashes used to communicate between humans. This is similar to how
computers communicate via (binary 0/1)
1858-1866
Transatlantic cable. Allowed direct instantaneous communication across the Atlantic. Today, cables connect
all continents and are still a main hub of telecommunications.
1876
Telephone. Alexander Graham Bell Exhibits.
Telephones exchanges provide the backbone of Internet connections today.
Modems provide Digital to Audio conversions to allow computers to connect over the telephone network.
1957
The US forms the Advanced Research Projects Agency (ARPA) within the Department of Defense (DoD) to
build US skills in computer technology. U.S.S.R. launches Sputnik.
1962
ARPA's contracts from the private sector to universities and laid the foundations for what would become the
ARPANET.
History of Internet
Year
Event
1962-1968
Packet-switching (PS) networks developed
The Internet relies on packets to transfer data.
Data is split into tiny packets that may take different routes to a destination.
1969
ARPANET commissioned by DoD for research into networking.
Four (4) nodes: (i) Univ of California, Los Angeles (UCLA); (ii) Stanford Research Institute
(SRI); (iii) Univ of California, Santa Barbara (UCSB); (iv) Univ of Utah
1971
Ray Tomlinson of invents Email program to send messages across a distributed network.
15 nodes (23 hosts) on ARPANET
Global Networking becomes a reality.
First international connections to the ARPANET: University College of London (England) and
Royal Radar Establishment (Norway)
Packets become mode of transfer
Transmission Control Program (TCP) specified. Packet network Intercommunication -- the
basis of Internet Communication.
Telenet, a commercial version of ARPANET, opened -- the first public packet data service.
1973
1974
History of Internet
Year
Event
1977
E-mail becomes a reality
Hosts: 100+
1979
News Groups formed.
USENET established using UUCP - A collection of discussions groups, news groups.
1982
establishes the Transmission Control Protocol (TCP) and Internet Protocol (IP), as the protocol suite, commonly
known as TCP/IP, for ARPANET.
TCP/IP defines future network communication.
1983
Name server developed.
1984
Domain Name Server (DNS) introduced.
Hosts: 1,000+
NSFNET created - NSF establishes 5 super-computing centers to provide high-computing power for all -- This allows
an explosion of connections, especially from universities.
1987
Commercialization of Internet. UUNET is founded with Usenix funds to provide commercial UUCP and Usenet
access.
Hosts: ~30,000.
History of Internet
Year
Event
1989
First relays between a commercial electronic mail carrier and the Internet
Hosts: 100,000+
WWW concept by Tim Berners-Lee
1990
First search-engine (Archie)
300,000 Hosts. 1,000 News groups
ARPANET ceases to exist.
First browser/editor program.
1991
User Friendly Interface to Internet established
Gopher released by Paul Lindner and Mark P. McCahill from the U of Minnesota.
Text based, menu-driven interface to access internet resources.
1992
Multimedia changes the face of the Internet
Hosts: 1+ Million. News groups 4,000
The term "Surfing the Internet" is coined by Jean Armour Polly.
1993
The WWW Revolution truly begins
Hosts: 2 Million. 600 WWW sites.
The Mosaic Web browser is released on the Net
Web exploded…
•
•
•
•
•
1994 – 3,2 million hosts and 3,000 websites
1995 – 6,4 million hosts and 25,000 websites
1997 – 19,5 million hosts and 1,2 million websites
January 2001 – 110 million hosts and 30 million websites
Expansion continues….
Some Facts
• 1994 – Hotmail starts web based email
• 1994 – World Wide Web Consortium (W3C) was founded
• 1995 – JAVA source code was released
• 1996 – Mirabilis (Israel) starts ICQ
• 1998 – Google is founded
Books / Resources to Follow …
Application
Transport
Network
Data Link
Physical
Books / Resources to Follow …
Application
Transport
Network
Data Link
Physical
Books / Resources to Follow … (online)
Application
Transport
Network
Data Link
Physical
http://www.redbooks.ibm.com/abstracts/gg243376.html
http://www.tcpipguide.com/
Internet Resources
29
COMPUTER NETWORKS AND
INTERNET PROTOCOLS
Protocol Stacks – OSI and TCP/IP
SOUMYA K GHOSH
SANDIP CHAKRABORTY
COMPUTER SCIENCE AND ENGINEERING
IIT KHARAGPUR
COMPUTER SCIENCE AND ENGINEERING
IIT KHARAGPUR
1
History of Computer Networks
•
https://www.youtube.com/watch?v=9hIQjrMHTv4
https://www.internetsociety.org/internet/history-internet
History of Internet
Year
Event
1836
Telegraph by Cooke and Wheatstone
Revolutionized human (tele)communications.
Morse Code a series of dots and dashes used to communicate between humans. This is similar to how
computers communicate via (binary 0/1)
1858-1866
Transatlantic cable. Allowed direct instantaneous communication across the Atlantic. Today, cables connect
all continents and are still a main hub of telecommunications.
1876
Telephone. Alexander Graham Bell Exhibits.
Telephones exchanges provide the backbone of Internet connections today.
Modems provide Digital to Audio conversions to allow computers to connect over the telephone network.
1957
The US forms the Advanced Research Projects Agency (ARPA) within the Department of Defense (DoD) to
build US skills in computer technology. U.S.S.R. launches Sputnik.
1962
ARPA's contracts from the private sector to universities and laid the foundations for what would become the
ARPANET.
History of Internet
Year
Event
1962-1968
Packet-switching (PS) networks developed
The Internet relies on packets to transfer data.
Data is split into tiny packets that may take different routes to a destination.
1969
ARPANET commissioned by DoD for research into networking.
Four (4) nodes: (i) Univ of California, Los Angeles (UCLA); (ii) Stanford Research Institute (SRI); (iii) Univ of
California, Santa Barbara (UCSB); (iv) Univ of Utah
1971
Ray Tomlinson of invents Email program to send messages across a distributed network.
15 nodes (23 hosts) on ARPANET
1973
Global Networking becomes a reality.
First international connections to the ARPANET: University College of London (England) and Royal Radar
Establishment (Norway)
1974
Packets become mode of transfer
Transmission Control Program (TCP) specified. Packet network Intercommunication -- the basis of Internet
Communication.
Telenet, a commercial version of ARPANET, opened -- the first public packet data service.
History of Internet
Year
Event
1977
E-mail becomes a reality
Hosts: 100+
1979
News Groups formed.
USENET established using UUCP - A collection of discussions groups, news groups.
1982
Transmission Control Protocol (TCP) and Internet Protocol (IP) are proposed, as the protocol suite, commonly known
as TCP/IP, for ARPANET.
TCP/IP defines future network communication.
1983
Name server developed.
1984
Domain Name Server (DNS) introduced.
Hosts: 1,000+
NSFNET created - NSF establishes 5 super-computing centers to provide high-computing power for all -- This allows
an explosion of connections, especially from universities.
1987
Commercialization of Internet. UUNET is founded with Usenix funds to provide commercial UUCP and Usenet
access.
Hosts: ~30,000.
History of Internet
Year
Event
1989
First relays between a commercial electronic mail carrier and the Internet
Hosts: 100,000+
WWW concept by Tim Berners-Lee
1990
First search-engine (Archie)
300,000 Hosts. 1,000 News groups
ARPANET ceases to exist.
First browser/editor program.
1991
User Friendly Interface to Internet established
Gopher released by Paul Lindner and Mark P. McCahill from the U of Minnesota.
Text based, menu-driven interface to access internet resources.
1992
Multimedia changes the face of the Internet
Hosts: 1+ Million. News groups 4,000
The term "Surfing the Internet" is coined by Jean Armour Polly.
1993
The WWW Revolution truly begins
Hosts: 2 Million. 600 WWW sites.
The Mosaic Web browser is released on the Net
Network Management and Control – Cross Layer Protocols
Application
HTTP, FTP, SMTP
Transport
TCP, UDP, RTP
Network
IPv4, IPv6, MPLS
Data Link
Ethernet, WiFi, Bluetooth, UMTS, LTE
Physical
DNS
SNMP
ARP, DHCP
Web exploded…
•
•
•
•
•
1994 – 3.2 million hosts and 3,000 websites
1995 – 6.4 million hosts and 25,000 websites
1997 – 19.5 million hosts and 1.2 million websites
January 2001 – 110 million hosts and 30 million websites
Expansion continues….
Some Facts
• 1994 – Hotmail starts web based email
• 1994 – World Wide Web Consortium (W3C) was founded
• 1995 – JAVA source code was released
• 1996 – Mirabilis (Israel) starts ICQ
• 1998 – Google is founded
Protocols
• Protocol is a controlled sequence of messages that is exchanged between
two or more systems to accomplish a given task.
• Protocol specifications define this sequence together with the format or
layout of the messages that are exchanged.
OSI Model Layers
OSI layer
Application
Presentation
Session
Transport
Network
Data Link
Physical
Function provided
Network applications such as file transfer and terminal
emulation
Data formatting and encryption
Establishment and maintenance of sessions
Provision for end-to-end reliable and unreliable delivery
Delivery of packets of information, which includes routing
Transfer of units of information, framing, and error checking
Transmission of binary data of a medium
Transmission Control Protocol / Internet Protocol (TCP/IP)
• Transmission Control Protocol/Internet Protocol (TCP/IP) suite of protocols
has become the dominant standard for inter-networking.
• TCP/IP represents a set of public standards that specify how packets of
information are exchanged between computers over one or more
networks.
OSI and TCP/IP
TCP/IP
OSI and TCP/IP
TCP/IP – Packet Encapsulation
Local Area Network (LAN) – Typical Components
•
•
•
Clients – workstations
Servers – usually have more computing resources
Network devices
–
–
–
–
–
–
–
Repeaters
Hubs
Transceivers
NICs
Bridges
Switches
Routers
Wide Area Networks
• A WAN is a data communications network covering a large
geographic area.
• Unlike LANs , a WAN connection is generally rented from a service
provider.
• WANs connect various sites at different geographic locations so
that information can be exchanged.
Evolution of LAN Devices
•
NICs, Repeaters, & Hubs
•
Bridges
•
Switches
•
Routers
NIC Specifics
•
NICs provide hosts with access to media by using a MAC address.
•
MAC stands for Media Access Control
•
NICs operate at Layer 2 !!
NICs, Repeaters, & Hubs
NIC
The First LAN
To connect two computers, you must...
•
Install a NIC card in each.
Attach computers using a crossover cable
NIC
NICs, Repeaters, & Hubs
NIC
Repeaters can be used to
increase the distance
100 meters or approx. 300 feet
Repeaters amplify and retime signals
NIC
NICs, Repeaters, & Hubs
NIC
NIC
Using repeaters was fine as long as a business only needed
two computers networked.
What if a business wanted a third
computer attached?
NIC
NIC
Or a fourth? What device
would they need?
NICs, Repeaters, & Hubs
A multi-port repeater!
Also called a...
NIC
NIC
Hub
NIC
NIC
A Dilemma!
As businesses expanded their networks,
they began to cascade hubs.
NIC
NIC
NIC
NIC
What’s The Problem?
1)
2)
3)
Hubs share bandwidth between all attached devices.
Hubs are stupid, Layer 1 devices. They cannot filter traffic.
Most LANs use a “broadcast topology,” so every device sees every
packet sent down the media.
Let’s take a look at how broadcasting works
Broadcasts
In this picture, all hubs forward all
traffic to all devices.
Broadcasts
So, if Host 1 wants ping Host 2, all hosts see the ping. This is what we mean by a
broadcast topology
1
2
The red arrows show that all hosts receive the ping request. Only Host 2 will respond.
What’s The Solution?
•
We need a smarter hub!
•
What’s a “smarter hub” called?
•
A Bridge!
•
Bridges filter network traffic based on MAC addresses.
•
Let’s take a look at how this works.
Bridge
To lessen the amount of LAN traffic, businesses began to uses
bridges to filter frames based on MAC addresses.
Bridge
Now, if Host 1 pings Host 2, only the hosts on that LAN
segment see the ping. The bridges stop the ping.
1
2
Switch
A switch (also know as a multi-port bridge),
can effectively replace these four bridges.
Switch
Another benefit of a switch is that each LAN segment
gets dedicated bandwidth.
10 Mbps
10 Mbps
The Cloud
10 Mbps
10 Mbps
10 Mbps
Router
Routers filter traffic based on IP addresses. The IP address tells
the router which LAN segment the ping belongs to.
1
16
Devices Function at Layers
Know these!
Devices Function at Layers
Also know that each device
not only works at its layer,
but all layers below it.
Devices Function at Layers
For example, a router is a
layer 3 device but also uses
MAC addresses (layer 2) and
repeats the signal (layer 1)
Hierarchical Design Model
•
•
•
•
•
A layered model for network design
Consists of 3 tiers
Access layer - for end user connectivity
Distribution layer - for policy based routing and access control
Core layer- for switching packets as fast as possible across the
internetwork.
Few points to note ….
•
•
•
•
•
Routers, by default, break up broadcast domain
Broadcast domain – Set of all devices on a network segment that hear all the
broadcasts sent on that segment
Breaking-up of network broadcast is important – because when a host or server
sends a network broadcast, every device on the network “must” read and process that
broadcast.
When a router’s interface receives this broadcast – it discards the broadcast without
forwarding it on to other network
Router also breaks up “collision domain” as well !
Few points to note …. (contd)
•
•
•
•
•
Switches aren’t used to create internetworks, they’re employed to add functionality
to an internetwork LAN
Switches only “switches” frames from one port to other within a “switched network”
Switches break-up collision domains.
Collision domain – Ethernet term ! – used to describe a network scenario in which
one particular device sends a packet on a network segment, forcing other devices
on the same segment to pay attention to it. At the same time, a different device tries
to transmit, leading to collision, then both the devices must re-transmit – a situation
found in a Hub
Each and every port on a switch represent its own collision domain (Hub represents
only one collision domain and only one broadcast domain)
41
COMPUTER NETWORKS AND
INTERNET PROTOCOLS
Circuit Switching and Packet Switching
SOUMYA K GHOSH
SANDIP CHAKRABORTY
COMPUTER SCIENCE AND ENGINEERING
IIT KHARAGPUR
COMPUTER SCIENCE AND ENGINEERING
IIT KHARAGPUR
1
Switched Network
• Communication between distant stations/ end-devices is typically
done over a network of switching nodes.
• Switching nodes do not concern with content of data. The purpose is
to provide a switching facility that will communicate/transmit the
data from source to destination via intermediate node(s).
• A collection of nodes and connections forms a communications
network.
• In a switched communications network, data entering the network
from a source station are routed to the destination by being switched
from node to node.
Ref: Data & Computer Communications by William Stallings
Typical Switching Network
Ref: Data & Computer Communications by William Stallings
Switching Technologies
• Switching nodes may connect to other nodes, or to some stations.
• Network is usually partially connected
– However, some redundant connections are desirable for reliability
• Two different switching technologies
– Circuit switching
– Packet switching
Ref: Data & Computer Communications by William Stallings
Circuit Switching
• Dedicated communication path between two stations
• Three phases
– Establish
– Transfer
– Disconnect
• Must have switching capacity and channel capacity to establish
connection
• Must have intelligence to work out routing
Ref: Data & Computer Communications by William Stallings
Packet Switching
• A station breaks long message into packets
• Packets are sent out to the network sequentially, one at a time
• The stream of packets are routed through the network and are
delivered to the intended destination?
– Two approaches
• Datagram approach
• Virtual circuit approach
Circuit Switching - Approaches
• Space-Division Switch
• Time-Division Switch
• TDM Bus
• Combinations
Circuit Switching - Approaches
Ref: Data & Computer Communications by William Stallings
Circuit Switching – Space Division Switch
Circuit Switching – Multi-stage Space Division Switch
3-stage Space
Division Switch
Ref: Data & Computer Communications by William Stallings
Circuit Switching – Time Division Multoplexing
Ref: Data & Computer Communications by William Stallings
Circuit Switching – Time Slot Interchange
Ref: Data & Computer Communications by William Stallings
Circuit Switching – Properties/Issues
• Once connected, transfer is transparent
• Developed for voice traffic (phone)
• Inefficient
– Channel capacity dedicated for duration of connection
– If no data, capacity wasted
• Set up (connection) takes time
• Data rate is fixed - Both ends must operate at the same rate
Packet Switching – Basics
• Data transmitted in small packets
– Typically 1000 octets (8 bit byte)
– Longer messages split into series of packets
– Each packet contains a portion of user data plus some control info
• Control info
– Routing (addressing) info
• Packets are received, stored briefly (buffered) and passed on to the next node
– Store and forward
Packet Switched Network
Ref: Data & Computer Communications by William Stallings
Packet Switching – Advantages
• Line efficiency
– Single node to node link can be shared by many packets over time
– Packets queued and transmitted as fast as possible
• Data rate conversion
– Each station connects to the local node at its own speed
– Nodes buffer data if required to equalize rates
• Packets are accepted even when network is busy
– Delivery may slow down
• Priorities can be used
Packet Switching – Techniques
• Station breaks long message into packets
• Packets sent one at a time to the network
• Packets are handled in two ways
– Datagram
– Virtual circuit
Packet Switching – Datagram
•
•
•
•
•
Each packet treated independently
Packets can take any practical route
Packets may arrive out of order
Packets may get lost or delayed
Up to receiver to re-order packets and recover from missing packets
Packet Switching – Datagram
Packet Switching – Virtual Circuit
• Preplanned route established before any packets sent
• Call request and call accept packets establish connection (handshake)
• Each packet contains a virtual circuit identifier instead of destination
address
• No routing decisions required for each packet
• Clear request to drop circuit
• Not a dedicated path
Packet Switching – Virtual Circuit
Packet Switching – VC Switching Table
Virtual Circuit – Source to Destination
Packet Switching – Virtual Circuits vs Datagram
•
Virtual circuits
– Network can provide sequencing and error control
– Packets are forwarded more quickly
• No routing decisions to make
– Less reliable
• Loss of a node loses all circuits through that node
• Datagram
– No call setup phase
• Better if few packets
– More flexible
• Routing can be used to avoid congested parts of the network
Circuit vs. Packet Switching
Circuit Switched
• Bandwidth guaranteed
• Circuit capacity not reduced by
other network traffic
• Circuit costs independent of
amount of data transmitted,
resulting in wasted bandwidth
• Suitable for voice
communication
Packet Switched
• Bandwidth dynamically allocated
on as-needed basis
• May have concurrent
transmissions over physical
channel
• May have delays and congestion
• More cost-effective, offer better
performance
• Suitable for data communication
26
COMPUTER NETWORKS AND
INTERNET PROTOCOLS
Protocol Stack – Layered Services
SOUMYA K GHOSH
SANDIP CHAKRABORTY
COMPUTER SCIENCE AND ENGINEERING
IIT KHARAGPUR
COMPUTER SCIENCE AND ENGINEERING
IIT KHARAGPUR
1
Network Protocols
•
•
•
Protocol defines the interfaces between the layers in the same system and with the
layers of peer system
Building blocks of a network architecture
Each protocol object has two different interfaces
– service interface: operations on this protocol
– peer-to-peer interface: messages exchanged with peer
•
“Protocol” includes
– specification of peer-to-peer interface
– module that implements this interface
•
Features:
–
–
–
Protocol Specification: prose, pseudo-code, state transition diagram
Interoperable: when two or more protocols that implement the specification accurately
IETF: Internet Engineering Task Force
Ref: Computer Networks: A Systems Approach, by Larry L. Peterson and Bruce S. Davie
Key Elements of a Protocol
• Syntax
– Data formats
– Signal levels
• Semantics
– Control information
– Error handling
• Timing
– Speed matching
– Sequencing
Interfaces
Service and Peer Interfaces
Ref: Computer Networks: A Systems Approach, by Larry L. Peterson and Bruce S. Davie
Protocol Hierarchy
Ref: Computer Networks: A Systems Approach, by Larry L. Peterson and Bruce S. Davie
Encapsulation
High-level messages are encapsulated inside of low-level messages
OSI (Open Systems Interconnection) Model
Protocol Layers - Functions
•
Physical Layer
– Handles the transmission of raw bits over a communication link
•
Data Link Layer
– Collects a stream of bits into a larger aggregate called a frame
– Network adaptor along with device driver in OS implement the protocol in this layer
– Frames are actually delivered to hosts
•
Network Layer
– Handles routing among nodes within a packet-switched network
– Unit of data exchanged between nodes in this layer is called a packet
Lower three layers are typically implemented on all network nodes
Protocol Layers - Functions
•
Transport Layer
– Implements a process-to-process channel
– Unit of data exchanges in this layer is called a message
•
Session Layer
– Provides a name space that is used to tie together the potentially different transport streams that are part of a
single application
•
Presentation Layer
– Concerned about the format of data exchanged between peers
•
Application Layer
– Standardize common type of exchanges
Transport layer and the higher layers typically run only on end-hosts and not on the intermediate switches and routers
Internet Architecture
Internet Protocol Graph
Internet Architecture
•
•
Defined by IETF
Three main features
– Does not imply strict layering. The application is free to bypass the defined transport layers
and to directly use IP or other underlying networks
– An hour-glass shape – wide at the top, narrow in the middle and wide at the bottom. IP
serves as the focal point for the architecture
– In order for a new protocol to be officially included in the architecture, there needs to be
both a protocol specification and at least one (and preferably two) representative
implementations of the specification
Ref: Computer Networks: A Systems Approach, by Larry L. Peterson and Bruce S. Davie
Network Application Programming Interface (API)
• Interface exported by the network
• Since most network protocols are implemented (those in the high protocol stack)
in software and nearly all computer systems implement their network protocols as
part of the operating system
• The interface is called the network Application Programming Interface (API)
TCP/IP Protocol Stack
TCP/IP Layers – Group of functions in each layer
Ref: IBM Redbooks - TCP/IP Tutorial and Technical Overview
TCP/IP Protocol Stack
• Application layer
– The application layer is provided by the program that uses TCP/IP for communication.
– An application is a user process cooperating with another process usually on a
different host (there is also a benefit to application communication within a single
host).
– Examples of applications include Telnet and the File Transfer Protocol (FTP).
– The interface between the application and transport layers is defined by port numbers
and “sockets”
TCP/IP Protocol Stack
• Transport layer
– Transport layer provides the end-to-end data transfer by delivering data from an application to
its remote peer. Multiple applications can be supported simultaneously.
– Most-used transport layer protocol is the Transmission Control Protocol (TCP), which provides
connection-oriented reliable data delivery, duplicate data suppression, congestion control, and
flow control.
– Another transport layer protocol: User Datagram Protocol (UDP)
– It provides connectionless, unreliable, best-effort service.
– As a result, applications using UDP as the transport protocol have to provide their own end-toend integrity, flow control, and congestion control, if desired.
– Usually, UDP is used by applications that need a fast transport mechanism and can tolerate
the loss of some data.
TCP/IP Protocol Stack
•
Internetwork layer (IP / Network Layer)
– The internetwork layer, also called the internet layer or the network layer, provides the “virtual
network” image of an internet (this layer shields the higher levels from the physical network
architecture below it).
– Internet Protocol (IP) is the most important protocol in this layer. It is a connectionless protocol
that does not assume reliability from lower layers.
– IP does not provide reliability, flow control, or error recovery. These functions must be provided
at a higher level.
– IP provides a routing function that attempts to deliver transmitted messages to their
destination.
– A message unit in an IP network is called an IP datagram. This is the basic unit of information
transmitted across TCP/IP networks.
– Typical internetwork-layer protocols are IP, ICMP, IGMP, ARP, and RARP.
TCP/IP Protocol Stack
•
Network interface layer
– The network interface layer, also called the link layer or the data-link layer, is the interface to
the actual network hardware.
– This interface may or may not provide reliable delivery, and may be packet or stream oriented.
– In fact, TCP/IP does not specify any protocol here, but can use almost any network interface
available, which illustrates the flexibility of the IP layer.
– Examples are IEEE 802.2, X.25 (which is reliable in itself), ATM, FDDI, and even SNA.
– There should be some underlying physical networks and interfaces
TCP/IP Protocol Stack
TCP/IP specifications do not describe or standardize any network-layer protocols per se; they
only standardize ways of accessing those protocols from the internetwork layer.
TCP/IP Architecture
TCP/IP : Protocol Architecture and Communication Network
Ref: Data and Computer Communications, by William Stallings
TCP/IP : Protocol Architecture and Communication Network
Ref: Data and Computer Communications, by William Stallings
21
COMPUTER NETWORKS AND
INTERNET PROTOCOLS
Application Layer - I
SOUMYA K GHOSH
SANDIP CHAKRABORTY
COMPUTER SCIENCE AND ENGINEERING
IIT KHARAGPUR
COMPUTER SCIENCE AND ENGINEERING
IIT KHARAGPUR
1
TCP/IP Protocol Stack
TCP/IP specifications do not describe or standardize any network-layer protocols per se; they
only standardize ways of accessing those protocols from the internetwork layer.
TCP/IP Architecture
Ref: IBM Redbooks - TCP/IP Tutorial and Technical Overview
TCP/IP Protocol Stack
TCP/IP Layers – Group of functions in each layer
Ref: IBM Redbooks - TCP/IP Tutorial and Technical Overview
TCP/IP Protocol Stack – Application Layer
• Application layer
– Application layer is provided by the program that uses TCP/IP for communication.
– An application is a user process cooperating with another process usually on a
different host (there is also a benefit to application communication within a single
host).
– Examples of applications: Telnet, SMTP, FTP etc.
– Interface between the application and transport layers is defined by port numbers and
“sockets”
TCP/IP - Application Layer
TCP/IP : Protocol Architecture and Communication Network
Ref: Data and Computer Communications, by William Stallings
TCP/IP : Protocol Architecture and Communication Network
Ref: Data and Computer Communications, by William Stallings
TCP/IP : Operation
Ref: Data and Computer Communications, by William Stallings
TCP/IP : Concept
Ref: Data and Computer Communications, by William Stallings
TCP/IP : Sample Protocols
Ref: Data and Computer Communications, by William Stallings
Protocol Stack Implementation in a Host
Application
Transport
Network
Data Link
Physical
Software, Kernel
Firmware, Device Driver
Hardware
How Application Data Passes Through Different Layers
Application
HTTP
Header
HTTP Data
Transport
TCP
HTTP
Header Header
HTTP Data
Network
IP
TCP
HTTP
Header Header Header
HTTP Data
Data Link
MAC
IP
TCP
HTTP
Header Header Header Header
HTTP Data
Physical
PHY
MAC
IP
TCP
HTTP
Header Header Header Header Header
HTTP Data
PHY
Trailer
Application Layer Interfacing
Application - 1
End to end
packet delivery
UDP
Application - 2
Connection
Establishment
Application - 3
Reliable Data
Delivery
Transport
Network
Data Link
Application - 4
Flow and
Congestion
Control
TCP
Ordered Packet
Delivery
Application Layer Interfacing
Name Service
(DNS)
End to end packet
delivery
UDP
Web
(HTTP)
Connection
Establishment
Email
(SMTP, POP, IMAP)
Reliable Data
Delivery
Transport
Network
Data Link
Flow and Congestion
Control
TCP
File Transfer
(FTP)
Ordered Packet
Delivery
Responsibilities of Application Layer
• Identifying and establishing the availability of intended communication
partners
• Synchronizing cooperating applications
• Establishing agreement on procedures for error recovery
• Controlling data integrity
Application Layer Examples
•
•
•
•
•
•
•
Domain Name System (DNS)
File Transfer Protocol (FTP)
Hypertext Transfer Protocol (HTTP)
Simple Mail Transport Protocol (SMTP)
Simple Network Management Protocol (SNMP)
Telnet
….
DNS
• Domain Name System (DNS) is a system used for translating names
of domains into IP addresses.
• There are more than 200 top-level domains on the Internet,
examples of which include the following:
.in - India
.us – United States
.uk – United Kingdom
.edu – educational sites
.com – commercial sites
.gov – government sites
.org – non-profit sites
.net – network service
FTP and TFTP
•
•
FTP is a reliable, connection-oriented service that uses TCP to transfer files
between systems that support FTP.
TFTP is a connectionless service that uses User Datagram Protocol (UDP).
– TFTP is used on routers to transfer configuration files and Cisco IOS images.
– TFTP is designed to be small and easy to implement.
HTTP
SMTP
•
E-mail servers communicate with each other using the Simple Mail Transport
Protocol (SMTP) to send and receive mail.
SNMP
The Simple Network Management Protocol (SNMP) is an application layer protocol
that facilitates the exchange of management information between network devices.
Telnet
Telnet client software provides the ability to log in to a remote Internet host that is running a Telnet
server application and then to execute commands from the command line.
Network API: “Socket”
Server and Client exchange messages over the network through a common Socket API
24