0% found this document useful (0 votes)
44 views20 pages

Course Contents: Data Communications Grade Prof. Dr. Hassan H. Soliman Dr. Mostafa Elgayar Part 5 P1

This document provides an overview of the TCP/IP protocol suite, specifically focusing on the network layer protocols. It discusses the Internet Protocol (IP) which operates at the network layer and provides best effort delivery of data packets across networks. It also mentions the Address Resolution Protocol (ARP) which maps IP addresses to hardware addresses, and the Internet Control Message Protocol (ICMP) which is used to report problems with packet delivery. The document provides information on IP addressing and the TCP/IP protocol stack. It also discusses how TCP/IP can operate over Ethernet and IEEE 802 networks and the encapsulation methods used.

Uploaded by

saher waleed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views20 pages

Course Contents: Data Communications Grade Prof. Dr. Hassan H. Soliman Dr. Mostafa Elgayar Part 5 P1

This document provides an overview of the TCP/IP protocol suite, specifically focusing on the network layer protocols. It discusses the Internet Protocol (IP) which operates at the network layer and provides best effort delivery of data packets across networks. It also mentions the Address Resolution Protocol (ARP) which maps IP addresses to hardware addresses, and the Internet Control Message Protocol (ICMP) which is used to report problems with packet delivery. The document provides information on IP addressing and the TCP/IP protocol stack. It also discusses how TCP/IP can operate over Ethernet and IEEE 802 networks and the encapsulation methods used.

Uploaded by

saher waleed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Mansoura University

Faculty of Computers and Information


Department of Information Technology
Second Semester- 2020-2021

DATA COMMUNICATIONS
Grade: 2ND YEAR PROGRAMS

Prof. Dr. Hassan H. Soliman


Dr. Mostafa Elgayar
Part 5 P1

Course Contents
PART 1
Overview and Introduction
PART 2
Communication Reference Models
PART 3
Data Communication Fundamentals
and Physical Layer Protocols
PART 4
Datalink Layer Protocols and
Emerging Network Technologies
PART 5
The Internet Protocol Suite:
The Network Layer Protocols
PART 6
The Internet Protocol Suite:
The Transport Layer Protocols
PART 7
The Internet Protocol Suite:
The Application Layer Protocols

Page 5-2
Introduction To TCP/IP (1)
• The TCP/IP protocol suite is named after two of its most
important protocols:
 Transmission Control Protocol (TCP) and,
 Internet Protocol (IP).
• A less used name for it is the Internet Protocol Suite,
which is the phrase used in official Internet standards
documents.
• The main design goal of TCP/IP was to build an
interconnection of networks, referred to as an
internetwork, or internet, that provided universal
communication services over heterogeneous physical
networks.

Page 5-3

Introduction To TCP/IP (2)


• The clear benefit of such an internetwork is the enabling of
communication between hosts on different networks,
perhaps separated by a large geographical area.
• The Internet consists of the following groups of networks:
 Backbones: Large networks that exist primarily to interconnect
other networks.
 Regional networks: connecting, for example, universities and
colleges.
 Commercial networks: providing access to the backbones to
subscribers, and networks owned by commercial organizations for
internal use that also have connections to the Internet.
 Local networks, such as campus-wide university networks.

Page 5-4
Introduction To TCP/IP (3)
• The ability to interconnect a large number of networks in
some hierarchical and organized fashion enables the
communication of any two hosts belonging to this
internetwork.
• Another important aspect of TCP/IP internetworking is the
creation of a standardized abstraction of the
communication mechanisms provided by each type of
network.

Page 5-5

Introduction To TCP/IP (4)


• TCP/IP provides communication services that run between
the programming interface of a physical network and user
applications.
• It enables a common interface for these applications,
independent of the underlying physical network. The
architecture of the physical network is therefore hidden
from the user and from the developer of the application.
• To be able to interconnect two networks, we need a
computer that is attached to both networks and can forward
data packets from one network to the other; such a
machine is called a router.

Page 5-6
IP address and Internet Protocol
• The term IP router is also used because the routing
function is part of the Internet Protocol portion of the
TCP/IP protocol suite.
• To be able to identify a host within the internetwork, each
host is assigned an address, called the IP address.
• The IP address consists of two parts:
IP address = <network number> <host number>
• The network number part: identifies the network within the
internet and is assigned by a central authority and is unique
throughout the internet.
• The host number part: is assigned by the organization that
controls the network identified by the network number.

Page 5-7

The TCP/IP protocol Stack

Page 5-8
Ethernet and IEEE 802.x LANs & TCP/IP (1)
• TCP/IP, as an internetwork protocol suite, can operate over
a large number of physical networks. The most common
and widely used of these protocols is Ethernet.
• As discussed in the previous chapter, two frame formats
can be used on the Ethernet networks:
 The Ethernet (or DIX Ethernet or Ethernet V2.).
 The international IEEE 802.3 standard.
• The difference between the two standards is in the use of
one of the header fields, which contains a protocol-type
number for Ethernet and the length of the data in the frame
for IEEE 802.3.

Page 5-9

Ethernet and IEEE 802.x LANs & TCP/IP (2)


• In Ethernet frame a data field length is up to 1500 bytes,
and Ether type is greater than 1500.
• In the 802.3 MAC frame, the length of the data field is
indicated in the 802.3 header (>1500). The type of protocol
it carries is then indicated in the 802.2 header.

Page 5-10
Ethernet and IEEE 802.x LANs & TCP/IP (3)
• For all practical purposes, the Ethernet physical layer and
the IEEE 802.3 physical layer are compatible.
• However, the Ethernet data link layer and the IEEE
802.3/802.2 data link layer are incompatible.
• The 802.2 Logical Link Control (LLC) layer above IEEE
802.3 uses a concept known as link service access point
(LSAP), which uses a 3-byte header, where DSAP and
SSAP stand for destination and source service Access
Point respectively. Numbers for these fields are assigned
by an IEEE committee.
• In the evolution of TCP/IP, three standards were
established that describe the encapsulation of IP, ARP and
RARP frames on these networks:
Page 5-11

Ethernet and IEEE 802.x LANs & TCP/IP (4)


1. Standard for the Transmission of IP datagrams over
Ethernet Networks specifies only the use of Ethernet
type of networks. The values assigned to the type field
are:
a. 2048 (hex 0800), for IP datagrams
b. 2054 (hex 0806), for ARP datagrams
c. 32821 (hex 8035), for RARP datagrams
2. Two Methods for the Transmission of IP Datagrams over
IEEE 802.3 Networks specifies two possibilities:
a. The Ethernet compatible method: The frames are sent on a real
IEEE 802.3 network in the same fashion as on an Ethernet
network, that is, using the IEEE 802.3 data-length field as the
Ethernet type field, thereby violating the IEEE 802.3 rules, but
compatible with an Ethernet network.
Page 5-12
Ethernet and IEEE 802.x LANs & TCP/IP (5)
b. IEEE 802.2/802.3 LLC type 1 format: Using 802.2 LSAP header
with IP using the value 6 for the SSAP and DSAP fields.
• The IEEE 802.2/802.3 method is the preferred method, so, all
future IP implementations on IEEE 802.3 networks are
supposed to use the second method.
• All IEEE 802.3, 802.4, and 802.5 implementations should use
the Sub-Network Access Protocol (SNAP) form of the IEEE
802.2 LLC, with the DSAP and SSAP fields set to 170
(indicating the use of SNAP), with SNAP assigned as follows:
a. 0 (zero) as organization code.
b. EtherType field: 1. 2048 (hex 0800), for IP datagrams
2. 2054 (hex 0806), for ARP datagrams
3. 32821 (hex 8035), for RARP datagrams
These are the same values used in the Ethernet type field.

Page 5-13

Ethernet Packet Decoding (1)


• Decoding means understanding the fields of the headers of
a packet to determine the information needed to process
the packet in correct way.
• For example from the packet segment shown we need to
determine: 1. the Destination and Source Hardware (MAC)
addresses, 2. the type of packet frame (Ethernet or IEEE
802.3), 3. the length of data or the type of protocol
encapsulated.
0x00 00 11 09 C1 10 08 00 10 7B 47 BB D3 08 00 45 00
0x10 00 28 00 25 40 00 27 06 FD D3 C1 71 A0 0D C1 E3
0x20 32 75 00 19 F3 01 42 40 CC C2 90 9F EE 8C 50 10
0x30 FD 5C DB 55 00 00 00 00 00 00 00 00

Page 5-14
Ethernet Packet Decoding (1)
0x00 00 11 09 C1 10 08 00 10 7B 47 BB D3 08 00 45 00
0x10 00 28 00 25 40 00 27 06 FD D3 C1 71 A0 0D C1 E3
0x20 32 75 00 19 F3 01 42 40 CC C2 90 9F EE 8C 50 10
0x30 FD 5C DB 55 00 00 00 00 00 00 00 00
Sol:
DA (6 bytes)= 00:11:09:C1:10:08
SA (6 bytes)= 00:10:7B:47:BB:D3
Type or Length?
(2 bytes)= 0x0800 (2048 > 1500)  Protcol Type
Packet Type  Ethernet
So, Protocol Type Encapsulated =2048  IP

Page 5-15

Internet Layer Protocols


• Protocols associated with the IP network layer are:
 The Internet Protocol
 The Internet Control Message Protocol (ICMP) and
 The Address Resolution Protocol (ARP)/RARP.
• The (IP) protocol operates at the network layer and
provides a best effort network layer service for connecting
computers to form a computer network.
• The (ARP) is used to map IP network addresses to the
hardware addresses used by a data link protocol such as IP-
to-MAC mapping in Ethernet networks.
• The (ICMP) protocol is used to report problems with
delivery of IP datagrams within an IP network.

Page 5-16
The Internet Protocol (IP) (1)
• The IP protocol operates at the network layer protocol of the
OSI reference model and is a part of the TCP/IP suite of
protocols for providing a best effort network layer service.
• Best-effort means that the packets sent by IP may be lost,
arrive out of order, or even be duplicated. IP assumes higher
layer protocols will address these anomalies.
• In IP networks, each computer is identified by one or more
globally unique IP addresses. The network layer Protocols
Data Units (PDUs) are known as either "packets" or
"datagrams".
• Each packet carries the IP address of the sending computer
and also the address of the intended recipient or recipients of
the packet. Other management information is also carried.

Page 5-17

The Internet Protocol (IP) (2)


• In IP version 4, IP addresses are represented by a 32-bit
unsigned binary value. It is usually expressed in a dotted
decimal format. For example, 9.167.5.8 is a valid IP
address.
• To identify a host on the Internet, each host is assigned an
address, the IP address, or in some cases, the Internet
address.
• When the host is attached to more than one network, it is
called multi-homed and has one IP address for each
network interface (at least).
• The IP address consists of a pair of numbers:
 IP address = <network number><host number>

Page 5-18
The Internet Protocol (IP) (3)
• The network number (network prefix) portion of the IP
address is administered by one of three International
Regional Internet Registries (RIR).
• For example, 128.2.7.9 is an IP address with 128.2 being
the network number and 7.9 being the host number,
according a predefined rule.
• The binary format of the IP address 128.2.7.9 is:
10000000 00000010 00000111 00001001
• IP addresses are used by the IP protocol to uniquely
identify a host on the Internet.
• Each IP datagram contains a source IP address and a
destination IP address.

Page 5-19

The Internet Protocol (IP) (4)


• To send a datagram to a certain IP destination, the target IP
address must be translated or mapped to a physical address
(MAC address). For example, on LANs, the Address
Resolution Protocol is used to translate IP addresses to
physical MAC addresses.)
• There are many approaches used to assign IP addresses for
networks through dividing the addresses to pre-defined
classes or predefined network sizes (by defining number of
hosts per network).

Page 5-20
Class-based IP addresses (1)
• In this approach, the address range is divided into
five classes.
• The first bits of the IP address specify how the rest
of the address should be separated into its network
and host part.
• The number of bits assigned to the network
number determines the available number of
networks of this class
• The number of bits assigned to the host number
determines the available number of hosts for one
network.
Page 5-21

Class-based IP addresses (2)

Page 5-22
Class-based IP addresses (3)
• Class A addresses: These addresses use 7 bits for the
<network> and 24 bits for the <host> portion of the IP
address. This allows for (126) networks each with
(16777214) hosts; a total of over 2 billion addresses.
 12.123.12.11 108.123.123.22 89.88.12.33

• Class B addresses: They use 14 bits for the <network>


and 16 bits for the <host> portion of the IP address. This
allows for (16382) networks each with (65534) hosts; a
total of over 1 billion addresses.
 130.123.23.45 190.33.34.66 181.184.22.1

Page 5-23

Class-based IP addresses (4)


• Class C addresses: They use 21 bits for the <network>
and 8 bits for the <host> portion of the IP address. That
allows for (2097150) networks each with (254) hosts; a
total of over half a billion addresses.
 193.227.50.11 201.122.123.22 199.33.33.44
• Class D addresses: These addresses are reserved for
multicasting (a sort of broadcasting, but in a limited area,
and only to hosts using the same class D address).
 224.0.0.1 224.1.1.1
• Class E addresses: They are reserved for future use.

Page 5-24
Class-based IP addresses (5)
Bits: 1 8 9 16 17 24 25 32
0NNNNNNN Host Host Host
Class A:
Range (1-126)

Bits: 1 8 9 16 17 24 25 32
10NNNNNN Network Host Host
Class B:
Range (128-191)
1 8 9 16 17 24 25 32
Bits:
110NNNNN Network Network Host
Class C:
Range (192-223)
1 8 9 16 17 24 25 32
Bits:
1110MMMM Multicast Group Multicast Group Multicast Group
Class D:
Range (224-239)
Page 5-25

Class-based IP addresses (6)


• The number of small- to medium-sized networks
has been growing very rapidly.
• It was feared that if this growth had been allowed
to continue unabated, all of the available Class B
network addresses would have been used by the
mid-1990s.
• This was termed the IP address exhaustion
problem. This issue has been solved in two ways,
introducing another IP addressing scheme called
IPV6 and the other by further dividing IP classes
into sub-classes or more precisely, sub-networks.
Page 5-26
Reserved IP addresses
• A component of an IP address with a value all bits
0 or all bits 1 has a special meaning:
 All bits 0: An address with all bits zero in the host number
portion is interpreted as this host (IP address with <host
address>=0). All bits zero in the network number portion means
this network (IP address with <network address>=0).
 All bits 1: An address with all bits one is interpreted as
all networks or all hosts. For example, 128.2.255.255
means all hosts on network 128.2 (class B address):
This is called a directed broadcast address.
 Loopback: The class A network 127.0.0.0 is defined as the
loopback network. Addresses from that network are assigned
to interfaces that process data within the local system.

Page 5-27

Intranets - private IP addresses


• Another approach to conserve the IP address space is
Address Allocation for Private Internets.
• This relaxes the rule that IP addresses must be globally
unique. It reserves part of the global address space for use
in networks that do not require connectivity to the Internet.
• Three ranges of addresses have been reserved for this
purpose:
 10.0.0.0: A single Class A network.
 172.16.0.0 to 172.31.0.0: 16 contiguous Class B networks.
 192.168.0.0 to 192.168.255.0: 256 contiguous Class C nets.
• Hosts having only a private IP address do not have direct IP layer
connectivity to the Internet. All connectivity to external Internet hosts
must be provided with application gateways such as proxy or
(Network Address Translation) NAT servers.
Page 5-28
IP subnets (1)
• Due to the explosive growth of the Internet, the principle
of assigned IP addresses became too inflexible
• To avoid having to request additional IP network
addresses, the concept of IP subnetting was introduced.
• The assignment of subnets is done locally. The entire
network still appears as one IP network to the outside
world.
• The host number part of the IP address is subdivided into a
second network number and a host number. This second
network is termed a subnetwork or subnet. The main
network now consists of a number of subnets. The IP
address is interpreted as:
<network number><subnet number><host number>
Page 5-29

IP subnets (2)
• The division is done using a 32-bit subnet mask.
• Bits with a value of zero bits in the subnet mask indicate
positions ascribed to the host number.
• Bits with a value of one indicate positions ascribed to the
subnet number.
• Like IP addresses, subnet masks are usually written in
dotted decimal form.
• Examples:
 A class A network 10.10.2.0 with subnet mask 255.255.255.0 is
divided into (256) subnets each contains (256-2) hosts.
 A class C network 193.22.50.0 with subnet mask 255.255.255.192
is divided into (4) subnets each contains (64-2) hosts.
 255.255.255.11000000 255.255.255.192
Page 5-30
Using Variable Length Subnet-mask (VLSM) (1)
• Limitation of using only a single subnet mask across a
given network-prefix was that an organization is locked
into a fixed-number of fixed-sized subnets.
• VLSM allows an organization to use more than one subnet
mask within the same network address space. It is often
referred to as ‘subnetting a subnet’, and can be used to
maximize addressing efficiency.
• This procedure gives us what is also called “Classless
Inter-Domain Routing” (CIDR)
 The network portion of the address is determined by the network
subnet mask or prefix-length (/8, /19, etc.)
 The first octet (first two bits) of the network address (or network-
prefix) is NOT used to determine the network and host portion of
the network address.

Page 5-31

Using Variable Length Subnet-mask (VLSM) (2)


Example: 10.0.0.0/8 “subnetted using /16”
Subnet 1st host Last host Broadcast
10.0.0.0/16 10.0.0.1 10.0.255.254 10.0.255.255
10.1.0.0/16 10.1.0.1 10.1.255.254 10.1.255.255
 10.2.0.0/16 “sub-subnetted using /24”
Subnet 1st host Last host Broadcast
10.2.0.0/24 10.2.0.1 10.2.0.254 10.2.0.255
10.2.1.0/24 10.2.1.1 10.2.1.254 10.2.1.255
10.2.2.0/24 10.2.2.1 10.2.2.254 10.2.2.255
 Etc.
10.2.255.0/24 10.2.255.1 10.2.255.254 10.2.255.255

10.3.0.0/16 10.3.0.1 10.3.255.254 10.0.255.255


Etc.
10.255.0.0/16 10.255.0.1 10.255.255.254 10.255.255.255
Page 5-32
Using Variable Length Subnet-mask (VLSM) (3)
Example: 207.21.24.0/24 network subnetted into eight /27
(255.255.255.224) subnets

207.21.24.192/27 subnet, subnetted into eight /30


(255.255.255.252) subnets
• This network has seven /27 subnets with 30 hosts each AND eight
/30 subnets with 2 hosts each.
• /30 subnets are very useful for serial networks.

Page 5-33

Using Variable Length Subnet-mask (VLSM) (4)


• Example for subnetting and VLSM:
• Site A has two Ethernet networks
• Site B had one Ethernet network
• Site C had one Ethernet network
Site A Site B Site C
we have
207.21.24.0 /24
25 users 25 users 10 users 8 users
• How many network addresses are needed?
• How many hosts are needed for the largest LAN?
• How many bits need to be borrowed to address this network
(i.e. what is the subnet mask used)?

Page 5-34
Using Variable Length Subnet-mask (VLSM) (5)
1. Addressing a Network with Standard Subnetting
Site A Site B Site C
a. we need 4 LANs and 2 WANs
• We have 207.21.24.0 /24
25 users 25 users 10 users 8 users
b. With fixed subnetting a subnet must offer number of
hosts no less than 25 host. Bits
Subnet # Subnet Address
Masked
c. Borrowing 3 bits will meet the 0 207.21.24.0 /27
current needs of the company, but 1 207.21.24.32 /27
2 207.21.24.64 /27
it leaves little room for growth. 3 207.21.24.96 /27
d. Each network will have 30 4 207.21.24.128 /27
5 207.21.24.160 /27
usable addresses, including the 6 207.21.24.192 /27
point-to-point WAN links (which 7 207.21.24.224 /27
only require two addresses).
Page 5-35

Using Variable Length Subnet-mask (VLSM) (6)


• To begin subnetting this network using VLSM, identify the
LAN with the largest number of hosts. Subnet the address
207.21.24.0 /24 based on this information.
 Subnet 1 & 2 can be used to address Site A Ethernet networks.
 Subnet 5 can be subnetted to accommodate Site B & C Ethernet
networks.
 Subnet 6 can be subnetted to accommodate the WAN links
Subnet # Subnet Address Site A Site B Site C
0 207.21.24.0 /27
1 207.21.24.32 /27
Site A 2 207.21.24.64 /27 25 users 25 users 10 users 8 users
Free 3 207.21.24.96 /27
Addresses 4 207.21.24.128 /27
Site B & C 5 207.21.24.160 /27 Sub-subnet 0 207.21.24.192 /30 WAN
Sub-subnet 1 207.21.24.196 /30 1&2
WAN 6 207.21.24.192 /27
7 207.21.24.224 /27 Sub-subnet 2 207.21.24.200 /30
links Sub-subnet 3 207.21.24.204 /30
Sub-subnet 4 207.21.24.208 /30 Free
Sub-subnet 5 207.21.24.212 /30 Addresses
Sub-subnet 6 207.21.24.216 /30
Sub-subnet 7 207.21.24.220 /30

Page 5-36
Using Variable Length Subnet-mask (VLSM) (7)

• Through applying VLSM, the topology was able


to be addressed and still have two complete
subnets available for future growth.

Site A Site B Site C

207.21.24.192 /30 207.21.24.196 /30

207.21.24.32 /27 207.21.24.64 /27


207.21.24.160 /28 207.21.24.176 /28
25 users 25 users 10 users 8 users

Page 5-37
Page 5-37

Using Variable Length Subnet-mask (VLSM) (8)

Exercise 1
• Your company has been assigned IP network 195.39.71.0
/24. Given that headquarters (60 hosts) is connected to five
branch offices (12 hosts each) by a WAN link, and to an
ISP (the ISP owns the addresses on that link), determine an
appropriate IP addressing scheme.
Headquart
ers ISP
60
users

Branch 1 Branch 2 Branch 3 Branch 4 Branch 5


12 users 12 users 12 users 12 users 12 users

Page 5-38
Using Variable Length Subnet-mask (VLSM) (9)

Address
provided by
195.39.71.64 /26 ISP

195.39.71.128/28 195.39.71.144/28 195.39.71.160/28 195.39.71.176/28 195.39.71.192/28

Page 5-39

Mansoura University
Faculty of Computers and Information
Department of Information Technology
Second Semester- 2020-2021

DATA COMMUNICATIONS
Grade: 2ND YEAR PROGRAMS

Prof. Dr. Hassan H. Soliman


Dr. Mostafa Elgayar
Part 5 P2

You might also like