CIS4445 DATA COMMUNICATIONS - PowerPoint PPT Presentation

1 / 106
About This Presentation
Title:

CIS4445 DATA COMMUNICATIONS

Description:

Exercises: 1, 2, 3, 4, 8, 12, 13, 14, 15. Review Questions: 1, 3, 4, 6, ... Subdomain 1. Subdomain 2. Designated Nodes. Hierarchical Arrangement of Domains. Root ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 107
Provided by: joelj5
Category:

less

Transcript and Presenter's Notes

Title: CIS4445 DATA COMMUNICATIONS


1
CIS-4445 DATA COMMUNICATIONS
  • Chapter 7
  • Wide Area Networks (WANs)

2
HOMEWORK - CHAPTER 7
Review Questions 1, 3, 4, 6, 7, 8, 15, 23, 26,
28
Exercises 1, 2, 3, 4, 8, 12, 13, 14, 15
3
Introduction
  • Motivation for WANs
  • Wide Area Network Routing
  • Public Data Networks The X Series
  • Internet Protocols
  • Transport Protocols

4
Generalized Wide Area Network
X
Z
W
A
S
D
B
C
T
Y
5
Motivation for WANs
  • Grew out of a need to connect many networks
  • Connections often required protocol converters to
    translate from one protocol to another because
    the networks were different
  • Cover large area
  • Many sub-networks/hosts
  • LAN protocols not appropriate
  • Collision detection not appropriate distances
    too far
  • Token passing not appropriate token takes long
    time to arrive back.

6
Motivation for WANs
  • More-complex routing
  • Many ways to get somewhere
  • Need to handle node/link failure
  • Need to handle congestion
  • Need to buffer significant amounts of data while
    protocol decides what to do with packets
  • Management of the WAN becomes an issue
  • Generally not going to have one organization with
    control/responsibility for entire network

7
Motivation for WANs
  • Sub-networks don't always use same protocols (may
    differ at any OSI level)
  • Level 1 (repeater)
  • level 2 (bridge)
  • Level 3 (router)
  • Determines which route to follow
  • Level 7 (gateway)
  • Entire protocol different
  • e.g. compression schemes, encoding, encryption,
    connection protocols, etc.

8
Introduction
  • Motivation for WANs
  • Wide Area Network Routing
  • Public Data Networks The X Series
  • Internet Protocols
  • Transport Protocols

9
Wide Area Network Routing
  • Network protocols have to determine how to get
    the information from Point A to Point B
  • A good starting point is to look at how routing
    was accomplished in smaller networks using
    Bridges at Layer 2
  • Depends on many factors, e.g.
  • Cost (money) of sending over link
  • Time required (link speed)
  • Congestion (current traffic over link)
  • Not always simple shortest-path
  • Need to think about bringing in higher layers of
    the OSI model to handle the tougher connection
    problems
  • Chapter 6 - layers 1 and 2 only ones used

10
Generalized WAN w/ Connection Costs
D
B
5
2
4
A
3
7
F
4
1
7
2
C
6
E
11
Partial Routing Tables for Nodes
  • Use similar approach as used in Chapter 6 with
  • bridge routing
  • Develop routing tables for each node in the WAN
    based on cost
  • Not going to have a lookup table for every node
    - too much

Node A
Node B
Node E
12
Types of Routing
  • Need to develop routing algorithms that will work
    for a WAN
  • Similar to using Bridges at layer 2, there are
    several basic types of routing algorithms which
    we need to discuss
  • Centralized Routing
  • Distributed Routing
  • Static Routing
  • Adaptive Routing
  • Plus combinations!

13
Centralized Routing
  • One node obtains connection/cost info
  • Decides on routes
  • Broadcast routes to other nodes
  • Use a Routing matrix

Destination Node
Source Node
14
Centralized Routing
  • Advantages
  • Simple routing method because one location
    assumes routing control
  • Disadvantages
  • Failure of the central location or any links
    connected to it has severe effect on providing
    routing information to network nodes

15
Distributed Routing
  • Each node determines/maintains own table
  • Starts with knowing only its nearest neighbors
  • Obtain costs from neighbors to other nodes
  • Share routing information with other nodes to
    gather knowledge of the wider network

D
A
2
7
2
1
E
2
4
B
C
16
Distributed Routing
  • Advantages
  • Failure of a node or link has little effect in
    providing accurate routing information
  • Disadvantages
  • Exchange of information is more complex
  • May take longer for a node to learn of conditions
    in remote locations

17
Static Routing
  • Tables fixed once established
  • Assumes the cheapest path is not dependent on
    time
  • Valid assumption if conditions don't change much
  • Major upgrades to a node in the network
  • Loss of a network node

18
Static Routing
  • Advantages
  • Simple method because nodes do not have to
    execute routing algorithms repeatedly
  • Disadvantages
  • Insensitive to changing conditions
  • What was a good route may turn into a very bad one

19
Adaptive Routing
  • Tables adjust to accommodate conditions
  • Necessary if conditions change often
  • Problems
  • Packet may never get to destination (sent back
    and forth as conditions change)
  • Difficult to implement efficiently takes time
    for info to propagate to all nodes (may be
    out-of-date).

20
Adaptive Routing
  • Advantages
  • Provides the most current information regarding
    link costs
  • Disadvantages
  • High overhead because nodes must maintain current
    information
  • Transmitting information regarding changing
    conditions adds to network traffic

21
Dijkstra's Algorithm
  • Also know as
  • The shortest path algorithm
  • Forward search algorithm
  • Static "centralized"
  • Can be made adaptive if executed often
  • Must know cost on all links
  • Iterative process which builds a set of nodes one
    at a time
  • "Shortest path" known for each node in set.

22
Dijkstra's Algorithm - Process
  • Initialize
  • set S A (where A is the starting node)
  • for all other nodes x
  • PRIOR(x)A if directly connected to A, else
    "undefined".
  • COST(x)cost of link AgtX (or infinity if none)

23
Dijkstra's Algorithm - Process
  • Loop (until no nodes left)
  • W x there's a link from x to a node in S,
    but x is not in S
  • choose y from W with minimum COST
  • S S union y
  • for all x not in S, update COST
  • COST(x) minimum of COST(x) and (COST(y)cost of
    link x to y)
  • if cost changed, PRIOR(x) is y

24
Dijkstra's Algorithm - Process
  • PRIOR function determines path back to start
  • Each node can exec with itself as start node
  • Or centralize and broadcast results.

25
Adding Nodes using Dijkstra's Algorithm
  • Snodes to which cheapest route to A is known
  • Wnodes connected to a node in S via a direct
    link

S
W
Direct Link
Put node X in S
X
Route
A
Is there a cheaper route to V through X?
V
Cost (V) represents cost of the current route
from A to V (if it exists)
26
Dijkstra's Algorithm - Example
27
Values Defined by Dijkstra
28
Cost Comparisons for Dijkstras Algorithm
Cost Comparisons After Adding C to S
Cost Comparisons After Adding B to S
29
Routing in Wide Area Networks
  • For networks that are very large, either in terms
    of the number of hosts or the distances between
    hosts, the "shared medium" approaches used in
    LANs just don't scale.
  • No matter how efficient the protocol for sharing
    the medium may be, having all message go to all
    stations involves too much unnecessary
    transmission of information when the number of
    stations is very large.
  • We have seen that the efficiency of most medium
    sharing protocols decreases as the physical size
    of the network increases

30
Routing in Wide Area Networks
  • In such networks, it is better to depend on
    intermediate nodes to forward packets selectively
    along paths leading to their destinations. This
    is similar to the work performed by bridges on a
    LAN except
  • We are no longer concerned that the process be
    transparent to sending stations or to network
    administrators, so...
  • We would rather use multiple (i.e. cyclic) paths
    in the network to maximize performance and
    improve reliability rather than depend on a
    spanning tree.

31
Routing in Wide Area Networks
  • To make all this work, when machine A wants to
    talk to machine B, somehow the network has to
    find a path from A to B.
  • There are several major characteristics of the
    process of finding such paths that vary in
    significant ways from network to network

32
Routing in Wide Area Networks
  • Characteristics of routing to consider
  • Static Routing originally used in small networks
  • Dynamic Routing routing protocols that adjust to
    changes in the state of network links
  • Distributed Routing distribute the task of
    computing routes among all the nodes of the
    network
  • Datagrams vs. Virtual Circuits ie packet by
    packet vs message by message
  • Hop-by-hop routing vs. source routing Source
    only knows initial node vs source figuring out
    the entire route

33
Routing in Wide Area Networks
  • Alternatives of hop-by-hop routing and datagram
    based networks are more reasonable than they
    might seem
  • With hop-by-hop routing, the work done for each
    packet is simply to look its destination up in a
    destination/next-step table
  • Even if a connection had been established first,
    the switching node would have to lookup the
    packet's virtual circuit ID to figure out the
    next step
  • When routing is done hop-by-hop, the switches are
    really depending on big tables to make routing
    decisions.
  • The problem isn't what you do while forwarding a
    packet but rather how those tables get build

34
Routing in Wide Area Networks
  • Weve already talked about Dijkstras Algorithm
    for determining a least cost path from A to B
  • Now lets examine a few other algorithms

35
Bellman-Ford Algorithm
  • Backward Search Algorithm
  • Each node A knows its immediate neighbors and the
    cost to send to them.
  • For any node Z in the network, X is the neighbor
    to send frames destined to Z if X minimizes the
    following
  • COSTAgtX COSTXgtZ
  • i.e. for each neighbor Y, calculate
  • COSTAgtY COSTYgtZ
  • If Y does not know how to get to Z,
  • COSTYgtZ infinity (i.e. large)

36
Bellman-Ford Algorithm
  • Let X be the Y which produces the lowest cost.
  • Periodically each station sends its table of
    costs to its neighbors
  • Neighbors use these to adjust their own routing
    tables
  • Over time, the algorithm will converge to a
    shortest path solution
  • Slow reaction to change (depends on topology)
  • Rely on neighbors for shorter paths
  • Invalidate routing table entries periodically.
    When?

37
Routing in Wide Area Networks
  • Weve discussed Dijkstras and the Bellman-Ford
    Algorithms
  • Although not obvious, Dijkstras algorithm will
    converge to a shortest path much more rapidly
    than Bellman-Ford
  • Bellman-Ford is more adaptable to a distributed
    environment
  • Dijkstras algorithm is superior if we can find
    some way to make Dijkstras algorithm work better
    in a distributed environment
  • all we really need is to find a way to send each
    node's link state information to all other nodes

38
Routing in Wide Area Networks
  • We cannot depend on routes based on shortest
    paths to deliver the link-state packets required
    by Dijkstra's algorithm to determine these
    shortest paths
  • If nothing else, think of the initialization
    problem - How do you distribute the link state
    packets when the network is first started and
    nodes have no idea how to route anything?
  • Similar to the start-up problem is the problem of
    how the network will recover if a damaged link
    whose failure had partitioned the network into
    disjoint components becomes operational again.
  • If the load on the current shortest path rises
    suddenly, then to reroute packets to use less
    loaded paths a network that used "shortest paths"
    would have to depend on congested paths to
    deliver the information needed to route around
    the congestion.

39
Routing in Wide Area Networks
  • Use Link State Routing to provide information
    about all nodes in the network to each node
  • Basically use a form of the flooding algorithm we
    talked about in chapter 6 when we talked about
    routing with transparent bridges and the spanning
    tree algorithm
  • Use counters to control the number of link state
    packets in the network
  • Run Dijkstra's algorithm periodically to update
    routing tables based on recent link state packets

40
Routing in Wide Area Networks
  • So far what we have discussed will work at least
    in theory for any network
  • However, a major consideration is not the cost of
    the route but merely the ability to get the
    information there in a timely manner
  • This is especially true for very large networks
    or systems of networks
  • Need to take a different approach
  • The Internet solution - Hierarchical Routing!

41
Hierarchical Routing
  • Large WAN
  • Impossible for each node to store entire routing
    table
  • Too much info to send between nodes
  • Nodes divided into domains
  • Routing within domain accomplished by Interior
    Routing Protocols like those weve already
    discussed
  • Routers connect domains using exterior routing
    protocols

42
Hierarchical Routing
  • Destination address specifies node (host), domain
    and sub-domains.
  • Router only forwards frames destined for another
    domain.
  • e.g. postal addresses

43
Hierarchical Routing
Designated Nodes
A
B
X
Y
Domain 2
Domain 1
W
Subdomain 1
Subdomain 2
Domain 3
44
Hierarchical Arrangement of Domains
Root
Domain 1
Domain 2
Domain 3
A
X
Other nodes
Other nodes
B
Y
Subdomain 1
Subdomain 2
W
Z
C
K
Other nodes
Other nodes
45
Hierarchical Routing
  • Internet uses hierarchical routing
  • 32-bit address (4 8-bit numbers)
  • 2 parts (2-level hierarchy)
  • IP address of site (network)
  • IP address of host (machine)
  • Class AC addresses

46
Hierarchical Routing
  • Names (user_at_host.dept. .domain)
  • no geographical significance
  • for users only, not for routing
  • DNS (Domain Name Server) protocol translates
    between Name IP number
  • Address depletion becoming a problem
  • Too few addresses for number of machine on
    Internet
  • Extending the standard
  • Reusing addresses

47
Routing Problems
  • Congestion
  • Too much data at link cannot send them quickly
    enough.
  • Frames delayed network unresponsive
  • Solutions to problems with congestion
  • Do nothing (wait for it to go away)
  • Eliminate waiting frames
  • Use flow control
  • Allocate buffers for each virtual circuit
  • Choke packets

48
Summary of Routing Strategies
49
Introduction
  • Motivation for WANs
  • Wide Area Network Routing
  • Public Data Networks The X Series
  • Internet Protocols
  • Transport Protocols

50
X Series Protocols
  • Four common protocols X.25, X.3, X.28, and X.29
  • All deal with getting data through a public data
    network
  • Deals with transmitting packets through a myriad
    of switches - ie packet switching networks

51
Packet-Switched Network
A
Two basic modes 1 - Virtual Circuits 2 -
Datagram Service
5
4
B
3
1
2
1
Packet Switched Network
4
5
C
3
2
D
Switching logic in the cloud makes routing
decisions similar to those we just discussed
52
Virtual Circuit Connections
A
C
Vc1
Vc3
Vc5
Y
X
Vc3
Vc1
Vc2
B
D
53
Routing Tables using Virtual Circuits
54
Datagram Service
4
5
A
Y
3
2
1
D
X
Packet Switched Network
55
Comparison of Virtual Circuits and Datagrams
Virtual Circuit
Datagram
  • Helps prevent congestion. Deterministic use of
    resources.
  • If circuit active too long, current path may not
    be the best one
  • Routing decision is made just once
  • Packets always arrive in order
  • Node failure breaks the link - loss of data
  • Unexpected packets make congestion control more
    difficult
  • Nodes route each packet using the most current
    information
  • Separate routing decisions for each packet
  • Packets can arrive out of order
  • A failed node can be routed around

56
X.25 Public Data Network Interface
DTE
Network defined protocol
X.25 Protocol
DCE
DCE
DTE
X.25 Protocol
Packet Data Network
57
X.25 Interface Standard
  • Defines a synchronous transmission analogous to
    the lowest three layers of the OSI model
  • Network layer receives the user data and puts it
    into an X.25 packet
  • The X.25 packet is sent to the data link layer
    where it is embedded in a LAPB frame (link access
    protocol - balanced)
  • The physical layer then transmits the frame using
    the X.21 protocol

58
X.25 Protocol Layers
Packet layer
Network
Network
LAPB
Data Link
Data Link
Physical
Physical
X.21 or X.21bis
59
X.25 Packet Formats
1
1 or 2
variable
1
Flags, logical group
logical channel
control
DATA
Data Packet
1
1 or 2
variable
1
Flags, logical group
logical channel
Packet Type
Other Information
Control Packet
60
X.25 Packet Packaging
X.25 Packet
LAPB Frame
61
Triple-X Standards
  • Used to connect non-DTE devices to
    packet-switched networks
  • X.3 - Packet Assembler and Disassembler
  • accepts input from a dumb terminal and constructs
    X.25 packets
  • X.28 - Provides the interface standard between
    the X.3 and the dumb terminal
  • What commands/keystrokes mean
  • X.29 - PAD-host interface
  • Defines the communication protocol between the
    PAD and the remote host

62
Triple-X Protocols
X.29 Protocol
host
X.25 Protocol
DCE
Non-X.25 device
Network defined protocol
X.3 PAD
X.28 Protocol
Packet Data Network
63
Introduction
  • Motivation for WANs
  • Wide Area Network Routing
  • Public Data Networks The X Series
  • Internet Protocols
  • Transport Protocols

64
Internet Protocols
  • With all the different approaches to networking
    we have considered, it should be clear that one
    of the problems facing the effective use of
    networks is simply that there are too many kinds
    of networks.
  • To provide the sort of global communication
    possible through the Internet, we need to provide
    mechanisms that enable machines connected to
    networks based on distinct technologies and
    protocols to communicate.

65
Internet Protocols
  • The Internet is based on a different approach to
    interconnecting dissimilar networks
  • Rather than simply translating frames of one
    existing protocol format to another, the Internet
    is based on defining a new "virtual network"
    protocol -- the iP (or internet protocol)
  • Given the common language represented by the iP,
    one only needs 2N converters. N that convert from
    the existing protocols to iP and N that convert
    from iP to the existing protocols.
  • To interconnect without overlaying a protocol
    such as IP we would need N(N-1) different
    protocol converters

66
Internet Protocols
DNS
SMTP
FTP
TELNET
TCP
UDP
IP and ICMP
Layer Three
Lower layer protocols
67
IP Transmitting Packets over Different Networks
B running TCP/IP
A running TCP/IP
User to User connection
TCP segment
TCP segment
Data
Data
IP packet
IP packet
Router running IP
Router running IP
TCP
TCP
Ethernet
TR
X.25
X.25
Ethernet frame
IP
IP
IP
IP
IP
IP
Token ring frame
Token Ring LAN
X.25 PDN
Ethernet LAN
68
Internet Protocol Packet
Packet Length
Type of service
Version
Header length
Identification
Flags
Fragment Offset
Time to Live
Protocol
Checksum
Header
Source IP address
Destination IP address
Options
Message Data
69
Internet Domains
Domain
Meaning
  • Com
  • edu
  • int
  • gov
  • mil
  • net
  • org
  • country code
  • Commercial institution
  • Educational institution
  • International organizations
  • Government agency
  • Military
  • Network service providers
  • Nonprofit organizations
  • jp for Japan, etc

70
Internet Address Classifications
71
Domain Name System
  • A distributed database that contains copies of
    text addresses and their associated 32-bit
    address
  • All information about addresses is spread across
    the internet among a collection of DNS servers
  • When a host computer needs an address
    translation, it calls a DNS server to look up the
    internet address
  • Each DNS server responsible for a ZONE in the DNS
    hierarchy
  • How then does a host know how to find the IP
    address? And get the information physically there?

72
Finding IP addresses
  • Remember that internet routing is hierarchical.
  • Within a physical network we depend on the
    underlying networks delivery mechanism (broadcast
    or switched).
  • We only count on IP routing and routers to get a
    packet to some machine (a router) actually
    attached to the same network as the destination
    machine.
  • In order to perform hierarchical routing,
    machines in the network need a way to quickly
    determine whether a packet is destined for a
    machine in the current network or requires
    forwarding through IP routers
  • IP solves this by using an address format that is
    tied to the underlying networks

73
Finding IP Addresses
  • Each machine's IP address has two sub-parts.
  • Network Part
  • Host Part

74
Finding IP Addresses
  • Network part
  • The first portion of a host's address identifies
    the network to which the host is attached. All
    machines attached to a given physical network
    must share this component of their IP addresses
  • The network part of an IP address is assigned by
    a "central authority". Before you can connect to
    the Internet, you must contact this authority to
    get a network number
  • InterNIC!!

75
Finding IP Addresses
  • Host part
  • Machine's within a network are identified by the
    second portion of the IP address. No two machines
    within a given hardware network may have the same
    host portion of their IP addresses
  • Once a network number is assigned by the central
    authority, those running a local network can
    independently assign host numbers to machines
    within their network

76
Finding an IP address
Root
edu
com
org
mit
uwgb
uwm
brooks
microsoft
acm
ieee
gbmsol
gbraxa
When a host needs an address translation it sends
a request to the local name server. If the local
server does not know it, the request is sent to
one of the DNS servers at the top level. The top
level DNS server then directs the address request
to the appropriate name server
77
Finding an IP address
  • Now that we know how to find an IP address
  • We can route a packet through the Internet - is
    that all?
  • We still have to resolve that IP address into a
    physical address that contains the hardware
    protocol address - NOT the IP address
  • This is normally done by the destination network

78
Finding the Hardware Address
  • We still need to find the appropriate hardware
    protocol address for the destination host (or
    router)
  • most real implementations of TCP/IP depend on a
    protocol named ARP (Address Resolution Protocol)
    to build a look-up table on demand.
  • ARP (usually) depends on the broadcast capability
    of LANs

79
Finding the Hardware Address
  • When a machine's IP software needs to find the
    hardware address corresponding to a local IP
    address, it first looks in its (initially empty)
    table/cache of IP-to-hardware address pairs
  • If it can't find a match, it broadcasts a
    hardware protocol packet asking if anyone knows
    the hardware address for the given IP address
  • If a machine sees such a packet containing a
    request for its own address it responds with a
    packet containing its hardware address
  • This hardware address then gets added to the cache

80
Summary of a Routers Actions
  • Receive an IP packet and extract the IP address
  • If the packets source route option is marked,
    route the packet accordingly
  • Else, determine the network number contained in
    the IP address
  • Does it match a network to which the router is
    connected?

81
Summary of a Routers Actions
  • If yes, determine the physical address of the
    destination (either by cache lookup or dynamic
    binding) and send a frame containing the IP
    packet to that destination
  • If no, find the network number in the routing
    table and forward the packet to the specified
    router
  • If for some reason the network is not in the
    routing table, forward the packet to a default
    router

82
IP Summary
  • What IP provides is called "Best Effort deliver".
  • IP doesn't deliberately try to avoid delivering
    packets
  • It just doesn't do anything to ensure they get
    delivered
  • While IP does not attempt to correct errors, it
    does report many of them

83
ICMP
  • All implementations of IP are expected to
    implement ICMP (Internet Control Message
    Protocol) which is used to report unusual
    conditions
  • ICMP is implemented by placing ICMP messages in
    IP packets and then asking IP to deliver them
  • Obviously, if IP is really working badly, ICMP
    will be an ineffective way to report errors
  • ICMP messages provide ways to
  • Report when there is no known way to reach a host
  • Report when a packet exceeds its time to live
    (probably because of a routing loop)
  • Test to see if a host is responsive

84
Introduction
  • Motivation for WANs
  • Wide Area Network Routing
  • Public Data Networks The X Series
  • Internet Protocols
  • Transport Protocols

85
Transport Protocols
DNS
SMTP
FTP
TELNET
TCP
UDP
Layer Four
IP and ICMP
Lower layer protocols
86
Transport Protocols
  • The physical, data-link and network layers of the
    OSI protocol hierarchy provide the ability to
    deliver messages from one machine to another
    through complex networks of networks
  • We really need more than that - the ability to
    deliver a message from one process to another
  • Typical server machine is likely to be running
    several processes intended to provide distinct
    network services.
  • When a packet arrives at such a machine, the
    network software needs some way to determine
    which server process the packet should ultimately
    be delivered to
  • If it is possible to run two clients on a machine
    simultaneously (Netscape and NCSA Telnet), then
    the network software has to somehow figure out
    which client each incoming packet is destined
    for.

87
Transport Protocols
  • Providing process-to-process communication
    through a network is the role associated with the
    "transport" level in the OSI model
  • The most widely used protocol in the Internet
    Protocol suite, TCP (Transmission Control
    Protocol), is an example of a transport level
    protocol.
  • Lets start our discussion of transport protocols
    with a simpler, less well known member of the
    Internet protocol suite, UDP (User Datagram
    Protocol).

88
UDP
  • The beauty of UDP is that it does so little.
  • Basically, almost the only difference between UDP
    and IP is the use of something called port
    numbers
  • Remember, the big difference between the
    transport layer and the network layer is the
    desire to provide process-to-process
    communication
  • To do this, we need some form of
    process-to-process addressing
  • It would be dangerous to use packet addresses
    formed by joining an IP address to a process
    number because process numbering schemes vary
    from operating system to operating system

89
UDP
  • UDP introduces the notion of an addressable set
    of "ports" associated with each machine and
    allows messages to be sent and received only
    through these ports
  • Like using extensions in a office telephone
    system
  • IP address is the basic phone number
  • Port address is the extension to the person you
    want to reach

90
UDP
  • Before a process running on a machine can send or
    receive UDP messages, it must ask the TCP/IP
    software on its machine to allocate a UDP port
    for its use
  • A process can either ask for a port with a
    particular number or any free port
  • On systems with security mechanisms, certain port
    numbers (the low ones) are reserved for
    privileged processes
  • When a packet is sent, the destination address
    must include both the IP address for the
    destination machine and a destination port
    number.
  • When a packet is delivered, the receiving process
    is given the sender's IP address and the source
    port number

91
UDP
  • To deliver UDP packets, the network again depends
    on the magic of encapsulation
  • The format of a UDP packet is

Source Port
Destination Port
Check sum
Length
Packet Data
  • The packet only contains port numbers (no IP
    addresses)
  • To deliver a UDP packet, the UPD software places
    the entire UDP packet in the data field of an IP
    packet
  • IP packet will have the source and destination IP
    addresses in its header (and which will of course
    end up as the data field of some hardware
    protocol packet)

92
UDP Summary
  • UDP provides layer 4 services for DNS
  • UDP has little overhead
  • UDP provides no acknowledgement of errors
  • UDP does perform error detection and if an error
    occurs, discards the data

93
TCP
  • A major function of TCP is to ensure reliable
    delivery
  • Why do we have to deal with reliability again
    when we dealt with it at the data link layer?
  • If you accept that we must deal with it again,
    why not take care of it at the network layer - in
    IP?
  • Good questions!!

94
TCP
  • First, realize that even if low level protocols
    are designed to be reliable, network layer
    protocols may need to do additional work to
    preserve this reliability
  • If an intermediate router crashed after receiving
    and acknowledging a message but before forwarding
    it, the message might still be lost
  • IP, of course, is designed to function on a wide
    range of underlying networks. So, it is best to
    assume some of them might not provide reliability
    guarantees
  • IP does not provide any guarantees of reliable
    delivery
  • IP is still one step away from an end-to-end
    connection

95
TCP
  • If we really want confirmation of a message's
    delivery, we will want to know that it got to the
    target process not just the target machine
  • UDP, like IP, does not guarantee delivery
  • The UDP checksum is optional
  • UDP is intended for end-to-end applications where
    reliability is not a primary concern
  • Within the Internet Protocol Suite, however,
    there is a reliable transport layer named TCP

96
TCP
  • TCP shares some of UDP's features
  • It is implemented by encapsulating TCP packets
    (actually called TCP segments) in IP packets
  • It depends on port numbers (that are interpreted
    independently from UDP port numbers).

97
TCP
  • TCP differs from UDP in several ways
  • It guarantees reliable, ordered delivery of data.
  • It is byte-stream oriented.
  • That is, it does not offer to deliver packets but
    bytes.
  • For example, even though a sending process
    invokes TCP 5 times sending 120 bytes of data
    each time, the receiving TCP may deliver 3 units
    of 200 bytes each to the process at the other
    end.
  • Basically, the bytes sent will be delivered in
    the order sent but not necessarily in the same
    units.

98
TCP Segment
Destination Port
Source Port
Sequence Number
Acknowledgement Number
Header
Flags
Header length
window
Urgent Pointer
checksum
Options
Message Data
99
TCP
  • Destination Port identifies the application to
    which the segment is sent
  • Source Port specifies the application sending
    the segment
  • Sequence Number The sequence number of the
    starting byte in data
  • Acknowledgement Number Contains the byte
    sequence number the receiving TCP entity expects
    to see

100
TCP
  • Header Length Specifies the size of the TCP
    header as a multiple of 4 bytes
  • Flags Specifies when other fields contain
    meaningful data
  • Window Tells receiving TCP entity how many more
    data bytes it can send beyond those already
    acknowledged
  • Checksum 16-bit transport layer error detection
  • Urgent Pointer Points to the first byte
    following the urgent data

101
TCP Connection Management
A
B
t1
Send TCP Segment with SYN 1 and sequence field
x
Send TCP Segment with SYN 1, acknowledgement
field x1, and sequence field y
t2
Send TCP Segment with acknowledgement field y1
t3
Send Data TCP Segments. Include sequence numbers
beginning with y1 and acknowledgement numbers
beginning with x1.
Send Data TCP Segments. Include sequence numbers
beginning with x1 and acknowledgement numbers
beginning with y1.
time
time
102
TCP Connection Management
A
B
Initial sequence number 100
Initial sequence number 700
Data, s101, a701,...
Data, s201, a701,...
Wait for more credit
t1
First segment removed from buffer also finds 100
more bytes of buffer space
t2
Data, s701, a301, c0
Data, s801, a301, c200
Data, s301, a901,...
Data, s401, a901,...
Wait for more credit
t3
time
time
103
TCP Congestion Control
  • Also need to provide some way of controlling
    congestion
  • Use a congestion window to limit the data flow to
    less than the ideal credit limit normally allowed
  • Congestion window is based on a timeout
  • Reduce the congestion window by half on each
    successive timeout

104
End Chapter 7
105
(No Transcript)
106
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com