Download Routing - OS3.nl

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Computer network wikipedia , lookup

IEEE 1355 wikipedia , lookup

Peering wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Airborne Networking wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Routing wikipedia , lookup

Transcript
Routing
Basic principles
Basic setup
Directly connected
Not directly connected
Unix and Linux routing commands
Route selection
dr. C. P. J. Koymans
Mathematical representation
Informatics Institute
University of Amsterdam
(version 1.1, 2010/02/19 12:21:58)
Routing in the Internet
Monday, February 22, 2010
Different routing mechanisms
Directly Connected IP Networks
I
Configuration under Unix with ifconfig
I
Packets can be delivered immediately by the data link
(layer 2 software)
I
No explicit route commands needed under Linux,
because ifconfig sets a route automatically
ifconfig command
ifconfig <interface> <ip_address>
netmask <netmask> broadcast <broadcast_address>
Data link layer “routing”
I
Only outgoing interface needed
I
Packet is flooded by layer 2
I
Bridges and switches use a lookup table to map
layer 2 addresses to outgoing interfaces
I
Spanning tree protocol takes care of loops
Global routing
Routing Table
I
I
Not directly connected networks need a gateway (next hop)
I
Recursive lookup (only 1 level)
I
Gateway needs to be directly connected
Route command
I
I
Syntax varies a lot between systems
Adding a (static) default route (Solaris)
I
I
Adding a (static) host route (Linux)
I
I
route add default <gateway>
route add -host <host> gw <gateway>
Adding a (static) network route (Linux)
I
route add -net <network> netmask <netmask> gw <gateway>
netstat -r shows the routing table
Route flags
Flag
G
H
S
Set
route needs gateway
route to host
route added statically
(mostly by admin)
Unset
route is directly connected
route to network
route added dynamically
(by a protocol)
Ip command
I
Introduced in the Linux iproute2 package
I
General interface to kernel addressing and routing
I
Replaces ifconfig, route and arp completely
I
Has support for routing policies and multiple routing tables
Ip subcommands
Route selection
ip <subcommand>. . .
Subcommand
link
address
neighbor
route
rule
Meaning
layer 2 interface settings (MAC)
layer 3 interface settings (IP)
arp cache data
routing table data
routing table selection
Mathematical representation
I
Graphs (undirected, labeled)
I
I
I
I
Nodes are routers and hosts
Edges are (point to point) connections
Labels represent “cost” of the route
Undirected: full duplex links, same cost in both directions
I
Longest prefix match
I
I
Host routes before network routes
Default route has shortest prefix
I
I
Route of last resort
Cannot be used in Internet core
Broadcast networks
The danger of pictures
The danger of pictures
I
Using a virtual network node is not always equivalent
to a full mesh of point to point links
I
Using a virtual network node is not always equivalent
to a full mesh of point to point links
I
Example of spanning tree problems
I
Example of spanning tree problems
Node reduction
Internet Routing (1)
I
I
LAN with N routers or hosts
I
Full mesh of N 2 edges
I
Reduced with 1 extra node to N edges
Works for LANs, but also for NBMA networks
I
I
For many situations, but not always
I
Based on top level structure defined by Autonomous Systems
(AS)
Each AS has administrative control over a collection of
I
I
Routers (and hosts)
Networks
Definition (AS — Autonomous System (from RFC 1930))
An AS (Autonomous System) is a connected group of one or more
IP prefixes run by one or more network operators which has a
single and clearly defined routing policy.
Internet Routing (2)
I
Edge routers inside an AS can be directly connected
to edge routers in another AS
I
I
I
I
I
I
A “human” protocol
Explicit command: route or ip route set
I
I
Distance Vector (for instance RIP)
Path Vector (for instance BGP)
Link State (for instance OSPF)
Examples: RIP, OSPF, IS-IS
Distance Vector Routing
I
Distance vector algorithm
I
I
Dynamic
I
Intra-AS routing
Using an interior routing protocol (IGP)
I
Static
I
Routers within the boundary of a single AS communicate
with each other to provide
Example: BGP4
No other protocols in use (except variants of BGP)
Routing Protocol Classification
I
I
Used for inter-AS routing
Using an exterior routing protocol (EGP)
I
I
Internet Routing (3)
Bellman-Ford (1957)
Distributed shortest path
I
Original ARPANET routing algorithm
I
Decentralised
Path Vector Routing
Link State Routing
I
I
I
I
Like distance vector routing, but
Instead of the distance the complete path (on AS level)
to the destination is given
The algorithm is still
I
I
decentralised
asynchronous
Link state algorithm
I
I
Dijkstra (1959)
Single source shortest path
I
Complete knowledge is distributed to all nodes in an area
I
Knowledge about the local network topology is flooded
to all participants in an area
I
Every node executes the shortest path algorithm
and draws the same conclusions