TCP/IP – Transmission Control Protocol/ Internet Protocol

48
Transmission Control Protocol (TCP) / Internet Protocol (IP)

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.html

Transcript of TCP/IP – Transmission Control Protocol/ Internet Protocol

Page 1: TCP/IP – Transmission Control Protocol/ Internet Protocol

Transmission Control Protocol (TCP) / Internet Protocol (IP)

Page 2: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 3: TCP/IP – Transmission Control Protocol/ Internet Protocol

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)

Page 4: TCP/IP – Transmission Control Protocol/ Internet Protocol

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)

Page 5: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 6: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 7: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 8: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 9: TCP/IP – Transmission Control Protocol/ Internet Protocol

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.

Page 10: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 11: TCP/IP – Transmission Control Protocol/ Internet Protocol

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.

Page 12: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 13: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 14: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 15: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 16: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 17: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 18: TCP/IP – Transmission Control Protocol/ Internet Protocol

UDP Datagram Format

Source port address 16 bits

Clocksum16 bits

Destination portAddress 16 bits

Total length16 bits

Header Data

variable8 bytes

Page 19: TCP/IP – Transmission Control Protocol/ Internet Protocol

UDP

IP

Delivers a datagram

Host-to-host protocolSource host Destination host

Page 20: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 21: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 22: TCP/IP – Transmission Control Protocol/ Internet Protocol

Client/server Paradigm

Client

programTCP/IP

Server

program

Server

Result

Page 23: TCP/IP – Transmission Control Protocol/ Internet Protocol
Page 24: TCP/IP – Transmission Control Protocol/ Internet Protocol

Using TELNET to login

Terminal Host

New Delhi

Mumbai

Banglore Chennai

Hyderabad

Calcutta

User working online

Page 25: TCP/IP – Transmission Control Protocol/ Internet Protocol

Steps involved in TELNET (remote login) - 1

Remote host

TELNETClient

TELNET server

TCP/IP

Local hostTerminal (Real)

Standard codeStandard

code

Page 26: TCP/IP – Transmission Control Protocol/ Internet Protocol

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)

Page 27: TCP/IP – Transmission Control Protocol/ Internet Protocol

FTP

Userinterface

Datatransfer unit

Protocolinterpreter

Protocolinterpreter

DataTransfer

unit

Local disk

Remote disk

TCP/IPControl connection

Data connection

Local host Remote host

Page 28: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 29: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 30: TCP/IP – Transmission Control Protocol/ Internet Protocol

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.

Page 31: TCP/IP – Transmission Control Protocol/ Internet Protocol

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.

Page 32: TCP/IP – Transmission Control Protocol/ Internet Protocol

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)

Page 33: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 34: TCP/IP – Transmission Control Protocol/ Internet Protocol

World Wide Web

Web server C (Japan)

Web server D (Chennai)

Web server A (Mumbai)Web server B (Denmark)

Page 35: TCP/IP – Transmission Control Protocol/ Internet Protocol

World wide web

RequiresA functional

architectureA structural architectureA navigational architecture

Page 36: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 37: TCP/IP – Transmission Control Protocol/ Internet Protocol

D: \

Newswire Live wireDATAMATION MANAGEMENT

Table of contentsFeature index

Cover story

Management

Desktops

Networks Software Servers

WWW.Serverhttp://www.datamation.com

A structural architecture

Page 38: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 39: TCP/IP – Transmission Control Protocol/ Internet Protocol

Browser architecture

HTML

CGI

JavaTELNET SMTPGOPHERFTTPHTTP

controller

BR

OW

SER

INTE

RPR

ETER

S

Page 40: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 41: TCP/IP – Transmission Control Protocol/ Internet Protocol

Static documents

URL

DocumentResponse

Request for a document

Client Server

Web document

Page 42: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 43: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 44: TCP/IP – Transmission Control Protocol/ Internet Protocol

Dynamic documents

URL

Document Response

Request for a document

Client Server

Page 45: TCP/IP – Transmission Control Protocol/ Internet Protocol

Dynamic documentsSteps

• Client requests for running a program.

• Running the program creates document.

• Respond

Page 46: TCP/IP – Transmission Control Protocol/ Internet Protocol

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

Page 47: TCP/IP – Transmission Control Protocol/ Internet Protocol

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.

Page 48: TCP/IP – Transmission Control Protocol/ Internet Protocol

“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