Course Contents: Data Communications Grade Prof. Dr. Hassan H. Soliman Dr. Mostafa Elgayar Part 5 P1
Course Contents: Data Communications Grade Prof. Dr. Hassan H. Soliman Dr. Mostafa Elgayar Part 5 P1
DATA COMMUNICATIONS
Grade: 2ND YEAR PROGRAMS
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
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
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
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
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
Page 5-13
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
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
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
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
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
Page 5-23
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
Page 5-27
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
Page 5-33
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
Page 5-36
Using Variable Length Subnet-mask (VLSM) (7)
Page 5-37
Page 5-37
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
Page 5-38
Using Variable Length Subnet-mask (VLSM) (9)
Address
provided by
195.39.71.64 /26 ISP
Page 5-39
Mansoura University
Faculty of Computers and Information
Department of Information Technology
Second Semester- 2020-2021
DATA COMMUNICATIONS
Grade: 2ND YEAR PROGRAMS