Download CRLF - Computer and Internet Architecture Laboratory

Document related concepts

CAN bus wikipedia , lookup

SIP extensions for the IP Multimedia Subsystem wikipedia , lookup

Distributed firewall wikipedia , lookup

AppleTalk wikipedia , lookup

Net bias wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Network tap wikipedia , lookup

Airborne Networking wikipedia , lookup

Computer network wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Zero-configuration networking wikipedia , lookup

IEEE 1355 wikipedia , lookup

Deep packet inspection wikipedia , lookup

Wake-on-LAN wikipedia , lookup

TCP congestion control wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Hypertext Transfer Protocol wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Internet protocol suite wikipedia , lookup

Transcript
A Closer Look at
HTTP, TCP, IP, and PPP
Chapter 3
Revision 1: August 2000
Copyright 2001 Prentice Hall
A Closer Look at

HTTP at the Application Layer

TCP (and UDP) at the Transport Layer

IP at the Internet Layer

PPP at the Data Link Layer
2
A Closer Look at HTTP
HyperText Transfer Protocol
4
HTTP: A Closer Look

World Wide Web Standards
– HTML (HyperText Markup Language) governs
the structure of the HTML webpage
– HTTP (HyperText Transfer Protocol) governs
the format and timing of requests and
responses between the browser and the
webserver application program
HTTP
Browser
HTML
Webserver
Program
HTTP: A Closer Look

Sample HTTP Request Line
– All text, often only a single line
– Keyword<sp>absolute path<sp>HTTP/ version
– Keyword (Method) is GET for Retrievals
• GET must be capitalized
– Absolute path is URL without http://hostname
GET /report1/home.htm HTTP/1.1
Absolute Path
5
6
HTTP: A Closer Look
New

Sample HTTP Request Header
– Although the book only discusses the requestline, if only the absolute path is give, the
request line is supposed to be followed by a
header line naming the host.
– So if the host is puka.hawaii.edu, the requestline and header would be (where CRLF is
carriage return followed by line feed):
GET /report1/home.htm HTTP/1.1[CRLF]
Host:puka.hawaii.edu[CRLF]
HTTP: A Closer Look

Sample HTTP Response Message
– Header is multiple lines of text
– Each ends with [CRLF]
HTTP/1.1 200 OK[CRLF]
Date: Tuesday, 20-JAN-1999 18:32:15 GMT[CRLF]
Server: name of server software[CRLF]
MIME-version: 1.0[CRLF]
Content-type: text/plain[CRLF]
[CRLF]
File to be downloaded.
7
HTTP: A Closer Look

Sample HTTP Response Message
– 200 is a code for a successful retrieval,
followed by the humanly readable code, OK
HTTP/1.1 200 OK[CRLF]
Date: Tuesday, 20-JAN-1999 18:32:15 GMT[CRLF]
Server: name of server software[CRLF]
MIME-version: 1.0[CRLF]
Content-type: text/plain[CRLF]
[CRLF]
File to be downloaded.
8
HTTP: A Closer Look

Sample HTTP Response Message
– There are other codes, indicating errors, such
as 404
– Followed by a humanly readable code, such
as, host not found
HTTP/1.1 404 Host not Found[CRLF]
9
HTTP: A Closer Look

Sample HTTP Response Message
– MIME-version and Content-type tell the type of
file being retrieved
– For HTML document, text/plain
HTTP/1.1 200 OK[CRLF]
Date: Tuesday, 20-JAN-1999 18:32:15 GMT[CRLF]
Server: name of server software[CRLF]
MIME-version: 1.0[CRLF]
Content-type: text/plain[CRLF]
[CRLF]
File to be downloaded.
10
HTTP: A Closer Look

HTML Pages Contain Text
– To be displayed

HTML Pages Contain Tags
– Some tags say “place a graphic here”, “place a
JAVA applet in a box here”, etc.
– For instance, the tag <img src=“big.jpg> says
“Get file big.jpg and place it here in the HTML
document”
– Graphics, Java programs, etc. are separate
files
11
12
HTTP: A Closer Look

Downloading a “page” may require several
downloads
– One for the HTML document
– One each for the other files it calls for
File Downloads
User
PC
2
3
1
HTML
Webserver
App.
java
Big.
jpg
13
HTTP: A Closer Look

Each download requires a separate HTTP
request-response cycle!
– So downloading complex webpages may
require many HTTP request-response cycles
HTTP
Request-Response
Cycle 1
User
PC
2
3
HTML
Webserver
App.
java
Big.
jpg
14
HTTP: A Closer Look

How Many HTTP messages will be created
to download the three files?
– 3 HTTP request-response cycles
– 2 HTTP messages per cycle (request and
response)
– 6 HTTP messages total
HTTP Request-Response
Cycle 1
User
PC
2
3
HTML
Webserver
App.
java
Big.
jpg
HTTP: A Closer Look

HTTP is Unreliable
– There is no error detection and correction for
transmission errors
– This helps makes HTTP simple, allowing
browsers and webserver application programs
to be simple and inexpensive
– So Unreliability can be good!
15
HTTP: A Closer Look

HTTP is Unreliable
– As we will see later, TCP at the transport layer
is reliable, offering error detection and
correction
– TCP gives HTTP clean data, so there is no
need for HTTP to do error checking
– Unreliability saves processing time on the
source and destination hosts, reducing host
costs
– Unreliability makes browsers and webservers
easier to write, reducing their costs
16
HTTP: A Closer Look

HTTP is Connectionless
– Connection-oriented services establish a
connection, maintain it for the duration of a
communication, and then break the connection
– For instance, in a telephone call, people say
hello (agreeing to talk), note if the line goes
dead, and agree to break the connection (we
don’t simply hang up on the other person)
17
18
HTTP: A Closer Look

HTTP is Connectionless
– Connectionless services merely send the
message without a connection. Like sending a
letter
– HTTP is connectionless. Just send requests,
get responses. No opens, maintenance, or
closing
Browser
HTTP
Request
Webserver
Application
19
HTTP: A Closer Look

HTTP is Connectionless
– Connectionless operation is simple because of
the lack of opens, maintenance, and closes
– This makes HTTP simple, allowing browsers
and webservers to be built easily
Browser
HTTP
Request
Webserver
Application
TCP: A Closer Look
Transmission Control Protocol
21
TCP: A Closer Look

Browser does not send HTTP Requests
directly to the webserver application
– The application layer programs are not
physically connected
– Browser sends HTTP Request to the user PC’s
transport layer process for delivery
Browser
HTTP Request
Transport
Process
22
TCP: A Closer Look

Transport layer process stores the HTTP
Request Temporarily
– Does NOT merely add a TCP header and then
pass the TCP segment down to the Internet
layer process as noted in Chapter 2
Browser
Request
Transport
Process
Transport
Process
23
TCP: A Closer Look

User PC transport process opens a
connection to the webserver transport layer
process
– This connection can be used to send several
TCP segments to handle a several HTTP
request-response cycles
Browser
Transport
Process
Transport
Process
24
TCP: A Closer Look

TCP has a Flags Field
– Six one-bit flags
TCP Segment
Bit 0
Source Port # (16)
Bit 31
Destination Port # (16)
Sequence Number (32 bits)
Acknowledgement Number (32 bits)
Hdr Len
Reserved (6)
(4)
Flags (6)
TCP Checksum (16)
Window Size (16)
Urgent Pointer (16)
Options (if any)
Data Field
PAD
25
TCP/IP: A Closer Look

Three Flags are Widely Used
– SYN bit set to 1 in a TCP segment to request a
connection
– ACK bit set to 1 in a segment to acknowledge a
received TCP segment
– FIN bit set to 1 in a segment to inform of a
connection closure
Hdr Len
Reserved (6)
(4)
Flags (6)
Window Size (16)
26
TCP: A Closer Look

Opening a connection takes 3 Segments
– First TCP segment has SYN flag set. Requests
connection to webserver transport process
SYN
User PC
Transport
Process
Webserver
Transport
Process
27
TCP: A Closer Look

Opening a connection takes 3 Segments
– Second TCP segment asks to open a
connection and also acknowledges the first
SYN message (ACK flag set too)
SYN
User PC
Transport
Process
SYN, ACK
Webserver
Transport
Process
28
TCP: A Closer Look

Opening a connection takes 3 Segments
– Third TCP segment acknowledges the second
– All segments are acknowledged except for pure
ACKs like the third segment
SYN
User PC
Transport
Process
SYN, ACK
ACK
Webserver
Transport
Process
29
TCP: A Closer Look

Next, user PC sends the HTTP Request
– Sends HTTP Request in data field of a TCP
segment
– Will receive an ACK TCP segment to
acknowledge receipt
User PC
Transport
Process
TCP segment containing
HTTP Request
ACK
Webserver
Transport
Process
Delivering the HTTP Response

30
Transport layer process on the webserver
receives the TCP segment delivering the
HTTP Request
– The transport process on the webserver
passes the HTTP Request in the TCP segment
data field to the webserver application program
Webserver
Application
HTTP Request
Transport
Process
Delivering the HTTP Response

Webserver application creates the HTTP
Response message
– Webserver application passes the HTTP
Response message to the webserver transport
layer process for delivery to the user PC
transport layer process
Webserver
Application
HTTP Response
Transport
Process
31
Delivering the HTTP Response

32
Webserver Transport Process Delivers the
Response
– User PC transport process sends an
acknowledgement
User PC
Transport
Process
TCP segment containing
HTTP Response
ACK
Webserver
Transport
Process
TCP: A Closer Look

Multiple HTTP Request-Response Cycles
can be Handled with a Single TCP
Connection in HTTP/1.1 and later versions

Each will have the following:
– TCP segment carrying the request
– Acknowledgement of this segment
– TCP segment carrying the response
– Acknowledgement of response segment
33
34
TCP: A Closer Look

Closing the Connection takes 4 TCP
Segments
– Initiated by the browser when it downloads the
last file
FIN
User PC
Transport
Process
ACK
FIN
ACK
Webserver
Transport
Process
TCP: A Closer Look

35
Refinement
– ACKs have to be delivered quickly
– Can be sent in TCP segments that carry only
ACKs
– However, if a data TCP segment is returned
quickly, the ACK will be included with this
segment
– This segment will contain both new data and an
acknowledgement of a previously received TCP
segment
– Reduces TCP segment transmissions
TCP Connections: Recap

For EACH Page Download…
– 3 TCP segments to open the connection
– 4 TCP segments per file downloaded
– 4 TCP segments to close the connection
– A very chatty protocol
36
37
TCP: Error Handling

TCP is reliable--it does error correction
– Each TCP segment has a 32-bit sequence
number that increases with each TCP segment
a transport process sends
Bit 0
TCP Segment
Source Port # (16)
Destination Port # (16)
Sequence Number (32 bits)
Bit 31
TCP: Error Handling

TCP is reliable--it does error correction
– ACKs acknowledge a specific TCP segment in
the sequence
– If a TCP segment is not acknowledged, the
other side retransmits it after awhile
– This adds TCP segments beyond the ones we
have seen
38
TCP: Error Handling

39
TCP is reliable--it Places TCP Segments in
Order
– TCP segments are encapsulated in IP packets
– IP does not guarantee that packets will arrive in
order
– TCP can place TCP segments in order based
on their sequence numbers
TCP: Error Handling

TCP Reliability in Perspective
– Provides clean application data to application
program
– If data link layer frame or IP packet is lost at
lower layers, receiving transport process will
not acknowledge a segment
– The sending transport process will resend
automatically
– So TCP protects against errors at lower layers
as well as transport layer errors
40
TCP: Why Connections?
41

Opens, closes, and ACKs create overhead,
so undesirable

Why do it?
– Allows sequence numbers, so that errors can
be handled easily

Overall, TCP is a high-overhead, highly
reliable transport layer protocol that
catches any errors at lower layers, giving
“clean” service to the application programs
TCP: Refinements

Mod A
Fragmentation
– Transport process must fragment long
application messages (break them into several
pieces) and transmits them in several TCP
segments
– So when large files are downloaded in
webservice, many more TCP segments will be
generated than we discussed above
App Frag 2 TCP-H
App Frag 1 TCP-H
42
TCP: Refinements

Mod A
43
Flow Control
– TCP implements flow control, so that one
transport process will not overload its peer by
transmitting too quickly
Data
User PC
Transport
Process
ACK
Command to
Limit Speed
Webserver
Transport
Process
User Datagram Protocol (UDP)

UDP
– User Datagram Protocol
– Alternative to TCP at the transport layer
– Lightweight
• No connections (connectionless)
• No error correction (unreliable)
• Reduces work source and destination host
must do
44
User Datagram Protocol (UDP)

UDP
– Good for voice, for which the delay of error
correction would be unacceptable
– Good for applications for which the cost of an
occasional message is small compared to the
cost of connection-oriented service
45
More on the IP
Internet Protocol
Internet Layer Process

Transport layer process passes EACH
TCP segment to the internet layer process
for delivery
Transport Layer
Process
TCP segment
Internet Layer
Process
47
48
IP: Connectionless Service

The Internet Protocol (IP)
– Internet layer protocol
– Governs transmission between router and host
– Governs transmission between pairs of routers
– Gives end-to-end route across many routers
User
PC
IP Router
IP Router
IP
Webserver
49
IP: Connectionless Service

The Internet Protocol (IP)
– IP messages are called IP packets

No connections are established
– No open, close, error correction, flow control
– Low overhead
Internet
Process
IP Packet
Internet
Process
50
IP: Connectionless Service

IP is unreliable
– No error handling (Let TCP catch errors!)
– No sequence numbers, so no way to put
arriving IP packets in order (Let TCP put the
TCP segments these IP packets contain in
order!)
Internet
Process
IP Packet
Internet
Process
51
TCP/IP Partnership

TCP checks for errors once, at the
destination host

IP is used in many hops between routers
– Not checking for errors at each step greatly
reduces overall processing work
– Reduces router costs
Transport
Check Only Once
Transport
Internet
Internet
Internet
Host
Router
Host
Connectionless IP

52
IP is unreliable (does not catch errors)
– But this is not bad
– First, errors are caught--at the nexthigher layer (transport) if TCP is used
– Second, avoiding error checking at each
hop between routers lowers router costs
– Far less expensive to check for errors on
one destination host than on many
routers along the way
IP Addresses and Router Forwarding

53
Routers use the destination IP address of
an incoming packet in the router forwarding
decision, that is, to decide what output port
to use to send the packet back out to the
destination host or to another router
B
B?
D?
Router A
D
Packet
C?
C
54
Router Delivery

If Destination Host is On the Source Host’s
Subnet, Source Host Delivers the Packet
Directly
– No router is involved
Source
Host
Subnet
Subnet
Destination Host
55
Router Delivery

If Destination Host is NOT On the Source
Host’s Subnet, Source Host Sends the
Packet to a Router for Delivery
Subnet
Subnet
56
Router Delivery

If Destination Host is On One of the
Router’s Subnets, the Router Sends the
Packet to the Destination Host for Delivery
Subnet
Subnet
57
Router Delivery

If Destination Host is NOT On One of the
Router’s Subnets, the Router Sends the
Packet to a Next-Hop Router for Delivery
– May have to choose among several possible
next-hop routers for delivery
Subnet
Subnet
58
Router Delivery

Border Routers Connect Networks, Not
Subnets
– Select between next-hop router on own
network or on another network
Own Network
Other Network
59
IP Addresses and Router Forwarding

Routers look at destination IP address of
packet to make decisions

What do I do with this packet, based upon
its destination address
B
B?
D?
Router A
D
Packet
C?
C
60
IP Address

32-bit Strings
– Often given in dotted decimal notation:
128.171.17.13

Fits into 32-bit source and destination
address field of IP headers
IP Packet
32-bit Source and Destination Addresses
IP Addresses

Letter
Many Addressing Systems Use
Hierarchical Addressing
City 1
City 2
City 3
– Postal delivery: city, street address
– Post office looks at city first
• If not P.O.’s city, put in bag for other city
• If in P.O.’s city, put in bag for sorting by
street address
– Hierarchical addressing greatly speeds sorting
at each post office
• Imagine if we needed a sorting bin for each
address in the country!
61
IP Addresses

For IP, Routers Take the Place of Post
Offices
– There are hundreds of millions of IP addresses
on the Internet
– Routers cannot store decision rules for
reaching each address individually
– So router makes decisions first based on the
network of subnet containing the destination
host
– This is the router forwarding decision
62
IP Addresses
Network
Network

The Internet is Made of Many Individual
Networks Owned by Different
Organizations

For instance, there is the University of
Hawaii network

Note that “Network” is an organizational
(concept)

Border routers between networks, routers
connect different networks
63
IP Addresses
Subnet
Subnet
64

Most large organizations divide their
networks into subnets managed by smaller
units

At the University of Hawaii, the College of
Business Administration is a subnet

Subnet is also an organizational concept

Internal routers within organizations
connect subnets
65
IP Addresses

Each Organization is Given a Network Part
Number

For the University of Hawaii, this is 128.171
– All IP Addresses in that Organization’s Network
Begin with that Network Part
Network Part
IP Address
128.171
66
IP Addresses

Network Parts can be 8 to 24 bits long
– For University of Hawaii, it is 16 bits long
– 16 bits is only an example
Network Part
(8 to 24 bits)
IP Address
IP Addresses

Network
Network
Between different organization networks,
routers look first at the Network Part of an
arriving IP packet’s destination address
– If the network part is not that of the
organization, the router cannot deliver the IP
packet locally
– Passes the IP packet on to another router,
called a next-hop router, to move the IP packet
closer to the destination host
Network Part
67
Assigning Network Parts

Organization applies to an Internet IP
address registrar
– Registrar gives organization a network part
– Organization assigns the local part to its hosts
internally
– Only large organizations and ISPs get network
parts
128.171.17.13
Registrar
128.171
Firm
128.171.123.130
68
69
IP Addresses

Network Part is Followed by a Subnet Part
– Identifies the subnet within the network
– Remaining Bits are the Host Part, designating a
particular host on that subnet
Network Part
Subnet Part
IP Address (32 bits total)
Host Part
Assigning Parts

70
Example
– IP address registrar gave the University of
Hawaii the network part 128.171
– UH gave the College of Business
Administration the subnet part 17
– College of Business Administration gave the
host part 13 to a computer it later gave the host
name voyager.cba.hawaii.edu
– So the computer’s IP address became
128.171.17.13.
71
Assigning Subnet Parts

Organization Assigns Subnet Parts
– Assigns subnet parts to suborganizations
– Suborganization assigns host bits to hosts
128.171
Registrar
128.171.17.13
Firm
Suborganization
128.171.17.13
Host
IP Addresses

Subnet
Subnet
Within an organizational Network
– Router looks at Network Plus Subnet Part
Combined
– If destination host is on a subnet attached to
the router, delivers the IP packet to the host
– Otherwise, passes the packet on to a next-hop
router
Local Part
Network Part
Subnet Part
IP Address (32 bits total)
Host Part
72
Importance of Part Sizes
73

Determine Number of Possible Networks,
Subnets, or Hosts

If There are N Bits in the Part, there can be
2N possible Networks, Subnets, or Hosts

Actually, 2N-2
– All zeros cannot be used for a part
– All ones cannot be used for a part

Example: if part has 8 bits, 28-2
possibilities (254)
Masks
74

Problem: Just looking at an IP address
does not tell you what bits belong to each
part

Solution: Create a second 32-bit number, a
mask, to tell the size of
– The network part for border router decisions
– The network plus subnet parts for internal
router decisions
Masks

Two Types: Network Masks and Subnet
Masks
– Network Mask Tells the Length of the Network
Part
– Subnet Mask Tells the length of the Network
Plus Subnet Parts (not just subnet part)
– IP Address will be paired with one or the other,
but not both simultaneously
– The correct pairing happens automatically
75
76
Masks

Masks Begin with 1s, End with 0s (111…00)

For network masks, 1s are in Network Part
bits; 0s are in Subnet and Host Parts

For subnet masks, 1s are in Network and
Subnet Parts; 0s are in Host part

Again, always total 32 bits
11111111111111110000000000000000
77
Masks

IP Address-Mask Pairs often Written with
Prefix Notation
– 128.171.17.13/16
– 16 means that the mask has 16 initial 1s
– Total number of bits is 32 in an IP address, so
there must be 16 trailing 0s
11111111111111110000000000000000
Router Forwarding Tables


Routers make forwarding decisions using
router forwarding tables
Generic format..
– Network or subnet
– Decision rule (deliver directly or pass on to a
particular router) if Network or Subnet bits
match those of IP destination address
Network/Subnet
Delivery
128.171.17
Local
142.99
Next-Hop Router A
78
79
Router Forwarding Tables

Refinement
Note
– Book calls first column the IP address part
– More precisely, designates a particular network
or subnet
– All packets to that network or subnet are
forwarded in the same way
Network/Subnet
Delivery
128.171.17
Local
142.99
Next-Hop Router A
Router Forwarding Tables

80
Router Compares Destination IP Address
to Each Row in Router Forwarding Table
– If matches, delivers according to Delivery rule
– If destination address of IP packet is
128.171.17.13, network and subnet bits
(128.171.17) match, so router delivers packet
locally (directly)
Network/Subnet
Delivery
128.171.17
Local
142.99
Next-Hop Router A
81
Router Forwarding Tables

Also Has a Mask Column
– Tells number of network or network+subnet bits
– If Mask in a row is 24 bits long, router only
compares first 24 bits of packet’s IP destination
address to Net/Subnet bits in table row
– Tells size of network part or network+subnet
parts
Net/Subnet
Mask
Destination
127.171.17
24
Local
142
8
Next-Hop
Router A
Router Forwarding Tables

Also Has a Mask Column
– A network mask for a host outside the
organization’s network
– A subnet mask for an internal host
– Can’t tell which by looking at the mask
– Don’t worry. It’s all automatic
Net/Subnet
Mask
Destination
127.171.17
24
Local
142
8
Next-Hop
Router A
82
83
Router Forwarding Tables

Example
– Destination IP Address is 127.171.17.13
– Mask is 24, so only look at 127.171.17
– Matches row’s network/subnet bits, so use
Local (direct) delivery
Net/Subnet
Mask
Destination
127.171.17
24
Local
142
8
Next-Hop
Router A
84
Router Forwarding Tables

Longest Match Principle
– Must select one row to determine delivery
– If two rows match, use longest match, that is
match to greatest number of bits
– For 127.171.17.13, use local delivery (24-bit
match)
Net/Subnet
Mask
Destination
127.171.17
24
Local
128.171
16
Next-Hop
Router A
85
Router Forwarding Tables

Metric
– If same length of match, turn to metric column
– Metric describes the desirability of a choice
– If metric is cost, choose lowest cost
– For other metrics (speed, etc.), may chose
largest value
Net/Subnet Mask
128.171
16
Metric
(Cost)
23
128.171
16
45
Delivery
Next-Hop
Router A
Local
Router Forwarding Tables

There May be No Matches
– One IP Address Part is Always 0.0.0.0
– If there is no match, choose its next-hop router
(called the Default Router)
Net/Subnet
Delivery
128.171.17.13
Local
0.0.0.0
Next-Hop Router C
86
Router Forwarding Tables

Recap of Selection Rules
– Compare destination IP address of an arriving
packet against ALL rows within the router
forwarding table because there may be multiple
matches
– Select a single row that matches
– If multiple rows match, select the longest match
– If multiple rows tie on the longest match, select
the row with the largest or smallest metric,
depending on the specific metric
– If there is no match, select the default router row
87
Router Forwarding Tables

Delivery
– Table not only designates local delivery or a
next hop router
– Also designates the router interface (port) that
will be used for delivery
Interface
Delivery
2
Local
3
Next-Hop Router C
3
Next-Hop Router D
88
Dynamic Routing Protocols

How Do Routers Get Information for their
Router Forwarding Tables?
– Share router forwarding table information
– Standards for these exchanges are called
dynamic routing protocols
Router Forwarding
Table Information
89
Dynamic Routing Protocols

How Do Routers Get Information for their
Router Forwarding Tables?
– Thanks to dynamic routing protocols, the
Internet needs no central point of control
– Routers create their router forwarding tables
strictly by information from peers and their own
knowledge
Router Forwarding
Table Information
90
IP Version 6

Current Version of IP is IP Version 4
– This is the version we have been discussing
– Has 32-bit IP address fields
– Not long enough; running out of IP addresses

Next Version will be IP Version 6
– Will have 128-bit IP address fields
– Will allow vast numbers of IP addresses (2128)
– Being adopted slowly
91
Terminology Confusion

TCP/IP is a Standards Architecture
– Includes not only TCP and IP but also UDP,
HTTP, and many other protocols
– May not even use TCP (UDP instead) or IP
(ARP instead, as discussed in Module A)

TCP and IP are Individual Standards
– Within the TCP/IP Architecture
92
More on PPP
Point-to-Point Protocol
Data Link Layer Process

Internet layer process passes EACH IP
packet to the data link layer process for
delivery over the data link
Internet Layer
Process
IP Packet
Data Link Layer
Process
94
95
PPP

Point-to-Point Protocol
– Popular data link layer protocol for dial-in
connections
– Supported by Microsoft Windows
– Between data link layer processes on user PC
and first router
– Not between user PC and the destination host
DLL Process
User PC
PPP
DLL Process
First Router
96
PPP

Negotiation Phase
– Before exchanging data frames, the two sides
– Negotiate conditions of PPP operation
– Also negotiate how specific protocols will be
handled, such as IP
• Not limited to IP
DLL Process
User PC
PPP
DLL Process
First Router
97
PPP

Data Frames
– Header
– Information field (IP packet or other information)
– Trailer with Frame Check Sequence field
• Error detection but not correction
• If an error is found, PPP frame is discarded
Trailer
Information Field
IP Packet
Header
98
PPP

Flag Fields (1 Octet Each)
– Always contain: 10000001
– Designates start of frame and end of frame
– No length field necessary
Flag
Addr
Ctrl
Prot
Info
CRC
Flag
99
PPP

Address Field (1 Octet)
– PPP was designed to allow several devices at
each end
– For modem-modem communication, only one
device at each end
– Has fixed value: 11111111
Flag
Addr
Ctrl
Prot
Info
CRC
Flag
100
PPP

Control Field (1 Octet)
– PPP was designed to allow control information
– Not used in PPP; included because PPP is
based on an older protocol that used this field
– In PPP, the control field contains the fixed value
00000011
Flag
Addr
Ctrl
Prot
Info
CRC
Flag
101
PPP

Protocol Field (2 Octets)
– Identifies the contents of the information field
– There are values for IP, IPX, other internet layer
protocols that may be carried in the information
field
– There are values for supervisory messages
Flag
Addr
Ctrl
Prot
Info
CRC
Flag
102
PPP

Cyclical Redundancy Check (2 Octets)
– For error-checking information
– Allows receiver to detect a PPP frame with a
transmission error
– Receiver discards such frames; error detection
but not reliability (no error correction)
Flag
Addr
Ctrl
Prot
Info
CRC
Flag
Physical Layer Process

103
Data link layer process passes EACH data
link layer frame to the physical layer
process for delivery to the next computer
(router or host)
Data Link Layer
Process
DL Frame
Physical Layer
Process
104
Physical Layer Process

Physical layer process does not create a
protocol data unit
– Sends one bit at a time over the data link
connecting the sending computer to the next
computer
– It is the data link layer process that organizes
these bits into frames over the data link
Physical Layer
Process
10110
Physical Layer
Process
Key Point
Reliability

106
Only TCP is Reliable or Needs to Be
– Corrects errors, gives application programs
clean data
– Corrects errors that occur a the transport layer
or lower layers because only correctly received
TCP segments are acknowledged