Routing - PowerPoint PPT Presentation

About This Presentation
Title:

Routing

Description:

LAN (extra stuff like LAN name, 2-way connectivity check) Sequence number ... Rtr inside a domain collects reachability information and informs the rtr on the ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 45
Provided by: Alek163
Category:
Tags: domain | name | routing

less

Transcript and Presenter's Notes

Title: Routing


1
Routing
2
Connectionless Network Layers
  • Destination, source, hop count
  • Maybe other stuff
  • fragmentation
  • options (e.g., source routing)
  • error reports
  • special service requests (priority, custom
    routes)
  • congestion indication
  • Real diff size of addresses

3
Comparative Addresses
  • IPv4 4 bytes, boundary depends on mask
  • IPX 10 bytes 4link, 6node
  • AppleTalk 2link, 1node
  • CLNP variable length, 14area, 6node
  • IPv6 16 bytes 8link, 8node (?)

4
IPv4 data packet
version
hdr lnth
TOS
total length
2
pkt id
2
df mf
offset
offset (contd)
Dont Fragment More Fragments
TTL (time to live)
protocol
hdr checksum
2
source
4
TCP, UDP
destination
4
options
variable
variable
padding
5
IPv6
vers
TOS
flow label (20 bits)
(4 bits)
(8 bits)
payload length
next
hops remain
source
destination
hop by hop hdr, or rtg hdr, or authentication
hdr, or end-to-end, or TCP, or ...
6
Distributed Routing Protocols
  • Rtrs exchange control info
  • Use it to calculate forwarding table
  • Two basic types
  • distance vector (DECnet, old ARPANET, RIP)
  • link state (new ARPANET 1980, DECnet Phase V
    1985, IS-IS 1988, OSPF version 2 1998).

7
Distance Vector Routing
  • Rtr knows
  • own ID
  • how many cables hanging off box
  • cost, for each cable, of getting to nbr

8
Distance Vector (DV) Routing
  • Initialize distances to all rtrs in the network
    to be 0, except to its nbrs.
  • Rtr learns from nbrs their distances to all nodes
    in the network, calculate own distances, and
    forward the distance vector to nbrs. This repeats
    until the distance vector converges.
  • Rtr updates the distance vector whenever it
    receives different distance vector from some nbr,
    or whenever some link breaks.
  • Distance vector is either sent periodically or
    when the network configuration changes.

9
Example of DV Routing
10
Problems with Distance Vector Routing
  • B does not conclude that C is unreachable but
    that d(B,C)d(B,A)d(A,C) 3
  • When A receives DV from B it concludes that
    d(A,C)4
  • DV increases in this until infinity, or maximum
    value which is set by administrator. For this
    reason, the cost field has the small size.

11
Split Horizon
  • This technique sometime prevents counting toward
    infinity.
  • If R1 forwards packets to D through R2, then R2
    informs R1 that its distance to D is infinity.
  • So, when the link toward node D fails, R2
    concludes that its distance to D is infinity
    immediately, i.e. that D is unreachable.

12
Split Horizon
  • Unfortunatelly, split horizon does not always
    work.
  • When link to D fails, R1 concludes that D is
    unreachable.
  • R2 gets the information from R1 that D is
    unreachable, and sets the path to D through R2,
    calculating DV based on DC of R2, and vice versa.

13
Link State Routing
  • Construct Link State Packet (LSP)
  • who you are
  • list of (nbr, cost) pairs
  • Broadcast LSPs to all rtrs
  • Store latest LSP from each rtr received from nbrs
  • Compute Routes
  • Forward LSPs from each nbr to other nbrs

14
Building Link State Packets
  • (a) A subnet. (b) The link state packets for
    this subnet.

15
Broadcasting LSP
  • LSPs are distributed through flooding
  • send to every nbr except from which LSP rcvd
  • LSP is updated only if it has a higher sequence
    number than the existing one, or if its age
    exceeded the maximum age.
  • Rtr forwards only updated LSPs, and it generates
    new LSPs periodically or when there is a
    configuration change (link cost has changed, nbr
    is down).

16
Fixing the Algorithm
  • Require LSPs to age at every hop
  • Make sequence number large and linear
  • Careful synchronization between nbrs
  • At most one LSP from one source
  • Each LSP has flags for acknowledgements and
    transmissions to nbrs.
  • When LSP is received from some nbr its
    corresponding ack flag is set, as well as its
    send flags to other nbrs.
  • Acknowledgments for LSP reception from one nbr
    are sent to it in a round-robin fashion. LSPs
    with the send flags for some nbr set, are sent to
    it also in a round-robin fashion.

17
Arithmetic in Circular Space
  • Sequence number a is smaller than sequence number
    b when it holds

18
Distributing the Link State Packets
  • The packet buffer for router B in the previous
    slide (Fig. 5-13).

19
Computing Routes
  • Edsgar Dijkstras algorithm
  • calculate tree of shortest paths from self to
    each
  • also calculate cost from self to each
  • Algorithm
  • step 0 put (SELF, 0) on tree
  • step 1 look at LSP of node (N,c) just put on
    tree. If for any nbr K, this is best path so far
    to K, put (K, cdist(N,K)) on tree, child of N,
    with dotted line
  • step 2 make dotted line with smallest cost
    solid, go to step 1

20
Example of Dijkstra Algorithm
21
Example of Dijkstra Algorithm
22
Example of Dijkstra Algorithm
Forwarding table A/B B/B C/self D/B E/B F/F G/F
23
Distance Vector vs Link State
  • Memory distance vector wins (but memory is
    cheap)
  • Computation debatable
  • Simplicity of coding simple distance vector
    wins.
  • Convergence speed link state better
  • Functionality link state can have custom routes,
    mapping the net, easier troubleshooting,

24
Specific Routing Protocols
  • Interdomain vs Intradomain
  • Intradomain link state (OSPF, IS-IS) vs distance
    vector (RIP)
  • Interdomain
  • static routing
  • EGP
  • BGP
  • ?

25
Routing Information Protocol (RIP)
  • Packets are requests and responses.
  • Report through response every destination every
    30 seconds, or as a reply to request.
  • Throw away info if too old (90? for IP)
  • Request when a rtr comes up or when info is too
    old
  • Maximum cost is 16
  • Most implementations of IP RIP do
  • split horizon
  • triggered updates
  • poison reverse (rtr that learns about link fail
    announce the distance through it as infinity).

26
Link State Routing Protocols
  • Intermediate system-intermediate system (IS-IS)
    is ISO standard Netware link state protocol
    (NLSP) is modification of IS-IS Private
    network-to-network interface (PNNI) for ATM Open
    shortest path first (OSPF)
  • Similarities and differences hierarchy, area
    addresses, LANs, parameter synchronization,
    number of destinations per LSP, LSP database
    overload, authentication.

27
IS-IS Pkt Types
  • Hello
  • pt-to-pt
  • LAN (extra stuff like LAN name, 2-way
    connectivity check)
  • Sequence number packet (SNP)
  • CSNP (complete), for LAN sync, and startup
  • PSNP (partial), for acking one or more LSPs
  • LSPs.

28
OSPF Pkt Types
  • Hellos
  • Database description
  • Startup
  • Link state request
  • Link state update
  • Multiple LSAs
  • Link state ack
  • Links state advertisement (LSA)
  • type 1 LSA (like IS-IS ordinary LSP)
  • type 2 LSA (like IS-IS LSP on a LAN)
  • types 3, 4, 5, external info

29
OSPF types 3, 4, and 5 LSAs
area border router
IP prefix
AS border rtr
3
AS
3
3
area
3
5
5
4
4
5
30
OSPF
  • Runs on the top of IP with protocol field 89.
  • Comprises two levels of hierarchy areas and
    backbone.
  • Boarder routers of some domain calculate their
    costs to the destinations outside the domain and
    flood the information into the area, so that area
    routers can calculate optimal path.

31
OSPF
  • Hierarchy OSPF has two levels of hierarchy.
    Boarder routers of any area calculate their costs
    to the boarder routers of the autonomous system
    (AS) and inject those to the area. The AS boarder
    routers report their cost to the destinations
    outside of the area.
  • Area addresses area has ID (4 bajta), where
    0.0.0.0 denotes level 2 in hierarchy. No
    possibility for dynamic merging or splitting the
    areas.

32
OSPF
  • Routing in LAN DR expects an acknowledgment from
    LAN routers for each link stage advertisement
    (LSA). A backup DR (BDR) keeps the replicated LSA
    database. Whenever some LAN router sends LSA it
    multicasts it to DR and BDR. Acks are also
    multicast to DR and BDR. If there is no ack, LSA
    is sent to the individual router.
  • Parameter sync. HelloInterval and
    RouterDeadInterval are specified in Hello
    messages, and have to be the same in the nbrs.
    This is limitation when the parameters is to be
    changed.
  • Startup master/slave database description
    protocol where LSAs are explicitly sent and acked
    and only after that is complete does link come
    up.

33
OSPF
  • One destination can be advertised in one LSA.
  • An overload protection is option in RFC 1765. All
    routers receive the same max external link state
    information. Rtrs can purge the info that they
    transmit if their databases are overloaded.
  • Authentication is set in the link state update
    message comprising multiple LSAs. It is same for
    the two directions of a link. Each rtr changes
    authentication.

34
Hierarchical Routing
  • Hierarchical routing.

35
Exterior Gateway Protocol (EGP)
  • Like RIP, but no metrics. Just if reachable. Rtr
    inside a domain collects reachability information
    and informs the rtr on the boarder of the domain.
    Boarder rtr informs the internal rtr about
    reachability outside the domain.
  • Rtrs establish com with pkts nbr acquisition
    request, nbr acquisition reply or refusal, nbr
    cease request, nbr cease ack.
  • Theoretically only legal topology (but tree would
    work)

36
EGP Does not Support Loops
37
Border Gateway Protocol (BGP)
  • Replacement of EGP, with policies
  • Path vector Instead of distances, rtrs exchange
    info about path, sequence of AS. Given reported
    paths to D from each nbr, and configured
    preferences, choose your path to D
  • dont ever route through domain X, or not to D,
    or only as last resort
  • Other policies dont tell nbr about D, or lie to
    nbr about D making path look worse

38
BGP Atributes and Pkts
  • Origin (well-known, mandatory) can be IGP, EGP or
    incomplete AS path (well-known, mandatory) 2
    octets for each AS along the path Next hop
    (well-known, mandatory), Unreachable (well-known,
    discretionary) Intra AS metric (optional,
    non-transitive) to help to rtrs of nbr AS to
    calculate optimal path Community (optional,
    non-transitive) to establish a unique policy
  • Packets are Open establish com between rtrs of
    different AS Update carries routing info
    Notification last message before a connection is
    closed Keepalive to inform about presence of
    nbr.

39
BGP Configuration
  • Path preference rules
  • Which nbr to tell about which destinations
  • How to edit the path when telling nbr N about
    prefix P (add fake hops to discourage N from
    using you to get to P)
  • Possible policies that dont converge
  • Lots of theoretical problems, and in practice

40
E-BGP vs I-BGP
  • Talking to peer within domain I-BGP
  • Talking to peer in another domain E-BGP
  • Original I-BGP had to be fully connected
  • To improve things
  • use confederations to break domain into smaller
    domains (each fully connected I-BGP)
  • use route reflecter, start topology with BGP
    router in domain in center, passing routing info

41
BGP Confederations
  • Originally so could group lots of domains into
    super-domain
  • only one policy
  • path looks shorter
  • does constrain path (since cant have domain
    twice)

S
d1
d2
d3
FOO
d4
d7
d5
d6
D
42
Multicast Routing
(a) A network. (b) A spanning tree for the
leftmost router. (c) A multicast tree for
group 1. (d) A multicast tree for group 2.
43
Routing for Mobile Hosts
  • A WAN to which LANs, MANs, and wireless cells are
    attached.

44
References
  • Radia Perlman, Interconnections Bridges,
    Routers, Switches and Internetworking Protocols,
    Addison-Wesley January 2000.
Write a Comment
User Comments (0)
About PowerShow.com