Lecture 24: TCPIP - PowerPoint PPT Presentation

1 / 54
About This Presentation
Title:

Lecture 24: TCPIP

Description:

This Computer Address. A computer needs to know its IP address to send or receive internet packets ... protocols which allow a computer to obtain its IP address ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 55
Provided by: Rand235
Category:

less

Transcript and Presenter's Notes

Title: Lecture 24: TCPIP


1
Lecture 24TCP/IP
  • Prof. Kenneth M. Mackenzie
  • Computer Systems and Networks
  • CS2200, Spring 2003

Includes slides from Bill Leahy
2
Review IP over any networkEncapsulate the
universal packetsin (any) local network frame
format
Frame Header
Frame Data
3
IP Address Hierarchy
  • Addresses are broken into a prefix and a suffix
    for routing efficiency
  • The Prefix is uniquely assigned to an individual
    network.
  • The Suffix is uniquely assigned to a host within
    a given network

1
1
Network 1
2
Network 2
3
3
5
4
Review Name Resolution
  • Convert symbolic name to IP address
  • People dont like to remember 130.207.5.169
    want symbolic names
  • Solution Domain Name Service (DNS)
  • Convert IP address to Ethernet MAC address on
    local subnet
  • Solution Address Resolution Protocol (ARP)

5
Review Bootstrapping IP
  • To get started you need to know
  • Your IP address
  • IP address of the router on your subnet
  • IP address of a nameserver
  • Dont need anything to bootstrap ARP
  • Solution DHCP
  • Runs on a subnet
  • Send an ethernet DHCP request
  • Reply contains the three items above

6
Short Range Sensor Scan
Today networking cleanup
Thursday RCP and distributed systems
Tuesday guest speakers 3210/3220/3251
Thursday Review
Final 1130-230
7
Today
  • IP cleanup
  • More on addresses
  • More on Routing
  • Network Example
  • TCP
  • Reliable in-order streams
  • Built atop IP
  • Breaking TCP/IP?

8
Remember to say
  • Project 5 review session this evening
  • crucial...
  • Project 4 CONTEST!
  • fastest multi-CPU and/or multi-disk
    configuration?
  • send your code to kenmac_at_cc.gatech.edu

9
IP Addresses
10
Special IP Addresses
  • Network Address
  • Directed Broadcast Address
  • Limited Broadcast Address
  • This Computer Address
  • Loopback Address
  • Berkeley Broadcast Address Form
  • Local 10..., 192.168..

11
Network Address
  • Useful to have an address which represents a
    network
  • Formed by adding a 0 suffix
  • Example
  • 128.10 ? 128.10.0.0
  • 10 ? 10.0.0.0
  • 192.5.48 ? 192.5.48.0
  • A network address should never appear as a
    destination in a packet

12
Directed Broadcast Address
  • Often convenient to send a message to all hosts
    on a single network
  • Directed broadcast address formed by adding a
    suffix containing all 1 bits
  • Once the direct broadcast message arrives in the
    destination network it is sent to all host on the
    network via
  • The local networks hardware broadcast facility or
    if none present
  • Individual messages sent to each host

13
Limited Broadcast Address
  • Typically used on startup by a computer that
    doesn't yet know the network number
  • Message must contain all 1 bits
  • Message remains on local net

14
This Computer Address
  • A computer needs to know its IP address to send
    or receive internet packets
  • TCP/IP contains protocols which allow a computer
    to obtain its IP address automatically when it
    boots
  • These startup protocols use IP to communicate
  • Sending an IP packet requires a source address
  • Address 0.0.0.0 means "this computer"

15
Loopback Address
  • During testing it is often convenient to have two
    applications which will eventually communicate
    run on the same computer.
  • A message can travel down the stack from one
    application and back up the stack to the other
    application
  • IP reserves class A network prefix 127 for this
    purpose (the suffix doesn't matter)
  • By convention 127.0.0.1 is most often used

16
Berkeley Broadcast Address Form
  • UC Berkeley developed and distributed an early
    version of TCP/IP as part of BSD UNIX
  • Instead of a directed broadcast address suffix of
    all 1 bits they used a suffix of all 0 bits. This
    is known as a Berkley Broadcast
  • Many early computer manufacturers derived their
    software from the Berkeley Implementation
  • Some can accept either, some both

17
Special IP Address Summary
Prefix
Suffix
Type of Address
Purpose
All-0's
All-0's
This computer
Used during bootstarp
Network
All-0's
Network
Identifies a network
Network
all-1's
Directed broadcast
Broadcast on specified net
All-1's
All-1's
Limited broadcast
Broadcast on local net
127
Any
Loopback
Testing
Network
All-0's
Directed broadcast
Berkeley broadcast
10
Any
Local
Unadvertised local
192.168
Any
Local
Unadvertised local
18
IP Routing
19
Physical Addressing in a WAN
1,2
Switch Site 1
Switch Site 4
A
B
H
1,5
4,2
Switch Site 2
Switch Site 3
Hierarchical Addressing
C
F
E
D
G
2,2
2,6
3,1
3,4
3,7
20
Next Hop Forwarding
21
Source Independence
  • Forwarding is only based on destination
  • Example
  • Passengers arriving in Atlanta from Boston, Los
    Angeles and Midtown all look in one place to find
    where to board flight to Miami
  • Allows compact tables and a single mechanism for
    handling forwarding

22
Routing
  • "Next Hop Information" table is commonly called a
    routing table.
  • Process of forwarding a packet to its next hop is
    known as routing.
  • Hierarchical addressing (i.e. 1,2)
  • Computation can be reduced
  • Routing table can be made shorter

23
Table Size Reduction
Next Hop Information
Destination
Next Hop
1,anything
Int 2
2,anything
Local
3,anything
Int 4
4,anything
Int 3
24
Routing in a WAN
  • As mentioned key element of WAN is scalability
  • Capacity of a WAN may be increased by adding
    packet switches (without attached computers) to
    the interior of the network
  • Exterior switches have attched computers
  • Interior switches do not
  • Each switch must have routing table and be able
    to forward packets
  • Each routing table must be able to handle all
    possible addresses
  • Tables must point to shortest route (Optimal)

25
Routing in a WAN
4
1
3
2
26
Routing Tables
27
Use of Default Routes
Node 1
Node 2
Node 3
Node 4
Dest
Next Hop
Dest
Next Hop
Dest
Next Hop
Dest
Next Hop
1
-
1
(2,1)
3
-
3
(4,3)

(1,2)
2
-
4
(3,4)
4
-
3
(2,3)

(3,2)

(4,2)
4
(2,4)
28
Routing Table Computation
  • Routing tables are computed automatically
  • Two basic approached are used
  • Static routing
  • Program runs when packet switch boots
  • Advantages Simple with low network overhead
  • Disadvantage Inflexible
  • Dynamic routing
  • Program builds routing table on boot and then as
    conditions change adjusts table
  • Advantage Allows network to handle problems
    automatically
  • Disadvantage potentially subject to instability

29
Network Example
server
100T switch
desktop
desktop
10/100 router
DSL modem
ISP
laptop
switch
10T hub
desktop
printer
30
Network Example
server
100T switch
desktop
192.168.1.254
desktop
67.33..
10/100 router
DSL modem
ISP
laptop
switch
10T hub
desktop
assigned by DHCP from ISP
static picked by DSL modem
printer
31
Network Example
server
100T switch
192.168.1.97
desktop
192.168.1.254
192.168.2.1
desktop
67.33..
10/100 router
DSL modem
ISP
laptop
switch
10T hub
desktop
assigned by DHCP from ISP
static picked by DSL modem
DHCP from DSL modem
static picked by me for the router
printer
32
Network Example
192.168.2.200
server
100T switch
192.168.1.97
desktop
192.168.1.254
192.168.2.1
desktop
67.33..
10/100 router
DSL modem
ISP
laptop
switch
10T hub
desktop
assigned by DHCP from ISP
static picked by DSL modem
DHCP from DSL modem
static picked by me for the router
printer
192.168.2.201
static picked by me
33
Network Example
192.168.2.
192.168.2.200
server
100T switch
192.168.1.97
desktop
192.168.1.254
192.168.2.1
desktop
67.33..
10/100 router
DSL modem
ISP
laptop
switch
10T hub
desktop
assigned by DHCP from ISP
static picked by DSL modem
DHCP from DSL modem
static picked by me for the router
printer
192.168.2.201
DHCP from router
static picked by me
34
Network Example
192.168.2.
192.168.2.200
server
100T switch
192.168.1.97
desktop
192.168.1.254
192.168.2.1
desktop
67.33..
10/100 router
DSL modem
ISP
laptop
switch
10T hub
desktop
printer
192.168.2.201
  • One subnet (192.168.2.)
  • all use ARP to convert IP-gtMAC
  • switches dynamically learn MACs

35
Network Example
192.168.2.
192.168.2.200
server
100T switch
192.168.1.97
desktop
192.168.1.254
192.168.2.1
desktop
67.33..
10/100 router
DSL modem
ISP
laptop
switch
10T hub
desktop
printer
192.168.2.201
Router rules 192.168.2. left 192.168.1.
right all else drop
36
Network Example
192.168.2.
192.168.2.200
server
100T switch
192.168.1.97
desktop
192.168.1.254
192.168.2.1
desktop
67.33..
10/100 router
DSL modem
ISP
laptop
switch
10T hub
desktop
printer
192.168.2.201
  • Another subnet
  • (192.168.1.)
  • use ARP to convert IP-gtMAC

37
Network Example
192.168.2.
192.168.2.200
server
100T switch
192.168.1.97
desktop
192.168.1.254
192.168.2.1
desktop
67.33..
10/100 router
DSL modem
ISP
laptop
switch
10T hub
desktop
printer
Another Router. note the DSL link is not
ethernet (also does NAT)
192.168.2.201
38
TCP
  • (and, by analogy, RDP from PRJ5)

39
TCP Reliable Transport Service
  • TCP must use an inherently unreliable service,
    IP, to provide reliable service
  • TCP must supply a service that guarantees
  • Prompt, reliable communication
  • Data delivery in the same order sent
  • No loss
  • No duplication

40
Applications atop IP?
User code 1
User code 2
API
IP code
IP code
41
Applications atop IP?
  • IP as an API
  • send()
  • recv() (or upcall)
  • oh and btw, messages may disappear, be
    duplicated, appear out of order, etc.

User code 1
User code 2
API
IP code
IP code
42
Applications atop IP?
  • IP as an API
  • send()
  • recv() (or upcall)
  • oh and btw, messages may disappear, be
    duplicated, appear out of order, etc.

User code 1
User code 2
API
IP code
IP code
  • UDP (Unreliable Datagram Protocol) is a thin
    veneer atop IP
  • Used by some services (NFS, some message
    systems)
  • considered difficult to program!

43
Interpose another layer?e.g. RDP or Reliable
Datagram Protocol as in PRJ5?
  • RDP API
  • send()
  • recv() (or upcall)
  • Every message sent is received exactly once

User code 1
User code 2
API
RDP
RDP
44
Interpose another layer?e.g. RDP or Reliable
Datagram Protocol as in PRJ5?
  • RDP API
  • send()
  • recv() (or upcall)
  • Every message sent is received exactly once

User code 1
User code 2
API
send()
RDP
RDP
45
Interpose another layer?e.g. RDP or Reliable
Datagram Protocol as in PRJ5?
  • RDP API
  • send()
  • recv() (or upcall)
  • Every message sent is received exactly once

User code 1
User code 2
API
send()
RDP
RDP
IP msgs w/RDP data
46
Interpose another layer?e.g. RDP or Reliable
Datagram Protocol as in PRJ5?
  • RDP API
  • send()
  • recv() (or upcall)
  • Every message sent is received exactly once

User code 1
User code 2
API
send()
recv()
RDP
RDP
IP msgs w/RDP data
IP msg(s) w/ACK
47
Services Provided by TCP
  • Connection Orientation
  • Point-To-Point Communication
  • Complete Reliability
  • Full Duplex Communication
  • Stream Interface
  • Reliable Connection Startup
  • Graceful Connection Shutdown

48
End to End Services
  • TCP provides a connection from one application on
    a computer to an application on a remote computer
  • Connection is virtual - provided by software
    passing messages
  • TCP messages are encapsulated in IP Datagrams
  • Upon arrival IP passes the TCP message on to the
    TCP layer.
  • TCP exists at both end of the connection but not
    at intermediate points (routers).

49
Achieving Reliability
  • Causes of problems
  • Failure of the IP system to deliver information
    reliably
  • Messages may be duplicated, lost, delayed or
    delivered out of order
  • Reboot of a host computer
  • Two programs make a connection
  • One computer reboots
  • New connection is formed
  • Messages from first session now arrive

50
Packet Loss and Retransmission
  • Host 1
  • Send message 1
  • Start timer
  • Receive ack 1
  • Send message 2
  • Start timer
  • Timer expires
  • Retransmit message 2
  • Start timer
  • Receive ack 2
  • Host 2
  • Receive message 1
  • Send ack 1
  • Receive message 2
  • Send ack 2

Packet Loss
How long to set timer for?
51
Adaptive Retransmission
  • Whenever TCP sends a message it records the time
    and then the time when a response is received
  • A statistical function is used to maintain a
    current estimate of expected delay
  • Timer can be set to a value depending on
  • Stable conditions
  • Increasing delay
  • Decreasing delay

52
Buffers and Windows
  • Receiving host can have a buffer
  • Acknowledgements can contain amount of free
    buffer space available (Window)
  • Sender will not send more data than buffer will
    hold
  • As buffer space increases (i.e. application
    consumes data from buffer) additional acks can be
    sent updating buffer space available

53
Breaking TCP/IP
  • Dont cooperate with congestion control
  • ?

54
Summary
  • IP cleanup
  • More on addresses
  • More on Routing
  • Network Example
  • TCP
  • Reliable in-order streams
  • Built atop IP
  • Breaking TCP/IP?
Write a Comment
User Comments (0)
About PowerShow.com