Top Banner
TCP/IP Networks
29

TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

TCP/IP Networks

Page 2: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Table of Contents

• Computer networks, layers, protocols, interfaces;

• OSI reference model;

• TCP/IP reference model;

• Internet Protocol (operations, addresses, classes);

• Routing;

• Transmission Control Protocol (TCP);

• User Datagram Protocol (UDP);

• Applications;

• Sockets.

Page 3: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Computer Networks

•Hosts;•Routers - Gateways;•Bridges - Repeaters;•Data packets networks, ISDN, leased lines;

Page 4: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Computer networks classification

NETWORK CHARACTERIS TICS

LAN's MAN's WAN's

S iz e Ca m pus Offic e City, Town County, Country

S pe e d 10Mbps -100Mbps 100Mbps 1Mbps , (45Mbps S MDS )

To po lo g y S ha re d m e dia S ha re d m e dia m e s h

Token-r ing

Works tation

Works tation

W ork station

W orkstati on

Works tation

Works tationW orkstati on

W orkstation

Shared media:

Bus

RingBackbone network Vs local access network

Page 5: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Switching Techniques

• Circuit switching;

• Message switching;

• Packet switching.

Page 6: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Protocol Hierarchies

Physical medium

Layer 5 protocol

Layer 4 protocolLayer 4/5 interface

Layer 3/4 interface

Layer 2/3 interface

Layer 1/2 interface

Layer 5

Layer 1

Layer 2

Layer 3

Layer 4

Host A

Layer 3 protocol

Layer 2 protocol

Layer 1 protocol

Layer 5

Layer 1

Layer 2

Layer 3

Layer 4

Host A

Page 7: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Information Flow

Layer 5 Layer 5 protocolM

Layer 4 protocolH4 M

H3 H4 M1 H3 M2

H2 H3 H4 M1 T2 H2 H3 M2 T2

M

H4 M

Source machine destination machine

H3 H4 M1 H3 M2

H2 H3 H4 M1 T2 H2 H3 M2 T2Layer 2

Layer 1

Layer 4

Layer 3

Page 8: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

OSI Reference Model

The OSI reference model based on a proposal developed by ISO has seven layers. The principles that were applied to arrive at the seven layers are as follows:

• A layer should be created where a different level of abstraction is needed;• Each layer should perform a well defined function;• The function of each layer should be chosen with an eye toward defining

internationally standardised protocols;• The layer boundaries should be chosen to minimise the information flow across

the interfaces;• The number of layers should be large enough that distinct functions need not be

thrown together in the same layer out of necessity, and small enough that the

architecture does not become unwieldy.

Page 9: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

OSI Layers Functions

Application: provides user access to an OSI environment.Presentation:hides from the application layer differences in representation of information.Session:provides facilities for synchronization.Transport: enables QoS network facilities.Network: establishes, maintains and terminates connections.Data Link: controls data transfer over physical link, including error detection.Physical: provides electrical and mechanical control to transmit data bits onto communication medium.

Application

Presentation

Session

Transport

Network

Data link

Physical

Page 10: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

TCP/IP Reference Model

• The protocols came first and model is just a

description of existing protocols;

• The TCP/IP reference model can not

describe non-TCP/IP networks;

•The layers 5 and 6 are not present in this

model.

Application

Transport

Internet

Host-to-Network

Page 11: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

OSI vs TCP/IP

Application

Presentation

Session

Transport

Network

Data link

Physical

Application

TCP

IP

Host-to-Network

UDP

Page 12: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

TCP/IP Detailed View

IEEE 802.3MAC

PING

TCP

IP

UDP

ARPRARP

ICMP

FTP, WWW,CMOTTelnet, rlogin, SMTP,

TFTP, DNS, SNMPNFS, yp, etc.

IEEE 802.4MAC

IEEE 802.5MAC

IEEE 802.6MAC

Ethernet Token bus Token ring MAN WAN

IEEE 802.2, 802.1HDLC/X.25,

PPP, SLIP

Page 13: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Internet Protocol (IP)

• Connectionless (i.e., each packet it treated independently, with no reference to packets that have long gone before);

•Cannot guarantee reliable, in-order delivery;

•PDU:

IP datagram, which contains user data, source-destination IP addresses, other inf. (such as its length, time-to-live, etc.);

• IP main operations:

Fragmentation/Reassembly and Routing

Page 14: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Fragmentation/Reassembly

Page 15: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Reassembly

Two options: either in host B, or in router G2.

It is preferred the first option.

Gain: Simpler routers (no buffering of fragments)

Loss:decrement of network utilisation and increment of packet loss probability.

Page 16: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

IP Addresses An IP address defines both the network and the host on the

particular network; An IP address has 4 bytes, so there are 4 billion addresses; There is one-to-one correspondence between IP and physical

addresses; Example of an IP address : 147.102.7.1; An IP address includes two parts: a network identifier (netid)

and a host identifier (hostid); The netid defines the network, while the hostid differentiate a

host of the network from the others; The length of netid depends on the address class: there are

three address classes, namely A,B and C;

Page 17: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Address Classes

Class Α: 0 + 7bits (netid=1byte) + 3bytes (hostid);Class B: 10 + 14bits (netid=2byte) + 2bytes (hostid);Class C: 110 + 21bits (netid=3byte) + 1bytes (hostid);

When a network is separated into subnetworks, the hostid defines both the host and the subnetwork of the host.

<IP address>=<netid><subnetid><hostid> A subnet mask (32-bit) indicates the split of hostid to subnetid

and new hostid; A subnet mask contains 1 for bits of netid and subnetid and 0

for bits of hostid; Example: The mask 255.255.255.0 defines 14 subnetorks and

4094 hosts for each subnetwork.

Page 18: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Domain Name Service (DNS)

The DNS servers correspond names such as “swpc94.telecom.ece.ntua.gr” in IP addresses like “147.102.7.94”;

However, the traffic of TCP/IP packets uses IP addresses and not names;

Before an Internet process, there is a dialogue (approx. 1/10 sec) between the source host and the local DNS server for finding the IP address of the target host.

Page 19: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Routing

• Direct routing: In the same network, usage of the Address Resolution

Protocol (ARP) and Reserve Address Resolution Protocol (RARP)

• Indirect routing: Between different networks, usage of the routers

Routers• They can manipulate packets from all the interconnected networks;

• They communicate with all the interconnected networks;

• They are “multihomed”, i.e., they have multiple IP addresses referring to all

the interconnected networks;

• They perform routing algorithms using the netid of the IP datagrams.

Page 20: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Indirect Routing Example

ΒΑ

Γ

2 1

3

ii i

iii

A B

C1 2

3I II

III

3 separate physical networks, with their own addresses, packet size and pattern.

Page 21: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Indirect Routing Example

ΒΑ

Γ

2 1

3

ii i

iii

A B

C1 2

3I II

III

D4

4IV

The networks are connected via two routers. The routers can send/receive packets to/from both

networks.

Page 22: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Indirect Routing Example

Introduction of the unique IP address for each host and the IP datagram as common transfer unit.

ΒΑ

Γ

2 1

3

ii i

iii

A B

C1 2

3I II

III

D4

5IV

1.1 1.2

1.31.4

2.4

2.1 2.22.3

2.5

3.4

3.1 3.23.3

Page 23: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Indirect Routing Example

ΒΑ

Γ

2 1

3

ii i

iii

A B

C1 2

3I II

III

D4

5IV

1.1 1.2

1.31.4

2.4

2.1 2.22.3

2.5

3.4

3.1 3.23.3

• Each host or router forwards the datagram per one hop towards its destination. For each hop, the datagram is encapsulated into a specific physical layer packet with a local physical address. The datagram keeps the IP address of its destination.• The routers firstly exams the netid.• Only at the last hop of routing, the hostid is mapped to the physical address.• In case of fragmentation, the destination takes over the reassembly.

3.3 dataD

3.3 data5

3.3 dataiii

Page 24: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Indirect Routing Example• Both hosts and routers keep routing tables for leading the IP datagrams to destinations and physical addresses tables for mapping the IP addresses to corresponding physical addresses.• Routing Table: It contains pairs of the form (N,R), where N is the IP address of the destination network and R is the IP address of the next router towards the destination.• Examples: Host 1.1

1.x2.x3.x

N R

Computation of the physical address1.41.4

Router 1.4/2.4

1.x2.x3.x

N R

direct connection

2.5direct connection

1.21.31.3

1.1 A

B

DC

Physical Addresses Table:

Page 25: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Transmission Control Protocol (TCP)• Connection-oriented (i.e., a connection is established before the data transmission);

• Can guarantee reliable stream delivery services;

• reserved TCP port numbers (16 bits): FTP 21

Telnet 23

Finger 79

HTTP 80

A

B

1500

1501

128.10.0.3

FTP21

23

128.10.0.7

Telnet

Page 26: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Transmission Control Protocol (TCP)

Sliding Window Technique; Multiplicative Decrease Congestion Avoidance; Slow Start Recovery;

Allowed_window = min (Receiver_Advertisement, Congestion_Window)

Page 27: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

User Datagram Protocol (UDP)

• Connectionless;

• No confirmations, packets numbering, flow control;

• No error detection/recovery;

•Cannot guarantee reliable in order delivery services;

• reserved UDP port numbers (16 bits): DNS 53

TFTP 69

SNMP 161

• Mainly, broadcasting applications use UDP.

Page 28: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Applications

FTP; SMTP; WWW; Telnet; Many others

Page 29: TCP/IP Networks. Table of Contents Computer networks, layers, protocols, interfaces; OSI reference model; TCP/IP reference model; Internet Protocol (operations,

Sockets

A

B

1500

1501

128.10.0.3

FTP21

23

128.10.0.7

Telnet

The combination of an IP address with a port number identifies a socket;

A socket defines an application service;