Title: CS 2200 Lecture 25 TCPIP
1CS 2200 Lecture 25TCP/IP
- (Lectures based on the work of Jay Brockman,
Sharon Hu, Randy Katz, Peter Kogge, Bill Leahy,
Ken MacKenzie, Richard Murphy, and Michael
Niemier)
2Announcements
- Remember, you too can be a TA
- Apply by April 14th
- Dont forget to do the course evaluation
- http//www.coursesurvey.gatech.edu/student_login.c
fm - Available Monday, April 12th ? Friday, April 30th
- (Except on Tuesday, Thursday, and Saturday from
midnight-3am) - Town Hall Meeting
- COC U-grad townhall meeting
- Tuesday, April 13th, 745 pm (tonight), CCB room
16 - You can
- Represent your major, express concerns, give
suggestions, share opinions, shape COC, etc.
3Announcements
- Town Hall Meeting (cont.)
- There will be free pizza, t-shirts, and the
chance to win a mini iPod - Responses will go to faculty, dean, etc. as
action items - Tickets available at CCB 108, and at the door
until full - X_BASE_Y
4First, lets review a little bit
5Switched vs. shared
Node
Node
Node
Shared Media (Ethernet)
Node
Node
Switched Media (ATM)
(As we get bigger, this is a must)
Switch
Node
Node
6Connection-Based vs. Connectionless
- Telephone operator sets up connection between
the caller and the receiver - Once the connection is established, conversation
can continue for hours - (i.e this is connection-based)
- Share transmission lines over long distances by
using switches to multiplex several conversations
on the same lines - Problem lines busy based on number of
conversations, not amount of information sent - Advantage reserved bandwidth
7Connection-Based vs. Connectionless
- Connectionless every package of information must
have an address gt packets - Each package is routed to its destination by
looking at its address - Analogy, the postal system (sending a letter)
- also called Statistical multiplexing
8Routing Messages
- Shared Media
- Broadcast to everyone!
- Switched Media needs real routing. Options
- Source-based routing message specifies path to
the destination (changes of direction) - Virtual Circuit circuit established from source
to destination, message picks the circuit to
follow - Destination-based routing message specifies
destination, switch must pick the path - deterministic always follow same path
- adaptive pick different paths to avoid
congestion, failures - randomized routing pick between several good
paths to balance network load
9Store and Forward vs. Cut-Through
- Store-and-forward policy each switch waits for
the full packet to arrive in switch before
sending to the next switch (good for WAN) - Cut-through routing or worm hole routing switch
examines the header, decides where to send the
message, and then starts forwarding it
immediately - In worm hole routing, when head of message is
blocked, message stays strung out over the
network, potentially blocking other messages
(needs only buffer the piece of the packet that
is sent between switches). - Cut through routing lets the tail continue when
head is blocked, accordioning the whole message
into a single switch. (Requires a buffer large
enough to hold the largest packet). - See board
10Broadband vs. Baseband
- A baseband network has a single channel that is
used for communication between stations. Ethernet
specifications which use BASE in the name refer
to baseband networks. - BASE refers to BASE BAND signaling. Only
Ethernet signals are carried on the medium - A broadband network is much like cable
television, where different services communicate
across different frequencies on the same cable. - Broadband communications would allow a Ethernet
network to share the same physical cable as voice
or video services. 10BROAD36 is an example of
broadband networking.
11Bridges
- We want to improve performance over that provided
by a simple repeater - Add functionality (i.e. more hardware)
- Bridge can detect if a frame is valid and then
(and only then) pass it to next segment - Bridge does not forward interference or other
problems - Computers connected over a bridged LAN don't know
that they are communicating over a bridge - (Also, dont forget about repeaters which
strengthen a signal)
12Ethernet vs. Ethernet w/bridges
Node
Node
Node
Node
Node
Node
Node
Node
Node
Node
Node
Single Ethernet 1 packet at a time
Node
Node
Node
Node
Node
Node
Bridge
Bridge
Node
Node
Node
Node
Node
Multiple Ethernets Multiple packets at a time
13Protocols peer-to-peer
- General B receives message from General A
- Colonel unpackages message and passes to General
B - Major unpackages messages and passes to Colonel B
- Captain unpackages message and passes to Major B
- Lieutenant unpackages message and passes to
Captain B - Sergeant unpackages message and passes to
Lieutenant B - Private receives message, unpackages it and
passes it to Sergeant B
- General A sends message to General B
- Colonel A repackages and sends to Colonel B
- Major A repackages and sends to Major B
- Captain A repackages and sends to Captain B
- Lieutenant A repackages and sends to Lieutenant B
- Sergeant A repackages and sends to Sergeant B
- Private A takes message, steals motorcycle and
delivers message to Private B
Note Message Identical at this point
14Protocol Family Concept
Message
Message
Logical
Actual
Actual
Logical
Message
Message
T
H
T
H
Actual
Actual
Message
Message
T
H
T
H
T
H
T
H
Physical
15What is a Minimal Protocol
- Bridge applications notion of message to the
networks notion of a packet - (i.e. how does an applications notion of a
message relate to a networks notion of a
message?) - 1. Application layer
- Hands over application programs message to the
transport layer
16What is a Minimal Protocol
- 2. Transport layer
- e.g. RTP layer in Project 5
- At sending end
- Takes a message from the application layer and
breaks it into packets commensurate with the
network characteristics - Attaches headers to the packets that contain
information for use at the destination - Handles retransmissions if necessary for
overcoming network errors - At receiving end
- Use the header info to assemble a message
destined for an application program at this node - Keeps track of packets of message(s) being
assembled - Negotiate with the sender (using ACKS/NACKS) to
complete the message assembly - Hand over assembled message to the application
layer
17What is a Minimal Protocol
- 3. Network layer
- Implements the network driver to deal with the
physical characteristics of the network - e.g.
- CSMA/CD for Ethernet
- token re-generation for token ring
- Routing packets on the available network links
- Filtering packets on the network and snarfing
those intended for this node
18ISO Model
7
- Interact with user e.g. mail, telnet, ftp
Presentation
6
- Char conv., echoing, format diffs endian-ness
Session
5
- Process to process comm. e.g. Unix sockets
Transport
4
- Packetizing, seq-num, retrans. e.g. TCP, UDP
Network
3
- Routing, routing tables e.g. IP
- Interface to physical media, error recovery e.g.
retransmit on collision in Ethernet
Data Link
2
- Electrical and mechanical characteristics of
physical media e.g. Ethernet
1
Physical
19ISO Model Examples
7
User program
Presentation
6
Session
5
- Sockets open/close/read/write interface
Kernel Software
Transport
4
- TCP reliable infinite-length stream
Network
3
- IP unreliable datagrams anywhere in
world
- Ethernet unreliable datagrams on local segment
Data Link
2
Hardware
- 10baseT ethernet spec twisted pair w/RJ45s
1
Physical
20Techniques Protocols Use
- Sequencing for Out-of-Order Delivery
- Sequencing to Eliminate Duplicate Packets
- Retransmitting Lost Packets
- Avoiding Replay Caused by Excessive Delay
- Flow Control to Prevent Data Overrun
- Mechanism to Avoid Network Congestion
- Name Resolution (external to protocol really)
21On to new stuff
22Today
- IP
- One protocol to rule them all
- Address assignment
- IP Routing (layer-3 switching)
- What exactly do we mean by this???
- Name Resolution
- ARP IP -gt ethernet MAC (media access control)
- DNS name -gt IP
- TCP
- Reliable in-order streams
- Built atop IP
- What exactly do we mean by this???
(i.e. how do we find the address of computer we
want to go to? 129.10.10.128 is more like a VA)
23Forming a WAN
Switch Site 1
Switch Site 4
Switch Site 2
Switch Site 3
24Physical 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
25Next Hop Forwarding
This table is for switch 2.
26Layer-2 Switches
- Each switch learns MAC addresses on its ports.
- Maintains internally a table of all MAC addresses
seen - For each packet, search the table (probably a
hash table)
48-bit MAC port 00423765fe01 1 0
0423765fe02 2 0197fbcd0137 2
27Scalability?
- Tables get large
- Must store all the MAC addresses in the universe
28WAN Technologies
- ARPANET
- One of the first packet switched networks
- X.25
- CCITT X.25
- Popular in Europe
- Originally for ASCII to Host connections
- Frame Relay
- Originally designed to bridge LAN segments
- SMDS (Switched Multi-megabit Data Service)
- ATM (Asynchronous Transfer Mode)
- Intended for voice, video and data over wide
areas - Uses fixed size cells
- Can specify quality of service required
29Internetworking
- Different networking solutions exist
- Why? No single networking technology is best for
all needs - Universal service
- System where arbitrary pairs of computers can
communicate - Increases productivity
- Networks, by themselves, are incompatible with
universal service - Solution Internetworking or an internet
Literally Communicating between networks of the
same and/or different types
30Step oneDefine universal packet format
31Step twoEncapsulate the universal packetsin
(any) local network frame format
Used to send msg. from 1 network to another (or
wi/the same)but we want a uniform standard.
Frame Header
Frame Data
Used to communicate within 1 network
32Physical Network Connection
Router
Router facilitates communication
between networks
Individual Networks
Each cloud represents arbitrary network
technology LAN, WAN, ethernet, token ring, ATM,
etc.
33Routers
- A router is
- a special-purpose computer dedicated to the task
of interconnecting networks. - A router can interconnect networks that use
different technologies - (including different media, physical addressing
schemes or frame formats)
Router
34Router operation
- Unpack IP packet from frame format of source
network - Perform routing decision
- Re-pack IP packet in frame format of the
destination network - (see board for demo packing, unpacking,
repacking)
35Virtual Network
36Virtual Network
37MTU and Fragmentation
- For any given network there is a Maximum
Transmission Unit or MTU - If a datagram arrives at a network an exceeds the
MTU the protocol software will break the Datagram
up into smaller pieces called fragments - The format of a fragment is the same except for
bits which are set to indicate a fragment - (Again, see the board 32 bytes?16 bytes?32
bytes)
38Reassembly
- Fragments are never reassembled until the final
destination - Why?
- Reduce amount of state information in routers.
When packets arrive at a router they can simply
be forwarded - Allows routes to change dynamically. Intermediate
reassembly would be problematic if all fragments
didn't arrive.
39Example
Source Host
Net 1
header 1
Router 1
Net 2
header 2
Router 2
Net 3
header 3
Destination Host
40TCP/IP
- A number of different protocols have been
developed to permit internetworking - TCP/IP (actually a suite of protocols) was the
first developed. - Work began in 1970 (same time as LAN's were
developed) - Most of the development of TCP/IP was funded by
the US Government (ARPA)
41Layered Model
TCP/IP Model
Application
5
Transport
4
Internet
3
Network Interface
2
Physical
1
42Layer upon layer upon layer...
- Layer 1 Physical
- Basic network hardware (same as ISO model Layer
1) - Layer 2 Network Interface
- How to organize data into frames and how to
transmit over network (similar to ISO model Layer
2) - Layer 3 Internet
- Specify format of packets sent across the
internet as well as forwarding mechanisms used by
routers - Layer 4 Transport
- Like ISO Layer 4 specifies how to ensure reliable
transfer - Layer 5 Application
- Corresponds to ISO Layers 6 and 7. Each Layer 5
protocol specifies how one application uses an
internet
43IP Addresses
44IP Internet Protocol Addresses
- Recall The various networking schemes (LAN's and
WAN's) we discussed used physical addresses - To achieve a seamless network with universal
connectivity we need addresses for the virtual
internet - The internet is an abstraction created in
software which can use addresses, packet format
and delivery techniques independent of the
physical hardware - (sound familiar???)
45IP Addressing
- Each host in the internet must have a unique
address - Users, application programs and software
operating in the higher layers of the protocol
stack use these addresses - In the IP protocol each host is assigned a unique
32 bit address. Any packet destined for a host on
the internet will contain the destination IP
address.
46IP 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
2
Network 1
Network 2
3
3
5
47Guarantee
- Each computer has a unique address
- The full address contains both a prefix and a
suffix assigned to guarantee uniqueness. - Although network numbers must be assigned
globally, suffixes can be assigned locally
without global coordination
48How many bits?
- How should the 32 bit address be divided?
- In other words how many bits for prefix, how many
for suffix? - Example 1
- 16 bits for each
- 65536 max networks, 65536 max hosts/network
- Example 2
- 24 bits for prefix, 8 bits for suffix
- 8,388,608 max networks, 256 max hosts/network
- Other possibilities?
49More Flexible System
- Create system with different classes of address.
Each class has different size for the prefix and
the suffix - (Up to) the first 4 bits determine the class
- Five classes are defined
50Five Classes of IP Address
51Five Classes of IP Address
Primary Classes
52Computingthe Class
(take a quiz) (then see the board)
53Dotted Decimal Notation
- Conventionally 32 bit IP addresses are expressed
in dotted decimal notation - Each byte is expressed as a decimal number
(0-255). The bytes are separated by decimal
points - Addresses range from 0.0.0.0 to 255.255.255.255
28
28
28
28
54Classes and Dotted Decimal
- Range of Values
- 0 through 127
- 128 through 191
- 192 through 223
- 224 through 239
- 240 through 255
Does this mean there are 64 Class B networks?
Does this mean there are 32 Class C networks?
(on the board)
55Division of the Address Space
Address Class
Bits in Prefix
Maximum Number of Networks
Bits in Suffix
Maximum Number of Hosts per Network
A B C
7 14 21
128 16384 2097152
24 16 8
16777216 65536 256
(on the board)
56Addressing Example
128.10
128.211
128.10.0.1
128.10.0.2
128.211.28.4
128.211.6.115
10
192.5.48
192.5.48.3
192.5.48.85
10.0.0.37
10.0.0.49
(on the board)
57Special IP Addresses
- Network Address
- Directed Broadcast Address
- Limited Broadcast Address
- This Computer Address
- Loopback Address
- Berkeley Broadcast Address Form
58Network 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
(quiz question)
59Directed 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
(quiz question)
60Limited 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
(quiz question)
61This 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"
62Loopback 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
(goto print menu)
63Berkeley 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
64Special 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
Berkley broadcast
65Routers and IP Addressing
- Each host has an address
- Each router has two (or more) addresses!
- Why?
- A router has connections to multiple physical
networks - Each IP address contains a prefix that specifies
a physical network - An IP address does not really identify a specific
computer but rather a connection between a
computer and a network. - A computer with multiple network connections
(e.g. a router) must be assigned an IP address
for each connection
66Example
Ethernet 131.108.0.0
Token Ring 223.240.129.0
131.108.99.5
223.240.129.2
223.240.129.17
78.0.0.17
WAN 78.0.0.0
Note!
(on the board)
67Multi-homed Hosts
- Can a host have multiple network connections?
- Yes! Why?
- Increase reliability
- Increase performance
- Like router, need one address for each connection
68Address Resolution Protocol
- IP addresses are virtual
- LAN/WAN hardware doesn't understand IP addresses
- Frame transmitted across a network must have
hardware address of destination (in that network) - Three basic mechanisms for resolving addresses
69Resolving Addresses
- 1. Address translation table
- Used primarily in WAN's
- 2. Translation by mathematical function
- 3. Distributed computation across network
- Protocol addresses are abstractions
- Physical hardware does not know how to locate a
computer from its protocol addess - Protocol address of next hop must be must be
translated to hardware address
70Address Resolution
A
C
E
R2
R1
B
D
F
71Address Resolution
A
C
E
R2
R1
B
D
F
Application sends message from A to B using B's
IP address Protocol software on A resolves IP
address of B to physical hardware address and
sends frame directly using hardware address
72Address Resolution
A
C
E
R2
R1
B
D
F
Application sends message from A to F using F's
IP address Software on A does NOT resolve F's
address
73Address Resolution
A
C
E
R2
R1
B
D
F
Application sends message from A to F using F's
IP address Software on A first determines that
message must pass through router R1. Address of
R1 is resolved and message is sent to R1
74Address Resolution
A
C
E
R2
R1
B
D
F
Application sends message from A to F using F's
IP address Software on R1 determines that
message must pass through router R2. Address of
R2 is resolved and message is sent to R2
75Address Resolution
A
C
E
R2
R1
B
D
F
Application sends message from A to F using F's
IP address Software on R2 determines that
message is intended for host on local net.
Address of F is resolved by R2 and message is
sent to F
76How to Resolve Addresses
- Table Lookup
- Store bindings/mapping in table which software
can search - Closed-form Computation
- Protocol addresses are chosen to allow
computation of hardware address from protocol
address using basic boolean and arithmetic
operations - Message Exchange
- Computers exchange messages across a network to
resolve addresses. One computer sends a message
requesting a translation and another computer
replies
(more detail about items 1-3 on earlier slide)
77Table Lookup I
- IP Address
- 197.15.3.2
- 197.15.3.3
- 197.15.3.4
- 197.15.3.5
- 197.15.3.6
- 197.15.3.7
- Hardware Address
- 0A074B128236
- 0A9CBC71328D
- 0A119A680199
- 0A078290CC1F
- 0A7776EF0328
- 0A828F5ABEFA
For large tables may use hashing or direct lookup
78Table Lookup IIDirect Lookup
- Hardware Address
- 0A074B128236
- 0A9CBC71328D
- 0A119A680199
- 0A078290CC1F
- 0A7776EF0328
- 0A828F5ABEFA
Must also do array bounds checking
79Address Resolution with Closed-form Computation
- Some networks have configurable hardware
addresses - NIC can be assigned any physical address
- By judiciously selecting hardware and IP
addresses, efficient computation of a hardware
address can be made from an IP address
80Example
- IP Address
- network 220.123.5.0
- 220.123.5.1
- 220.123.5.2
- 220.123.5.3
- 220.123.5.4
- 220.123.5.5
- Assigned Hardware Address
- 1
- 2
- 3
- 4
- 5
hardwareAddress IPAddress 0xFF
81Message Exchange
- Computer needing address resolved sends message
across network - The message carries an address that needs to be
resolved - The reply contains the appropriate hardware
address - Two possible designs
- Special address resolution servers are
established known to computers on net - Request is broadcast to net and each computer is
responsible for replying when request is for its
address
82Address Resolution Protocol
- TCP/IP can use any of the three methods
- Table lookup usually used in a WAN
- Closed-form computation is used with configurable
networks - Message exchanged used in LAN's with static
addressing - To insure that all computers agree TCP/IP
includes an Address Resolution Protocol - Two types of messages are supported
- Request a hardware address given a protocol
address - Reply containing IP Address and hardware request
83ARP Message Delivery
84ARP Message Delivery
85ARP Message Delivery
86ARP Message Delivery
87Caching ARP Responses
- When a ARP response is received the result is
cached (new responses replace old ones) - Cache size is limited
- Entries are removed after some amount of time if
unused (e.g. 20 minutes) - When an ARP response is sent, the sender puts the
address binding in its cache - Communication is typically two-way
- Space is limited (i.e. computers do not attempt
to listen to the net and store all addressing
information that passes).
88IP Addresses and Routing Table Entries
R1
R2
R3
Assume message with IP address
192.4.10.3 arrives at router R2
for each entry in table if(Mask Addr)
Dest forward to NextHop
(see board)
89Best-Effort Delivery
- IP does not handle the problems of
- Datagram duplication
- Delayed or out-of-order delivery
- Corruption of data
- Datagram loss
90IP Routing
91Physical 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
92Next Hop Forwarding
93Source 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
94Routing
- "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
95Table Size Reduction
Next Hop Information
Destination
Next Hop
1,anything
Int 2
2,anything
Local
3,anything
Int 4
4,anything
Int 3
96Routing 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)
97Routing in a WAN
4
1
3
2
98Routing Tables
99Use of Default Routes
Simplified more
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)
100Routing 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
101Testing Reachability
- Ping
- Sends an ICMP echo request message
- Starts a timer
- If no answer...retransmits, etc.
102Error Reporting (ICMP)
- TCP/IP includes a protocol used by IP to send
messages when problems are detected Internet
Control Message Protocol - IP uses ICMP to signal problems
- ICMP uses IP to send messages
- When IP detects an error (e.g. corrupt packet) it
sends an ICMP packet
103Some ICMP Messages
- Echo Reply
- Destination unreachable
- Source quench
- Redirect
- Alternate host address
- Echo
- Router advertisement
- Router selection
- Time exceeded
- Parameter problem
13 14 15 16 17 18 30 31 Note Max message 255
Timestamp Timestamp reply Info request Info
reply Addr mask req Addr mask reply Traceroute Dat
agram conv error
104Sample Messages
- Source Quench
- Sent by router when out of buffer space (and
discards a datagram). - Sent to the originator of the datagram. Sender
must reduce transmission rate. - Time Exceeded
- Sent by router when discarding a datagram whose
Time to Live field has reached 0. - Also, sent if reassembly timer expires before all
fragments have arrived. - Destination Unreachable
- Router that determines a message cannot be
delivered to its final destination sends to
originator - An entire network is disconnected from internet
- A given host is offline
- Note Some ICMP messages are not error messages
105ICMP Message Transport
106ICMP Message Transport
- Where should ICMP message be sent?
- ICMP messages are always created in response to a
Datagram. - Router sends ICMP message to source of datagram
- What happens if Datagram containing ICMP message
encounters an error - Nothing!!!
107Using ICMP to Trace a Route
- Datagram has "TIME TO LIVE" field.
- Upon reaching a router the "TIME TO LIVE" field
is decremented - If the field reaches 0, Datagram is discarded and
ICMP message is sent to originator - We can use this operation to trace a route
108Tracing a Route
- Send a Datagram to the destination with the "TIME
TO LIVE" field set to 1 - At the first router "TIME TO LIVE" will be set to
0 and an ICMP message will be returned - Send a Datagram to the destination with the "TIME
TO LIVE" field set to 2 - etc.
- (Some details omitted)
109TCP
110TCP 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
111Services Provided by TCP
- Connection Orientation
- Point-To-Point Communication
- Complete Reliability
- Full Duplex Communication
- Stream Interface
- Reliable Connection Startup
- Graceful Connection Shutdown
112End 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).
113Achieving 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
114Packet Loss and Retransmission
115Adaptive 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
116Buffers 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
117Aside Breaking TCP/IP
- Dont cooperate with congestion control
- ?