CS 164: Computer Networks - PowerPoint PPT Presentation

About This Presentation
Title:

CS 164: Computer Networks

Description:

Mobile registers with foreign agent and provides the address of its home agent. ... Once home agent gets the IP datagram, it tunnels the packet to the mobile. ... – PowerPoint PPT presentation

Number of Views:14
Avg rating:3.0/5.0
Slides: 35
Provided by: tri549
Learn more at: http://alumni.cs.ucr.edu
Category:

less

Transcript and Presenter's Notes

Title: CS 164: Computer Networks


1
  • CS 164 Computer Networks
  • Slide Set 10 -- Internetworking (Continued)
  • Routing

2
In this set ....
  • How are link-state algorithms implemented in
    practice ?
  • OSPF
  • Mobile IP
  • ---------------------------------
  • Section 4.3 - Global Internet -- Subnetting,
    Classless Inter-domain routing and BGP

3
Implementing link state routing
  • Each node maintains two lists
  • The tentative list and the confirmed list.
  • Each list contains entries of the type
    Destination, Cost, Next Hop.
  • The two lists are continuously updated as new
    nodes are added to the shortest path tree (as in
    the Dijkstras algorithm).

4
The Algorithm
  • Step 1 Initialize confirmed list with myself --gt
    cost 0
  • Step 2 For the node just added to the confirmed
    list in the previous step, call it node Next,
    select its LSP.
  • Step 3 For each neighbor of Next (Neighbor),
    calculate cost to reach this neighbor
  • Cost Cost from me to Next Cost of Next to
    Neighbor.
  • (a) If Neighbor is currently on neither the
    Tentative or the Confirmed list, add Neighbor,
    Cost NextHop to Tentative list. Note -- here
    NextHop is the one that is used to reach Next.
  • (b) If Neighbor is on the Tentative list and the
    cost seen is lt the cost currently listed for
    Neighbor, replace the entry with Neighbor, Cost,
    NextHop. Else, do nothing.
  • Step 4 If Tentative list is empty, stop. Else,
    pick entry from the Tentative list with lowest
    cost and move it to Confirmed list. Return to
    Step 2.

5
Our Example
We look at D.
Step Confirmed Tentative
5 (D,0,-) (C,2,C) (B,5, C) (A,12,C)
6 (D,0,-) (C,2,C) (B,5, C) (A, 10, C)
7 (D,0,-) (C,2,C) (B,5,C) (A,10,C)
Step Confirmed Tentative
1 (D, 0, -)
2 (D,0,-) (C, 2, C) (B, 11, B)
3 (D,0,-) (C,2,C) (B,11,B)
4 (D,0,-) (C,2,C) (B,5,C) (A,12,C)
6
Computational Complexity
  • There are n nodes.
  • 1st iteration, search through n nodes to
    determine w, the one with the minimum cost.
  • 2nd iteration, search through (n-1) nodes and so
    on.
  • Total n(n1)/2 O(n2)
  • One could use sorting methods (heapsort etc.)
    -could reduce complexity to O(nlogn).

7
Comparing Distance Vector and Link State
  • Message complexity in link state is O(nE) since
    each node sends an update -- possibly needed for
    each link.
  • With distance vector it depends on the rate of
    change of link costs etc.
  • Convergence time in link state O(nlogn) In
    distance vector depends on relative path costs --
    count to infinity problem.
  • However, link state suffers from oscillations.
  • Link state is stable since computation done at
    each node -- distance vector could lead to
    problems if there are malfunctioning routers.

8
Open Shortest Path First (OSPF)
  • Open standard -- non-proprietary
  • Essentially the link-state approach --however
    features are added.
  • Authentication of routing messages -- prevent
    misconfigurations-- only sys admin can configure.
  • Add a hierarchy -- OSPF runs within a domain or
    administrative region. The region is sub-divided
    into areas.
  • Router does not need to know how to get to every
    network within the domain -- enough to know how
    to get to right area.
  • Load balancing - if two paths have same cost,
    subdivide traffic among paths.

9
OSPF Header
  • Nuggets
  • Checksum -- same as IP (does not include
    authentication part).

Authentication can be none, password based or
crypto checksum (hash). Types -- HELLO packet,
Request, Send, ACK receipt of link state
messages. Header is common for all OSPF messages.
10
Link State Advertisements
  • Router uses this to advertise directly connected
    nets and costs of links to other routers.
  • Link state age -- similar to TTL (not included in
    checksum).
  • Unique IP address for router -- if it has more
    than one, pick lowest.
  • TOS -- different routes for different IP packets
    -- not widely used.

Other info on LSA, look up the book.
11
Metrics
  • How does one assign link costs ?
  • Costs distinguish between different physical
    links.
  • dynamically, one may consider the load --
    difficult.
  • Versions of ARPANET tried to address this.
  • One way -- count the number of queued packets
    --does not take bandwidth or latency into
    consideration.
  • Another way -- latency on the link.
  • Each incoming packet time-stamped. There is an
    associated transmission time and propagation
    latency -- static for the link.
  • Delay (Depart time - Arrival time)
    transmission time prop. latency.

12
Instability
  • Due to improper choice of metrics, instability
    and oscillations could occur.
  • Many of links remain idle while others are
    heavily loaded.

13
Oscillations in link state
2)
1)
A
A
2 e
1
1 e
D
B
D
B
1e
1
0
e
C
C
A
0
2 e
3)
D
B
1
1e
C
14
Avoiding oscillations
  • Smoothing variations of the metric in time.
  • Choose weights that do not change often --
    averages.
  • Impose hard limit on how much metric could
    change from one measurement to next.
  • Do not change paths with high frequencies even if
    link weights do change often.

15
Mobility
  • So far, with IP, implicit assumption that there
    is no mobility.
  • Addresses -- network part, host part -- so
    routers determine how to get to correct network.
  • If nodes move network may change
  • How do we cope with this ?
  • Should there be a change in IP addresses with
    mobility ? If so how ?
  • Should we use DHCP to assign new addresses ? May
    be adequate in some cases.
  • Within the same network no problems -- no need to
    change IP addresses -- link layer delivery.

16
Mobile IP
  • Problem occurs when user switches between
    networks.
  • Applications may keep running and so the remote
    end needs to know how to deliver packets to the
    mobile host.
  • Mobile IP
  • Need for transparency for the user
  • No need to change software of majority of routers
    on the Internet.
  • Background compatible

17
The Home Agent
  • However, it doesnt come for free!
  • Some routers need new functionalities.
  • Home Agent Permanent IP address somewhere that
    the mobile calls home.
  • A router located on the home network of the
    mobile.
  • When a node needs to reach the mobile, sends the
    messages to the home address.

18
The Foreign Agent
  • The Foreign Agent Router located in new network
    to which the mobile attaches itself when it is
    away from the home network.
  • Mobile registers with foreign agent and provides
    the address of its home agent.
  • Foreign agent contacts the home agent and
    provides a care-of-address --gt IP address of
    the foreign agent.

19
Note ....
  • The home and foreign agents have to announce
    their presence -- they are specialized routers.
  • The attaching mobile may solicit an advertisement
    by sending a request.

20
Proxy ARP
  • When the mobile is away, the home agent has to
    pick up packets meant for the mobile.
  • With Proxy ARP, the home agent (HA) inserts IP
    address of mobile node instead of its own!
  • It provides its own hardware address though !
  • To invalidate old ARP entries in possible caches,
    as soon as mobile is known to have registered
    with a FA (foreign agent), HA issues an ARP.
  • Note that this is not in response to an ARP
    query and hence is called the gratuitous ARP.

21
Tunnelling
  • Once home agent gets the IP datagram, it tunnels
    the packet to the mobile.
  • To recollect, by tunneling, it encapsulates the
    IP packet within another IP packet destined for
    the foreign agent.
  • The FA strips the IP wrapper, recognizes that the
    packet was meant for a registered mobile nad uses
    its own ARP entry to send the frame to the
    hardware address of the mobile.

22
Other details
  • Mobile has to dynamically acquire an IP address
    in the foreign network.
  • Packets in the other direction are simple, use
    the sources IP address (a fixed location).
  • If the source was a mobile, similar procedures
    could be used.

23
Route optimization
  • Previous approach sub-optimal. Fixed --gt home --gt
    foreign --gt mobile. This is called the triangle
    routing problem.
  • HA will let the sending node know the
    care-of-address of mobile node.
  • Sending node creates tunnel to mobile.

HA
S
FA
24
Implementation and Other issues
  • HA sends a binding update to the source in
    addition to forwarding initial packet.
  • Source creates an entry in a binding cache
    which includes mappings of mobile node addresses
    to care-of addresses.
  • Entries could become stale -- mobile chooses a
    new FA -- old FA would issue a binding warning.
  • Issue Can lead to security problems.
  • Mobile IP not widely deployed -- still being
    researched -- Mobile networking in general an
    upcoming research area.

25
Routing so far...
  • Somewhat scalable.
  • Routers need not know of all the hosts that are
    connected to the Internet.
  • Enough to know of networks.
  • However, in reality, millions of nodes --
    distance vector takes for ever to converge, link
    state too expensive -- both dont scale that much!

26
Revisiting the Internet
  • Called the customer provider view -- we have
    end-user sites, regional service provider
    networks etc.
  • Each unit is independent as far as administration
    goes -- what routing to use, how to assign
    metrics etc. Each unit is called an Autonomous
    System or AS.

27
Intra-AS routing
  • The routing schemes that we have seen so far are
    used for routing within ASes.
  • There are gateway routers that deliver packets to
    outside the AS.
  • Internal nodes know which ASes they can reach,
    but not the intricacies.

28
Scalability and Addressing
  • IP address space is limited -- too many networks.
  • In addition, the more the networks, the more
    would be the entries in each routing table.
  • We need to take care so that address space is not
    used up.
  • Note -- 221 Class C addresses but only 214 Class
    B.
  • A Class C network can have at most 255 hosts,
    what if we had 257 ? Should we allocate one of
    the fewer Class B addresses?

29
Address Efficiency
  • In our example, we had 256 hosts. For this, Class
    C is insufficient.
  • Class B can accommodate 65535 hosts
    (approximately 64 K).
  • If we assign a Class B address to this 256 node
    network, we are wasting the address space -- the
    address efficiency would be 256/65535 0.39 .
  • If we construct a separate Class C network with 2
    hosts, we dont do much better -- efficiency
    becomes 2/255 0.78 .

30
Sub-Netting
  • The solution is to assign a single IP network
    number to a set of several physical networks.
  • Each physical network is called a subnetwork or
    subnet for short.
  • The requirement is that the subnets have to be
    close to each other --gt they need to look like a
    single network when considered together.
  • Each router can have an entry to this
    aggregation of networks.
  • Example -- a campus network can be divided into
    sub-networks.

31
The Subnet Mask and Subnet Number
  • The mechanism by which a single network number
    can be shared among multiple networks involves
    configuring all the nodes on each subnet with a
    subnet mask.
  • This enables us to introduce what we call a
    subnet number -- all hosts on the same subnet
    will have the same subnet number.

32
Representation
  • In this example, we subdivide the network part
    into two sub-parts.
  • The first is the network number and the second a
    Subnet ID.

Note With this, the Class B can be divided into
several sub-networks.
33
An Example
  • We have the Class B network subdivided into three
    subnets.
  • Each subnet has a sub-net mask.
  • The mask determines how many bits belong to the
    subnet ID.
  • Notice that each subnet can have any number of
    bits in its subnet mask.
  • Bitwise ANDing of Host IP address and Subnet Mask
    gives the Subnet No.

28
28
34
Next....
  • Given subnets how does one now make the
    forwarding tables ?
  • More about Subnets
  • Classless Inter Domain Routing.
  • BGP
Write a Comment
User Comments (0)
About PowerShow.com