Chapter5 Addressing
Chapter5 Addressing
Prepared by : Pr RIAHLA
1
Network Addressing:
Purpose
• MAC Address
• IP Address
• Port Number
2
Prepared by : Pr RIAHLA
Network Addressing:
Types
Device Application
Addressing Addressing
Port Number
Transport Layer
Logical Physical
Address Address
Prepared by : Pr RIAHLA 3
We’ll do a simulation at the
end of the class
Prepared by : Pr RIAHLA 4
Network Addressing
Physical Addressing
(MAC)
Prepared by : Pr RIAHLA 5
MAC address
Prepared by : Pr RIAHLA 6
MAC address
• A device has a unique worldwide address (fixed MAC
address).
• IEEE 802.3 addresses are encoded on 48 bits (6 bytes).
08:00:20:09:E3:D8 or 8:0:20:9:E3:D8
08-00-20-09-E3-D8 or 08002009E3D8
00:00:0C:XX:XX:XX Cisco.
08:00:20:XX:XX:XX Sun.
08:00:09:XX:XX:XX HP
Prepared by : Pr RIAHLA 7
Structure of a MAC Address
FF:FF:FF:FF:FF:FF
11111111:11111111:11111111:11111111:11111111:11111111
48 Bytes
Prepared by : Pr RIAHLA 8
MAC address
chassis number (or Vehicle
Identification Number, VIN)
Prepared by : Pr RIAHLA 9
Ethernet frame
Application
TCP
IP
Driver Ethernet
Prepared by : Pr RIAHLA 10
Specific MAC Addresses
MACa = 08:00:20:09:E3:D8
LAN
Prepared by : Pr RIAHLA 11
Specific MAC Addresses
FF:FF:FF:FF:FF:FF
11111111:11111111:11111111:11111111:11111111:11111111
48 bits
Prepared by : Pr RIAHLA 12
Specific MAC Addresses
Groupe
Prepared by : Pr RIAHLA 13
Specific MAC Addresses
unicast MAC address
refers to a specific MAC address that
identifies a single network device. the first
bit of the first byte set to 0, distinguishing
them from multicast or broadcast
addresses.
MACb
MACa = 08:00:20:09:E3:D8
MACb = 00:00:0C:00:01:30
LAN
Prepared by : Pr RIAHLA 14
Other Specific MAC Addresses
Locally Administered MAC Address: assigned to a device by
software or a network administrator, overriding the burned-in
address for physical devices. assigning the value of 1 to the second-
least-significant bit of the first byte of the address: example
address 06-00-00-00-00-00
Prepared by : Pr RIAHLA 16
Other Specific MAC Addresses
Prepared by : Pr RIAHLA 17
Logical Addressing (IP)
Prepared by : Pr RIAHLA 18
IP Addressing
Street Building
City
Prepared by : Pr RIAHLA 19
IP Addressing
00:00:0C:00:01:30
08:00:20:09:E3:D8
Prepared by : Pr RIAHLA 20
IP Addressing
Prepared by : Pr RIAHLA 21
IP Addressing
32 Bits
http://www.adresseip.com
Prepared by : Pr RIAHLA 22
IP Addressing
Prepared by : Pr RIAHLA 23
IP Addressing
Example
32 Bits
8bits
8bits 8bits 8bits 8bits
11000000.10101000.00000001.00101010
192.168.1.42
Prepared by : Pr RIAHLA 24
Packet/Datagram IP
Application
TCP
IP
Driver Ethernet
Prepared by : Pr RIAHLA 25
IP Addressing
IP Address Classes
0 8 16 24 31
A 0
Netid Hostid
B 10 Netid Hostid
C 1 10 Netid Hostid
D 1110 Multicast
E 11110 Réserved
Prepared by : Pr RIAHLA 26
IP Address Classes
Class A
0 8 16 24 31
A 0 Netid Hostid
00000000.00000000.00000000.00000001 01111111.11111111.11111111.11111110
Prepared by : Pr RIAHLA 27
IP Address Classes
Class B
0 8 16 24 31
B 10 Netid Hostid
10000000.00000000.00000000.00000001 10111111.11111111.11111111.11111110
Prepared by : Pr RIAHLA 28
IP Address Classes
Class C
0 8 16 24 31
C 110 Netid Hostid
11000000.00000000.00000000.00000001 11011111.11111111.11111111.11111110
Prepared by : Pr RIAHLA 29
IP Address Classes
A 0.0.0.1 127.255.255.254
B 128.0.0.1 191.255.255.254
C 192.0.0.1 223.255.255.254
D 224.0.0.1 239.255.255.254
E 240.0.0.1 247.255.255.254
Prepared by : Pr RIAHLA 30
Subnet Mask
=
Network address Africa 0000000000000
Prepared by : Pr RIAHLA 31
Default Subnet Mask
0 8 16 24 31
Class A Netid Hostid
0 8 16 24 31
Prepared by : Pr RIAHLA 32
Default Subnet Mask
0 8 16 24 31
Class C Netid Hostid
255.255.255.0
Prepared by : Pr RIAHLA 33
Specific IP addresses
Example
Prepared by : Pr RIAHLA 34
Specific IP addresses
Example
Prepared by : Pr RIAHLA 35
IP Addressing: Example
Prepared by : Pr RIAHLA 36
IP Addressing: Example
192.168.100.1
Prepared by : Pr RIAHLA 37
IP Addressing: Example
subnet Mask?
What is the
class of this
Address?
Class C
11000000
Prepared by : Pr RIAHLA 38
IP Addressing: Example
Prepared by : Pr RIAHLA 39
IP Addressing: Example
Network/Machine part
0 8 16 24 31
Class C Netid Hostid
SO
Prepared by : Pr RIAHLA 40
IP Addressing: Example
Prepared by : Pr RIAHLA 41
IP Addressing: Example
Network Address
Our Address : 192.168.100.1
0 8 16 24 31
Class C Netid Hostid
SO
Prepared by : Pr RIAHLA 42
IP Addressing: Example
Prepared by : Pr RIAHLA 43
IP Addressing: Example
Broadcast Address
Our Adress : 192.168.100.1
0 8 16 24 31
Class C Netid Hostid
Broadcast
Netid 11111111
Address
11000000. 10101000. 01100100. 11111111
So
Broadcast: 192.168.100.255
Prepared by : Pr RIAHLA 44
IP Addressing: Example
Prepared by : Pr RIAHLA 45
IP Addressing: Example
Prepared by : Pr RIAHLA 46
IP Addressing: Example
EOOOO, 192.168.100.192
EVERYONE
192.168.100.1 192.168.100.120
192.168.100.255
Prepared by : Pr RIAHLA 47
Subnet Addresses
Netid Hostid
Prepared by : Pr RIAHLA 48
Subnet Addresses
Prepared by : Pr RIAHLA 49
Subnet Addresses
128.10.1.
.2 .3 .4
.1
Internet 128.10.0.0
R
.1
128.10.2. .5 .6 .7
Prepared by : Pr RIAHLA 50
Subnet Addresses
Example
172.16.19.40/21
➢ What is the subnet mask for this address?
255.255.248.0
➢ How many bits have been reserved for private subnets?
5 bits
➢ How many private subnets are available?
32
➢ How many hosts can each subnet have?
2046
➢ What is the subnet address in the example?
172.16.16.0.
➢ "What is the broadcast address of the subnet in the example?
172.16.23.255
Prepared by : Pr RIAHLA 51
Subnet Addresses
Example
For the following address: 130.200.45.225, provide:
Prepared by : Pr RIAHLA 52
Subnet Addresses
Example
Given the following network address: 192.10.10.0, the
following subdivision is needed:
Number of required subnets: 14
Number of usable machines required: 14
a) Address class:
b) Default mask:
c) Custom subnet mask:
d) Total number of subnets:
e) Total number of machine addresses:
f) Number of usable machine addresses:
g) Number of borrowed bits for the subnet:
h) What are the 4th and 9th subnet ranges?
i) What is the 8th subnet?
j) What is the broadcast address for the 13th subnet?
k) How many broadcast domains can be created?
53
Subnet Addresses
Example
Given the following network address: 192.10.10.0, the
following subdivision is needed:
Number of required subnets: 14
Number of usable machines required: 14
54
Subnet Addresses
Example
1. From a network ID and a desired number of
subnets, calculate the subnet mask and the
number of hosts per subnet:
55
Subnet Addresses
Example
2. In this exercise, the maximum number of
hosts per subnet is given. Calculate the subnet
mask and the number of possible subnets.
56
Subnet Addresses
Example
3. Given an IP address and a subnet mask,
determine the host IP range that includes this
address.
57
Subnet Addresses
Example
4. Which subnet includes the address
206.168.1.96 as a usable host address?
•206.168.1.32/28
•206.168.1.64/26
•206.168.1.32/27
•206.168.1.64/29
58
Subnet Addresses
Example
5. A company has a network address of
203.16.1.64 with a subnet mask of
255.255.255.192. The company wants to create
two subnets that will contain 10 hosts and 18
hosts, respectively. What are the two networks
that will allow this?
•203.16.1.64/27
•203.16.1.128/27
•203.16.1.16/28
•203.16.1.192/28
•203.16.1.96/28
59
Subnet Addresses
Example
6. What subnet mask allows hosting 510 hosts
on the network with IP address 172.30.0.0?
• 255.255.0.0
• 255.255.248.0
• 255.255.252.0
• 255.255.254.0
• 255.255.255.0
• 255.255.255.128
60
Subnet Addresses
Example
7. What IP address / subnet mask combination
identifies the IP addresses between
191.50.128.0 and 191.50.159.255?
•191.50.128.0 / 255.255.224.0
•191.50.128.0 / 255.255.255.224
•191.50.128.0 / 255.255.0.0
•191.50.128.0 / 255.255.192.0
•191.50.128.0 / 255.255.255.192
61
How to Design a private
network ?
•If the private network will NEVER be interconnected
with others than You can use any address.
Prepared by : Pr RIAHLA 62
Network Addressing
Application Addressing
(Port)
Prepared by : Pr RIAHLA 63
Port Number
Packet to 199.7.55.3
Prepared by : Pr RIAHLA 64
Port Number
Prepared by : Pr RIAHLA 65
Port Number
Packet to 199.7.55.3
Port 3
Prepared by : Pr RIAHLA 66
Port Number
Port:25
Prepared by : Pr RIAHLA 67
Simulation
Prepared by : Pr RIAHLA 68