Download 04_IPv4_routing

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

AppleTalk wikipedia , lookup

IEEE 1355 wikipedia , lookup

Network tap wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Deep packet inspection wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Distributed firewall wikipedia , lookup

Peering wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Computer network wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Airborne Networking wikipedia , lookup

Routing wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Transcript
Communication
Systems
4th lecture
Chair of Communication Systems
Department of Applied Sciences
University of Freiburg
2008
1 | 44
Communication Systems
Last lecture and practical course

Standards and network layering models

OSI and IP

Need of an universal service

IP as layer 3 network protocol

Start with look at IP header

Fragmentation of packets
2 | 44
Communication Systems
last lecture – addressing scheme

Address is split into two virtual parts: network and host part

address could be split at every bit

network and host parts add up to 32 bit in every case

important for routing decisions
3 | 44
Communication Systems
plan for this lecture

IP sub- and supernetting

Datagram delivery

Address mapping in broadcast nets

Packet routing in IP networks


Discussed address adaptation in broadcast nets for local
delivery

Talked of routing principles (matching destination addresses
against network address of an interface)

Mostly involves static routing (addresses, netmasks, ...)
assigned by administrator directly or via DHCP
How does routing LAN-wide or globally work?
4 | 44
Communication Systems
ip – new subnetting scheme





The number of class B networks was much to small (Germany
has around 100(?) universities and colleges and therefore would
need for them at least 100 class B networks out of 16,384)
There is no real need for class A networks (imagine a big
company connecting all there machines to the Internet directly –
e.g. IBM or HP had class A networks or a provider with over
million customers in a given area)
There is great need for bigger networks than class C but much
smaller then B
The waste of addresses with the old scheme was enormous and
the need for IP v6 seemed very urgent :-)
Concept of subnetting and supernetting was introduced
5 | 44
Communication Systems
ip – new subnetting scheme




Introduction of netmasks (were implicit with old addressing
scheme)
Supernetting means the combining of address ranges into larger
ones with just one common network and broadcast address
The IP addresses arn't self explanatory any more
For the information of the span of subnetworks netmasks where
introduced: “1” marks prefix part of IP (network) “0” marks suffix
part of IP (host)
6 | 44
Communication Systems
ip – new subnetting scheme cont.

The netmask of 255.255.0.0 just marks an old class B network

255.0.0.0 depicts class A and 255.255.255.0 class C



The netmask may be abbreviated with the numbers of “1” in the
netmask (e.g. class A: 8, B: 16, C: 24)
If you combine two class C networks into a larger one, e.g.

network 192.168.10.0 with broadcast 192.168.10.255 and

network 192.168.11.0 with broadcast 192.168.11.255
The result is:

network 192.168.10.0 with broadcast 192.168.11.255 and
netmask 255.255.254.0
7 | 44
Communication Systems
ip – new subnetting scheme cont.
8 | 44
Communication Systems
ip – new subnetting scheme – principles






Split of netmasks into prefix and suffix is done on the
boundary between the “1” and “0”
e.g. 1111 1111.1111 1111.1 000 0000.0000 0000 is 255.255.128.0
(some commands use abbreviation 17, first practical course)
We would split that way the network 132.230.0.0/255.255.0.0
into two subnets: 132.230.0.0 – 132.230.127.255 and
132.230.128.0 – 132.230.255.255
But we could split that network another way:
e.g. 1111 1111.1111 1111.0000 0000.0000 0001 is 255.255.0.1
and get two subnets, one with the even (in the last octet) IP
addresses and one with the odd IP addresses in it
Managing networks that way implements a lot of risks :-)
9 | 44
Communication Systems
ip – new subnetting scheme – conclusion






Networks may combined into larger ones, large networks may be
split
Splitting networks means adding a “1” to the netmask (increasing
prefix and decreasing suffix)
Combining networks via removing “1” from netmask and adding
“0”
Therefore at the moment are enough blocks of class C networks
still available for assignment (the need for IP v6 declined)
Additional information is needed, routers need more memory to
store netmasks in combination with net names
Routing tables could be simplified through aggregation of routes
10 | 44
Communication Systems
datagram delivery


Why the long introduction on addressing schemes, network
names and netmasks?
Packet switched networks depend on routing decision for every
packet (network taxonomy)

How datagrams sent through (global) network to end systems?

Two types of delivery in IP networks:


local delivery (no router involved)

non-local delivery (router needed)

determined by common prefix
Routers may or may not additionally switch packets between
different LAN or WAN protocols
11 | 44
Communication Systems
datagram delivery

We need a rule to decide how to deliver packets in IP networks

every router and host maintains a routing table

read destination address of given packet

get the netmask of the smallest network (we will see why we start
with the biggest netmask and descend to smallest)

compute: netmask AND destination address

compare the result against the network address connected with
the used netmask

match: deliver packet that route

not matched: start the algorithm with the netmask of next
bigger network
12 | 44
Communication Systems
datagram delivery



When you got the route the packet should take

if no gateway is given -> deliver locally (we will see how later
on)

see if gateway is given -> deliver the packet to the router (use
locally specific mechanism for delivery to the router)
Example:

network address: 10.8.4.0

“class C” netmask (255.255.255.0)

broadcast 10.8.4.255

network and broadcast addresses special IPs which could not
be assigned to host machines (last lecture)
Host machine: 10.8.4.202, router: 10.8.4.254
13 | 44
Communication Systems
datagram delivery

Described simple example Ethernet network

typical LAN situation like the setup in the several computer pools (as
seen in first practical exercise)

nearly same setup in a typical home installation (wired Ethernet
could be exchanged with wireless LAN connections)
14 | 44
Communication Systems
datagram delivery

Routing table of a standard host machine in a subnet (LAN)
normally consists of three entries (you should have seen that
in the practical course):

route to the local LAN

loopback route

default route
15 | 44
Communication Systems
datagram delivery


Now lets see how a packet to the host 10.8.4.204 would be
routed

take routing entry with the smallest netmask (here:
255.255.255.0)

10.8.4.204 & 255.255.255 -> 10.8.4.0 (match!!)

local delivery
Packet to 132.230.1.204

take routing entry with the smallest netmask (here:
255.255.255.0)

132.230.1.204 & 255.255.255 -> 132.230.1.0 (miss!)

try next entry: 132.230.1.204 & 255.0.0.0 -> 132.0.0.0 (miss!)

try next: 132.230.1.204 & 0.0.0.0 -> 0.0.0.0 (match!)
16 | 44
Communication Systems
datagram delivery




local delivery to the router
Default route matches every packet, therefore its to be tested
last
Local delivery takes place in every case

directly to the destination machine

directly to the router

router/gateway IP has to be part of the subnet
For packet delivery only the destination address is checked!

security hazards because of possible IP spoofing

most of modern routers do source address checking (but
that is not part of the protocol definition)
17 | 44
Communication Systems
universal service – address and size adaptation



Seldom one single network spans between two end systems
IP runnable on top of many different hardware types and software
protocols
Address and size adaptation needed

mapping from Internet standard addresses (IP addresses) to linkspecific addresses

datagram size adaptation

Internet datagram has universal common size (64KByte for IP)

mapping from common size to link-specific MTU requires
fragmentation

fragmentation allows the splitting of packets into smaller units with
reassembling at the receiving station
18 | 44
Communication Systems
addressing schemas


IP addresses are topologically sensitive

interfaces on same network share prefix

prefix is assigned via ISP/local network administrator

32bit globally unique

address is implemented in software
e.g. 802.x addresses are vendor-specific

interfaces made by same vendor share prefix 48bit globally unique

networks may have ethernet adaptors from a wide range of
distributors with completely different prefixes

prefix is put in hardware
19 | 44
Communication Systems
datagram delivery cont.

Local delivery with point-to-point connections is easy, just send
the packet to the other end of the connection

modem, (GPRS, UMTS) – addressing is done other ways:


device number of serial port, telephone number of the telephone
system, ...
PPP point-to-point route (network consisting of just two IP
addresses)
20 | 44
Communication Systems
datagram delivery cont.

Routing table looks a little bit different (compared to LAN e.g.
Ethernet connection)

netmask is 255.255.255.255 (just one address in network)

Addresses do not have to share same prefix

e.g. 80.43.112.34 for the local machine and 217.67.12.33 for the
providers gateway


Seen with modem, ISDN, GPRS/UMTS, PPPoE (ADSL)
connections for individuals toward end user ISPs
default gateway is just the machine at the other end of connection
21 | 44
Communication Systems
address mapping in broadcast nets

But what to do in broadcast nets with many connected hosts?


in broadcast nets every host gets every packet sent out in the
segment (switching may reduce traffic, but for some services
packets to all are inevitable)
For local delivery, need to map network-layer address to link-layer
address:

consider the machines 132.230.15.6 and 132.230.15.18 (netmask
e.g. 255.255.255.0) ... [on same network]
22 | 44
Communication Systems
address mapping cont.

Encapsulate IP datagram within link-layer frame

What lower level destination (MAC) address to use?

Helper protocol is needed

IP has no feature to do mapping itself

such mapping is not needed in PPP environments

this protocol is specific to the underlying hardware / software
protocol

ARP is for address mapping in Ethernets and TokenRings

More on ARP in practical/theoretical exercises
23 | 44
Communication Systems
IP routing

By now simple point-to-point routes and local routing

What happens in bigger networks of connected networks?

Machines are connected over continents and/or different media


introduction: BelWue, DFN, GEANT(2), ...
Next topic is IP routing in general and dynamic routing and
algorithms
24 | 44
Communication Systems
definition of routers


Somehow magically an IP packet travels long distances and finds
its way between two end systems (from source machine to
destination)
As we introduced:



IP is a packet switched network so on every intermediate system a
routing decision is to be made
These intermediate systems normally have more than one IP
interfaces (each interface with its own IP number matching to the
net the machine is member of)
Formally: each machine with interfaces in two different IP subnets
(and the ability to forward packets from one interface to the
other) is called a router
25 | 44
Communication Systems
definition of routers cont.

Every router maintains a routing table

In the simplest case the router has three entries in that table



route to local subnet #1

route to local subnet #2

default route with the router in one of the subnets

the routing table grows with the number of interfaces and nets
connected to each
Routing tables in Internet routers grew huge because of nonconsecutive IP ranges (aggregation of networks is
impossible then)
IPv6 should solve this issue and simplify the routing tables
again
26 | 44
Communication Systems
routing example
27 | 44
Communication Systems
routing example




The routing tables of the two routers #1, #2 are longer then
routing table of end system

For each interface a routing entry is present

We find a default route on both of them (most routers have default
entry, we will see why later)
Maintaining this routing information manually is the standard
mechanism used for relatively static and very small LAN
environments
Routing tables on a larger scale are not as fixed as local
ones
Remember the networking structure graphs of BelWue, DFN
and GEANT(2), many network nodes are connected one more
than one path with each others
28 | 44
Communication Systems
routing cont.




Reasons for multilink IP connections

Every ISP must have more than one uplink connection to get
the permission to operate (fox hole principle)

Links are of differing bandwidth, quality, latency and price
These variables may differ over time periods (different rates
for daily or night use, failing lines, congested paths, ...)
You will need mechanisms to consider these information and
compute an optimal way to every destination network
Routing techniques and protocols working over IP are to be
introduced ...
29 | 44
Communication Systems
routing protocols

In general: routing protocols are not IP specific

Routing protocols may be needed on different network layers



It depends on the type of underlying networking
infrastructure and concept of connection
We can make some general assumptions on routing
algorithms independently of the type of network
Within connection orientated networks like ATM
infrastructure we find virtual channel switching

ATM packets follow a previous installed route

Route is active during the whole session
30 | 44
Communication Systems
routing protocols

IP – packet orientated network

Routing decision is renewed for every packet (introduction to
static IP routing last lecture)

No state of previous routing decisions is kept (!)

Static routing (manual setup) is acceptable in small networks

Routing setup for end systems often by DHCP

These mechanisms not suitable for routing on larger scale,
e.g.

campus-wide inter LAN routing

DFN-wide, inter-provider-routing, ...
31 | 44
Communication Systems
routing protocols




Routing tables grow relatively fast, e.g. simple subnetting in
university LAN of roughly 256 class-C subnets in 132.230.X.Y
IP domain produces long tables in core routers

IP subnet aggregation is often impossible

routers may have several links

network should have redundant links ...
Routing could be defined: Algorithms to establish routing
table to make widely distributed endpoints appear to be
directly connected
So mechanisms for automated setup of router tables desired
Different routing protocols run on routers implement several
routing algorithms
32 | 44
Communication Systems
routing protocols – general considerations

In general: forwarding is local made decision, requiring only next
hop information

But: computation of best route requires global information

This information is challenging:


hard to collect, often outdated, huge amounts of data

no single network owner
General needs for routing

compute optimal paths for each destination (we need a
definition of term “optimal”)

minimize control message exchanges

minimize routing table space
33 | 44
Communication Systems
routing protocols – pitfalls


While considering automatic setup of routing tables some risks
may show up

Loops: should local forwarding information be inconsistent with
global topology – it can form loops (black holes in which packets
“disappear” - you may have observed this phenomenon with
traceroute when a route oscillated between two routers ...)

Oscillations: dynamically adapting to load can shift load, lead to
congestion and repeat (often with paths of small bandwidth –
consider two ISDN lines with heavy load ...)
Normally these scenarios unusual under normal operation, often
due to misconfiguration
34 | 44
Communication Systems
routing protocols – theory

Routing itself (discussed with IP addressing) is part of the
network layer and responsible for deciding which output line
an incoming packet should take


Routing algorithms often implemented in applications run
on top of the underlying IP network
For routing decisions hence every routing algorithm certain
properties are desirable:

correctness of routes

simplicity of protocol

robustness

stability

fairness and optimality
35 | 44
Communication Systems
routing protocols – theory

Correctness and simplicity are obvious requirements

Robustness


once a major network is set up system wide failures and
outages are not desired

should catch up with topology changes

cope with hardware failures

route changes (because of pricing changes, new infrastructure,
expanding of the network, ...)
... that means, not all connected hosts shouldn't be affected
36 | 44
Communication Systems
routing – theory cont.

Stability


Routing algorithms should converge towards equilibrium in a
certain amount of time
Fairness and optimality

obvious but often contradictory goals

see the following picture, if the six hosts 1,1' ; 2,2' ; 3,3'
communicate with each other and saturate the link the
communication of X,X' should be shut off completely ...
37 | 44
Communication Systems
routing – theory cont.

Conflict between Fairness and optimality (depends of course
on underlying network topology)
38 | 44
Communication Systems
routing protocols – theory




Before decision on trade-off between the described problem
could be done – we should see what we seek to optimize:

maximum total network throughput could be one parameter

minimum mean packet delay is an other
These two goals in conflict too: since operating any queuing
system near limit implies long delays
Many networks try to compromise with minimizing the number
of hops (passing a routing engine) to take from source to
destination
Such the delay is reduced and the amount of bandwidth
consumed minimized
39 | 44
Communication Systems
routing protocols – in packet networks



Internet doesn't have very predictable traffic flow, may have
unreliable links
Routers are assumed to know

address of each neighbor

cost of reaching each neighbor
Choices for Internet routing

centralized vs. distributed routing

source based vs. hop-by-hop

single or multipath

dynamic vs. static
40 | 44
Communication Systems
routing strategies – (non)adaptive routing


Routing algorithms are grouped into two major classes
Nonadaptive RA do not base their routing decisions on
(continuous) measurements or estimates of current bandwidth
usage and topology




no need for specific measurement service run continuously or
scheduled
The routes to use are computed in advance, off-line and
downloaded to routers when network is coming up
That is the typical scenario for networked end systems –
normally the system administrator provides the routes during
machine setup
Or the routing information is transferred via DHCP (centralized
setup of networking resources)
41 | 44
Communication Systems
adaptive routing




Routing done that way often named static (type of routing
discussed yet falls into that category)
Adaptive algorithms change their routing decisions to reflect
changes in traffic/bandwidth usage and topology
Algorithms differ in where they get their information ...

Locally from own measurements or from adjacent routers

Or (globally) from all routers
... and when changes are executed

Every T seconds when network load changes

Or changes in topology occur

Or event driven ...
42 | 44
Communication Systems
adaptive routing cont.

Measure / function needed to represent certain values

Metric can be seen as a value for measuring routing costs

These costs could be



physical distance between two routers

number of hops packets travel from source to destination

estimated transit time

monetary costs (cheap satellite link vs. expensive sea cable for
continental crossing or vice versa)
Different routing algorithms (RA) use different metrics for
their routing decisions
Different metrics have different costs of computing them
43 | 44
Communication Systems
literature list/next lecture



IP Addressing

Kurose & Ross: Computer Networking (3rd): Section 4.4.2

Tanenbaum: Computer Networks (4th): Section 5.6.2

Stevens: TCP/IP Illustrated Vol.1, Section 1.4, Section 3.4
Routing Theory

Tanenbaum, Computer Networks (4th): Section 5.2

Kurose & Ross, Computer Networking (3rd): Section 4.5
Next lecture

pentecost break: thus next lecture is the 20th May (please hand back
your second exercise sheet at this lecture)

lecture plan/exercises are available on the lectures homepage:
http://www.ks.uni-freiburg.de/php_veranstaltungsdetail.php?id=20
44 | 44