Title: TCPIP Architecture
1TCP/IP Architecture
- The Transmission Control Protocol/Internet
Protocol (TCP/IP) networking model consists of
only four layers, instead of the seven in the
Open Systems Interconnection (OSI) reference
model. - The TCP/IP model is defined in Request for
Comments (RFC) 1122, "Requirements for Internet
HostsCommunication Layers."
2The OSI Reference Model and the TCP/IP Stack
3TCP/IP Protocols
4The Point-to-Point Protocol (PPP) Frame
5PPP Connection Establishment Phases
- Link dead. The two computers begin in a state
where there is no communication between them,
until one of them initiates a physical layer
connection. - Link establishment. After a physical layer
connection is established, the computers use Link
Control Protocol (LCP) to negotiate the
parameters they will use during the rest of the
PPP session. - Authentication. If required, the two computers
exchange PPP frames that perform a user
authentication sequence. - Link quality monitoring. If required, the two
computers exchange link quality protocol messages
after the authentication process is complete.
6PPP Connection Establishment Phases (Cont.)
- Network layer protocol configuration. The
computers perform a separate exchange of messages
by using the appropriate network control
protocols for each network or internet layer
protocol they agreed to use. - Link open. When the network control protocol
negotiations are complete, the PPP connection is
fully established, and the exchange of packets
containing application data can begin. - Link termination. When the two computers have
finished communicating, they sever the PPP
connection by exchanging LCP termination
messages, after which the systems return to the
link dead state.
7The IP Datagram Format
8IP Addressing
- The Source IP Address and Destination IP Address
fields in every IP header identify the computer
that created the datagram and its final
recipient. - IP addresses are 32-bit values that identify both
a particular network interface and the network to
which that interface is connected.
9IP Routing
- Routing is the process by which IP passes
datagrams from system to system until they reach
their final destination. - A router is a device that connects TCP/IP
networks and maintains information about the
other routers in its immediate vicinity.
10Fragmentation
- Fragmentation occurs during the routing of
packets through an internetwork. - When a router receives a packet that is too large
to be transmitted over another network, the
router splits the datagram into fragments and
encapsulates each fragment in a separate packet. - Datagrams can be fragmented, and their fragments
fragmented, as many times as necessary on the way
to their destination. - The fragments are reassembled when they all reach
the system identified by the Destination IP
Address field in their IP headers.
11Address Resolution Protocol (ARP)
- A computer with an IP address of a router or
computer that it must resolve generates an ARP
Request message containing that IP address and
broadcasts it to the local network. - All the other TCP/IP systems on the network
receive the message and compare the enclosed IP
address with their own. - The computer using the requested IP address then
generates an ARP Reply message containing the
hardware address of its network interface adapter
and returns it to the sender as a unicast (that
is, a transmission addressed to a single
destination).
12Internet Control Message Protocol (ICMP)
- ICMP, as defined in RFC 792, is another
internet-layer TCP/IP protocol, but it does not
carry application data as IP does. - ICMP has two functions it carries request and
reply data for diagnostic programs such as Ping,
and it provides error reporting services for
intermediate systems. - Because IP is an end-to-end protocol, it is
designed so that only the destination system
reads the contents of the datagram and processes
the data. - If an error that occurs during transmission
prevents the packet from reaching its
destination, the destination system has no way of
knowing about the problem or its cause.
13Converting a Binary Address to Decimal
14Two LANs Connected by Routers
15Binary IP Address and Subnet Mask Values
16IP Address Classes
17IP Addressing Rules
- The network identifier cannot have a first-byte
value of 127. - This value is reserved for loopback and
diagnostic functions. - The network identifier and host identifier bits
cannot all be 1s. - If all bits were set to 1, the address would be
interpreted as a broadcast rather than an
individual host. - The network identifier and host identifier bits
cannot all be 0s. - If all bits were set to 0, the address would be
interpreted to mean "this network only."
18IP Address Ranges for Private Networks
19Calculating Subnet Masks
- You have a Class C network address, such as
192.168.24.0, and you want to create 10 subnets
supporting 12 hosts each. - You can borrow 4 bits from the 8-bit host
identifier to create a 4-bit subnet identifier
NNNNNNNN NNNNNNNN NNNNNNNN SSSSHHHH - Because 24 2 14, the subnet identifier can
support 10 subnets, and the 4-bit host identifier
permits up to 14 hosts per subnet. - To compute the subnet mask, add the number of
network and subnet identifier bits and mask them
all, resulting in 11111111 11111111
11111111 11110000 - The values of the first three bytes of the mask
are 255.255.255, and the fourth byte now is
11110000, which becomes 240 in decimal form. - Therefore, the subnet mask you should use on this
network is 255.255.255.240.
20Binary Conversion Values for 8-Bit Numbers
21Lining Up Bit Values with Conversion Values
22Adding the Conversion Values
23Example Subnet and Host Identifier Values
- First three bytes
- 11000000 10101000 00011000
- 192 168 24 192.168.24
- Fourth byte, possible values
- 0001 0001 0001 10000001 0010 0001 10010001
0011 0001 10100001 0100 0001 10110001
0101 0001 11000001 0110 0001 11010001
0111 0001 1110
24Example IP Address Values for the First Subnet
25Subnet Mask for Class B Network Example
26TCP Services
- Guaranteed delivery
- Packet acknowledgment
- Data segmentation
- Flow control
- Error detection
- Application identification
27The TCP Message Format
28TCP Connection Establishment
- A Transmission Control Protocol (TCP) connection
is actually two separate connections, with one
running in each direction. - To establish each one of the connections, a
computer transmits a TCP message with the SYN
control bit activated. - The other computer then replies by sending a
message with the ACK control bit activated. - To streamline the process into three steps
instead of four, the client sends its SYN message
and the server replies with a message containing
both the ACK and SYN bits. - The server acknowledges the clients connection
request and issues its own connection request
using just one message. - The client then replies to the server with an ACK
message, and both of the connections are
complete.
29The TCP Three-Way Handshake
30TCP Packet Acknowledgment
- The TCP packet acknowledgment and error
correction systems rely on the values of the
Sequence Number and Acknowledgment Number fields
in the TCP header. - During the three-way handshake, when the server
replies to the clients SYN message, the SYN/ACK
message that the server generates contains its
own initial sequence number (ISN) in the Sequence
Number field and also a value in its
Acknowledgment Number field. - This acknowledgment number value is the
equivalent of the clients ISN plus 1. - The function of this field is to inform the other
system of what value is expected in the next
messages Sequence Number field.
31TCP Packet Acknowledgment (Cont.)
- When the systems begin to send data, they
increment their sequence number values by 1 for
each byte of data they transmit. - The same message numbering process also occurs
simultaneously in the other direction.
32TCP Checksum Computation and Error Correction
33TCP Flow Control
34The TCP Termination Process
35The UDP Message Format