ITT420 - Chapter 3
ITT420 - Chapter 3
Bit
Data rate Topology
representation
Data Link
Physical
Framing
Addressing
Connection
Flow control Error Control
Control
Process-to-Process Delivery
Session
Dialog control Synchronization
Presentation
Directory
File transfers
services
In a nutshell
The TCP/IP Protocol Suite
IP Addressing
Addressing
MAC IP Port
Address Address Number
IP Addressing
Logical Addressing
IPv4 IPv6
IP Addressing
• An IPv4 address is a 32-bit address that uniquely and
universally defines the connection of a device (for example, a
computer or a router) to the Internet.
• Address space
• Address range
• The total number of addresses used by the protocol
• If a protocol used N bits, so address space is 2N
• Theoretically, need restriction in manage IP address range
IPv4 Notation
Dotted-Decimal
Binary Notation
Notation
IPv4
Example
Change the following IP addresses from binary notation to
dotted-decimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 11100111 11011011 10001011 01101111
d. 11111001 10011011 11111011 00001111
Solution
We replace each group of 8 bits with its equivalent decimal
number (see Appendix B) and add dots for separation:
a. 129.11.11.239 b. 193.131.27.255
c. 231.219.139.111 d. 249.155.251.15
Example
Change the following IP addresses from dotted-decimal notation
to binary notation.
a. 111.56.45.78 b. 221.34.7.82
c. 241.8.56.12 d. 75.45.34.78
Solution
We replace each decimal number with its binary equivalent:
a. 01101111 00111000 00101101 01001110
b. 11011101 00100010 00000111 01010010
c. 11110001 00001000 00111000 00001100
d. 01001011 00101101 00100010 01001110
Example
Change the following IP addresses from binary notation to
hexadecimal notation.
a. 10000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
Solution
We replace each group of 4 bits with its hexadecimal equivalent.
Note that hexadecimal notation normally has no added spaces
or dots; however, 0X (or 0x) is added at the beginning or the
subscript 16 at the end to show that the number is in
hexadecimal.
a. 0X810B0BEF or 810B0BEF16
b. 0XC1831BFF or C1831BFF16
Example
• Find the error, if any, in the following IPv4 addresses.
Solution
a. There must be no leading zero (045).
b. There can be no more than four numbers.
c. Each number needs to be less than or equal to 255.
d. A mixture of binary notation and dotted-decimal
notation is not allowed.
Classful Addressing
Solution
The default mask is 255.0.0.0, which means that only the first
byte is preserved and the other 3 bytes are set to 0s. The
network address is 23.0.0.0.
Example
Solution
The default mask is 255.255.0.0, which means that the first 2
bytes are preserved and the other 2 bytes are set to 0s. The
network address is 132.6.0.0.
Example
Solution
The default mask is 255.255.255.0, which means that the first 3
bytes are preserved and the last byte is set to 0. The network
address is 201.180.56.0.
Special Addresses
Special Addresses
Direct Broadcast Address
Limited Broadcast Address
This Host on This Network
Specific Host on This Network
Loopback Address
Private Addresses
Classful Addressing
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to 0, we get
11001101 00010000 00100101 0010000
or
205.16.37.32.
Finding the Last Address
Solution
The binary representation of the given address is
11001101 00010000 00100101 00100111
If we set 32−28 rightmost bits to 1, we get
11001101 00010000 00100101 00101111
or
205.16.37.47.
Finding the No of Addresses
Solution
The value of n is 28, which means that number
of addresses is 2 32−28 or 16.
Example
Another way to find the first address, the last address, and the
number of addresses is to represent the mask as a 32-bit binary
(or 8-digit hexadecimal) number. This is particularly useful when
we are writing a program to find these pieces of information. In
the previous example, /28 can be represented as
11111111 11111111 11111111 11110000
(twenty-eight 1s and four 0s)
Find
• The first address
• The last address
• The number of addresses
Solution
a. The first address can be found by ANDing the given
addresses with the mask. ANDing here is done bit by bit. The
result of ANDing 2 bits is 1 if both bits are 1s; the result is 0
otherwise
Solution
b. The last address can be found by ORing the given
addresses with the complement of the mask. ORing here is
done bit by bit. The result of ORing 2 bits is 0 if both bits are
0s; the result is 1 otherwise. The complement of a number is
found by changing each 1 to 0 and each 0 to 1
Solution
c. The number of addresses can be found by complementing
the mask, interpreting it as a decimal number, and adding 1
to it
Network Address
192.168.98.0
192.168.99.0
192.168.100.0
192.168.101.0
192.168.102.0
192.168.105.0
Example
Address First Octet Second Octet Third Octet Fourth Octet
192.168.98.0 11000000 10101000 01100010 00000000
192.168.99.0 11000000 10101000 01100011 00000000
192.168.100.0 11000000 10101000 01100100 00000000
192.168.101.0 11000000 10101000 01100101 00000000
192.168.102.0 11000000 10101000 01100110 00000000
192.168.105.0 11000000 10101000 01101001 00000000
Solution
We first need to align the left side of the double colon
to the left of the original pattern and the right side of
the double colon to the right of the original pattern to
find how many 0s we need to replace the double colon.
8 bits 40 bits
0
Ethernet MAC address
8 bits 56 bits
1 11111111 11111110
Interface Identifier
Find the interface identifier if the Ethernet physical
address is (F5-A9023-14-7A-D2)16
Solution
We only need to change the seventh bit of the first
octet from 0 to 1, insert two octet FFFE16 and change
the format to colon hex notation. The result is
F7A9:23FF:FE14:7AD2
Multicast Address
Strategies
Header
Dual Stack Tunneling
Translation
Dual Stack
• Dual-Stack devices – ones that maintain both
IPv4 and IPv6 protocols.
• Enables networks to support both IPv4 and
IPv6 services and applications during the
transition period
• An IPv4 address must be assigned for every
dual-stack machine
Dual Stack
Dual Stack
Tunneling
• Tunneling mechanisms allow interconnection of
separate IPv6 networks over IPv4 based services.
• As amount of IPv6 networks increase, tunneling
IPv4 over IPv6 will be needed.
• Example tunneling mechanism:
• IPv6 Manually Configured Tunnel
• IPv6 over IPv4 GRE Tunnel
• Automatic IPv4-Compatible Tunnel
• Automatic 6to4 Tunnel
• ISATAP Tunnel
• Teredo Tunnel
Header Translation
Header Translation
Header Translation
• If there is no common protocol between peers, i.e.
one device is IPv4-only and other is IPv6-only device,
header translation is used to provide connection
between these peers.
FIN