Week 8
Week 8
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-1
Network-layer functions
▪ forwarding: move packets from router’s
input to appropriate router output
data plane
▪ routing: determine route taken by
packets from source to destination
control plane
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-2
Per-router control plane
Individual routing algorithm components in each and every router interact in the control plane
(routing processor maintains routing tables and computes the forwarding table for that router,
each router has a routing component that communicates with the routing components in
other routers to compute the values for its forwarding table)
Routing
Algorithm control
plane
data
plane
values in arriving
packet header
0111 1
2
3
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-3
Software-Defined Networking (SDN) control plane
Remote controller computes, installs forwarding tables in routers (routing processor communicates
with the remote controller via the control agent, receive forwarding table entries computed by the
remote controller, and install these entries in the router’s input ports)
Remote Controller
control
plane
data
plane
C
A
CA CA CA CA
values in arriving
packet header
0111 1
2
3
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-4
Network layer: “control plane” roadmap
▪ introduction ▪ network management,
▪ routing protocols configuration
• SNMP
▪ link state
• NETCONF/YANG
▪ distance vector
▪ intra-ISP routing: OSPF
▪ routing among ISPs: BGP
▪ SDN control plane
▪ Internet Control Message
Protocol
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-5
Routing protocols
mobile network
national or global ISP
Routing protocol goal: determine
“good” paths (equivalently, routes), application
from sending hosts to receiving host, transport
network
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-6
Graph abstraction: link costs
5
ca,b: cost of direct link connecting a and b
v 3 w e.g., cw,z = 5, cu,z = ∞
2 5
u 2 1 z
3 may reflect the physical length of the
1 2
x y corresponding link, the link speed, or
1
the monetary cost associated with a
link
graph: G = (N,E): A graph is used to formulate routing problems
N: set of routers = { u, v, w, x, y, z }
E: set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-7
Routing algorithm classification (2 classifications)
global (centralized) : all routers have complete topology, link cost info (complete,
global knowledge about the network is used
• “link state” algorithms
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-9
Dijkstra’s link-state routing algorithm
1 Initialization:
2 N' = {u} /* compute least cost path from u to all other nodes */
3 for all nodes v
4 if v adjacent to u /* u initially knows direct-path-cost only to direct neighbors */
5 then D(v) = cu,v /* but may not be minimum cost! */
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) + cw,v )
13 /* new least-path-cost to v is either old least-cost-path to v or known
14 least-cost-path to w plus direct-cost from w to v */
15 until all nodes in N'
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-10
Dijkstra’s algorithm: an example
v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,y
3 uxyv 3,y 4,y
4 uxyvw 4,y
5 uxyvwz
Initialization (step 0): For all a: if a adjacent to then D(a) = cu,a
5
3
find a not in N' such that D(a) is a minimum
v w 5 add a to N'
2
u 2 1 z update D(b) for all b adjacent to a and not in N' :
3 D(b) = min ( D(b), D(a) + ca,b )
1 2
x 1
y
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-11
Dijkstra’s algorithm: an example
5
v 3 w
2 5
u 2 1 z
3
1 2
x 1
y
5 uwxvyz v
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-13
Network layer: “control plane” roadmap
▪ introduction ▪ network management,
configuration
▪ routing protocols • SNMP
▪ link state • NETCONF/YANG
▪ distance vector
▪ intra-ISP routing: OSPF
▪ routing among ISPs: BGP
▪ SDN control plane
▪ Internet Control Message
Protocol
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-14
Distance vector algorithm
Based on Bellman-Ford (BF) equation:
Bellman-Ford equation
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-17
Distance vector algorithm
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-18
Distance vector: example (initial state)
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-19
Distance vector: example (D sends vector to E)
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-20
Distance vector: example (B sends vector to A)
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-21
Distance vector: example (E sends vector to A)
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-22
Distance vector: example (until convergence)
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-23
Distance vector: example (B’s distance vectors)
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-24
Network layer: “control plane” roadmap
▪ introduction ▪ network management,
▪ routing protocols configuration
▪ intra-ISP routing: OSPF • SNMP
• NETCONF/YANG
▪ routing among ISPs: BGP
▪ SDN control plane
▪ Internet Control Message
Protocol
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-25
Internet approach to scalable routing
* organizing routers into autonomous systems (ASs)
* AS: consisting of a group of routers that are under the same
administrative control
* the routers in an ISP, and the links that interconnect them,
constitute a single AS
* routers within the same AS all run the same routing algorithm
(intra-autonomous system routing protocol)
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-26
Internet approach to scalable routing
most common intra-AS routing protocols:
▪ RIP: Routing Information Protocol [RFC 1723]
• classic DV: DVs exchanged every 30 secs
• no longer widely used
▪ EIGRP: Enhanced Interior Gateway Routing Protocol
• DV based
• formerly Cisco-proprietary for decades (became open in 2013 [RFC 7868])
▪ OSPF: Open Shortest Path First [RFC 2328]
• link-state routing
• ISO standard, not RFC standard
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-27
OSPF (Open Shortest Path First) routing
▪ “open”: publicly available
▪ classic link-state
• each router floods OSPF link-state advertisements to all other routers
in entire AS
• multiple link costs metrics possible: bandwidth, delay
• each router has full topology, uses Dijkstra’s algorithm to compute
forwarding table
▪ security: all OSPF messages authenticated (to prevent malicious
intrusion)
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-28
Hierarchical OSPF
▪ an OSPF autonomous system can be configured hierarchically into areas
▪ two-level hierarchy: local area, backbone.
• link-state advertisements flooded only in area, or backbone
• each node has detailed area topology; only knows direction to reach
other destinations
area border routers: boundary router:
“summarize” distances to connects to other ASes
backbone
destinations in own area, backbone router:
advertise in backbone runs OSPF limited
to backbone
local routers:
• flood LS in area only area 3
• compute routing within
area
internal
• forward packets to outside routers
area 1
via area border router
area 2 Network Layer: 5-29
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020
Network layer: “control plane” roadmap
▪ introduction ▪ network management,
▪ routing protocols configuration
▪ intra-ISP routing: OSPF • SNMP
• NETCONF/YANG
▪ routing among ISPs: BGP
▪ SDN control plane
▪ Internet Control Message
Protocol
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-30
Internet inter-AS routing: BGP
▪ BGP (Border Gateway Protocol): the de facto inter-domain routing
protocol
• “glue that holds the Internet together”
▪ allows subnet to advertise its existence, and the destinations it can
reach, to rest of Internet: “I am here, here is who I can reach, and how”
▪ BGP provides each AS a means to:
• eBGP: obtain subnet reachability information from neighboring ASes
• iBGP: propagate reachability information to all AS-internal routers.
• determine “good” routes to other networks based on reachability information
and policy
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-31
eBGP, iBGP connections
2b
2a ∂
2c
1b 3b
2d
1a 1c ∂
3a 3c
AS 2
1d 3d
AS 1 eBGP connectivity AS 3
logical iBGP connectivity
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-32
BGP basics
▪ BGP session: two BGP routers (“peers”) exchange BGP messages over
TCP connection:
• advertising paths to different destination network prefixes (BGP is a “path
vector” protocol)
▪ when AS3 gateway 3a advertises path AS3,X to AS2 gateway 2c:
• AS3 promises to AS2 it will forward datagrams towards X
▪ when AS2 gateway 2a advertises path AS3,AS2,X to AS1 gateway 1c:
• It means that AS1 can arrive at X by first passing through AS2 and then going to AS3
AS 3 3
b
AS 1 1 3 3
b a c
1 1 AS 2 3
2 X
a c d
b
1 BGP advertisement:
2 2
d AS3, X
a c
2
d Network Layer: 5-33
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020
Path attributes and BGP routes
▪ policy-based routing:
• gateway receiving route advertisement uses import policy to
accept/decline path
• AS policy also determines whether to advertise path to other
neighboring ASes
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-34
BGP path advertisement
AS 3 3
b
AS 1 1 3
3
b c
a
1 1 AS 2 3 X
2
a c d
b AS3, X
1
AS2,AS3,X 2 2
d
a c
2
d
▪ AS2 router 2c receives path advertisement AS3,X (via eBGP) from AS3 router 3a
▪ based on AS2 policy, AS2 router 2c accepts path AS3,X, propagates (via iBGP) to all
AS2 routers
▪ based on AS2 policy, AS2 router 2a advertises (via eBGP) path AS2, AS3, X to
AS1 router 1c
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-35
BGP path advertisement (more)
AS 3 3
b
AS 1 1 AS3,X 3
AS3,X 3
b c
AS3,X a
1 1 AS 2 3 X
2
a AS3,Xc d
b AS3, X
1
AS2,AS3,X 2 2
d
a c
2
d
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-37
Network layer: “control plane” roadmap
▪ introduction ▪ network management,
▪ routing protocols configuration
▪ intra-ISP routing: OSPF • SNMP
• NETCONF/YANG
▪ routing among ISPs: BGP
▪ SDN control plane
▪ Internet Control Message
Protocol
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-38
Per-router control plane
Individual routing algorithm components in each and every router
interact in the control plane to computer forwarding tables
Routing
Algorithm control
plane
data
plane
values in arriving
packet header
0111 1
2
3
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 4-39
Software-Defined Networking (SDN) control plane
Remote controller computes, installs forwarding tables in routers
Remote Controller
control
plane
data
plane
CA
CA CA CA CA
values in arriving
packet header
0111 1
2
3
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 4-40
Software defined networking (SDN)
Why a logically centralized control plane?
▪ easier network management: avoid router misconfigurations,
greater flexibility of traffic flows
▪ table-based forwarding allows “programming” routers
• centralized “programming” easier: compute tables centrally and distribute
• 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
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-41
Traffic engineering: difficult with traditional
routing
5
3
2 v w 5
u 2 1
3 z
1
2
x 1 y
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-42
Traffic engineering: difficult with traditional
routing
5
3
2 v w 5
u 2 1
3 z
1
2
x 1 y
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-43
Traffic engineering: difficult with traditional
routing
5
3
2 v w 5
u 2 1
3 z
1
2
x 1 y
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-44
Software defined networking (SDN)
4. programmable routing
access
control
… load
balance
3. control plane functions
external to data-plane
control switches
applications
Remote Controller
control
plane
data
plane
CA 2. control, data
CA CA CA CA
plane separation
1: generalized “flow-based”
forwarding (e.g., OpenFlow)
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-45
Software defined networking (SDN)
network-control applications
Data-plane switches: …
routing
▪ fast, simple, commodity switches access load
implementing generalized data-plane control balance
forwarding in hardware control
plane
northbound API
▪ flow (forwarding) table computed,
installed under controller supervision SDN Controller
(network operating system)
▪ API for table-based switch control
(e.g., OpenFlow) southbound API
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-46
Software defined networking (SDN)
network-control applications
SDN controller (network OS): …
routing
▪ maintain network state load
access
information control balance
tolerance, robustness
SDN-controlled switches
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-47
Software defined networking (SDN)
network-control applications
SDN-controlled switches
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-48
Network layer: “control plane” roadmap
▪ introduction ▪ network management,
▪ routing protocols configuration
▪ intra-ISP routing: OSPF • SNMP
• NETCONF/YANG
▪ routing among ISPs: BGP
▪ SDN control plane
▪ Internet Control Message
Protocol
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-49
ICMP: internet control message protocol
▪ used by hosts and routers to
Type Code description
communicate network-level 0 0 echo reply (ping)
information 3 0 dest. network unreachable
3 1 dest host unreachable
• error reporting: unreachable host, 3 2 dest protocol unreachable
network, port, protocol 3 3 dest port unreachable
• echo request/reply (used by ping) 3 6 dest network unknown
3 7 dest host unknown
▪ lies “above” IP: 4 0 source quench (congestion
control - not used)
• ICMP messages carried in IP
8 0 echo request (ping)
datagrams (as IP payloads) 9 0 route advertisement
▪ ICMP message: type, code plus 10
11
0
0
router discovery
TTL expired
first 8 bytes of IP datagram causing 12 0 bad IP header
error
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 4-50
Traceroute and ICMP
3 probes 3 probes
3 probes
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 4-51
Network layer: “control plane” roadmap
▪ introduction ▪ network management,
▪ routing protocols configuration
▪ intra-ISP routing: OSPF • SNMP
▪ routing among ISPs: BGP • NETCONF/YANG
▪ SDN control plane
▪ Internet Control Message
Protocol
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-52
What is network management?
"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."
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-53
Components of network management
Managed device:
Managing server: agent data equipment with manageable,
application, typically managing configurable hardware,
with network server/controller software components
managers (humans) in data managed device
the loop Data: device “state”
agent data configuration data,
Network agent data
operational data,
management managed device device statistics
protocol: used by managed device
managing server to query,
agent data
configure, manage device;
used by devices to inform agent data
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-54
Network operator approaches to management
agent data
agent data
managed device
managed device
agent data
agent data
managed device
managed device
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-55
Network operator approaches to management
SNMP/MIB
• Simple Network Management Protocol
(SNMP): an application–layer protocol, a agent data
network operator can query/set the data managing
contained in a device’s Management server/controller
Information Base (MIB) objects managed device
data
• Management Information Base (MIB): a
hierarchical virtual database of network
objects, describes a device being agent data
monitored by a network management
system agent data
• MIB examples: on a printer; the different managed device
cartridge states and the number of managed device
printed files, on a switch; incoming and
outgoing traffic, rate of package loss, agent data
number of packets addressed to a agent data
broadcast address …
managed device
managed device
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-56
SNMP: Management Information Base (MIB)
• SNMP tools (NMS and agents) like
SolarWinds, Paessler (PRTG)
• SNMP uses UDP in TL, IP in NL
• SNMP commands help retrieve,
manage, modify, and parse the data
• SNMP manager initiates the
commands
• SNMP agents initiate the TRAPS
command. (TRAPS is a signal sent to
the manager by the agent when
events ocur)
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-57
Network operator approaches to management
NETCONF/YANG
• NETCONF is the standard for installing,
manipulating and deleting configuration agent data
of network devices managing
server/controller
• YANG is used to model both configuration data managed device
and state data of network elements,
modelling language representing data
structures in an XML tree format, can be agent data
converted into any encoding format, e.g.
XML or JSON agent data
managed device
managed device
agent data
agent data
managed device
managed device
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-58
NETCONF overview
▪ goal: actively manage/configure devices network-wide
▪ operates between managing server and managed network devices
• actions: retrieve, set, modify, activate configurations
• query operational data and statistics
• subscribe to notifications from devices
▪ uses a simple remote procedure call (RPC) mechanism (to implement
communication between a client and a server)
• NETCONF protocol messages encoded in XML
• exchanged over secure, reliable transport (e.g., TLS) protocol
▪ standard application programming interfaces (APIs) are available on
network devices for the NMS to manage the devices using NETCONF
▪ runs primarily over Secure Shell (SSH) transport
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-59
Sample NETCONF RPC message
note message id
change a configuration
The slides are based on the slides by Computer Networking: A Top-Down Approach 8th edition, Jim Kurose, Keith Ross, Pearson, 2020 Network Layer: 5-60