Top Banner
TCP/IP & ROUTING PROTOCOLS V.Maheswaran Nair Sub Divisional Engineer BSNL,Trivandrum.
53

TCP IP Routing protocols

Nov 17, 2014

Download

Documents

api-19652143
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 Routing protocols

TCP/IP

&

ROUTING PROTOCOLS

V.Maheswaran Nair

Sub Divisional Engineer

BSNL,Trivandrum.

Page 2: TCP IP Routing protocols

TCP/IP(Transmission Control Protocol/

Internet Protocol)

Page 3: TCP IP Routing protocols

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

Page 4: TCP IP Routing protocols

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

Page 5: TCP IP Routing protocols

Networking protocols

Moving packet of data from Source to Destination

Internet Protocols (IP) and Routing Protocols are used.

Page 6: TCP IP Routing protocols

TCP is responsible for:

Data concurrency

Packet Sequencing

Delivery guarantee

Error Control

Retransmission

Page 7: TCP IP Routing protocols

Internet address

MAC address

(Node to Node)

IP address

(Source to

Destination)

Port address

(Application)

16 bit

Decimal Notation

Page 8: TCP IP Routing protocols

MAC address

48 bit (6 Bytes)

Hexa Decimal Notation

AB 0F 25 B6 C5 D2

Vendor ID Serial No

Page 9: TCP IP Routing protocols

IP Address

Page 10: TCP IP Routing protocols

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.

Page 11: TCP IP Routing protocols

Dotted Decimal Notation

Page 12: TCP IP Routing protocols

128.11.3.31

10000000 00001011 00000011 00011111

Page 13: TCP IP Routing protocols

Classes

Page 14: TCP IP Routing protocols

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

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

Page 15: TCP IP Routing protocols

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.

Page 16: TCP IP Routing protocols

IP Address Classes

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

Page 17: TCP IP Routing protocols

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.

Page 18: TCP IP Routing protocols

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

Page 19: TCP IP Routing protocols

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

Page 20: TCP IP Routing protocols

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%

Page 21: TCP IP Routing protocols

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

Page 22: TCP IP Routing protocols

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

Page 23: TCP IP Routing protocols

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

Page 24: TCP IP Routing protocols

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

Page 25: TCP IP Routing protocols

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

Page 26: TCP IP Routing protocols

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

Page 27: TCP IP Routing protocols

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

Page 28: TCP IP Routing protocols

ROUTING PROTOCOLS

Page 29: TCP IP 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

Page 30: TCP IP Routing protocols

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

Page 31: TCP IP Routing protocols

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

Page 32: TCP IP Routing protocols

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

Page 33: TCP IP Routing protocols

Types of R P

Routes

Static

Dynamic

Distance Vector Protocols

Link State Protocols

RIP,IGRP

OSPF,IS-IS

Page 34: TCP IP Routing protocols

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)

Page 35: TCP IP Routing protocols

Metrics Hop Count -- Distance Vector

Cost (BW) – Link State

Page 36: TCP IP Routing protocols

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

Page 37: TCP IP Routing protocols

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

Page 38: TCP IP Routing protocols

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

Page 39: TCP IP Routing protocols

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

Page 40: TCP IP Routing protocols

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)

Page 41: TCP IP Routing protocols

OSPF operation….

OSPF- Routers send Hello packets out OSPF-enabled interfaces

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

Page 42: TCP IP Routing protocols

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

Page 43: TCP IP Routing protocols

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

Page 44: TCP IP Routing protocols

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

Page 45: TCP IP Routing protocols

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

Page 46: TCP IP Routing protocols

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

Page 47: TCP IP Routing protocols

Boarder Gateway Protocol

Between Two AS

Page 48: TCP IP Routing protocols

Autonomous System

DefinitionAn autonomous system is a network

under a common administration

Page 49: TCP IP Routing protocols

Autonomous systems

Page 50: TCP IP Routing protocols

Autonomous systems

AS-1 AS-2

AS-0

IGP

IGP IGP

BGP

BGP

BGP

Page 51: TCP IP Routing protocols

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

AS with its immediate neighbors periodically .

Note:Note:

Page 52: TCP IP Routing protocols

Initial routing tables in path vector routing

Page 53: TCP IP Routing protocols

Popular routing protocols