tcp/ip – transmission control protocol/ internet protocol
Upload: we-learn-a-continuous-learning-forum-from-welingkars-distance-learning-program
Post on 24-Jan-2015
4.028 views
DESCRIPTION
In this presentation, we will discuss in details about the TCP/ IP framework, the backbone of every ebusiness. To know more about Welingkar School’s Distance Learning Program and courses offered, visit: http://www.welingkaronline.org/distance-learning/online-mba.htmlTRANSCRIPT
Transmission Control Protocol (TCP) / Internet Protocol (IP)
Overview of TCP/IP
• Oldest networking standard developed for US department’s ARPANET
• Most popular network protocol• Allows reasonably efficient and error – free
transmission• A file transfer protocol , sends large files
uncorrupted across unreliable networks• Compatible with a variety of data link protocols
hence popular
An Internet
1
23
4
5A
B
C
D
E
F
a
b c
de
f
A, B, C, D, E, F –host (computers)
1, 2, 3, 4, 5 – physical networks
a, b, c, d, e, f – routers/gateways
For TCP/IP, the same internet appears differently. TCP/IP considers all interconnected physical networks as one huge network (1+2+3+4+5)
Session
Presentation
Application
TCP/IP and OSI model
Protocols defined by theunderlying networks
H
H
H
Physical layer
Data link layer
Network layer
ICMP
ARP RARP
TCP UDPTransport layer (2protocols)
NFS
SMTP
FTP
Applications
TELN
ET
DN
S
SNM
P
RPLApp
licat
ion
Message
creates
Frame
Bits
Datagram
Encapsulated
Segment or user diagram
Creates
Data units known as
TFTP
IP (Supports 4 protocols)
NETWORK LAYER
• ICMP (Internet control message protocol) -handles error & controls messages
• IGMP• ARP (Address resolution protocol) – obtaining the
physical address of a mode when the internet address is known
• RARP (Reverse address resolution protocol) –allows a host to discover its internet address when it knows only its physical address
Internet Protocol (IP) -1
• Transmission mechanism used for TCP/IP• Unreliable & connectionless datagram
protocol• Assumes the unreliability of the underlying
layers & gives best to get a transmission through to its destination
• For good quality IP must be paired with a reliable protocol like TCP
Internet Protocol (IP) – 2
• IP transports data in packets known as datagrams
• IP functionality in a limited way is not a weakness
• IP provides bare-bone transmission functions ; frees the user to add only those facilities necessary for a given application; allows for maximum efficiency
IP Datagram
Option
Source IP addressDestination IP address
Time to live8 bits
Protocol 8 bits
Header checksum 16 bits
Identification 16 bits Fragmentation Offset 13 bits
Flags3 bits
Service type8 bits
HLEN4 bits
Total length of the IP Datagram 16 bits
(2 byte field)
VER4 bitsVER –
Version
HLEN –
Header length
(b) Header
Header Data (a) Datagram
20-60 bytes
20-65536 bytes
IP datagram- 1
• Service type : defines how the datagram should be handled; includes bits that define the priority of the datagram; also contains bits that specify type of service the sender desires such as the level of throughput, reliability and delay
• Total length : can define up to 65,536 bytes;two byte field.
IP datagram- 2• Flags : Bits in the flags deal with fragmentation.
(Datagram can/cannot be fragmented; can be the first, middle or last fragment etc.)
• Fragmentation offset : A pointer shows the offset of the data in the original datagram
• Time to live : This field defines the number of hops a datagram can travel before it is discarded; source host, when it creates the datagram sets this field to an initial value; when the datagram travels through the internet router by router each router decrements this value by 1. If this value becomes 0 before the datagram reaches its final destination, the datagram is discarded. This prevents a datagram from going back & forth between routers
Internet address - 1
• Protocol : field defines which upper layer protocol data are encapsulated
• Source address, destination address : Each field is a four byte(32 bit) Internet address. It identifies the original source & final destination of the datagram respectively.
• Options : The field gives more functionality to the IP datagram. It carries field that control routing, timing, management and alignment.
Internet address - 2
• Addressing : Physical addresses are on NICs. It identifies individual devices. The internet requires an additional addressing constituent :An address that identifies the connection of a host to its networkEach internet consists of four bytes (32 bits) defining three fields :
I. Class typeII. Netid III. Hostid
Internet address
Netid Hostid Class type
- each internet consists of four bytes (32 bits) defining three fields :
1) Class type
2) Netid
3) Hostidvarying lengths & depends on the
Class of the address
Internet classes
1 1 1 1 0
1 1 1 0
1 1 0
1 0
0
Reserved for future use
Multicast address
Netid Hostid
Hostid Hostid Hostid Netid
Netid Hostid Class B
Class A
Class C
Class D
Class E
byte 1 byte 2 byte 3 byte 4 Address
Lowest
Class range of internet addresses
127 .255 . 255. 255
127 .255 . 255. 255
127 .255 . 255. 255
127 .255 . 255. 255
127 .255 . 255. 255
127 .255 . 255. 255
0 . 0 . 0 . 0
240 . 0 . 0 . 0
224 . 0 . 0 . 0
192 . 0.0 . 0
128.0 0 . 0 Class B
Class C
Class D
Class A
Class E
From To Netid HostidNetid Hostid
Netid
Netid
Hostid
Hostid
Netid
Netid
Hostid
Hostid
Hostid
Network & hosts addresses in an internet
C1 C2 C3 139.6.0.0
GC6
G
C4C7
C8C9
C10
C3
171.26.00.0
R
178 .5.0.0Network
3
Network 1
Network 2
Router
171.26.01.09
Gateway Gateway
139.6.0.1 139.6.0.2 139.6.0.3
171.26.05.08139.6.0.4
182.2.0.0178.5.2.1 178.5.2.2
171.26.01.05 171.26.01.06
178.5.2.3
ARP request/response
Host 2 Host HosHost 1 Host 3
ARP packet
ARP packet questions about the physical address of a node. IP address it gives
Router or host
One of the nodes responds identifying itself as the right node & gives the physical address
UDP Datagram Format
Source port address 16 bits
Clocksum16 bits
Destination portAddress 16 bits
Total length16 bits
Header Data
variable8 bytes
UDP
IP
Delivers a datagram
Host-to-host protocolSource host Destination host
Port-to-port addresses
Physical
TCP or UDPIP
Data Link
TCP or UDPIP
Data LinkPhysical
app 2app 3
app 4app 1 app 3
app 4app 1
app 2
TCP segment
Options and padding
Sequence number32 bits
Acknowledge number32 bits
Source port address16 bits
Destination port address 16 bits
Urgent pointer16 bits
Control checksum16 bits
HLEN4 bits
Reserved16 bits
urg
fln
syn
rst
psn
sck
Window size16 bits
Header Data
HLEN –
Header length
(a) Datagram
Client/server Paradigm
Client
programTCP/IP
Server
program
Server
Result
Using TELNET to login
Terminal Host
New Delhi
Mumbai
Banglore Chennai
Hyderabad
Calcutta
User working online
Steps involved in TELNET (remote login) - 1
Remote host
TELNETClient
TELNET server
TCP/IP
Local hostTerminal (Real)
Standard codeStandard
code
Steps involved in TELNET (remote login) - 2
1. TELNET client transforms the output from the actual terminal to standard code
2. TELNET server in the remote host receives the information in the standard code
3. TELNET server will transform the information into character accepted by remote host
4. The remote host is pooled into thinking that a terminal is locally connected to it. (in other words a virtual terminal is connected to the local host)
FTP
Userinterface
Datatransfer unit
Protocolinterpreter
Protocolinterpreter
DataTransfer
unit
Local disk
Remote disk
TCP/IPControl connection
Data connection
Local host Remote host
Local procedure callC program calling the
open Function
is used here
C program to access a
disk
Localhost
Local Disk
User application
program
Local procedure
C programCalling the
OpenFunction
Is used here
C programto access a
disk
Local host
LocalDisk
RPCClient
NFSServer
RPCClient
NFSclient
C program
Remotehost Local
Disk
TCP/IP
Remote procedure call - 1
Remote procedure call - 2
1. A program issues a call to the NFS client process. NFS client formats the call for the RPC client and passes it.
2. RPC client transforms the data to a format called XDR.(external data presentation) & provides the interface with TCP/IP transport mechanisms.
Remote procedure call - 3
3. At the remote host, RPC server retrieves the call translates it out of XDR and passes it to the NFS server.
4. NFS server relays the call to the remote disk.5. The remote disk finally responds as if to a call &
opens the file to the NFS server. Similar process is followed in the reverse order to work in the opposite way.
Internet
Mail transferagents
(MTA)
Mail transferAgents(MTA)
Mail transferagents (MTA)
Mail transferAgents(MTA)
Database or diskDatabase
Or diskAlias
expansion
Aliasexpansion
Spool
Useragent
Useragent
Mail boxes Mail boxes Spool
Interface Interface
User A User BElectronic Mail
(Sending & Receiving)
SNMP
Router R2
Router R1
Router R4
Router R3
Router R
Router R5
Network 1
Network 3
Managed (Agent)
Managed (Agent)
Routers R1 to R4 are Managed (Agent)
Manager
Manager
World Wide Web
Web server C (Japan)
Web server D (Chennai)
Web server A (Mumbai)Web server B (Denmark)
World wide web
RequiresA functional
architectureA structural architectureA navigational architecture
A Functional Architecture WWW.Server
http://www.datamation.com<html><head><title> DATAMATIONPlugin </title></head><body><hp> newswire</hl><hl> DATAMATIONMagazine </hl><hl> Media kit </hl>
Proxy server
Fire wall
From & to the internet
LAN HTML documents interpreted by browsers
D: \
Newswire Live wireDATAMATION MANAGEMENT
Table of contentsFeature index
Cover story
Management
Desktops
Networks Software Servers
WWW.Serverhttp://www.datamation.com
A structural architecture
Browser architecture
• Many commercial browsers exist• These interpret and display a web
document. Each of these use the same architecture
• Browser has three parts :1. Controller2. Client programs3. Interpreters
Browser architecture
HTML
CGI
JavaTELNET SMTPGOPHERFTTPHTTP
controller
BR
OW
SER
INTE
RPR
ETER
S
Static documents
• Fixed content documents are created and stored in a server
• Client accesses the document, a copy of the document is received
• User can use a browsing program to display the document
• User cannot change the contents;but the contents can be changed in the server
Static documents
URL
DocumentResponse
Request for a document
Client Server
Web document
Dynamic documents -1
• These do not exist in predefined format• Documents are created by a web server
when a browser requests the document• When the request arrives, the web server
runs an application program to create the dynamic document
• Server then returns the output in response to the browsers request for document
Dynamic documents - 2
• Contents of document varies as these are created for each request. Time and date are types of dynamic information.
• Client can request that the server run a program in UNIX and send the result back
Dynamic documents
URL
Document Response
Request for a document
Client Server
Dynamic documentsSteps
• Client requests for running a program.
• Running the program creates document.
• Respond
Active documents
URL
P1
D P
Response
Request for a document
Copy of the program P1 sent
Running the program P1
Produce the document D
Client Server
Active documentsSteps
• Client requests for a copy of the program
• Copy of the program is sent by server.
• Running the program and creating the document at the client’s end.
“Like” us on Facebook: http://www.facebook.com/welearnindia p // /
“Follow” us on Twitter:http://twitter com/WeLearnIndiahttp://twitter.com/WeLearnIndia
Watch informative videos on Youtube: http://www.youtube.com/WelingkarDLP