Chapter 5: Network and Transport Layers Outlines Network Protocols and TCP/IP Networking Addressing Routing Network flow control and QoS Network Protocols and TCP/IP Transmission Control Protocol/ Internet Protocol (TCP/IP)
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
The Transmission Control Protocol/ Internet Protocol (TCP/IP) was developed for the U.S. Dept of Defense’s Advanced Research Project Agency Network (ARPANET) in 1974.
TCP/IP allows reasonable efficient and error-free transmission.
TCP/IP has two parts:
A typical TCP packet has 192-bit (24-byte) header of control information.
Two forms of IP are currently in use:
The primary reason for the increase in packet size is an increase in the address size from 32 bits to 128 bits, due to the dramatic growth in the usage of the Internet.
The size of the message field depends on the data link layer protocol used. TCP/IP is commonly combined with Ethernet.
1 Source ID 16 bits
2 Destination ID 16 bits
3 Sequence number 32 bits
4 ACK number 32 bits
5 Header length 4 bits
6 Unused 6 bits
7 Flags 6 bits
8 Flow control 16 bits
9 CRC 16 16 bits
10 Urgent pointer 16 bits
11 Options 16 bits
1 Version number 4 bits
2 Header length 4 bits
3 Type of Service 8 bits
4 Total length 16 bits
5 Identifiers 16 bits
6 Flags 3 bits
7 Packet offset 13 bits
8 Hop limit 8 bits
9 Protocol 8 bits
10 CRC 16 16 bits
11 Source address 32 bits
12 Destination Address 32 bits
13 Options varies
14 User data varies
15 Flow name 24 bits
16 Next header 8 bits
11 (128 bits)
12 (128 bits)
Maximum Ethernet packet size = 1492
TCP message field
1492 - 24 (TCP header) - 24 (IPv4 header) = 1444
Address Example Software Example Address
Application Layer Web browser ike.ba.ttu.edu
(also called domain name)
Network Layer TCP/IP 126.96.36.199
Data Link Layer Ethernet 00-A0-C9-96-1D-90
The network layer determines the best route through the network to the final destination.
Based on this routing, the network layer identifies the data link layer address of the next computer to which the message should be sent.
In general, the data link layer address is permanently encoded in each network card, and as part of the hardware that cannot be changed.
Network layer addresses are generally assigned by software. Every network layer software package usually has a configuration file that specifies the network layer address for that computer.
Application layer addresses (or server addresses) are also assigned by a software configuration file. Virtually all servers have an application layer address, but most client computers do not.
Network layer addresses and application layer addresses go hand in hand. ike.ba.ttu.edu - means 188.8.131.52 at the network layer.)
InterNIC is responsible for network layer addresses (IP addresses) and application layer addresses or domain names (www.ttu.edu).
There are five classes of Internet addresses.
Classes A, B, and C are available to organizations
Class D and E are reserved for special purposes and are not assigned to organizations.
Ranges of the first byte for different classes:
Class D Class E
Class A: 0xxxxxxx
Class B: 10xxxxxx.xxxxxxxx
Class C: 110xxxxx.xxxxxxxx.xxxxxxxx
Class D: 1110xxxx.xxxxxxxx.xxxxxxxx
Class E: 1111xxxx.xxxxxxxx.xxxxxxxx
The IP addresses with the first
byte as 0 and 127 are reserved
# of Addresses
Class Available Addr-Structure Example Available#
Class A 16 million First byte fixed 50.x.x.x 127
last three bytes
Class B 65k First two bytes fixed 128.192.x.x 16k
last two bytes
Class C 254 First three bytes fixed 192.1.56.x 2 millions
The Internet is quickly running out of addresses. Although there are more than 1 billion possible addresses, the fact that they are assigned in sets (or groups) significantly restricts the number of usable addresses.
The IP address shortage was one of the reasons behind the IPv6, providing in theory, 3.2 x 1038 possible addresses.
How to apply for IP address?
Assign IP addresses to specific computers so that all computers on the same local area network have a similar address.
Each LAN that is logically grouped together by IP number is called a TCP/IP subnet.
Subnet mask enables a computer to determine which computers are on the same subnet. This is very important for message routing.
IP address: 184.108.40.206
Subnet mask: 255.255.255.0
IP address: 129.118.49.x is for the computers in the same subnet
Subnet with partial bytes addresses.
E.g. 220.127.116.11 to 18.104.22.168
22.214.171.124 1000 0001.0111 0110.0011 0001.0110 1111
255.255.192.0 1111 1111.1111 1111.1100 0000.0000 0000
The IP prefix 1000 0001.0111 0110.00
126.96.36.199 1000 0001.0111 0110.0011 0011.0110 1111
188.8.131.52 1000 0000.0101 0011.0111 1111.0000 0001
Subnet Mask Template
128 64 32 16 8 4 2 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
1 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1
Network ID–Class B
Possible Subnet Address
An address assignment problem:
Each time the computer is moved, or its network is assigned a new address, the software on each individual computer must be updated.
Solution: dynamic addressing
With this approach, a server is designated to supply a network layer address to a computer each time the computer connects to the network.
Two standards for dynamic addressing are commonly used in TCP/IP networks:
The Bootp or DHCP server can be configured to assign the same network layer address to the computer each time it requests an address or it can lease the address to the computer by picking the “next available” network layer address from a list of authorized addresses.
Dynamic addressing greatly simplifies network management in non-dial-up networks too.
The sender translates the application layer address (or server name) of the destination into a network layer address; and in turn translates that into a data link layer address.
Two approaches used in TCP/IP:
Domain Name Service (DNS)
Used for translating application layer addresses into network layer addresses.
Keeps the name and IP addresses of the name server that will provide DNS information for your address classes.
Server address resolution process:
This is why it sometimes takes a long time to access certain sites.
IP addresses are then temporarily stored in a server address table.
In order to actually send a message, the network layer software must know the data link layer of the destination computer.
In the case of a distant computer, the network layer would route the message by selecting a path through the network that would ultimately lead to the destination.
There are many possible routes or paths a message can take to get from one computer to another.
The process of determining the route or path through the network that a message will travel from the sender to the receiver.
The routing information on each router, which specifies how message will travel through the network.
Types of routing:
Decentralized routing: Static routing, Dynamic routing
Dynamic Routing (adaptive routing)
Commonly used dynamic routing protocols
Routing Information Protocol (RIP)
Internet Control Message Protocol (ICMP)
Open Shortest Path First (OSPF)
Two drawbacks to Dynamic Routing.
Two ways a group of packets can be routed:
TCP/IP vs. UPD/IP
The usual transmission between two computers.
Sending messages to all computers on a LAN or subnet.
Sending the same message to a group of computers temporarily in a class D IP address.
Could be one packet that all receive or
replicated by routers in the network
by the network
Computers wishing to participate in a multicast send a message to the sending computer or some other computer performing routing along the way using a special type of TCP-level packet called Internet Group Management Protocol (IGMP).
Each multicast group is temporarily assigned a special Class D IP address to identify the group, thus allowing a restricted broadcast of messages to this specific group.
TELNET FTP SMTP DNS SNMP DHCP
Quality of Service (QoS):
RT + B
R: Token replenishment rate
B: Bucket size
At least four pieces of information needed for a client computer TCP/IP configuration
Data link layer address