Module 5 The Network Layer - Control Plane

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

Computer Networking: A Top Down Approach 6th Edition

Jim Kurose, Keith Ross


Addison-Wesley
March 2012

The Network Layer


– Control Plane

All material copyright 1996-2012


J.F Kurose and K.W. Ross, All Rights Reserved
The Network Layer – Control Plane

chapter goals: understand principles behind


network control plane
❖ traditional routing algorithms
❖ SDN controllers
❖ network management

and their instantiation, implementation in the


Internet:
❖ OSPF, BGP, OpenFlow, ODL and ONOS
controllers, SNMP

4-2
Outline

5.1 Introduction 5.5 Generalized Forward & SDN


5.2 routing protocols • match
• action
❖ link state
• OpenFlow examples of
❖ distance vector
match-plus-action in action
5.3 intra-AS routing in the
Internet 5.7 Network management and
SNMP
5.4 routing among the ISPs:
BGP

Network Layer: Control Plane 5-3


(5.1) Introduction

Network Layer 4-4


Network-layer functions
Recall: two network-layer functions:
❖ forwarding: move packets
from router’s input to data plane
appropriate router output
▪ routing: determine route
taken by packets from source control plane
to destination

Two approaches to structuring network control


plane:
▪ per-router control (traditional)
▪ logically centralized control (software defined networking)

Network Layer: Control Plane 5-5


Per-router control plane
Individual routing algorithm components in each and every
router interact with each other in control plane to compute
forwarding tables

Routing
Algorith control
m plane
data
plan
e

Network Layer: Control Plane 5-6


Logically centralized control plane
A distinct (typically remote) controller interacts with local
control agents (CAs) in routers to compute forwarding tables

Remote Controller

control
plane

data
plan
e
C
A
CA CA CA CA

Network Layer: Control Plane 5-7


Outline

5.1 Introduction 5.5 Generalized Forward & SDN


5.2 routing protocols • match
• action
❖ link state
• OpenFlow examples of
❖ distance vector
match-plus-action in action
5.3 intra-AS routing in the
Internet 5.7 Network management and
SNMP
5.4 routing among the ISPs:
BGP

Network Layer: Control Plane 5-8


Routing algorithms classification

Classification

Global Decentralized
Routing Algorithm Routing Algorithm

❖ All routers have complete ❖ router knows


topology, link cost physically-connected neighbors,
information. link costs to neighbors.
❖ iterative process of computation,
exchange of info with neighbors.
Link-State (LS) Distance-Vector (DV)
4-9
The Link-State (LS)
Dijkstra’s Algorithm

❖ Network topology, link costs known to all nodes


▪ accomplished via “link state broadcast”
▪ all nodes have same information

❖ Computes least cost paths from one node (‘source”


as u) to all other nodes

❖ Iterative: after k iterations, know least cost path to k


destination nodes

4-10
The Link-State (LS)
Dijkstra’s Algorithm

notation:
❖ c(x,y) : link cost from node x to y; = ∞ if not direct
neighbors
❖ D(v) : current value of cost of path from source to dest. v
❖ p(v) : predecessor node along path from source to v
❖ N’ : set of nodes whose least cost path definitively known

Network Layer: Control Plane 5-11


Dijsktra’s algorithm Dijkstra’s Algorithm

1 Initialization:
2 N' = {u}
3 for all nodes v
4 if v adjacent to u
5 then D(v) = c(u,v)
6 else D(v) = ∞
7
8 Loop
9 find w not in N' such that D(w) is a minimum
10 add w to N'
11 update D(v) for all v adjacent to w and not in N' :
12 D(v) = min( D(v), D(w) + c(w,v) )
13 /* new cost to v is either old cost to v or known
14 shortest path cost to w plus cost from w to v */
15 until all nodes in N'

Network Layer: Control Plane 5-12


The Link-State (LS)
Dijkstra’s Algorithm
Example:
Routers in nodes u, v, w, x, y and
z have been assigned with link
cost value as stated in the
diagram.

(a) Construct table of least cost


paths from node u to node z
(b) Computes least cost paths
from node u to node z
(c) Produce forwarding table
for node u

4-13
The Link-State (LS)
Dijkstra’s Algorithm
Solution:
(a) Construct table of least cost
paths from node u to node z
v w

u z

x y

1, u
2,u 2, x
2, u
3, y
4, y
The Link-State (LS)
Dijkstra’s Algorithm
(b) Computes least cost paths from
node u to node z

v w

u z

x y

1, u
2, x
2, u
3, y
4, y
The Link-State (LS)
Dijkstra’s Algorithm

(c) Produce forwarding table for v w


2
node u
u 1 z
1 2
x y
Destination Link Least cost 1
(next u)
v (u, v) 2
w (u, x) 3
x (u, x) 1
y (u, x) 2
z (u, x) 4
The Distance Vector (DV)

Key idea:
❖ from time-to-time, each node sends its own distance vector
estimate to neighbors
❖ when x receives new DV estimate from neighbor, it updates
its own DV using B-F equation:

Bellman-Ford equation (dynamic programming)


let 🡪 cost of least-cost path from x to y

then for each node

min taken over all cost to cost from neighbor v


neighbors v of x neighbor v to destination y

4-17
The Distance Vector (DV)

Example: Bellman-Ford
Neighbor to u are x, v, and w;
Clearly,
v w

B-F equation says: u

=> du (z) = 4

4-18
Outline

5.1 Introduction 5.5 Generalized Forward & SDN


5.2 routing protocols • match
• action
❖ link state
• OpenFlow examples of
❖ distance vector
match-plus-action in action
5.3 intra-AS routing in the
Internet 5.7 Network management and
SNMP
5.4 routing among the ISPs:
BGP

Network Layer: Control Plane 5-1


9
Hierarchical Routing

Our routing study thus far - idealization


❖ all routers identical

❖ network “flat”

… not true in practice

Reason 1 Reason 2
Scale: with 600 million destinations: Administrative autonomy
❖ can’t store all destination’s in ❖ internet = network of
routing tables! networks
❖ routing table exchange would ❖ each network admin may
swamp (flood) links! want to control routing in
its own network

4-20
Hierarchical Routing

❖ Aggregate routers into Gateway router:


regions, “Autonomous ❖ at “edge” of its own AS
Systems (AS)” ❖ Has link to router in another
▪ typically under the same AS
administrative control
▪ the same ISP or the same
company network

❖ Routers in same AS run same


routing protocol
▪ “intra-AS” routing protocol
▪ routers in different AS can
run different intra-AS
routing protocol
4-21
Hierarchical Routing

intra-AS routing
gateway algorithm
routers

inter-AS routing Set entries for


algorithm external dests

Set entries for


internal &
external dests

22
Intra-AS Routing

❖ also known as Interior Gateway Protocols (IGP)


❖ Most common intra-AS routing protocols:

Intra-AS
Routing Protocols

RIP OSPF IGRP

RIP: Routing OSPF: Open IGRP: Interior Gateway


Information Protocol Shortest Path Routing Protocol
(Distance Vector) First (Link State) (Distance Vector with
Link State property)
4-23
Inter-AS Routing

❖ BGP (Border Gateway Protocol):


▪ the de facto inter-domain routing protocol
▪ based on “path vector routing”
• (different from Distance Vector (DV) and Link-State (LS))
▪ “glue” that holds the Internet together
Inter-AS Routing

❖ BGP provides each AS a means to determine “good” routes to


other networks based on reachability information and policy

BGP

eBGP iBGP
Obtain subnet Propagate reachability
reachability information information to all
from neighboring ASs. AS-internal routers.
Inter-AS Routing
eBGP => think as ‘external’

iBGP => think as ‘internal’

Figure: eBGP and iBGP sessions

4-26
Chapter 5: outline
5.1 introduction 5.5 Generalized Forward & SDN
5.2 routing protocols • match
• action
❖ link state
• OpenFlow examples of
❖ distance vector
match-plus-action in action
5.3 intra-AS routing in the
Internet 5.7 Network management and
SNMP
5.4 routing among the ISPs:
BGP

Network Layer: Control Plane 5-27


Generalized Forwarding and SDN
Each router contains a flow table that is computed and
distributed by a logically centralized routing controller

logically-centralized routing controller

control plane

data plane
local flow table
headers counters actions

1
0100 1101

3 2
values in arriving
packet’s header
Network Layer: Data Plane 4-28
OpenFlow data plane abstraction
❖ flow: defined by header fields
❖ generalized forwarding: simple packet-handling rules
▪ Pattern: match values in packet header fields
▪ Actions: for matched packet: { drop, forward, modify }
matched packet or send matched packet to controller
▪ Priority: disambiguate overlapping patterns
▪ Counters: #bytes and #packets

Flow table in a router (computed and distributed by


controller) define router’s match+action rules
Network Layer: Data Plane 4-29
OpenFlow data plane abstraction
❖ flow: defined by header fields
❖ generalized forwarding: simple packet-handling rules
▪ Pattern: match values in packet header fields
▪ Actions: for matched packet: { drop, forward, modify }
matched packet or send matched packet to controller
▪ Priority: disambiguate overlapping patterns
▪ Counters: #bytes and #packets

*:
wildcard
1. src=1.2.*.*, dest=3.4.5.* drop
2. src = *.*.*.*, dest=3.4.*.* forward(2)
3. src=10.1.2.3, dest=*.*.*.* send to controller
OpenFlow: Flow Table Entries

Rule Action Stats

Packet + byte counters


1. Forward packet to port(s)
2. Encapsulate and forward to controller
3. Drop packet
4. Send to normal processing pipeline
5. Modify Fields

Eth IP
Switch VLAN MAC MAC IP IP TCP TCP
type Sr
Port ID src dst Dst Prot sport dport
c

Link Network Transport layer


layer layer
Examples
Destination-based
forwarding:
Switch MAC MAC Eth VLAN IP IP IP TCP TCP
Action
Port src dst type ID Src Dst Prot sport dport
* * * * * * 51.6.0.8 * * * port6
IP datagrams destined to IP address 51.6.0.8
Firewall should be forwarded to router output port 6
:
Switch MAC MAC Eth VLAN IP IP IP TCP TCP
Forward
Port src dst type ID Src Dst Prot sport dport
* * * * * * * * * 22 drop
do not forward (block) all datagrams destined to TCP port 22

Switch MAC MAC Eth VLAN IP IP IP TCP TCP


Forward
Port src dst type ID Src Dst Prot sport dport
* * * * 128.119.1.1 drop
do not forward* (block)
* * * *
all datagrams sent by host
128.119.1.1
Examples
Destination-based layer 2 (switch) forwarding:
Switch MAC MAC Eth VLAN IP IP IP TCP TCP
Action
Port src dst type ID Src Dst Prot sport dport
22:A7:23:
* 11:E1:02 * * * * * * * * port6
layer 2 frames from MAC address
22:A7:23:11:E1:02 should be forwarded to output
port 6

Network Layer: Data Plane 4-33


OpenFlow abstraction
▪ match+action: unifies different kinds of devices
▪ Router ▪ Firewall
• match: longest • match: IP addresses
destination IP prefix and TCP/UDP port
• action: forward out numbers
a link • action: permit or
▪ Switch deny
• match: destination ▪ NAT
MAC address • match: IP address
• action: forward or and port
flood • action: rewrite
address and port

Network Layer: Data Plane 4-34


OpenFlow example Example: datagrams from
hosts h5 and h6 should
be sent to h3 or h4, via s1
match action and from there to s2
IP Src = 10.3.*.* Host h6
forward(3)
IP Dst = 10.2.*.* 10.3.0.6
1 s3 controller
2

3 4
Host h5
10.3.0.5

1 s1 1 s2
2 Host h4
4 2 4
Host h1 10.2.0.4
3 3
10.1.0.1
Host h2
10.1.0.2 match action
match action Host h3
ingress port = 2
10.2.0.3 forward(3)
ingress port = 1 IP Dst = 10.2.0.3
IP Src = 10.3.*.* forward(4) ingress port = 2
forward(4)
IP Dst = 10.2.*.* IP Dst = 10.2.0.4
Issue with traditional approach
❖ Internet network layer: historically has been
implemented via distributed, per-router approach
▪ monolithic router contains switching hardware, runs
• proprietary implementation of Internet standard
protocols (IP, RIP, IS-IS, OSPF, BGP)
• in proprietary router OS (e.g., Cisco IOS)
▪ different “middleboxes” for different network layer
functions:
• firewalls, load balancers, NAT boxes, ..

❖ ~2005: renewed interest in rethinking network


control plane

Network Layer: Control Plane 5-36


Software-Defined Networking (SDN)

Why a logically centralized control plane?


❖ easier network management:
▪ avoid router misconfigurations, greater flexibility of
traffic flows
❖ table-based forwarding (using OpenFlow API)
allows “programming” routers
▪ centralized “programming” easier: compute tables
centrally and distribute, as opposed to traditional …
▪ distributed “programming”: more difficult: compute
tables as result of distributed algorithm (protocol)
implemented in each and every router
❖ open (non-proprietary) implementation of control
plane
Network Layer: Control Plane 5-37
Software-Defined Networking (SDN)
4. programmable 3. control plane
control routing access
control
… load
balance functions
applications external to
data-plane
Remote Controller switches

control
plane

data
plan
e
C 2. control,
A data plane
CA CA CA CA separation

1: generalized“
flow-based”
forwarding (e.g.,
OpenFlow) Network Layer: Control Plane 5-38
SDN archtecture: Data Plane switches

Data plane switches network-control applications


❖ fast, simple, commodity switches
routing

implementing generalized
access load
data-plane forwarding in control balance
hardware c
❖ switch flow table computed, northbound API o
nt
installed by controller ro
SDN Controller l
❖ API for table-based switch (network operating system) pl
a
control (e.g., OpenFlow) n
▪ defines what is controllable and southbound API e

what is not
d
❖ protocol for communicating a
with controller (e.g., OpenFlow) t
a
SDN-controlled switches p
Network Layer: Control Plane 5-39
l
SDN archtecture: SDN Controller

SDN controller (network network-control applications


OS): routing

▪ maintain network state access load
information control balance

▪ interacts with network c


northbound API o
control applications “above” nt
via northbound API SDN Controller
ro
l
▪ interacts with network (network operating system) pl
a
switches “below” via n
southbound API e
southbound API
▪ implemented as distributed d
system for performance, a
t
scalability, fault-tolerance, a
SDN-controlled switches
robustness
Network Layer: Control Plane 5-40
p
l
SDN archtecture: Control Applications

network-control apps: network-control applications

▪ “brains” of control: routing



• implement control functions access load
using lower-level services, API control balance
provided by SDN controller c

▪ unbundled: northbound API o


nt
• can be provided by 3rd party: SDN Controller
ro
l
distinct from routing vendor, (network operating system) pl
a
or SDN controller n
southbound API e

d
a
t
a
SDN-controlled switches p
Network Layer: Control Plane 5-41
l
Chapter 5: outline
5.1 introduction 5.5 Generalized Forward & SDN
5.2 routing protocols • match
• action
❖ link state
• OpenFlow examples of
❖ distance vector
match-plus-action in action
5.3 intra-AS routing in the
Internet 5.7 Network management and
SNMP
5.4 routing among the ISPs:
BGP

Network Layer: Control Plane 5-42


What is network management?
❖ Computer networks are autonomous systems:
▪ 1,000s of interacting hardware/software components
❖ other complex systems requiring monitoring, control:
▪ jet airplane
▪ nuclear power plant
▪ air traffic control ( at airport )

"Network management includes the deployment, integration


and coordination of the hardware, software, and human
elements to monitor, test, poll, configure, analyze, evaluate,
and control the network and element resources to meet the
real-time, operational performance, and Quality of Service
requirements at a reasonable cost."

Network Layer: Control Plane 5-43


Infrastructure for network management
definitions:
managing entity
agent data
managing
data managed device
managed devices
entity
contain managed
agent data
objects whose data is
network gathered into a
management
managed device Management
protocol agent data

managed device
Information Base
(MIB)
agent data
agent data
managed device
managed device

Network Layer: Control Plane 5-44


SNMP protocol
Two ways to convey MIB info, commands:

managing managing
entity entity

request
trap msg
response

agent data agent data

managed device managed device

request/response mode trap mode


Network Layer: Control Plane 5-45
SNMP protocol: message types
Message type Function
GetRequest
GetNextRequest manager-to-agent: “get me data”
GetBulkRequest (data instance, next data in list, block of data)

InformRequest manager-to-manager: here’s MIB value

SetRequest manager-to-agent: set MIB value

Response Agent-to-manager: value, response to


Request

Trap Agent-to-manager: inform manager


of exceptional event

Network Layer: Control Plane 5-46


SNMP protocol: message formats
Get/Set header Variables to Get/Set
PDU Error
Request Error
type Status Name Value Name Value ….
ID Index
(0-3) (0-5)

PDU Trap
type Enterprise Agent Type
Specific Time
Name Value ….
Addr code stamp
4 (0-7)
Trap header Trap info

SNMP PDU

Network Layer: Control Plane 5-47


Chapter 5: summary
we’ve learned a lot!
❖ approaches to network control plane
▪ per-router control (traditional): link state, distance vector
▪ logically centralized control (software defined networking)
❖ traditional routing algorithms
▪ implementation in Internet: OSPF, BGP
❖ network management

next stop: link layer!


Network Layer: Control Plane 5-48

You might also like