Está en la página 1de 36

Chất lương dịch vụ mạng

Giảng viên: Lưu Thanh Trà


Email: luu@hcmut.edu.vn
Nội dung môn học
• Internet ngày nay
• Các thành phần của network QoS
• Xử lý gói tại các thiết bị trung gian
• Cấu trúc Edge-Edge
• Thiết lập QoS cho cấu trúc Edge-edge
• Lớp liên kết dữ liệu
• Kỹ thuật QoS Low-speed/high speed
Internet ngày nay
• “Simple network, smart edge”
• Kết nối và định tuyến
QoS
• Khái niệm QoS
• Tại sao cần QoS ?
• Vấn đề của QoS hiện tại
– Không có khả năng thông báo nghẽn
– Không có khả năng phân loại dịch vụ
– Không có khả năng thực hiện QoS E2E động
– Giới hạn trong việc tính cước
Simple network, smart edge
• Post services
• Best effort service (BE)
– Dựa trên địa chỉ IP (IPv4/IPv6)
• Transport services
– End host thực hiện việc quản lý gởi dữ liệu
dựa trên dịch vụ truyền được cung cấp
– TCP, UDP, SCTP, DCCP
• Stateless
• Fairness
• Unicast, multicast, anycast
• Multi-home
Kết nối & Định tuyến
• Phân chia & Kết hợp
– Class –base
– Classless Interdomain
– Subnetting
Kết nối & Định tuyến
• What is Routing?
– A famous quotation from RFC 791
“A name indicates what we seek.
An address indicates where it is.
A route indicates how we get there.”
-- Jon Postel
Forwarding vs. Routing
• Forwarding: data plane
– Directing a data packet to an outgoing link
– Individual router using a forwarding table
• Routing: control plane
– Computing paths the packets will follow
– Routers talking amongst themselves
– Individual router creating a forwarding
table
Why Does Routing Matter?
• End-to-end performance
– Quality of the path affects user performance
– Propagation delay, throughput, and packet loss
• Use of network resources
– Balance of the traffic over the routers and links
– Avoiding congestion by directing traffic to lightly-
loaded links
• Transient disruptions during changes
– Failures, maintenance, and load balancing
– Limiting packet loss and delay during changes
Shortest-Path Routing
• Path-selection model
– Destination-based
– Load-insensitive (e.g., static link weights)
– Minimum hop count or sum of link weights

2
3 1
1
4
2 1
5
4 3
Shortest-Path Problem
• Given: network topology with link costs
– c(x,y): link cost from node x to node y
– Infinity if x and y are not direct neighbors
• Compute: least-cost paths to all nodes
– From a given source u to all other nodes
– p(v): predecessor node along path from source to v

2
3 1
1
u 4
2 1
5
p(v)
4 3
v
Shortest-Path Problem
• Given: network topology with link costs
– c(x,y): link cost from node x to node y
– Infinity if x and y are not direct neighbors
• Compute: least-cost paths to all nodes
– From a given source u to all other nodes
– p(v): predecessor node along path from source to v

2
3 1
1
u 4
2 1
5
p(v)
4 3
v
Dijkstra’s Shortest-Path
Algorithm
• Iterative algorithm
– After k iterations, know least-cost path to k nodes
• S: nodes whose least-cost path definitively known
– Initially, S = {u} where u is the source node
– Add one node to S in each iteration
• D(v): current cost of path from source to node v
– Initially, D(v) = c(u,v) for all nodes v adjacent to u
– … and D(v) = ∞ for all other nodes v
– Continually update D(v) as shorter paths are learned
Dijsktra’s Algorithm
1 Initialization:
2 S = {u}
3 for all nodes v
4 if v adjacent to u {
5 D(v) = c(u,v)
6 else D(v) = ∞
7
8 Loop
9 find w not in S with the smallest D(w)
10 add w to S
11 update D(v) for all v adjacent to w and not in S:
12 D(v) = min{D(v), D(w) + c(w,v)}
13 until all nodes in S
Dijkstra’s Algorithm Example
2 2
3 1 3 1
1 1
4 4
2 1 2 1
5 5
4 3 4 3

2 2
3 1 3 1
1 1
4 4
2 1 2 1
5 5
4 3 4 3
Dijkstra’s Algorithm Example
2 2
3 1 3 1
1 1
4 4
2 1 2 1
5 5
4 3 4 3

2 2
3 1 3 1
1 1
4 4
2 1 2 1
5 5
4 3 4 3
Shortest-Path Tree
• Shortest-path tree • Forwarding table
from uv 2 y
at u link
3 1
1
u
x 4 z
v (u,v)
2 1 w (u,w)
5 t
x (u,w)
w4 3
s y (u,v)
z (u,v)
s (u,w)
t (u,w)
Link-State Routing
• Each router keeps track of its incident links
– Whether the link is up or down
– The cost on the link
• Each router broadcasts the link state
– To give every router a complete view of the graph
• Each router runs Dijkstra’s algorithm
– To compute the shortest paths
– … and construct the forwarding table
• Example protocols
– Open Shortest Path First (OSPF)
– Intermediate System – Intermediate System (IS-IS)
Detecting Topology Changes
• Beaconing
– Periodic “hello” messages in both directions
– Detect a failure after a few missed “hellos”
“hello”

• Performance trade-offs
– Detection speed
– Overhead on link bandwidth and CPU
– Likelihood of false detection
Broadcasting the Link State
• Flooding
– Node sends link-state information out its links
– And then the next node sends out all of its links
– … except the one where the information arrived
X A X A

C B D C B D
(a) (b)

X A X A

C B D C B D
(c) (d)
Broadcasting the Link State

• Reliable flooding
– Ensure all nodes receive link-state information
– … and that they use the latest version
• Challenges
– Packet loss
– Out-of-order arrival
• Solutions
– Acknowledgments and retransmissions
– Sequence numbers
– Time-to-live for each packet
Bellman-Ford Algorithm
• Define distances at each node x
– dx(y) = cost of least-cost path from x to y
• Update distances based on neighbors
– dx(y) = min {c(x,v) + dv(y)} over all neighbors
v v 2 y
3 1
1
u
x 4 z
2 1
5 t du(z) = min{c(u,v) + dv(z),
w4 3
s c(u,w) + dw(z)}
Distance Vector Algorithm
• c(x,v) = cost for direct link from x to v
– Node x maintains costs of direct links c(x,v)
• Dx(y) = estimate of least cost from x to y
– Node x maintains distance vector Dx = [Dx(y): y є N ]
• Node x maintains its neighbors’ distance vectors
– For each neighbor v, x maintains Dv = [Dv(y): y є N ]
• Each node v periodically sends Dv to its neighbors
– And neighbors update their own distance vectors
– Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N
• Over time, the distance vector Dx converges
Distance Vector Algorithm
Each node:
Iterative, asynchronous:
each local iteration caused by: wait for (change in local link cost or
• Local link cost change message from neighbor)
• Distance vector update
message from neighbor recompute estimates
Distributed:
• Each node notifies neighbors
if DV to any destination has
only when its DV changes
changed, notify neighbors
• Neighbors then notify their
neighbors if necessary
Distance Vector Example: Step
0
Optimum 1-hop paths
Table for A Table for B
E 3 C
Dst Cst Ho Dst Cst Ho 1
p p 1
2 F
A 0 A A 4 A
6
B 4 B B 0 B 1
C  – C  – 3 D
A 4
D  – D 3 D B
E 2 E E  –
Table for C Table for D Table for E Table for F
F 6 F F 1 F
Ds Cs Hop Dst Cst Ho Dst Cst Ho Dst Cst Ho
t t p p p
A  – A  – A 2 A A 6 A
B  – B 3 B B  – B 1 B
C 0 C C 1 C C  – C 1 C
D 1 D D 0 D D  – D  –
E  – E  – E 0 E E 3 E
Distance Vector Example: Step
2
Optimum 2-hop paths
Table for A Table for B
E 3 C
Dst Cst Ho Dst Cst Ho 1
p p 1
2 F
A 0 A A 4 A
6
B 4 B B 0 B 1
C 7 F C 2 F 3 D
A 4
D 7 B D 3 D B
E 2 E E 4 F
Table for C Table for D Table for E Table for F
F 5 E F 1 F
Dst Cst Ho Dst Cst Ho Dst Cst Ho Dst Cst Ho
p p p p
A 7 F A 7 B A 2 A A 5 B
B 2 F B 3 B B 4 F B 1 B
C 0 C C 1 C C 4 F C 1 C
D 1 D D 0 D D  – D 2 C
E 4 F E  – E 0 E E 3 E
Distance Vector Example: Step
3
Optimum 3-hop paths
Table for A Table for B
E 3 C
Dst Cst Ho Dst Cst Ho 1
p p 1
2 F
A 0 A A 4 A
6
B 4 B B 0 B 1
C 6 E C 2 F 3 D
A 4
D 7 B D 3 D B
E 2 E E 4 F
Table for C Table for D Table for E Table for F
F 5 E F 1 F
Dst Cst Ho Dst Cst Ho Dst Cst Ho Dst Cst Ho
p p p p
A 6 F A 7 B A 2 A A 5 B
B 2 F B 3 B B 4 F B 1 B
C 0 C C 1 C C 4 F C 1 C
D 1 D D 0 D D 5 F D 2 C
E 4 F E 5 C E 0 E E 3 E
Distance Vector: Link Cost Changes
Link cost changes: 1
Y
4 1
• Node detects local link cost change
X Z
• Updates the distance table 50

• If cost change in least cost path, notify


neighbors
algorithm
terminates
“good
news
travels
fast”
Routing protocols
• The early Arpanet was completelly flat - single
“network” model
– one routing protocol, all routers had all the routing info
– with the growth it become hard to maintaine and
computationally intensive
• Solution: split the Internet into a set of
Autonomous Systems (AS)
– Each Autonomous System is a set of routers and
networks under the same administration
Routing protocols
• Special routers, called “Exterior gateways”
used to connect ASes
• Two classes of routing protocols:
– Interior routing protocols (IGP - Interior
Gateway protocols)
– Exterior routing protocols (EGP - Exterior
Gateway protocols)
Interior Routing Protocols
(IGPs)
• Used inside an Autonomous System
• Designed to handle more redundant links
– Links are cheaper in a local environment =>
one can afford more redundant links
• Designed with a higher bandwidth in mind
– Cheaper bandwidth => one can use more
bandwidth for the exchange of routing
information
Interior Routing Protocols (cont.)
• They generally contain less information than
EGPs
– IGPs in general (with exeptions) do not have to know
about any other network outside the AS
• No policy support
– Inside AS, one generally does not want to aplly policy
– everyone can use every available link
– policies are generally only set on what links should be
preffered
Interior Routing Protocols
(cont.)
• Fairly extensive metric support
– Redudancy => one has to distinguish
between redundant links
– metrics or “costs” help in the decision
proccess
• Designed for fast convergence
– Because of the redudancy, IGPs are designed
to make quick changes if the network
topology changes
Exterior Routing Protocols (EGPs)
• Used to exchange routing information between
ASes
• Designed with lower bandwidth in mind
– long distance links are more expensive => routing
protocol should use less bandwidth for the exchange
of routing information
• They generally contain a lot of information
– EGPs have to know about all external networks
– In the Internet that might be 40.000 networks
Exterior Routing Protocols (cont.)
• They assume a less reliable network
– most of them are connection oriented for reliable
delivery
• They are designed to provide policy control
– generally you set routing policy at the border of your
routing domain
• They do not run in every single router
– Only at the border of your AS you have to run an EGP
– Internal routers can be less powerfull

También podría gustarte