tcp ip routing protocols

Post on 17-Nov-2014

564 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

TCP/IP

&

ROUTING PROTOCOLS

V.Maheswaran Nair

Sub Divisional Engineer

BSNL,Trivandrum.

TCP/IP(Transmission Control Protocol/

Internet Protocol)

TCP/IP Protocols provide the ability to connect machines regardless of the underlying network cabling & the Operating Systems in use.

TCP/IP is a piece of networking software for the Internet and networks worldwide.

TCP/IP

TCP/IP protocol suite contain two main things:

Network Applications HTTP (Hyper Text Transfer Protocol) WWW

Services

FTP (File Transfer Protocol) for transferring file

SMTP Simple Mail Transfer Protocol) for E Mail

DNS (Domain Name System) etc…

TCP is Used

Networking protocols

Moving packet of data from Source to Destination

Internet Protocols (IP) and Routing Protocols are used.

TCP is responsible for:

Data concurrency

Packet Sequencing

Delivery guarantee

Error Control

Retransmission

Internet address

MAC address

(Node to Node)

IP address

(Source to

Destination)

Port address

(Application)

16 bit

Decimal Notation

MAC address

48 bit (6 Bytes)

Hexa Decimal Notation

AB 0F 25 B6 C5 D2

Vendor ID Serial No

IP Address

Each Internet address consists of 4 bytes (32-bits), defining two parts:

Hostid

Netid

These parts are of varying lengths depending upon the class of the address.

Dotted Decimal Notation

128.11.3.31

10000000 00001011 00000011 00011111

Classes

There are five different IP Address Classes: A, B, C, D & E.

These are designed to cover the needs of different types of organizations.

Host IdNet Id

NIB

Each address is a pair (Netid and Hostid) where the Netid identifies a network and the Hostid identifies a host on that network.

IP Address Classes

Class A Address : N.H.H.H Class B Address : N.N.H.H Class C Address : N.N.N.H

IP address - Classes

Class A 00xxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx

Network Host

Class B

Network Host

1010xxxxxx xxxxxxxx xxxxxxxx xxxxxxxx

Class C

Network Host

110110xxxxx xxxxxxxx xxxxxxxx xxxxxxxx

•IP addressing supports five different address classes - A, B,C,D,E•CLASS A,B,C are available for commercial uses.•The left most bits indicate the network class.

Identifying a class of address

Address Identifier Network Id Host Id

0 7 bits Network Bits 24 bits Host IdA

10 14 bits Network Bits 16 bits Host IdB

110 21 bits Network Bits 8 bits Host IdC

1110 Multicast address (224.0.0.0-239.255.255.255)D

1111 Reserved for future useE

IP Address Bit Patterns

8 Bits8 Bits 8 Bits 8 Bits

Class-A:

Class-B:

Class-C:

Class-D:

Class-E:

0-127

128-191

192-223

224-239

240-255

0 0 0 0 0 0 0 0

1 0 0 0 0 0 0 0

1 1 0 0 0 0 0 0

1 1 1 0 0 0 0 0

1 1 1 1 0 0 0 0

0 1 1 1 1 1 1 1

1 0 1 1 1 1 1 1

1 1 0 1 1 1 1 1

1 1 1 0 1 1 1 1

1 1 1 1 1 1 1 1

Address space utilisation

01

0

127

00000000

01111111

A-50%

1

0

128

191

10000000

10111111

B-25%

0

1

192

223

11000000

11011111

C-12.5%

240 25

5111100001111111

1

E-6.25%

022423

9

11100000 1110111

1

D-6.25%0

1

100%

0.0.0.0 127.255.255.255

128.0.0.0 191.255.255.255

192.0.0.0 223.255.255.255

224.0.0.0 239.255.255.255

240.0.0.0 255.255.255.255

A

B

C

D

E

FROM TO

Class No. of networks No. of hosts

A 27 – 2 = 126 224 – 2 = 16,777,214

B 214 = 16,384 216 – 2 = 65,534

C 221 = 2,097,152 28 – 2 = 254

D Not Applicable Not Applicable

E Not Applicable Not Applicable

Number of networks and hosts in each Class

TCP/IP and OSI

OSI is made of seven layers. TCP/IP protocol is made of five layers.

PHYSICAL

DATA LINK

NETWORK

TRANSPORT

APPLICATION

PHYSICAL

DATA LINK

NETWORK

TRANSPORT

SESSION

PRESENTATION

APPLICATION

OSI Model TCP/IP Model

TCP/IP Protocol Suite

D

N

T

A

ICMP IGMPRARPARP

FTPDHCP SMTP

TELNETHTTP

TFTPSNMPDNS

TCP UDP

IP

Protocols defined by the underlying networks

P

Ethernet, Token Ring, FDDI, HDLC, FR, PPP, ATM

Data Encapsulation

Frame

Data

DataPort add (TCP)

TCP Segment

DataPort add (UDP)

UDP Message

Dest MACSource MAC IP Header TCP-UDP Data

TCP-UDP DataSource IP Dest IP

Application

TPT Layer (TCP/UDP)

NW Layer (IP)

Data Link (MAC)

Physical Bits 10000010101001

IP Datagram

Well known port numbers

PORT DESCRIPTION

20 File Transfer-Data

21 File Transfer-Control

23 Telnet

25 SMTP

53 Domain Name Server

69 Trivial File Transfer

80 WWW

123 Network Time Protocol

179 Border Gateway Protocol

Domain Name System (DNS)

What is the IP Address of www.Yahoo.com

What is the IP Address of www.Yahoo.com

www.yahoo.com , IP address is 210.212.90.15

www.yahoo.com , IP address is 210.212.90.15

User traffic

yahoo.com

DNS Server

DNS Server

Internet

ROUTING PROTOCOLS

Routing Protocol

It is a language a router speaks with other routers

Functions of RP Forwarding, Sharing Updating

information about the reachability and status of the network

Static Routing

Routes to destinations are set up manually Route may be up or down but static routes

will remain in the routing tables and traffic would still be sent towards the route

Not suitable for large networks Also known as Non-adaptive routing

Dynamic Routing

Routes are learnt via an internal or external routing protocols

Network reachability is dependent on the existence and state of the network

Routing decisions change to reflect the changes in topology

Also known as Adaptive routing

Routing Table

A Data base to be maintained by each router.

Created by using algorithms.It contains

Network addressInterface address for reaching the next router (Hope)

Metric

Types of R P

Routes

Static

Dynamic

Distance Vector Protocols

Link State Protocols

RIP,IGRP

OSPF,IS-IS

Routing Protocols contd..

Distance Vector Routing Protocols eg. RIP V1 (Routing Information protocol)

RIP V2 Link State Routing Protocols eg. OSPF (Open Shortest Path First)

IS-IS (Intermediate System-Intermediate System)

Metrics Hop Count -- Distance Vector

Cost (BW) – Link State

Routing Updates

After exchanging 2 periodic updates, the network is converged.

21.0.0.020.0.0.0 22.0.0.0 23.0.0.0

.2.1 .2.1 .1.2

A B C

23.0.0.0 21.0.0.2 2 20.0.0.0 22.0.0.1 2

22.0.0.0 21.0.0.2 1 20.0.0.0 21.0.0.1 123.0.0.0 22.0.0.2 1

21.0.0.0 22.0.0.1 1

NW VIA HOP20.0.0.0 ---------- 021.0.0.0 ---------- 0

NW VIA HOP21.0.0.0 ---------- 022.0.0.0 ---------- 0

NW VIA HOP22.0.0.0 ---------- 023.0.0.0 ---------- 0

Routing Table-A Routing Table-B Routing Table-C

20.0.0.10 23.0.0.15

Routing Updates

Router-C in its next scheduled update, flags the network as unreachable and passes the information along.

21.0.0.020.0.0.0 22.0.0.0 23.0.0.0

.2.1 .2.1 .1.2

A B C

NW VIA HOP20.0.0.0 D 021.0.0.0 D 022.0.0.0 21.0.0.2 123.0.0.0 21.0.0.2 2

Routing Table-A

Routing Table-B

Routing Table-C

NW VIA HOP20.0.0.0 21.0.0.1 121.0.0.0 D 022.0.0.0 D 023.0.0.0 22.0.0.2 1

NW VIA HOP20.0.0.0 22.0.0.1 221.0.0.0 22.0.0.1 122.0.0.0 D 023.0.0.0 D 023.0.0.0 C UR23.0.0.0 22.0.0.2 UR23.0.0.0 21.0.0.2 UR

Routing Updates

Routers-A & B still have entries in the route table about 23.0.0.0.

The information is no longer valid but there is no router to inform them of this fact, thus creating a black-hole in the network.

21.0.0.020.0.0.0 22.0.0.0 23.0.0.0

.2.1 .2.1 .1.2

A B C

NW VIA HOP20.0.0.0 D 021.0.0.0 D 022.0.0.0 21.0.0.2 123.0.0.0 21.0.0.2 2

Routing Table-A

Routing Table-B

Routing Table-C

NW VIA HOP20.0.0.0 21.0.0.1 121.0.0.0 D 022.0.0.0 D 023.0.0.0 22.0.0.2 1

NW VIA HOP20.0.0.0 22.0.0.1 221.0.0.0 22.0.0.1 122.0.0.0 D 023.0.0.0 D 0

Route Invalidation Timer

Another Timer, Garbage Collection or Flush Timer, 60 Seconds longer than RIT, is set.

On the expiry of which the route entry will be flushed from the routing table.

21.0.0.020.0.0.0 22.0.0.0 23.0.0.0

.2.1 .2.1 .1.2

A B C

NW VIA HOP TIME20.0.0.0 C 0 RIT21.0.0.0 C 0 RIT22.0.0.0 21.0.0.2 1 RIT23.0.0.0 21.0.0.2 2 RIT

Routing Table-A

Routing Table-B

Routing Table-C

NW VIA HOP TIME20.0.0.0 21.0.0.1 1 RIT21.0.0.0 C 0 RIT22.0.0.0 C 0 RIT23.0.0.0 22.0.0.2 1 RIT

NW VIA HOP TIME20.0.0.0 22.0.0.1 2 RIT21.0.0.0 22.0.0.1 1 RIT22.0.0.0 C 0 RIT23.0.0.0 C 0 RIT0 023.0.0.0 22.0.0.2 UR23.0.0.0 21.0.0.2 UR

RIP Timers

Update Timer 30 Seconds

Route Invalidation Timer 180 Seconds (6 Times the Update Timer)

Garbage Collection Timer 240 seconds (60 Seconds longer than RIT)

OSPF operation….

OSPF- Routers send Hello packets out OSPF-enabled interfaces

Two routers sharing a common link, after exchanging Hello packets, become neighbors

OSPF operation…

Link State Advertisements (LSAs) i.e. router’s links and their state, are exchanged between adjacent routers

Each router receiving an LSA from a neighbor records the LSA in Link State Database and sends a copy of the LSA to all of its other neighbors

LSAs are exchanged, until all the routers build identical Link State Databases i.e. the link state databases have been synchronized

OSPF operation….

Each router uses SPF algorithm to calculate a shortest path to every known destination, with itself as root

Each router builds its router table from its SPF Tree

After this, in a stable internetwork, all activities stop except Hello packets are exchanged, after regular intervals of

10 seconds (Hello Interval) between neighbors, as keepalives

LSAs are exchanged every 30 minutes

Metrics

Speed Cost

>= 100Mbps 1

Ethernet/802.3 10

E1(2.048Mbps) 48

64Kbps 1562

Metric=108/Interface Speed in bits per sec.e.g. 100000000/2048000=48.828125

Shortest Path Tree of Router-A

A B

C D

4 4

20 5

2 2

5 3

3

A B

C D

4

5

2

20

PATH VECTOR ROUTING

Path vector routing is similar to distance Path vector routing is similar to distance vector routing. There is at least one node, vector routing. There is at least one node, called the speaker node, in each AS that called the speaker node, in each AS that creates a routing table and advertises it to creates a routing table and advertises it to speaker nodes in the neighboring ASs..speaker nodes in the neighboring ASs..

Boarder Gateway Protocol

Between Two AS

Autonomous System

DefinitionAn autonomous system is a network

under a common administration

Autonomous systems

Autonomous systems

AS-1 AS-2

AS-0

IGP

IGP IGP

BGP

BGP

BGP

In distance vector routing, each node shares the knowledge about the entire

AS with its immediate neighbors periodically .

Note:Note:

Initial routing tables in path vector routing

Popular routing protocols

top related