CPE 426 Computer Networks - PowerPoint PPT Presentation

Loading...

PPT – CPE 426 Computer Networks PowerPoint presentation | free to download - id: 56e534-M2I1O



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

CPE 426 Computer Networks

Description:

Title: Slide 1 Author: utg Last modified by: ut Created Date: 10/31/2010 11:37:30 AM Document presentation format: On-screen Show Company: cpe Other titles – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 55
Provided by: utg
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: CPE 426 Computer Networks


1
CPE 426 Computer Networks
  • Week 12
  • Chapter 27 Internet Routing
  • Part I

2
TOPICS
  • Chapter 27 Internet Routing and Routing
    Protocols
  • 27.1 Introduction
  • 27.2 Static vs Dynamic Routing
  • Extra Router Configuration in Network
  • 27.3 Static Routing and Default Route
  • Extra Examples of Static Routing
  • BREAK
  • 27.4 Dynamic Routing and Router
  • 27.5 Routing in Global Internet
  • 27.6 Autonomous System Concept
  • 27.7 Two Types of Routing Protocol
  • 27.8 Routes and Data Traffic
  • Extra Bellman-Ford Algorithm Review
  • Extra Dijkstra Algorithm Review

3
Chapter 27Internet Routing and Routing Protocol
  • ???????????? Packet ?? IP Network ????????? Hop
    ??? Network ????? ???????? Network ?????
  • Router ??????????????????? ????????? Router
    ???????????????????? Network
  • ????????????????? Prefix ??? IP Address ???????
    Router ?????? Run IP Protocol ???????????????
    Layer 3
  • ??? Router ????????????? Routing Table ????????
    IP Address ??? Next Hop

4
Chapter 27 27.2 Static vs Dynamic Routing
  • ????? Routing ???????????
  • Static Routing ???????????? Routing Table ???
    Router ???????????????????? ??????????????????????
    ??? Network Administration
  • ???????????????????????? Configuration ??? Router
  • Dynamic Routing ???????????? Routing Table
    ???????????????? ?????????????????????? Network
    ??????? ????????????? Update ????????
  • ????????????????????????? Router ????? Run
    Routing Protocol
  • ??????? Routing Protocol ??? Router
    ????????????????????????????? ?????????? Network
    ??????????????????? ??????? Router
    ???????????????????? Routing Table
    ???????????????????????? ?????????????????????????
    ?? ????????? Network ??????? ???????????????????
    ???????????????????????? Network ????????????

5
Chapter 27 27.3 Static Routing in Host and
Default Route
  • ???????? Static Routing ??????? ?????????????
    Routing Software(Router ?????????????)
    ????????????????? Resource ??? Network ?????
    Router ??????????????????????????
  • ????????????? ?????????????????? ????? Link Down
    ???? Router Down ??????????????????????
    ?????????????????????????????????????????????
  • ????????????? Static Routing ?????????? Network
    ???????? ??????????? LAN ?????????
    ??????????????? Internet ???????? Static Routing
  • ?????????????????? Host ??????????????? Network
    ??????????????? Router ????????(?????? Gateway)
  • ?????? Static Route ????????????? Default Route
    ????
  • ????? Static Route ??????????????????????????
    Route Loop

6
Chapter 27 27.3 Static Routing in Host and
Default Route
7
???????? Interface ?????? Router
  • ????? Interface ??? Router ???????? IP Address
    ?????????????? Network ??? Interface ?????????
    (Prefix ????????? ??? Suffix ???????)

58.42.96.0/19
58.42.96.2
58.42.96.1
200.18.95.1
195.3.0.193
R1
R2
195.3.0.192/26
200.18.95.0/24
R4
R3
195.3.0.194
200.18.95.2
70.12.0.2
70.12.0.1
70.12.0.0/16
8
???????? Interface ?????? Router
  • ???????????????????????????? Router
    ?????????????????? Network ??????? ??? Network
    ?????????????????????????? ????????????????????
    Routing Table

58.42.96.0/19
58.42.96.1
R4
R1
200.18.95.1
195.3.0.193
R2
195.3.0.192/26
200.18.95.0/24
R3
70.12.0.1
70.12.0.0/16
9
???????? Interface ?????? Router
  • ?????????? Router ?????? Subnet ??? Private IP
    ??? ?????????????????? Host Address ?????????????
    /30 ???? ???? Sub ??? 192.168.100.0/24 ????? 64
    Subnet

Subnet 192.168.100.4/30 Host Range
192.168.100.5-192.168.100.6 Broadcast
192.168.100.7
192.168.100.4/30
58.42.96.0/19
192.168.100.8/30
58.42.96.1
.6
.9
R4
R1
.5
.10
R2
195.3.0.193
200.18.95.1
200.18.95.0/24
195.3.0.192/26
.18
.13
R3
.14
.17
70.12.0.1
192.168.100.12/30
192.168.100.16/30
70.12.0.0/16
10
???????? Interface ?????? Router
  • ???????? Static Routing Table ?????? Router
    ???????????????????????????????????????????
    Router ????????? Network (Network ??????? Transit
    ???????????? ?????????? Host ???????)
    ??????????????????????????????? Default Route
    ???? R1

58.42.96.0/19
58.42.96.1
.6
.9
192.168.100.4/30
192.168.100.8/30
.5
.10
R2
195.3.0.193
200.18.95.1
R1
R4
200.18.95.0/24
195.3.0.192/26
.18
.13
R3
192.168.100.12/30
192.168.100.16/30
.14
.17
70.12.0.1
70.12.0.0/16
11
???????? Interface ?????? Router
NW Mask Next Hop
200.18.95.0 255.255.255.0 Direct
70.12.0.0 255.255.0.0 192.168.100.17
58.42.96.0 255.255.224.0 192.168.100.6
195.3.0.192 255.255.255.192 192.168.100.6
0.0.0.0 0.0.0.0 192.168.100.17
58.42.96.0/19
58.42.96.1
.6
.9
192.168.100.4/30
192.168.100.8/30
.5
.10
R2
195.3.0.193
200.18.95.1
R1
R4
200.18.95.0/24
195.3.0.192/26
.18
.13
R3
192.168.100.12/30
192.168.100.16/30
.14
.17
70.12.0.1
70.12.0.0/16
12
???????? Interface ?????? Router
R2 Routing Table
58.42.96.0/19
58.42.96.1
.6
.9
192.168.100.4/30
192.168.100.8/30
.5
.10
R2
195.3.0.193
200.18.95.1
R1
R4
200.18.95.0/24
195.3.0.192/26
.18
.13
R3
192.168.100.12/30
192.168.100.16/30
.14
.17
70.12.0.1
70.12.0.0/16
13
???????? Interface ?????? Router
R3 Routing Table
58.42.96.0/19
58.42.96.1
.6
.9
192.168.100.4/30
192.168.100.8/30
.5
.10
R2
195.3.0.193
200.18.95.1
R1
R4
200.18.95.0/24
195.3.0.192/26
.18
.13
R3
192.168.100.12/30
192.168.100.16/30
.14
.17
70.12.0.1
70.12.0.0/16
14
???????? Interface ?????? Router
R4 Routing Table
58.42.96.0/19
58.42.96.1
.6
.9
192.168.100.4/30
192.168.100.8/30
.5
.10
R2
195.3.0.193
200.18.95.1
R1
R4
200.18.95.0/24
195.3.0.192/26
.18
.13
R3
192.168.100.12/30
192.168.100.16/30
.14
.17
70.12.0.1
70.12.0.0/16
15
Chapter 27 27.4 Dynamic Routing and Router
  • ???? Router ?? Internet ????? Dynamic Routing
  • ??????????????????????? Routing Information
    ??????????
  • Static Router ???????????????????? Customer
    ???????????? ISP ???? Router ?????????????????????
    Internet ????????????? ???????????????????
    Dynamic Routing
  • ???? Static Routing ???????????????????
    ?????????????? LAN ?????????????????

16
Chapter 27 27.4 Dynamic Routing and Router
  • Router ???????? Network ??????? Direct Connect
    ????????
  • ?????? Router ???????? Network ????
    ?????????????????????? Router ????????????????????
    ?? Network ????
  • ?? Static Routing ?????????????? Router
    ?????????????
  • ??????????????????????????????????? Software ??
    Routing Protocol ?? Dynamic Routing
  • ????????????????????? ????? Router
    ??????????????????????????????????? ???????
    Network ?????????????? Routing ???? Dynamic

17
Chapter 27 27.4 Dynamic Routing and Router
  • ?????? R1 ?????? 200.18.95.0/24 ??? 58.42.96.0/19
    ???????????? 195.3.0.192/26
  • R2 ?????? 58.42.96.0/19 ??? 195.3.0.192/26
    ???????????? 200.18.95.0/24
  • R1 ??? R2 ??????????????????????? 58.42.96.0/19
    ????? Router ?????????????? Network ?????
  • ??? 195.3.0.192 ??????? R2 ?????
    ???????????????????? R1 ??? ??? 195.3.0.192/26
    Unreachable
  • ??? R2 ??? ????? R1 ?????????????????? ??????? R1
    ?? Mark ??? 195.3.0.192/26 ???? Unreachable
    ???????

R1
R2
58.42.96.0/19
195.3.0.192/26
200.18.95.0/24
18
Chapter 27 27.5 Routing in Global Internet
  • Internet ?????????? Router ?????? ???????? Router
    ????????????????????????? Router ?????? ???????
    Routing Traffic ????????
  • ??????????????? Traffic ?? Internet ??????????
    Routing ???????????????? (Hierarchy)
    ???????????????????? Router ??????????????????????
    ???????????? ??????????? Router
    ??????????????????????????????????????????????????
    ?
  • Routing Protocol ?????????? ???????????? Routing
    Protocol ????????????
  • ?????????????????????? ????????????????????????
  • ?????????????????????????????? ??????????????
    Routing Protocol ???????????? ?????????????????
  • ??? Routing Protocol ?????????????????????????????
    ??????????????? Protocol ????????

19
Chapter 27 27.6 Autonomous System Concept
  • ????????????? Router ???????????????????????????
    ??????????? Autonomous System (AS)
  • ???????????????????? ???? ????? ISP
  • ???????????????????????????? Router ???????? AS
    ?????
  • Router ????? AS ????????????????? Routing
    Information ???

20
Chapter 27 27.7 Two Type of Internet Routing
Protocol
  • 27.7.1 Interior Gateway Protocols(IGP)
  • Router ????? AS ????? Interior Gateway Protocol
    (IGP) ??????????????? Routing Information
  • ????? AS ?????????????????? IGP ??????????
  • RIP
  • OSPF
  • IGRP (Cisco)
  • EIGRP (Cisco)

21
Chapter 27 27.7 Two Type of Internet Routing
Protocol
  • 27.7.2 Exterior Gateway Protocols(EGP)
  • Router ??????? AS ????? EGP ???????????????
    Routing Information ??? Router ????? AS ?????
  • EGP ????????????????? IGP ????????????????????????
    ????? ????? Overhead ???????
  • EGP ?????? Routing Information ??????? AS
    ???????????????????? AS ?????
  • ?????? Routing Information ?????? AS
    ???????????????????????????? ????????????????

22
Chapter 27 27.7 Two Type of Internet Routing
Protocol
  • 27.7.3 ????????????????? IGP ??? EGP
  • Router R1 ?? Run ???? IGP1 ??? EGP
  • Router R4 ?? Run ???? IGP2 ??? EGP

23
Chapter 27 27.7 Two Type of Internet Routing
Protocol
  • 27.7.4 Optimum Routes, Routing Metrics and IGP
  • ?????????????????????? Internet ???????????????
  • Router ????????????????????????? (Optimal Routes)
  • Remote Application ??????????????????? Delay
    ??????
  • Web Application ????????????????? Throughput
    ??????
  • Webcast ???? Real-Time ????????????????? Jitter
    ??????
  • ??????????? Routing Metric ???????????????????????
    ??????????????
  • ??????????? Delay, Throughput ???? Jitter
    ??????????
  • ????????? Internet ????? Metric ?????????????
  • Hop Count (????? Network ???? Router ???????)
  • Administrative Cost (??????????? Administrator)
    ??????????????????????????????????????????????
  • ???????????????? 4 Hop ????? Administrative Cost
    ????????????????? Hop ????????????????????????????
    ???

24
Chapter 27 27.7 Two Type of Internet Routing
Protocol
  • 27.7.4 Optimum Routes, Routing Metrics and IGP
  • ??????????????? IGP ????? Routing Metric
  • EGP ????????
  • ?????????????? AS ??? IGP ??????? ?????? Metric
    ??????? ???????????????????????
  • ??????? EGP ????????????? Optimal Path
    ??????????????????????????????????

AS 15
Throughput 15 Mbps
AS 1
AS 100
AS 70
Hop 10
25
Chapter 27 27.8 Routes and Data Traffic
  • Data Traffic ????????????????????????? Routing
    Traffic

26
Least Cost Path Algorithms
  • ????????????????? 18 18.12-18.13
  • ????? Course Notes ???? CPE 326
  • ????? Course Notes ???? CPE 231
  • ?????? Graph
  • ????? Algorithm ????????????????????
    ??????????????????????
  • ????????????????????? Routing Information ???????
  • ????????????????? Routing ??????
  • Distance Vector Routing ????? Bellman-Ford
    Algorithm
  • ???????? Router ????????????????? Routing Table
    ?????????????????????????? ???????? Propagate
    ???? Router ???????????????????? ???? RIP(Routing
    Information Protocol)
  • Link-State Routing ????? Dijkstra Algorithm
  • ???????? Router ????? Link State ???????? (?????
    Direct Connect) ???????????? Router ????? Router
    ???????? Link State Database ???????? Topology
    ??????? Network ????????????????? Shortest Path
    First Tree ????????????? Root ????? Router
    ???????

27
Least Cost Path Algorithms
NW3
NW2
R3
NW4
R2
R4
NW7
R5
R6
R1
NW1
R7
R9
R8
NW5
NW6
1. ??????????????? Host ????? ???????? Host ?????
????????? Router ??????????? Network
??????????????????????????? Router ?????????? ???
Router ????? ??? Network ?????????????????
28
Least Cost Path Algorithms
R3
R2
R4
R5
R6
R1
R7
R9
R8
2. Cost ????????????? Router ?????????????????????
???????? ????????????? ??? Queue ??? Interface
??? Router ?????? ????????????? ??????? ??? Cost
??????? Router ?????????????????? ?????? Cost
Matrix
29
Least Cost Path Algorithms
R3
5
1
R2
R4
2
4
2
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
2. Cost ????????????? Router ?????????????????????
???????? ????????????? ??? Queue ??? Interface
??? Router ?????? ????????????? ??????? ??? Cost
??????? Router ?????????????????? ?????? Cost
Matrix (W)
30
Least Cost Path Algorithms
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
2. Cost ????????????? Router ?????????????????????
???????? ????????????? ??? Queue ??? Interface
??? Router ?????? ????????????? ??????? ??? Cost
??????? Router ?????????????????? ?????? Cost
Matrix (W)
31
Bellman-Ford Algorithm Definitions
  • Find shortest paths from given node subject to
    constraint that paths contain at most one link
  • Find the shortest paths with a constraint of
    paths of at most two links
  • And so on 
  • s source node
  • w(i, j) link cost from node i to node j
  • w(i, i) 0
  • w(i, j) ? if the two nodes are not directly
    connected
  • w(i, j) ? 0 if the two nodes are directly
    connected
  • h maximum number of links in path at current
    stage of the algorithm
  • Lh(n) cost of least-cost path from s to n under
    constraint of no more than h links

32
Bellman-Ford Algorithm Method
  • Step 1 Initialization
  • L0(n) ?, for all n ? s
  • Lh(s) 0, for all h
  • Step 2 Update
  • For each successive h ? 0
  • For each n ? s, compute
  • Lh1(n)minjLh(j)w(j,n)
  • Connect n with predecessor node j that achieves
    minimum
  • Eliminate any connection of n with different
    predecessor node formed during an earlier
    iteration
  • Path from s to n terminates with link from j to n

33
Example Bellman Ford ??? Node 1 (h0
Initialization s1)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
Cost R1 ?????? Node Infinity L0(n)8 n
2,..,9 L0(1)0
34
Example Bellman Ford ??? Node 1 (h1
Initialization s1)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
Cost R1 ?????? Node Infinity L0(n)8 n
2,..,9 L0(1)0
????? Lh1(n)minjLh(j)w(j,n) L1(2)minjL0(j)
w(j,2) j 1,..,9 minL0(1)w(1,2),L0(2)
w(2,2),L0(3)w(3,2),,L0(9)w(9,2) min
j 1, path 1-2, cost 3 L1(3)minjL0(j)w(j,3
) j 1,..,9 minL0(1)w(1,3),L0(2)w(2,
3),L0(3)w(3,3),,L0(9)w(9,3) all
infinity
35
Example Bellman Ford ??? Node 1 (h2 n2,3)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
Cost R1 ?????? Node Infinity L1(2)3 L1(6)6
L1(8)2 L1(1)0
????? Lh1(n)minjLh(j)w(j,n) L2(2)minjL1(j)
w(j,2) j 1,..,9 minL1(1)w(1,2),L1(2)
w(2,2),L1(3)w(3,2),,L1(9)w(9,2) min
j 1, path 1-2, cost 3 L2(3)minjL1(j)w(j,3
) j 1,..,9 minL1(1)w(1,3),L1(2)w(2,
3),L1(3)w(3,3),,L1(9)w(9,3) min j2,
path 1-2 plus 2-3 1-2-3, cost 358
36
Example Bellman Ford ??? Node 1 (h2 n5,7)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
Cost R1 ?????? Node Infinity L1(2)3 L1(6)6
L1(8)2 L1(1)0
????? Lh1(n)minjLh(j)w(j,n) L2(5)minjL1(j)
w(j,5) j 1,..,9 minL1(1)w(1,5),L1(2)
w(2,5),L1(3)w(3,5),,L1(6)w(6,5),..,L1(9)w(9,5
) min(31,63)4 (j2, path 1-2-5,
cost 4) L2(7)minjL1(j)w(j,7) j 1,..,9
minL1(1)w(1,7),L1(2)w(2,7),,L1(6)w(6,7),
,L1(9)w(9,7) min j6, path 1-6 plus
6-7 1-6-7, cost 628
37
Example Bellman Ford ??? Node 1 (h2 n6)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
Cost R1 ?????? Node Infinity L1(2)3 L1(6)6
L1(8)2 L1(1)0
????? Lh1(n)minjLh(j)w(j,n) L2(6)minjL1(j)
w(j,6) j 1,..,9 minL1(1)w(1,6),,
L1(8)w(8,6),..,L1(9)w(9,6) j8 Path
1-88-6 ??????? Path 1-6
38
Example Bellman Ford ??? Node 1 (h2 n8)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
Cost R1 ?????? Node Infinity L1(2)3 L1(6)6
L1(8)2 L1(1)0
????? Lh1(n)minjLh(j)w(j,n) L2(8)minjL1(j)
w(j,8) j 1,..,9 minL1(1)w(1,8),,
L1(6)w(6,8),..,L1(9)w(9,8) Path
?????????? ???? n9 ????? Path 1-8-9
??????????????? 2 Hop
39
Example Bellman Ford ??? Node 1 (h3)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
Cost R1 ?????? Node Infinity L2(2)3 L2(3)7
L2(5)4 L2(6)6 L2(7)8 L2(9)4 L2(1)0
????? Lh1(n)minjLh(j)w(j,n) L3(5)minjL2(j)
w(j,5) j 1,..,9 minL2(1)w(1,5),L2(2)
w(2,5),L2(3)w(3,5),..,L1(9)w(9,5)
Path ?????????? Path ?? R7 ?????????? ??????
Path 1-2-5-7 ????????? Path ?? R3 ??????? ???
1-2-3 ???? 1-2-5-3, Path R4 min(1-2-3-4,1-8-9-4)

40
Example Bellman Ford ??? Node 1 (h4)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
R2
R4
2
R5
1
3
3
R6
R1
2
R7
R9
1
2
R8
2
Algorithm ??????????????????? Hop ?????????
NW Algorithm ????????????????????????????
Topology ?????????????????? Node ????????? ??????
Update ?????????????? ????????? Cost ??????????
41
Dijkstras Algorithm Definitions
  • Find shortest paths from given source node to all
    other nodes, by developing paths in order of
    increasing path length
  • N set of nodes in the network
  • s source node
  • T set of nodes so far incorporated by the
    algorithm
  • w(i, j) link cost from node i to node j
  • w(i, i) 0
  • w(i, j) ? if the two nodes are not directly
    connected
  • w(i, j) ? 0 if the two nodes are directly
    connected
  • L(n) cost of least-cost path from node s to
    node n currently known
  • At termination, L(n) is cost of least-cost path
    from s to n

42
Dijkstras Algorithm Method
  • Step 1 Initialization
  • T s Set of nodes so far incorporated consists
    of only source node
  • L(n) w(s, n) for n ? s
  • Initial path costs to neighboring nodes are
    simply link costs
  • Step 2 Get Next Node
  • Find neighboring node not in T with least-cost
    path from s
  • Incorporate node into T
  • Also incorporate the edge that is incident on
    that node and a node in T that contributes to the
    path
  • Step 3 Update Least-Cost Paths
  • L(n) minL(n), L(x) w(x, n) for all n Ï T
  • If latter term is minimum, path from s to n is
    path from s to x concatenated with edge from x to
    n
  • Algorithm terminates when all nodes have been
    added to T

43
Example Dijkstra ??? Node 1 (T1)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
T1, L(2)3,L(3)inf,L(4)inf, L(5)inf,L(6)6,L
(7)inf,L(8)2, L(9)inf
44
Example Dijkstra ??? Node 1 (T1)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
T1, L(2)3,L(3)inf,L(4)inf, L(5)inf,L(6)6,L
(7)inf, L(8)2, L(9)inf
  • Min L(8) ????????? Node 8 ????? T T1,8
  • L(n) minL(n), L(8) w(8, n) for all n not in
    T

T1,8, L(2)3,L(3)inf,L(4)inf, L(5)inf,
L(6)3, L(7)inf,L(8)2, L(9)4
45
Example Dijkstra ??? Node 1 (T1,8)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
T1,8, L(2)3, L(3)inf,L(4)inf, L(5)inf,L(6)
3,L(7)inf, L(8)2, L(9)4
  • Min L(2) ????????? Node 2 ????? T T1,2,8
  • L(n) minL(n), L(2) w(2, n) for all n not in
    T

T1,2,8, L(2)3, L(3)8, L(4)inf, L(5)4,
L(6)3, L(7)inf, L(8)2, L(9)4
46
Example Dijkstra ??? Node 1 (T1,2,8)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
T1,2,8, L(2)3, L(3)8,L(4)inf, L(5)4,
L(6)3, L(7)inf, L(8)2, L(9)4
  • Min L(6) ????????? Node 6 ????? T T1,2,6,8
  • L(n) minL(n), L(6) w(6, n) for all n not in
    T

T1,2,6,8, L(2)3, L(3)8, L(4)inf, L(5)4,
L(6)3, L(7)5, L(8)2, L(9)4
47
Example Dijkstra ??? Node 1 (T1,2,6,8)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
T1,2,6,8, L(2)3, L(3)8,L(4)inf, L(5)4,
L(6)3, L(7)5, L(8)2, L(9)4
  • Min L(5) ???? L(9) ????? ????????? Node 5 ?????
    T T1,2,5,6,8
  • L(n) minL(n), L(5) w(5, n) for all n not in
    T

T1,2,5,6,8, L(2)3, L(3)6, L(4)inf, L(5)4,
L(6)3, L(7)5, L(8)2, L(9)4
48
Example Dijkstra ??? Node 1 (T1,2,5,6,8)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
T1,2,5,6,8, L(2)3, L(3)6, L(4)inf, L(5)4,
L(6)3, L(7)5, L(8)2, L(9)4
  • Min L(9) ????????? Node 9 ????? T
    T1,2,5,6,8,9
  • L(n) minL(n), L(5) w(5, n) for all n not in
    T

T1,2,5,6,8,9, L(2)3, L(3)6, L(4)7, L(5)4,
L(6)3, L(7)5, L(8)2, L(9)4
49
Example Dijkstra ??? Node 1 (T1,2,5,6,8,9)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
T1,2,5,6,8,9, L(2)3, L(3)6, L(4)7, L(5)4,
L(6)3, L(7)5, L(8)2, L(9)4
  • Min L(7) ????????? Node 7 ????? T
    T1,2,5,6,7,8,9
  • L(n) minL(n), L(7) w(7, n) for all n not in
    T

T1,2,5,6,7,8,9, L(2)3, L(3)6,
L(4)7, L(5)4, L(6)3, L(7)5, L(8)2, L(9)4
50
Example Dijkstra ??? Node 1 (T1,2,5,6,7,8,9)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
T1,2,5,6,7,8,9, L(2)3, L(3)6, L(4)7,
L(5)4, L(6)3, L(7)5, L(8)2, L(9)4
  • Min L(3) ????????? Node 3 ????? T
    T1,2,3,5,6,7,8,9
  • L(n) minL(n), L(3) w(3, n) for all n not in
    T

T1,2,3,5,6,7,8,9, L(2)3, L(3)6,
L(4)7, L(5)4, L(6)3, L(7)5, L(8)2, L(9)4
51
Example Dijkstra ??? Node 1 (T1,2,3,5,6,7,8,9)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
5
1
R2
R4
2
2
4
5
R5
1
2
2
3
4
4
3
4
1
3
3
3
R6
R1
6
2
R7
5
4
5
R9
1
1
2
3
R8
2
5
3
T1,2,3,5,6,7,8,9, L(2)3, L(3)6, L(4)7,
L(5)4, L(6)3, L(7)5, L(8)2, L(9)4
  • Min L(4) ????????? Node 4 ????? T
    T1,2,3,4,5,6,7,8,9
  • L(n) minL(n), L(4) w(4, n) for all n not in
    T

T1,2,3,4,5,6,7,8,9, L(2)3, L(3)6,
L(4)7, L(5)4, L(6)3, L(7)5, L(8)2, L(9)4
52
Example Dijkstra ??? Node 1 (T1,2,3,4,5,6,7,8,9
)
R3
1 2 3 4 5 6 7 8 9
1 - 3 8 8 8 6 8 2 8
2 2 - 5 8 1 8 8 8 8
3 8 4 - 1 5 8 8 8 8
4 8 8 2 - 8 8 3 8 3
5 8 2 2 8 - 4 1 8 8
6 4 8 8 8 3 - 2 1 8
7 8 8 8 4 4 5 - 8 5
8 5 8 8 8 8 1 8 - 2
9 8 8 8 3 8 8 3 3 -
R2
R4
2
R5
1
3
3
R6
R1
2
R7
R9
1
2
R8
2
T1,2,3,4,5,6,7,8,9, L(2)3, L(3)6,
L(4)7, L(5)4, L(6)3, L(7)5, L(8)2, L(9)4
Algorithm Terminates
Dijkstra ????????????????????? Topology ???
Network
53
HW 6
  • Download ?????????????????

54
End of Week 12
  • Week 13 IP Routing II BGP/RIP/OSPF and Multicast
    Protocols
  • Chapter 2727.9-27.16 Extra Notes
  • BGP
  • RIP
  • OSPF
  • Subnet and VLAN
  • Switch Layer 3
About PowerShow.com