Hta5 Routing-2-17
Hta5 Routing-2-17
●
Forwarding: choosing a next hop based on the available information about
network topology
●
Routing: discovering the network topology
– Static: configured manually
– Dynamic: detected autonomously with a routing protocol
●
Databases separated by role:
– FIB: Forwarding Information Base
●
Directly used for choosing the next hop
●
Optimized for lookup speed
– RIB: Routing Information Base
●
Used for topology discovery
●
Can contain information not directly related to forwarding (e.g. discovery method, timeout)
2
What is a Router?
●
In the IP world: any network node that forwards traffic
●
In practice they are usually running routing protocols to build the
RIB and FIB tables
●
Router can be
– Any computer with more than 1 network interface
– Dedicated device
●
Major vendors: Cisco, Juniper, Alcatel-Lucent, Huawei etc.
●
Router capacity: number of interfaces, bit per second, packets
per second
3
Router Examples
●
https://waltonbd.com/
wifi-router/walton-rout
er-wwr001n2
●
https://www.juniper.ne
t/us/en/products/route
rs/ptx-series/ptx1000
0-ptx10004-ptx10008-
and-ptx10016-packet-
transport-routers.html
4
Optimal Path
●
How is it optimal?
– Fewest hops
– Shortest geographical distance
– Lowest latency
– Highest bandwidth
– Lowest cost
– Highest reliability
●
Must avoid loops!
●
Multipath routing: redundancy for reliability
– 1:1 redundancy: have a backup path, switch over when the primary fails
– 1+1 redundancy: send the packet on both paths, losing both instances has smaller chance
– This only protects if the paths are disjoint!
5
Routing Semantics
●
Communication type: unicast, anycast, broadcast, multicast, geocast
●
Operation
– Hop-by-hop: each node does individual forwarding decisions
– Source routing: source specifies a route (network needs to trust the source)
●
Model
– Flat: the entire network is a single domain (only for small networks)
– Hierarchical: network partitioned into domains
●
Intra-domain routing: for nodes inside a domain
●
Inter-domain routing: for nodes that are domain gateways
6
Distance Vector
●
Bellman-Ford algorithm
– Collect which destinations are reachable through which neighbors
– For each known destination we store: next hop, distance
– Exchange this list with neighbors
– Choose the neighbor as next hop with shortest distance to the destination
●
Periodically send updates to the neighbors
●
After the start in each round we learn about farther and farther destinations
– Suffers from slow convergence
●
Examples
– Routing Information Protocol (RIP)
– Interior Gateway Routing Protocol (IGRP)
7
Link State
●
Dijkstra algorithm
– Link state information: who am I and who my neighbors are
– Periodically send this information to all known nodes
– After some rounds all nodes are known
– Once we have all the link state information we do a weighted breadth-first search
●
LS can detect and reconfigure faster than DV after a link failure
●
Examples
– Open Shortest Path First (OSPF)
– Intermediate System to Intermediate System (IS-IS)
8
DV and LS
●
DV: tell my neighbors who I know
– Bellman-Ford algorithm
●
LS: tell everybody I know who my neighbors are
– Dijkstra algorithm
●
In Routing Practical lecture we’ll see how these
algorithms work
9
RIP
●
Routing Information Protocol, RFC 1058 (1988)
– Distance Vector
– Update interval 30 sec
– Hop count limit 15 (not an issue in practice)
– Routing metric: hop count
●
RIPv2 RFC 1723 (1994)
– CIDR support
– Faster convergence with shorter update interval
– Message authentication
●
RIPng RFC 2080 (1997)
– IPv6 support (its working title was IPng)
– Message authentication handled by IPSec
10
OSPF
●
Open Shortest Path First
– Original RFC 1131 (1989) is now obsoleted, it was updated and extended by dozens of newer RFCs
– OSPFv2 for IPv4 introduced in RFC 1247 (1991), current version RFC 2328 (1998)
– OSPFv3 for IPv6 introduced in RFC 2740 (1999), current version RFC 5340 (2008)
– Link State
– Typically used in enterprise networks
●
Neighbor detection: Hello Protocol periodically probes the neighbors
●
Link State Advertisement (LSA): notify all known nodes about LS
– LS Request, LS Update, LS Acknowledgement messages
●
Splits the network into areas, LSA only within the area
– Backbone area: connects all other areas (area 0.0.0.0)
– Regular area: no specific feature
– Transit area: has no end stations, backbone is typically chosen from these
●
32 bit area identifier written as a.b.c.d but it’s not an IP address!
●
Multiple routers can be connected to a not point-to-point link (e.g. Ethernet)
– Choose a Designated Router that represents this network segment, also Backup Designated Router
●
Routing metric: path cost, typically bandwidth relative to a reference value
11
IS-IS
●
Intermediate System to Intermediate System, 1992
– ISO 10589:2002 is the current version of the standard
●
IETF republished a draft version of it in RFC 1142, which was revoked in RFC 7142
– Link State
– Typically used in networks of Internet providers
●
Similar operation to OSPF, but
– Not tied to IP, can run in any Layer 3 network
●
Also used in Ethernet as part of IEEE 802.1aq Shortest Path Bridging
– Forms areas differently: no central backbone area
– Easier to extend the messages with new optional parts
12
Internet topology
●
Autonomous System (AS)
– Local network of one internet provider or company
– Internet: lots of ASes connected together
– Advantages: easier operation of small parts, higher scalability
– Disadvantages: difficult to operate on global scale
●
Interior Gateway Protocol: routing within an AS
– RIP, OSPF, IS-IS, lots of others
●
Exterior Gateway Protocol: inter-AS routing
– BGP
13
AS Relationships
●
Hierarchical topology Transit providers
– Peering: connection between
ASes on the same level
●
Pairwise relationship, not transitive
– Transit: a higher level AS
connects lower level ASes
– These connections are manually
established with contracts
between the companies (money)
ISP1 ISP2
●
Example transit provider: BIX
– Budapest Internet Exchange
14
BGP
●
Border Gateway Protocol
– The routing protocol used for inter-AS routing
– Original version RFC 1105 (1989), current version BGPv4 RFC 1654 (1994) RFC 4271 (2006)
– Path-vector routing: similar to DV, but not just with neighbors, whole paths are exchanged
●
Policy routing: mix of autonomous discovery and manually added directives
– Path cost is not just bandwidth/latency, but money: must pay for the amount of traffic
– Limited trust between ASes (suspect espionage by foreign country → route around it)
●
iBGP: we can use BGP as an interior gateway protocol
– Not efficient: needs full mesh topology, not scalable
– Route Reflector: one node represents a whole cluster of nodes, only need full mesh between RRs
15
Routing Protocol Implementations
●
Proprietary router operating systems
– Cisco IOS: entirely their own operating system
– Juniper JunOS: BSD-based OS, proprietary routing implementation
●
Open source routing software
– Quagga: successor of Zebra
– FRRouting: fork of Quagga
– XORP: eXtensible Open Routing Platform
– BIRD: Bird Internet Routing Daemon
●
Run in the background and fill the FIB of the operating system
16
Sensor Networks Not exam material
●
Wireless Mesh Network, Ad Hoc network
●
Special environment
– No central control: needs distributed algorithms
– High mobility: frequent topology change, links are unreliable
– Running on battery makes everything expensive: sending messages, processing data
●
Very exotic routing protocols have been proposed
– Hot research topic in early 2000s
– Entire zoo of protocols proposed by researchers
●
Proactive, reactive: depending on traffic intensity, need for low initial latency
●
DV and source routing are popular
●
Notable examples:
– DSDV (Destination-Sequenced Distance Vector) similar to RIP, uses sequence numbers to avoid loops
– OLSR (Optimized Link State Routing) similar to OSPF, RFC 3626
– DSR (Dynamic Source Routing) reactive source routing, RFC 4728
– AODV (Ad-hoc On-demand Distance Vector) combines ideas from DSDV and DSR, RFC 3561, used in ZigBee
– B.A.T.M.A.N. (Better Approach To Mobile Ad-hoc Networking) is developed by a German anarchist community
17