information and communication engineering (ice) mut itec4610 network switching and routing ดร....

80
I n f o r m a t i o n a n d C o m m u n i c a t i o n e n g i n e e r i n g MUT ITEC4610 Network Switching and Routing ดด. ดดดดดดดด ดดดดด ดดดดดดดดดดดดดดดดดดดดดดดดดดดดดดดดดดดดด ดดดดดดด(ICE) MUT Email: [email protected] ดดดดดดดดดด: F402 ดดดดดดดดดดดดดดดดดดดดดด: (02)9883655 ดดด 220 ดดดดดดดดดดดดดดดดดดดดดดด: 065343850

Upload: dwayne-whitchurch

Post on 31-Mar-2015

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ITEC4610Network Switching and Routing

ดร . ประวิ�ทย์ ชุ�มชุ�หั�วิหัน้�าสาขาวิ�ชุาวิ�ศวิกรรมสารสน้เทศและการส��อสาร(ICE)MUTEmail: [email protected]หั�องท�างาน้: F402เบอรโทรศ�พทท#�ท�างาน้: (02)9883655 ต่%อ 220เบอรโทรศ�พทเคล��อน้ท#�: 065343850

Page 2: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Class VRouting Algorithms,

RIPv1&RIPv2

ดร . ประวิ�ทย์ ชุ�มชุ�หั�วิหัน้�าสาขาวิ�ชุาวิ�ศวิกรรมสารสน้เทศและการส��อสาร(ICE)MUTEmail: [email protected]หั�องท�างาน้: F402เบอรโทรศ�พทท#�ท�างาน้: (02)9883655 ต่%อ 220เบอรโทรศ�พทเคล��อน้ท#�: 065343850

Page 3: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

หั�วิข�อท#�จะบรรย์าย์Routing Algorithm

– Distance-vector routing– Link state routing

• RIPv1• RIPv2

Page 4: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

IP components

สร้�างได้�อย่างไร้?

ไว้�ทำ าอะไร้สร้�างได้�อย่างไร้?

ไว้�ทำ าอะไร้?

สร้�างได้�อย่างไร้?

ไว้�ทำ าอะไร้?

Page 5: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Routing protocol• Define how routers exchange

network– What type of information– The format of information– When to exchange– Which router to exchange information

with

• RIP, OSPF,BGP, IGRP,EIGRP etc.

Page 6: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Routing algorithm• To choose or compute a route based on

the available network information• A routing algorithm is defined by

– The type of network information exchanges– Which router to exchange with – Method to compute the routes

• Distance vector routing, Link state routing,

Diffusing update algorithm (DUAL) etc.

Page 7: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Routing Algorithm classification

Global or decentralized information?

Global:• all routers have complete

topology, link cost info• “link state” algorithmsDecentralized: • router knows physically-

connected neighbors, link costs to neighbors

• iterative process of computation, exchange of info with neighbors

• “distance vector” algorithms

Static or dynamic?Static: • routes change slowly

over timeDynamic: • routes change more

quickly– periodic update– in response to link

cost changes

Page 8: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Upon completion you will be able to:

• Distinguish between intra and interdomain routing• Understand distance vector routing and RIP• Understand link state routing

Objectives

Unicast Routing Protocols:Unicast Routing Protocols:RIPRIP

Page 9: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Routing inside an autonomous system is referred to as intradomain Routing inside an autonomous system is referred to as intradomain routing. Routing between autonomous systems is referred to as routing. Routing between autonomous systems is referred to as interdomain routing. interdomain routing.

INTRA- AND INTERDOMAIN ROUTING

Page 10: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Autonomous systems

Page 11: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Popular routing protocols

Page 12: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Routing in the Internet

Path- or distance-vector protocols

Link-state protocols

Inter-domain(policy)

BGP

Intra-domain(performance)

RIP, IGRP, EIGRP(advance DV)

OSPF, IS-IS

Page 13: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

In distance vector routing, the least cost route between any two nodes is In distance vector routing, the least cost route between any two nodes is the route with minimum distance. In this protocol each node maintains a the route with minimum distance. In this protocol each node maintains a vector (table) of minimum distances to every nodevector (table) of minimum distances to every node

The topics discussed in this section include:The topics discussed in this section include:

Initialization Initialization Sharing Sharing Updating Updating When to Share When to Share Two-Node Loop Instability Two-Node Loop Instability Three-Node Instability Three-Node Instability

DISTANCE VECTOR ROUTING

Page 14: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Distance vector routing tables

Page 15: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ขบวิน้การสร�าง routing table

• Initialization• Sharing• Updating

Page 16: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Initialization of tables in distance vector routing

Page 17: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Initialization

• ได�มาจากท#�ไหัน้– ICMP

- Router Solicitation - Router Advertisement

Page 18: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

In distance vector routing, each node shares its routing table with its

immediate neighbors periodically and when there is a change.

Note:Note:

Page 19: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Updating in distance vector routing of A

Page 20: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Trigger Updates

• A cost update distributed immediately in response to a detected change in the cost estimate for a route to destination

• May delay trigger updates for a short time

• The trigger updates contain information about only changed routes– RIP

Page 21: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Holddowns

• Prevent the reinstatement of old routes• When a router moves from its routing

table a route to a particular destination, it invokes a holddown that disables acceptance of new routes to this detination for a specified time interval

• Disadvantage– Increase the time for routers to learn the

correct new routes

Page 22: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

การแสดงใน้ร�ปแบบของเวิกเต่อรBellman-Ford algorithm on a

number of hops h

1

0

00

1

01

3

Nh

nodesofnumbertheNwhereNO

jid

jiD

jifor

iallfor

jiforhDdhD

iallforhD

ij

ij

kjikk

ij

ii

)(

nodeandnodebetweenlinkdirectofcosttheis

nodendestinatiotonodesourcefromroutecostminimumtheofthecostis

,)(D

,)(D

:conditionsintialWith

)),((min)(

,)(

ij

ii

Page 23: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ต่�วิอย์%างการค�าน้วิน้1

5

2

Node 1

Node 3

Node 2

220

0001

505

0001

101

0001

01

0

33232322132123

33132312131113

32132212121112

),,min(

))(),(),((min)(

),,min(

))(),(),((min)(

,),,min(

))(),(),((min)(

,)(

DdDdDdD

DdDdDdD

direct

DdDdDdD

iallforD

h

k

k

k

ii

i/j 1 2 3

1 0 1 5

2 1 0 2

3 5 2 0

Dij(1)

Page 24: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ต่�วิอย์%างการค�าน้วิน้

1

5

2

Node 1

Node 3

Node 2

2022051

1111

3052150

1112

1250110

1112

02

1

33232322132123

33132312131113

32132212121112

),,min(

))(),(),((min)(

),,min(

))(),(),((min)(

),,min(

))(),(),((min)(

,)(

DdDdDdD

DdDdDdD

DdDdDdD

iallforD

h

k

k

k

ii

i/j 1 2 3

1 0 1 3

2 1 0 2

3 3 2 0

Dij(2)

1

2

Node 1

Node 3

Node 2

Page 25: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ต่�วิอย์%างการค�าน้วิน้

7

1

1

8 2

2

Node 1

Node 2 Node 3

Node 4Node 5

26

25

22

1

0

1

15

14

13

12

11

nodeViatD

nodeViatD

nodeViatD

DirecttD

TD

nodeFor

,)(

,)(

,)(

,)(

)(

Node 1’s routing Table

To Cost Next

Node 2 1 direct

Node 3 2 Node 2

Node 4 5 Node 2

Node 5 6 Node 2

Page 26: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Two-node instabilityBA

Unsolicited Response (change in routing table)

Normal

X failure

BUnsolicited Response

(every 30s or change in routing table)

Unstability

X failure

Page 27: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Defining Infinity

BUnsolicited Response

(every 30s or change in routing table) X failure

x 2 - x 6 A

x 10 Bx 14 A

x 20 B x ∞ B=

∞ =16

x ∞ -

Page 28: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Split Horizon

BUnsolicited Response

(every 30s or change in routing table) X failure

x 2 - x 6 A

x ∞ -x ∞ -

x ∞ -

Each node sends only part of its table through each interface

x 6A

Page 29: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Problem of Split Horizon

• Node A could not guess that this is due to the split horizon strategy or because B has not received any news about X recently

Page 30: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Split Horizon and Poison Reverse

BUnsolicited Response

(every 30s or change in routing table) X failure

x 2 - x 6 A

x ∞ -x ∞ -

x ∞ -

Do not use this value; What I know about this route come from you x ∞

Page 31: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Three-node instability

B

X failure

x 2 -x 6 A

x ∞ -

x ∞C x 5 A

x 5 A

x ∞

x 8 Cx 12 B

Unstability Unstability

Page 32: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Defining Infinity

B

X failure

x 2 -x 6 A

x ∞ -

x ∞C x 5 A

x 5 A

x ∞

x 8 Cx 12 B

∞=16

x 16 B x 15 B

x ∞ B=

Page 33: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Loop-Free Distance Vector Routing

• Distributing enough information in update messages --> quickly detect, no prevent routing loop

• Controlling the order in which nodes distribute update messages and compute routes in response to an increase in link cost Prevent loop but require – A significant number of message exchanges– Slow convergence

• Refs– J. J. Garcia-Luna-Aceves: A Minimum-Hop Routing Algorithm

Based on Distributed Information. Computer Networks 16: 367-382 (1989)

– DUALEIGRP

Page 34: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ค�าถาม?

Page 35: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

แบบฝึ,กหั�ดลองท�าด�

7

1

1

8 2

2

Node 1

Node 2 Node 3

Node 4Node 5

?)(

?)(

?)(

?)(

)(

tD

tD

tD

tD

TD

nodeFor

25

24

23

21

22 0

1

Node 2’s routing Table

To Cost Next

Node 1

Node 3

Node 4

Node 5

Page 36: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

เฉลย์

7

1

1

8 2

2

Node 1

Node 2 Node 3

Node 4Node 5

35

34

2

1

0

1

25

24

23

21

22

nodeViatD

nodeViatD

DirecttD

DirecttD

TD

nodeFor

,)(

,)(

,)(

,)(

)(

Node 2’s routing Table

To Cost Next

Node 1 1 direct

Node 3 2 direct

Node 4 4 Node 3

Node 5 5 Node 3

Page 37: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

แบบฝึ,กหั�ดลองท�าด� เป.น้การบ�าน้

2

6

5

3

4

11

32

1 14

14

จงแสด้งการ้คำ านว้นหา node 1’ routing table ใช้� Bellman-Ford’s algorithm

Page 38: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

In link state routing, if each node in the domain has the entire topology In link state routing, if each node in the domain has the entire topology of the domain, the node can use Dijkstra’s algorithm to build a routing of the domain, the node can use Dijkstra’s algorithm to build a routing table.table.

The topics discussed in this section include:The topics discussed in this section include:

Building Routing Tables Building Routing Tables

LINK STATE ROUTING

Page 39: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Concept of link state routing

Each router knows network topology

Page 40: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Link state knowledge

Page 41: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Dijkstra algorithm

Page 42: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Example of formation of shortest path tree

Page 43: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Table 14.1 Table 14.1 Routing table for node ARouting table for node A

Page 44: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

การแสดงใน้ร�ปแบบของเวิกเต่อร

1 noderoot

listPermanentofseta

1SteptoGo

setallForlabels)of(Update:2Step

completeisalgoritmhthestop;thennode,allcontainsif

thatsuchFindnode)closestnextthe(Find:1Step

P

DdDD

Pj

P

iPPset

DD

Pi

jfordDDP

ijijj

jPj

i

jj

],min[

}{

min

1,0,1 11

Page 45: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ต่�วิอย์%างFind A’s routing table

2

4 5

3

1 52 4 3

4

3

B

D E

C

A 52 4 3

4

3node

1 2 3 4 5

1 0 5 2 3 ∞

2 5 0 4 ∞ 3

3 2 4 0 ∞ 4

4 3 ∞ ∞ 0 ∞

5 ∞ 3 4 ∞ 0

dij

Page 46: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ต่�วิอย์%าง

1SteptoGo

:2Step

:1Step

3,6)24,min(],min[

1,3)2,3min(],min[

1,5)24,5min(],min[

}3,1{

2),,3,2,5min(

,,3,2,5,0,1

5355

34344

32322

3

54321

viaDdDD

viaDdDD

viaDdDD

Pset

DD

DDDDDP

i

3

12

Page 47: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ต่�วิอย์%าง

1SteptoGo

:2Step

:1Step

3,6)3,6min(],min[

1,5)3,5min(],min[

}4,3,1{

3),6,3,5min(

45455

42422

4

viaDdDD

viaDdDD

Pset

DDi

4

3

12

3

Page 48: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ต่�วิอย์%าง

1SteptoGo

:2Step

:1Step

3,6)53,6min(],min[

}2,4,3,1{

5),6,5min(

25255

2

viaDdDD

Pset

DDi

2

4

3

1 52

3

Page 49: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ต่�วิอย์%าง

}5,2,4,3,1{

6),6min( 2

Pset

DDi

:1Step 2

4 5

3

1 52

43

Page 50: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

สร�ปเป.น้ต่ารางStep P B

(cost, NH)

C(cost, NH)

D(cost, NH)

E(cost, NH)

0 A 5,A 2,A 3,A ∞

1 AC 5,A 3,A 6,C

2 ACD 5,A 6,C

3 ACDB 6,C

4 ACDBE

Page 51: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Comparison of LS and DV algorithms

Message complexity• LS: with n nodes, E links,

O(nE) msgs sent • DV: exchange between

neighbors only– convergence time varies

Speed of Convergence• LS: O(n2) algorithm requires

O(nE) msgs– may have oscillations

• DV: convergence time varies– may be routing loops– count-to-infinity problem

Robustness: what happens if router malfunctions?

LS: – node can advertise

incorrect link cost– each node computes only

its own table

DV:– DV node can advertise

incorrect path cost– each node’s table used by

others • error propagate thru

network

Page 52: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ค�าถาม?

Page 53: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

แบบฝึ,กหั�ดลองท�าด�

7

1

1

8 2

2

Node 1

Node 2 Node 3

Node 4Node 5

Node 2’s routing Table

To Cost Next

Node 1

Node 3

Node 4

Node 5

Page 54: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

เฉลย์

1SteptoGo

,),min(],min[

),min(],min[

,),min(],min[

:2Step

},{

),,,,min(

:1Step

,,,,,,

directDdDD

DdDD

viaDdDD

Pset

DD

DDDDDP

i

7187

1

2312

21

171

7101

25255

24244

23233

2

54321

j/i 1 2 3 4 5

1 0 1 ∞ ∞ 7

2 1 0 2 ∞ 8

3 ∞ 2 0 2 ∞

4 ∞ ∞ 2 0 1

5 7 8 ∞ 1 0

7

1

1

8 2

2

Node 1

Node 2 Node 3

Node 4Node 5dji

1

Node 1

Node 2

Page 55: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

เฉลย์

1SteptoGo

,),min(],min[

,)min(,],min[

:2Step

},,{

),,,min(

:1Step

directDdDD

viaDdDD

Pset

DDi

717

3532

321

373

35355

34344

3

j/i 1 2 3 4 5

1 0 1 ∞ ∞ 7

2 1 0 2 ∞ 8

3 ∞ 2 0 2 ∞

4 ∞ ∞ 2 0 1

5 7 8 ∞ 1 0

7

1

1

8 2

2

Node 1

Node 2 Node 3

Node 4Node 5dji

1

2

Node 1

Node 2 Node 3

Page 56: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

เฉลย์

1SteptoGo

,),min(],min[

:2Step

},,,{

),,min(

:1Step

46517

4321

575

45455

4

viaDdDD

Pset

DDi

j/i 1 2 3 4 5

1 0 1 ∞ ∞ 7

2 1 0 2 ∞ 8

3 ∞ 2 0 2 ∞

4 ∞ ∞ 2 0 1

5 7 8 ∞ 1 0

7

1

1

8 2

2

Node 1

Node 2 Node 3

Node 4Node 5dji

1

2

2

Node 1

Node 2 Node 3

Node 4

Page 57: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

เฉลย์

Complete

Pset

DDi

},,,,{

),min(

:1Step

54321

66 5

j/i 1 2 3 4 5

1 0 1 ∞ ∞ 7

2 1 0 2 ∞ 8

3 ∞ 2 0 2 ∞

4 ∞ ∞ 2 0 1

5 7 8 ∞ 1 0

7

1

1

8 2

2

Node 1

Node 2 Node 3

Node 4Node 5dji

1

1

2

2

Node 1

Node 2 Node 3

Node 4Node 5

Page 58: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

สร�ปเป.น้ต่ารางStep P Node

2(cost, NH)

Node 3(cost, NH)

Node 4(cost, NH)

Node 5(cost, NH)

0 1 1,1 ∞ ∞ 7,1

1 12 3,1 ∞ 7,1

2 123 5,3 7,1

3 1234 6,4

4 12345

Page 59: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

แบบฝึ,กหั�ดลองท�าด�

2

6

5

3

4

11

32

1 14

14

จงแสด้งการ้คำ านว้นหา node 1’ routing table ใช้� Dijkstra’s algorithm

Page 60: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

เฉลย์ สร�ปเป.น้ต่าราง

Step P Node 2(cost, NH)

Node 3(cost, NH)

Node 4(cost, NH)

Node 5(cost, NH)

Node 5(cost, NH)

0

1

2

3

4

5

Page 61: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

The Routing Information Protocol (RIP) is an intradomain routing The Routing Information Protocol (RIP) is an intradomain routing protocol used inside an autonomous system. It is a very simple protocol protocol used inside an autonomous system. It is a very simple protocol based on distance vector routing. based on distance vector routing.

The topics discussed in this section include:The topics discussed in this section include:

RIP Message Format RIP Message Format Requests and Responses Requests and Responses Timers in RIP Timers in RIP RIP Version 2 RIP Version 2 Encapsulation Encapsulation

RIP

Page 62: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Example of a domain using RIP

Page 63: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

RIP message format

Command : 1, request, 2 response

Version : version 1 or version 2

Family : Define family of the protocol used ex. 2 for TCP/IP

Network address : The address of destination address

Distance :Hop count to the destination networ

Page 64: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Request messages

Page 65: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Response Message

-Command field = 1-Solicited response is sent only answer to request-Unsolicited response is sent periodically, every 30 second

Page 66: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Figure 14.11 shows the update message sent from router R1 to router R2 in Figure 14.8. The message is sent out of interface 130.10.0.2.

See Next Slide

The message is prepared with the combination of split horizon and poison reverse strategy in mind. Router R1 has obtained information about networks 195.2.4.0, 195.2.5.0, and 195.2.6.0 from router R2. When R1 sends an update message to R2, it replaces the actual value of the hop counts for these three networks with 16 (infinity) to prevent any confusion for R2. The figure also shows the table extracted from the message. Router R2 uses the source address of the IP datagram carrying the RIP message from R1 (130.10.02) as the next hop address.

Example 1

Page 67: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Solution to Example 1it replaces the actual value of the hop counts for these three networks with 16 (infinity) to prevent any confusion for R2-- Split Horizon and Poison Reverse

Page 68: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

RIP timers

- Periodic timer = Controls the advertising of regular update message

- Expiration = Governs the validity of a route

- Garbage Collection= When to purge a route from the routing table

-This timer allows neighbors to become aware of the invalidity of the route prior to purging

Page 69: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

A routing table has 20 entries. It does not receive information about five routes for 200 s. How many timers are running at this time?

SolutionThe 21 timers are listed below: Periodic timer: 1 Expiration timer: 20 − 5 = 15 Garbage collection timer: 5

RIP timers

Page 70: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

RIP version 2 format

• Route tag– Carries information such as autonomous system

number• Subnet mask

– Carries subnet mask or prefix• Next-hop address

– Carries the address of next hop

Page 71: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Authentication

Page 72: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Multicasting

• RIP Version 1 uses broadcasting• RIP Version 2 uses the all router

multicast address

Page 73: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

RIP uses the services of UDP on well-known port 520.

Note:Note:

Page 74: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

RIPv1• Distance vector protocol• Uses UDP port 520• Classlfull protocol• Metric is router hop count• Maximum hop count is 15;infinite (unreachable) routes

have a metric of 16• Periodic updates sent every 30 seconds to multicast

address 224.0.0.9• 25 routes per RIP messages (24 if uses authentication)• Implement split horizon with poison reverse• Implements triggered updates• No support Authentication• Subnet mask included in route entry• Administrative of distance for RIPv2 is 120

– A rating of the trustworthiness of a routing information source. In Cisco routers, administrative distance is expressed as a numerica

l value between 0 and 2 5 5 . The higher the value, the lower th et r ust wor t hi ness r at i ng.

Page 75: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

RIPv2• Distance vector protocol• Uses UDP port 520• Classless protocol• Support VLSM• Metric is router hop count• Maximum hop count is 15;infinite (unreachable)

routes have a metric of 16• Periodic updates sent every 30 seconds to multicast

address 224.0.0.9• 25 routes per RIP messages (24 if uses authentication)• Implement split horizon with poison reverse• Implements triggered updates• Subnet mask included in route entry• Administrative of distance for RIPv2 is 120

Page 76: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

IP components

สร้�างได้�อย่างไร้?

Page 77: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

RIP Table processing

• RIP routing tables managed by application-level process called route-d (daemon)

• advertisements sent in UDP packets, periodically repeated

physical

link

network forwarding (IP) table

Transprt (UDP)

routed

physical

link

network (IP)

Transprt (UDP)

routed

forwardingtable

Page 78: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

ค�าถาม?

Page 79: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Summary

• Distance Vector routing• Link State Routing• RIPv1 & RIPv2

Page 80: Information and Communication engineering (ICE) MUT ITEC4610 Network Switching and Routing ดร. ประวิทย์ ชุมชู หัวหน้าสาขาวิชาวิศวกรรมสารสนเทศและการสื่อสาร

Info

rmatio

n a

nd

C

om

munica

tion e

ng

ineerin

g

(ICE)

MUT

Homeworks

• เต่ร#ย์มบรรย์าย์เร��อง 2-3 คน้ต่%อ 1 กล�%ม– เปร#ย์บเท#ย์บ IPv4 และ IPv6 หัร�อ– เปร#ย์บเท#ย์บ ICMP4 และ ICMP6 หัร�อ – Mobile IPv4 หัร�อ– Mobile IPv6

• ใชุ� Microsoft PowerPoint ใน้การบรรย์าย์• บรรย์าย์กล�%มละ 10-15 น้าท# ถามต่อบ 5 น้าท#�• เก/บ 5 %• บรรย์าย์ 1 กรกฎาคม 2549 เวิลา 16.00 (ต่�องต่รง

เวิลา)