Documente Academic
Documente Profesional
Documente Cultură
Week 4
Lecture Outline
TCP/IP Transport Layer (TCP)
General Information
IP Addressing
Subnetting (next week)
Application
Transport
Network
Data Link
Physical
Transport Layer
The Application layer is only aware of the
Transport layer
Duties of the Transport Layer
Packetizing
Creating a connection
Addressing
Providing reliability
packet
Connection-oriented
Connectionless
Connection Establishment
Data Transfer
Connection Termination
Connection Establishment
1.
2.
3.
Data Transfer
Connection Termination
1.
2.
3.
4.
Requires a 4 steps:
Client requests a disconnection from the server
Server acknowledges
Server requests disconnection from the client
Client acknowledges
216 = 65536
So the valid port number range is 0..65535
Theoretically, up to 65536 clients may be
connected to the same server at the same time.
1.
2.
3.
Usage
0 1023
1024 49151
Damage control
Loss control
Order control
Duplicate control
Slower delivery
More complicated
Damage Control
Error detection
The sender of a packet may include extra information
to provide a cross check at the receiving end.
Example: Given data D, sender encodes a function
f(D) to be included with the packet. The receiver then
reverses the function (i.e. f-1(D) to generate the data
and compares it to the data (they should be the
same).
Acknowledgements (ACK)
Require receiver to acknowledge the receipt of the
senders packets.
Time Outs
If an ACK is not received after a set period of time,
assume the packet was damaged and start again.
Loss Control
Order Control
Duplicate Control
Internet Protocols
Two protocols for transport layer in the Internet
User Datagram Protocol (UDP)
IP Addressing
IP Addressing
IP addresses uniquely and universally
IP Addressing
Notation
Binary
4 sets of binary octets (i.e. 4 bytes)
Dotted decimal (conventional)
Easier to read
Each byte is capable of representing 2 8 = 256
possibilities (0..255)
OO programming)
Although the new classless addressing
technology will eventually take over, classful
addressing will be in existence for a long
time.
We must understand classful before we
understand classless
Classful Addressing
IP address divided into five classes:
A, B, C, D, and E
Address Space:
A covers , B covers , C covers 1/8, and D, E cover 1/16
Number of Addresses
Percentage
231 = 2,147,483,648
50%
230 = 1,073,741,824
25%
229 = 536,870,912
12.5%
228 = 268,435,456
6.25%
228 = 268,435,456
6.25%
of a binary IP address:
Hostid
General Model:
Figure 4-4
Examples
Class A
Divided into 128 blocks (each with different netid)
0.0.0.0 to 0.255.255.255 (netid 0)
1.0.0.0 to 0.255.255.255 (netid 1)
purposes
Netid 10 is used for private addresses.
125 remaining blocks can be assigned to
organizations
Think about this: can only have 125 unique
organizations each with 16,777,216 addresses to use.
Waste of addresses!
Class B
Divided into 16,384 blocks (each with different netid)
128.0.0.0 to 128.0.255.255 (netid 128.0)
128.1.0.0 to 128.1.255.255 (netid 128.1)
organizations
Each organization would then have 65,536 available
addresses
Think about it! 16,368 unique organizations possible,
each with 65,536 addresses to use.
Class C
Divided into 2,097,152 blocks (each with a
different netid).
256 blocks used for special purposes.
2,096,896 blocks can be assigned to
organizations
Each organization would then have 256
addresses
Think about this one:
Class D & E
Class D
Class E
Network Address
The network address identifies the network
Network Address
- Try it yourself!
Example Problems:
1)
2)
Masks
Given an address, can we extract the network
information
32 bit binary number
Applying the logical AND
operator to the mask and
the address gives the first
address in the block
(network address)
B A AND B
Masks
The AND operates as follows:
1. If the bit in the mask is 1, the corresponding
Masks
Default Masks
Class
Mask in Binary
Mask in dotteddecimal
255.0.0.0
255.255.0.0
255.255.255.0
Masks
-Try It Yourself
1) Given address 23.56.7.91, apply the
Masks
Depletion of Addresses on the Internet
Other Issues
-Multihomed Devices
Multihomed device
Other Issues
-Special Addresses
Special Address
Netid
Hostid
Source or Destination
Network address
Specific
All 0s
None
Specific
All 1s
Destination
All 1s
All 1s
Destination
All 0s
All 0s
Source
All 0s
Specific
Destination
Loopback address
127
Any
Destination
Other Issues
-Special Addresses
Direct Broadcast Address
Other Issues
-Special Addresses
Limited Broadcast Address
Belongs to class E
Allows a host to send a message to all other hosts
Other Issues
-Special Addresses
This Host on This Network
Other Issues
-Special Addresses
Specific Host on This Network
Other Issues
-Special Addresses
Loopback Address - used to test the software on a machine
Note:
packet never
leaves
machine
Other Issues
-Special Addresses
Private Addresses
One-to-many
Individual source sends packet to group of
destinations
Class D address