4.2 KiB
| title | aliases | tags | ||
|---|---|---|---|---|
| 20-network-layer-control-plane |
|
per-router control vs SDN
per router
- each router runs a routing algorithm
- router communicate with each other
- and creates a forwarding table
SDN software defined networking
a remote controller computes, and install fowarding tables in routers
routing algorithms
- goal is to determine "good" paths from sending to recieving host through network of routers
- path: sequence of routers
- "good": least "cost", "fastest", "least congested"
graph abstraction
- nodes: set of routers
- edges: set of links
c_{a,b} cost the link directly connecting a and b. if there is no link the cost is ♾
algorithm classification
global: all routers have complete toplogy, link cost into
- link state algotihms
decentralized: interative process of computation, exchange of into with neighbors
- routers only know link costs to attacked neighbors
- "distance vecotr algorithms
static: routes change very slowly over time
dynamic: routes change more quickly
- periodic updates or in response to link cost changes
notations
link state routing
centralized: network topology, link costs are known to all nodes
- each node gathers informatin on each link to its neighbors
- build link state packets and flood to all other nodes
computes least costs paths from one node to all other nodes
- gives a fowarding table for that node
iterative: after k interations, know least cost path to k destinations
Dijkstra's algorithm
foward search algorithm
///initialization
N` = {u}
for all nodes v
if v adjacent to u
then D(v) = Cuv
else D(v) = infinity
//loop
loop until all nodes in N`
find W not in N` such that D(w) is a min
add w to N`
update D(v) for all v adjacent to w and not in N`:
D(v) = min(D(v), D(w)+Cwv)
//new least-path-cost to v is either old least-cost-path to v or known least-path-cost to w plus direct-cost from w to v
algorithm complexity:
- n nodes
- for each of n interation: need to check all nodes, w, not in N
- n(n+1)/2 comparisons: O(n²)
- more efficient implementations possible: O(nlogn)
message complexity
- each router must broadcast its link state information to other n routers
- efficient broadcast algorithms: O(n) link crossings to dissenimate a bradcast message from one source
- each router's message crosses O(n) links: overall message compexity O(n²)
Distance vector routing
bellman-ford equation
backward search algorithm
D_{x}(y) = min_{v} \{c_{x, v} + D_{v}(y)\}
distance vector algorithm
each node:
-
wait for change in local link cost or msg from neighbor
-
recompute DV estimate using DV recieved from neighbor
-
if DV to any destination had changed, notify neighbors
-
iterative, asynchronous
-
distributed, self-stopping
- no notifications recieved, no action taken
"good news (decrease on link cost) travels quickly"
"bad news (increase on link cost) travels slowly" - count-to-infinity problem
- if a link is broken other routers become aware slowly
- routers unaware of broken link can "advertise" incorrect costs and create a routing loop
- loop is broken if a hop count threshold is passed
link state (LS) vs Distance vector (DV)
message complexity
- LS: n routers O(n²) messages sent
- DV: exhange between neighbors; convergence time varies
speed of convergence:
- LS: O(n²) algorithm, O(n²) messages
- DV: varies
- may have routing loops
- count-to-infinity problem
robustness
- LS:
- router can advertise incorrect link cost
- each router computes only its own table
- DV:
- router can advertise incorrect path cost: black holing
- each routers table is used by others: errors propagate through network
routing in internet
- autonomous system (AS): a group of networks and routers controled by a single administrative authority
- Intra-AS routing:
- routing information protocol (RIP): distance vector routing
- open shortest path first (OSPF): link state routing




