Computer Networks - PowerPoint PPT Presentation

1 / 118
About This Presentation
Title:

Computer Networks

Description:

Computer Networks Section1. Routing Algorithms and Network Layer Protocol Presenter: Shu-Ping Lin – PowerPoint PPT presentation

Number of Views:132
Avg rating:3.0/5.0
Slides: 119
Provided by: Harry186
Category:

less

Transcript and Presenter's Notes

Title: Computer Networks


1
Computer Networks
  • Section1. Routing Algorithms and Network Layer
    Protocol
  • Presenter Shu-Ping Lin

2
Outline
  • Routing Algorithms
  • The Network Layer in The Internet

3
Outline
  • Routing Algorithms
  • The Network Layer in The Internet

4
Store-and-Forward Packet Switching
5
Routing Algorithm
  • Routing algorithm
  • Datagram
  • Virtual circuit
  • Differences between routing and forwarding
  • Routing versus forwarding

6
Routing Algorithm (contd)
  • Requirement of routing algorithm
  • Correctness and Simplicity
  • Robustness
  • Stability
  • Fairness
  • Optimality

7
Datagram Routing
8
Virtual-Circuit Routing
9
Comparison
10
Routing Algorithm (contd)
  • Nonadaptive (static routing)
  • Do not base routing decisions on measurement of
    the current traffic and topology.
  • The route used to get from node to node is
    computed in advance.
  • Adaptive (dynamic routing)
  • Change routing decisions to reflect changes in
    topology and traffic.

11
Optimality Principle
  • If router J is on the optimal path from router I
    to router K, the the optimal path from J to K
    also falls along the same route.
  • Sink tree
  • The set of optimal routes from all sources to a
    given destination
  • The goal of all routing algorithms is to discover
    and use the sink trees for all routers.

12
Sink Tree
13
Shortest Path Routing
  • Link metric
  • Dijkstra algorithm

14
Flooding
  • Every incoming packet is sent out on every
    outgoing link except the one it arrived on.
  • Termination of flooding process
  • Hop counter
  • Record of packet which has been flooded
  • Applications of flooding
  • Military application
  • Comparison

15
Distance Vector Routing
  • Each router maintains a table giving the best
    known distance to each destination and which line
    to be used.
  • Tables are updated by exchanging information with
    the neighbors.
  • Items in the table
  • Preferred outgoing line
  • Estimate of the distance to that distance

16
Distance Vector Routing (contd)
17
Distance Vector Routing (contd)
  • Converge to the correct answer, but do so slowly.
  • It reacts rapidly to good news, but leisurely to
    bad news.
  • The count-to-infinity problem

18
Count-to-Infinity Problem
19
Problem of DVR
  • Does not take line bandwidth into account.
  • Take too long to converge.

20
Link State Routing
  • Learning about the neighbors
  • Sending a special HELLO packet on each
    point-to-point line
  • Measuring line cost to each of its neighbors
  • Round-trip time
  • Traffic load
  • Line bandwidth

21
Link State Routing (contd)
  • Building link state packet

22
Link State Routing (contd)
  • Distributing the link state packets
  • Flooding is used to distribute the link state
    packet.
  • Each packet contains a sequence number that is
    incremented for each new packet sent.
  • Computing the new routes
  • Dijkstras algorithm can be run locally to
    construct the shortest path to all destinations.

23
Hierarchical Routing
  • As networks grow in size, the router routing
    tables grow proportionally.
  • Each router has responsible for its region and
    knows nothing about the internal structure of
    other router.

24
Hierarchical Routing (contd)
25
Hierarchical Routing (contd)
  • Penalty of increased path length
  • The optimal number of levels for an N router
    subnets is ln N.

26
Broadcasting Routing
  • The source simply send a distinct packet to each
    destination.
  • Waste bandwidth
  • Have to know complete list of all destinations
  • Flooding
  • Generate too many packets
  • Consume too much bandwidth

27
Broadcasting Routing (contd)
  • Multidestination routing
  • Each packet contains a list of destinations.
  • The destination set is partitioned among the
    output lines.
  • Using spanning tree
  • Routers must know which of its lines belong to
    the spanning tree in advance.
  • Copy an incoming packet onto all the spanning
    lines except the on it arrived on.

28
Broadcasting Routing (contd)
  • Reverse path forwarding
  • Router checks to see if the packet arrived on the
    line that is normally used for sending packets to
    the source of the broadcast.

29
Multicast Routing
  • Each router computes a spanning tree covering all
    other routers.
  • When a process sends a multicast packet to a
    group
  • Examining the spanning tree of this group
  • Removing all lines that do not lead to hosts that
    are members of group

30
Multicast Routing (contd)
31
Multicast Routing (contd)
  • Pruning spanning tree
  • Reverse path forwarding
  • Router with no hosts interested in a particular
    group sends a PRUNE message.
  • The subnet is recursively pruned.

32
Multicast Routing (contd)
  • Disadvantage of algorithm, suppose that network
    has n groups, each with an average of m members.
  • For each group, m pruned spanning trees must be
    stored
  • Total of mn trees
  • Core-based tree
  • A host wanting to multicast sends packets to the
    core, which does the multicast along the spanning
    tree.

33
Routing for Mobile Hosts
34
Routing for Mobile Hosts (contd)
  • Mobile host
  • Migratory hosts
  • Roaming hosts
  • All hosts are assumed to have a permanent home
    location that never changes.
  • Hosts also have a permanent home address that can
    be used to determine their home location.

35
Routing for Mobile Hosts (contd)
  • Each area has a home agent which keeps track of
    hosts whose home is in the area, but who are
    currently visiting another area.
  • Each area has foreign agent which keeps track of
    all mobile hosts visiting this area.

36
Routing for Mobile Hosts (contd)
  • Registration procedure
  • Foreign agent searching
  • Registration
  • Foreign agent contacts the mobile hosts home
    agent.
  • Verification of mobile hosts home agent
  • Acknowledgement from the mobile hosts home agent

37
Routing for Mobile Hosts (contd)
  • Tunneling
  • Encapsulate the original packet in the payload
    field of an outer packet and sends the latter to
    the foreign agent.

38
Routing for Mobile Hosts (contd)
39
Routing in Ad Hoc Networks
  • AODV (Ad hoc On-demand Distance Vector)
  • Distant relative of the Bellman-Ford distance
    vector algorithm
  • Considering the limited bandwidth and low battery
    life
  • On-demand algorithm

40
Routing in Ad Hoc Networks (contd)
  • AODV algorithm maintains a table at each node,
    keyed by destination and which neighbor to send
    packets in order to reach destination.
  • Route request packet

41
Routing in Ad Hoc Networks (contd)
  • When a route request packet arrives at a node
  • The (Source address, request ID) pair is looked
    up in a local history table too see if this
    request has already been seen and processed.
  • Receiver looks up the destination in its route
    table.
  • If receiver does not know a fresh route to the
    destination, it increments the Hop count field
    and rebroadcast the REQUEST packet.

42
Routing in Ad Hoc Networks (contd)
43
Routing in Ad Hoc Networks (contd)
  • Destination constructs a ROUTE REPLY packet which
    follows the reverse path to source.
  • Each intermediate node enters this packet into
    local routing table when
  • No route to destination is known.
  • Sequence number for destination in REPLY is
    greater than the value in the routing table.
  • Sequence number is equal but the new route is
    shorter.

44
Routing in Ad Hoc Networks (contd)
  • Problem of mobility
  • Route maintenance
  • Periodically, each node broadcasts a Hello
    message.
  • If no response is returned, router prune this
    link.
  • Active neighbor

45
Routing in Ad Hoc Networks (contd)
46
Routing in Ad Hoc Networks (contd)
  • Critical difference between AODV and DVR
  • Nodes do not send out periodic broadcasts
    containing their entire routing table.

47
Node Lookup in Peer-to-Peer Networks
  • One of p2p routing algorithmChord
  • Each user node has an IP address that can be
    hashed to an m-bit number call node identifier.
  • Successor (k) is the node identifier of the first
    actual node following k around the circle
    clockwise.

48
Node Lookup in Peer-to-Peer Networks (contd)
  • Finger table
  • Start field k 2i (modulo 2m)
  • If key falls between k and successort (k), then
    the node holding information about key is
    successor (k).
  • Otherwise, the entry whose start field is the
    closest predecessor of key is tried.

49
Node Lookup in Peer-to-Peer Networks (contd)
50
Node Lookup in Peer-to-Peer Networks (contd)
  • Node r joining
  • New node r asks successor (r) for its
    predecessor.
  • Insert r in between successor and predecessor.
  • Successor should hand over those keys in the
    range predecessor (r)-r, which now belong to r.
  • Every node runs a background process that
    periodically recomputes each finger by calling
    successor.

51
Outline
  • Routing Algorithm
  • The Network Layer in The Internet

52
The Network Layer in The Internet
  • Principles for network design
  • Make sure it works.
  • Keep it simple.
  • Make clear choices.
  • Exploit modularity.
  • Expect heterogeneity.
  • Avoid static options and parameters.
  • Look for a good design it need not be perfect.

53
The Network Layer in The Internet (contd)
  • Think about scalability.
  • Consider performance and cost.
  • Network layer provides best-efforts way to
    transport datagrams from source to destination.

54
The IP Protocol
  • The IPv4 header

55
IP Address
  • IP address formats

56
IP Address (contd)
  • Special IP address

57
Subnet
  • Split a network into several parts for internal
    use.

58
Subnet (contd)
  • Some bits are taken away from the host number to
    create a subnet number.
  • For example, a university can use a 6-bit subnet
    number and a 10-bit host number, allowing fro up
    to 64 subnets.
  • Outside the network, the subnet is not visible,
    so allocating a new subnet does not require
    contacting ICANN.

59
Subnet (contd)
  • Subnet mask indicates the split between network
    subnet number and host.

60
Network Address Translation
  • Shortage of IP address
  • Within the company, every computer gets a unique
    IP address, which is used for routing intramural
    traffic.
  • An address translation takes place when a packet
    exits the company.

61
Network Address Translation (contd)
62
Network Address Translation (contd)
  • Use TCP port to distinguish the traffic.
  • TCP source port field is replaced by an index
    into the NAT boxs translation table.
  • Each entry contains original IP address and
    original source port.

63
Network Address Translation (contd)
  • Violation of the architectural model of IP
  • Every IP address uniquely identifies a machine.
  • NAT changes the Internet from a connectionless
    network to a kind of connection-oriented network.
  • Violation of protocol layering
  • layer k may not make any assumptions about what
    layer k1 has put into the payload field.

64
Internet Control Protocols
  • Internet Control Message Protocol (ICMP)

65
Address Resolution Protocol
  • How do IP address get mapped onto data link layer
    addresses, such as Ethernet?
  • Configuration file
  • ARP
  • Broadcast a packet onto the Ethernet asking Who
    owns IP address xxx.xxx.xxx.xxx.
  • Correspondent will reply with its Ethernet address

66
Address Resolution Protocol (contd)
67
Address Resolution Protocol (contd)
  • Make ARP work more efficiently
  • Local cache
  • ARP request with requestors Ethernet address
  • Transmit data to remote network.

68
RARP, BOOTP, and DHCP
  • When a computer is booted how does it get the IP
    address.
  • RARP
  • Broadcast a packet to ask RARP server.
  • Packet cannot be forwarded by routers, so RARP
    server is needed on each network.

69
RARP, BOOTP, and DHCP (contd)
  • BOOTP
  • Use UDP message, which are forwarded over
    routers.
  • Require manual configuration of tables mapping IP
    address to Ethernet address.
  • DHCP
  • Both manual IP address assignment and automatic
    assignment

70
RARP, BOOTP, and DHCP (contd)
  • DHCP

71
OSPFThe Interior Gateway Routing Protocol
  • Routing algorithm within as autonomous system
    (AS) is called an interior gateway protocol.
  • The original Internet interior gateway protocol
    was distance vector protocol (RIP).
  • Link state protocol replaced RIP in 1979.
  • OSPF began work in 1988.

72
OSPFThe Interior Gateway Routing Protocol
(contd)
  • Internet is made up of a large number of
    autonomous systems.
  • Each AS is operated by a different organization
    and can use its own routing algorithm.
  • Every AS has a backbone area.
  • All areas are connected to the backbone and can
    communicate each other via backbone.

73
OSPFThe Interior Gateway Routing Protocol
(contd)
74
OSPFThe Interior Gateway Routing Protocol
(contd)
  • Using flooding, each router informs all the other
    router in its area of its neighbors and costs.
  • This information allows each router to construct
    the graph for its area and compute the shortest
    path.
  • Backbone routers accept information from the area
    border routers in order to compute the best route
    from each backbone router to every other router.

75
BGPThe Exterior Gateway Routing Protocol
  • All interior gateway protocol has to do is to
    move packets as efficiently as possible without
    worrying about politics.
  • Exterior gateway protocol routers have to worry
    about politics.
  • No transit traffic through certain ASes.
  • Traffic starting or ending at IBM should not
    transit Microsoft.
  • Policies are typically manually configured into
    each BGP router and are not part of protocol.

76
BGPThe Exterior Gateway Routing Protocol (contd)
  • Stub networks
  • Has only one connection to BGP graph and cannot
    be used for transit traffic.
  • Multiconnected networks
  • Could be used for transit traffic, except that
    they refuse
  • Transit networks
  • Willing to handle third-party packet

77
BGPThe Exterior Gateway Routing Protocol (contd)
  • Border Gateway Protocol (BGP)
  • Fundamentally a distance vector protocol, but
    each BGP router keeps track of the path used.

78
Internet Multicasting
  • IP uses class D address to support multicast.
  • Two kinds of group address
  • Permanent address
  • Temporary address

79
Internet Multicasting (contd)
  • 224.0.0.1 All systems on a LAN
  • 224.0.0.2 All routers on a LAN
  • 224.0.0.5 All OSPF routers on a LAN
  • 224.0.0.6 All designated OSPF routers on a LAN
  • Temporary groups must be created before they can
    be used.

80
Internet Multicasting (contd)
  • Multicasting routing is done using spanning tree.
  • Each multicast router exchanges information with
    its neighbors, using a modified distance vector
    protocol.

81
Mobile IP
  • Increment of portable computers.
  • Major goals
  • Mobile host must be able to use its home IP
    address anywhere.
  • Changes to software and router are not permitted.
  • No overhead should be incurred when a mobile host
    is at home.

82
Mobile IP (contd)
  • See section 5.2.9 (Routing for Mobile Hosts)
  • When foreign shows up at a foreign site, it
    contacts the foreign host there and registers.
  • The foreign host contacts the users home agent
    and gives it a care-of-address.

83
Mobile IP (contd)
  • Each foreign agent periodically broadcast its
    address and type of service, which called
    advertisement.
  • Registration for impolite mobile hosts that leave
    without saying goodbye.

84
IPv6
  • While NAT may buy a few more years time, IP in
    its current form (IPv4) is numbered.
  • IETF issued a call for proposal and discussion in
    RFC 1550.
  • IPv6 is not compatible with IPv4, but it is
    compatible with other auxiliary Internet protocol.

85
IPv6 (contd)
  • Main features
  • Longer addresses
  • Simplification of the header
  • Better support for options
  • Security
  • Quality of service

86
IPv6 (contd)
  • The IPv6 fixed header

87
IPv6 (contd)
  • New notation of 16-byte address
  • 80000000000000000123456789ABCDEF
  • 8000123456789ABCDEF
  • IPv4 can be written as 192.168.20.46
  • Vanishment of IPv4 headers
  • IHL
  • Protocol
  • Checksum

88
IPv6 (contd)
  • Extension header is encoded as (Type, Length,
    Value) tuple.
  • Type is a 1-byte field telling which option this
    is.
  • Length is a 1-byte field telling how long the
    value is.
  • Value is any information required.

89
IPv6 (contd)
  • IPv6 extension header

90
IPv6 (contd)
  • Controversies
  • Hop limit field length
  • Maximum packet size
  • Checksum
  • Mobile issue

91
  • Section2. The Internet Transport Protocols TCP

92
Introduction to TCP
  • Function of providing reliable end-to-end byte
    stream over an unreliable internetwork.
  • Lack of IP
  • No guarantee that packets will be delivered
    properly.
  • Packets may arrive in the wrong order.

93
TCP Service Model
  • TCP service is obtained by both sender and
    receiver creating sockets.
  • Each socket has IP address and a 16-bit number
    called port.
  • Port number below 1024 are called well-known
    ports and reserved for standard service.

94
TCP Service Model (contd)
  • Well-Known Ports

95
TCP Service Model (contd)
  • Characteristics of TCP connections
  • Full duplex
  • Point-to-point
  • Byte stream, not a message stream

96
TCP Service Model (contd)
  • A key feature of TCP is that every packet on a
    TCP connection has its own 32-bit sequence
    number.
  • TCP segment consisting of fixed 20-byte header is
    used for exchanging data between sender and
    receiver.

97
TCP Service Model (contd)
  • Segment size issue
  • Fit in the 65515-byte IP paylo.ad
  • Cant exceed maximum transfer unit (MTU).
  • MTU is generally 1500 bytes.
  • The basic protocol used by TCP is the sliding
    window protocol.
  • Timer
  • Acknowledgement number

98
TCP Segment Header
99
TCP Connection Establishment
  • Three-way handshake.

100
TCP Connection Release
  • To release a connection , either party can send a
    TCP segment with the FIN bit set.
  • When the FIN is acknowledged, that direction is
    shut down for new data.
  • Normally, four TCP segments are required to
    release a connection.

101
TCP Connection Management Modeling
102
TCP Transmission Policy
103
TCP Transmission Policy (contd)
  • When the window size is 0, the sender stop
    sending data to receiver except
  • Urgent data may be sent.
  • Send a 1-byte segment to make the receiver
    reannounce the next byte expected and window size.

104
TCP Transmission Policy (contd)
  • Consider the worst case in performance issue.
  • For receivers
  • Delay acknowledgements and window updates for 500
    msec in the hope of acquiring some data.
  • For senders
  • Nagles algorithm

105
TCP Transmission Policy (contd)
  • Silly window syndrome
  • Data are passed to the sending TCP entity in
    large blocks, but an interactive application on
    the receiving side reads data 1 byte at a time.

106
TCP Transmission Policy (contd)
  • Clarks algorithm
  • It forces window update to wait until it has a
    decent amount of space available.
  • Combination of Nagles and Clarks algorithm.

107
TCP Congestion Control
  • When the load offered to any network is more than
    it can handle, congestion builds up.
  • TCP achieves congestion control by dynamically
    manipulating the window size.
  • First step of congestion control detection.
  • All the Internet TCP algorithms assume that
    timeouts are caused by congestion.

108
TCP Congestion Control (contd)
109
TCP Congestion Control (contd)
  • Two potential problemsnetwork capacity and
    receiver capacity.
  • Each sender maintains two windowsreceiver window
    and congestion window.
  • The number of bytes that may be sent is the
    minimum of the two windows.

110
TCP Congestion Control (contd)
  • Slow start

111
TCP Timer Management
  • Retransmission timer
  • Difficulties of setting retransmission timer

112
TCP Timer Management (contd)
  • Estimate RTT
  • Where is a smothing factor that determines how
    much weight is given to the old value.
  • TCP uses ßRTT to estimate retransmission timer.

113
TCP Timer Management (contd)
  • Jacobson proposed proposed to use mean deviation
    as a cheap estimator of the standard deviation.

114
TCP Timer Management (contd)
  • Potential problem
  • When the ack of retransmission packet comes in,
    it is unclear whether the ack refers to the first
    transmission or a later one.
  • Karns algorithm
  • Persistence timer is design to prevent the
    deadlock.
  • Keepalive timer.

115
Wireless TCP and UDP
  • Problem due to congestion control.
  • TCP assumes that timeouts are caused by
    congestion, not by lost packets.
  • A packet is lost on a wired network, the sender
    should slow down.
  • When one is lost on a wireless network, the
    sender should try harder.

116
Wireless TCP and UDP (contd)
  • Bakne and Badrinath propose indirect TCP which
    split the TCP connection into two separate
    connections.

117
Wireless TCP and UDP (contd)
  • The advantage of this scheme is that
    bothconnections are now homogeneous.
  • Timeouts on the first connection can slow the
    sender down, whereas timeouts on the second one
    can speed it up.z
  • The disadvantage of the scheme is that it
    violates the semantics of TCP.

118
Transactional TCP
  • Efficiency problem of TCP
Write a Comment
User Comments (0)
About PowerShow.com