Tải bản đầy đủ (.pdf) (11 trang)

Advanced Computer Networks: Lecture 20 - Dr. Amir Qayyum

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (333.5 KB, 11 trang )

CS716
Advanced Computer Networks
By Dr. Amir Qayyum
1


Lecture No. 20


Virtual Private Networks ­ VPN
C

Physical links

A

B
Corporation X private network

K

L

M
Corporation Y private network
(a)

K

C


L
Physical links

A

M

B
Virtual circuits

(b)

3


IP Tunneling
Data

IP
Data

IP 
IP 
Multicast
Multicast
VU

IP

IP


IP 
IP 
Multicast
Multicast

IPv4
Da
ta
IP

UET

IP

IP 
IP 
Multicast
Multicast
MAJU
4


IP Tunnel in VPNs
• Virtual point­to­point link between a pair of nodes 
separated by many networks
Network 1

R1


Internetwork

R2

Network 2

10.0.0.1
IP header,
Destination = 2.x

IP header,
Destination = 10.0.0.1

IP header,
Destination = 2.x

IP payload

IP header,
Destination = 2.x

IP payload

IP payload
5


Routing
Pir Wadhai


Islamabad

Rawal 
Dam

Rawalpindi
Faizabad
Airport

• A stranger appears and asks “Airport ?”
• Which way do you point ?
6


Routing Overview
A
1

3
4
C

6

1

B
9

E


2

F

1
D

7


Bellman­Ford Algorithm
• For every node N
– For each directed pair (B,C)
• Is the path B  N  …C better than B .C ?
• Is cost BNdest smaller than previously known?

• For N nodes
– Uses an NxN matrix of (distance, successor) values

8


Bellman­Ford Algorithm
A

Source

Infinity
Infinity

Infinity
8
8

6
C
C

Infinity
Infinity
3
3
3

1

B
B
B

1

C

Infinity
Infinity
7
7
6


2

2
E
E
E

Infinity
5
5
4
4

Infinity
1
1
1
1

B
Dest
Dest
Dest
Dest

1
Destination

E
Dest

Dest
A
A

5

• After n iterations, nodes at distance n hops along the shortest 
path have correct information
9


Dijkstra’s Algorithm
• From node N
– Start with S = {N} and one­hop paths from N
– Loop n­1 times
• Add closest outside node M to S
• For each node P not in S
– Is the path N ..... M ..... P better than N ..... P ?

10


Dijkstra’s Algorithm
3

1
2

3


2

4

2

9

7

7
1

3

2

2

6

4
1

6

10

8
1


2

3

4

5

6

7

8

9

3

10 11 12 13 14 15
11



×