You are on page 1of 30

Addressing & Subnetting

PDF created with pdfFactory Pro trial version www.pdffactory.com


Addressing

• …to identify and locate each host. We call it


“addressing”.
• Identification: hostname, address (MAC, IP)
• IP add ? MAC add ?
• MAC add: local
• IP add: internetwork
• An address generally represents the connection to the
network

PDF created with pdfFactory Pro trial version www.pdffactory.com


Addressing

unique address: letter (network address) and number (host address)

PDF created with pdfFactory Pro trial version www.pdffactory.com


IP Address (IPv4)

• IP address is 32-bit long.


• It is often writen in dotted decimal format.

PDF created with pdfFactory Pro trial version www.pdffactory.com


Addressing

• IP add has two parts: net-id & host-id


• Two different networks must have different network
address (net-id).
• Two different hosts in the same network must have
different host address (host-id).
• Hosts in the same network have the same network
address.
• Broadcast domain: one network add
• Network address= IP address AND Subnet mask

PDF created with pdfFactory Pro trial version www.pdffactory.com


Example 1:

SM : 255.255.255.0
Net/host id: N.N.N.H
Net E1 (Net-ID): 192.168.11.0 Number broadcast domain ?
Net E2 : 192.168.10.0
Net E3 : 192.168.12.0

PDF created with pdfFactory Pro trial version www.pdffactory.com


Example 2:

H: hhhhhhhh
00000000
00000001
00000010
SM: 255.255.255.0 00000011
Net add: 192.168.10.0 00000100
Net/host id: N.N.N.H …
11111110
11111111

PDF created with pdfFactory Pro trial version www.pdffactory.com


Example 3:

• IP add: 192.168.100.1
• Subnet mask: 255.255.255.0
• Net add: 192.168.100.0
• Net/Host ID: N.N.N.H
• IP add : 11000000.10101000.01100100.00000001
• SM : 11111111.11111111.11111111.00000000
• Net add : 11000000.10101000.01100100.00000000

PDF created with pdfFactory Pro trial version www.pdffactory.com


Example 4:

• IP add: 96.168.100.1
• Subnet mask: 255.255.224.0
• Net add: ?

• IP add : 01100000.10101000.01100100.00000001
• SM : 11111111.11111111.11100000.00000000
• Net add : 01100000.10101000.01100000.00000000
• Note: subnetmask

PDF created with pdfFactory Pro trial version www.pdffactory.com


Hierachical addressing scheme

As a hierachical addressing scheme, IP addresses are divided into


“classes”.

PDF created with pdfFactory Pro trial version www.pdffactory.com


Classes of IP Addresses

• Class A
addresses are
assigned to larger
networks.
• Class B
addresses are
used for medium-
sized networks
• Class C for small
networks.

PDF created with pdfFactory Pro trial version www.pdffactory.com


Classes of IP Addresses

• First octet order bits: • First octet order bits:


– Class A: 00000000 (0) – Class B: 10000000 (128)
00000001 (1) 10000001 (129)
… …
01111110 (126) 10111110 (190)
01111111 (127) 10111111 (191)

• First octet order bits: • First octet order bits:


– Class C: 11000000 (192) – Class D: 11100000 (224)
11000001 (193) 11100001 (225)
… …
11011110 (222) 11101110 (238)
11011111 (223) 11101111 (239)

PDF created with pdfFactory Pro trial version www.pdffactory.com


Classes of IP Addresses

PDF created with pdfFactory Pro trial version www.pdffactory.com


Network Address

• When all host-bits are zeros (0), we have a number that represents
network address. This address is reserved, namely it cannot be
assigned to any host.

PDF created with pdfFactory Pro trial version www.pdffactory.com


Broadcast Address

• When host-bits are all one (1), we have a number that represents
broadcast address. This address is also reserved, namely it cannot
be assigned to any host.
• Exp: ping 10.0.6.255

PDF created with pdfFactory Pro trial version www.pdffactory.com


Reference: broadcast Address

• The router supports the following kinds of broadcast types:


– Limited broadcast - A packet is sent to a specific network or
series of networks. In a limited broadcast packet destined for a
local network, the network identifier portion and host identifier
portion of the destination address is either all ones
(255.255.255.255) or all zeros (0.0.0.0).
– Flooded broadcast - A packet is sent to every network.
– Directed broadcast - A packet is sent to a specific destination
address where only the host portion of the IP address is either all
ones or all zeros (such as 192.20.255.255 or 190.20.0.0).

PDF created with pdfFactory Pro trial version www.pdffactory.com


Unicast and Broadcast Transmission

Unicast transmission Broadcast transmission

• The concept of unicast and broadcast transmission


exist in both layer 2 and layer 3 protocols. There are
refelections in the addressing scheme.

PDF created with pdfFactory Pro trial version www.pdffactory.com


Reserved IP Address

Host-bits = all zeros (network address); exp: 176.10.0.0


Host-bits = all ones (broadcast address); exp: 176.10.255.255
Network-bits = all ones; exp: 01111111.x.x.x
Network-bits = all zeros; exp: 00000000.x.x.x
127.x.x.x (loopback address = 127.0.0.1).

PDF created with pdfFactory Pro trial version www.pdffactory.com


Reference: Reserved IP Address

• all 0s -This host, exp: 0.0.0.0


• all 0s.host - Host on this net, exp:0.x.x.x
• all 1s - Limitted broadcast (local net),exp:
255.255.255.255
• Net.all 1s - Directed broadcast for net, exp:
192.168.100.255
• 127.anything (often 1) - Loopback, (127.0.0.1)
• Exp: ping 0.0.0.0
0.0.6.156
255.255.255.255
10.0.6.255

PDF created with pdfFactory Pro trial version www.pdffactory.com


Public IP Addresses

• Public IP addresses are unique. No two machines that connect to a public network
can have the same IP address. (X#Y#Z )
• Public IP addresses must be obtained from an Internet service provider (ISP) or a
registry at some expense.
• With the rapid growth of the Internet, public IP addresses were beginning to run out
(IP address depletion).
• New addressing schemes, such as classless interdomain routing (CIDR) and IPv6
were developed to help solve the problem. Private IP addresses are another
solution.

PDF created with pdfFactory Pro trial version www.pdffactory.com


Private IP Addresses

PDF created with pdfFactory Pro trial version www.pdffactory.com


Private IP Addresses

• RFC 1918 sets aside three blocks of IP addresses for private, internal use.
These three blocks consist of one Class A, a range of Class B addresses, and a
range of Class C addresses.
• Addresses that fall within these ranges are not routed on the Internet
backbone. Internet routers immediately discard private addresses.

PDF created with pdfFactory Pro trial version www.pdffactory.com


Using Private Addresses

• When addressing a nonpublic intranet, a test lab, or a home


network, we normally use private addresses instead of globally
unique addresses.
• Private addresses can be used to address point-to-point serial links
without wasting real IP addresses.
• Connecting a network using private addresses to the Internet
requires translation of the private addresses to public addresses.
This translation process is referred to as Network Address
Translation (NAT).

PDF created with pdfFactory Pro trial version www.pdffactory.com


Subnetting
• Net 1: 172.16.0.0
• Net 2: 172.17.0.0
• Net 3: 172.18.0.0
• Net 4: 172.19.0.0
• Hosts per network (usable):
2^16-2= 65534 !!!
• IP add for poin-to-point link (router – router): 2 hosts à 2 IP add
• Waste !!!
• Exp:
• Net add: 192.168.100.0; SM: 255.255.255.0; Number hosts usable: 2^8-2=254
• If hosts per network is 60 à used: 6 bits host: xxhhhhhh, 2^6-2=62 hosts; unused:
2 bits host
xxhhhhhh
xx000000 (0)
xx000001
xx000010

xx111110
xx111111 (63)

PDF created with pdfFactory Pro trial version www.pdffactory.com


Subnetting

• Subnetting is another method of managing IP addresses. This method of dividing full


network address classes into smaller pieces has prevented complete IP address
exhaustion.
• The network is no longer limited to the default Class A, B, or C network masks and there
is more flexibility in the network design.
• Subnet addresses include the network (N) portion, plus a subnet (sN) field and a host
(H) field.
To create a subnet address, a network administrator borrows bits from the host
field and designates them as the subnet field.

PDF created with pdfFactory Pro trial version www.pdffactory.com


Subnetting
• Host bit must be
reassigned as
network bit.The
starting “borrow” bit is
the leftmost hosting
bit.
• Providing broadcast
contentment and low
level security.

PDF created with pdfFactory Pro trial version www.pdffactory.com


Subnetting

• 1 net add: 192.168.10.0; SM: Exp:


255.255.255.0; 254 hosts xxxhhhhh
• hosts per network: 30; networks: 6 ? 000 (0)
– Borrows bits: 3 à 2^3-2= 6 subnets 001 (32)
– Host bits: 5 à 2^5-2=30 hosts
010 (64)
– SM: 255.255.255.224
011 (96)
– Subnets: 192.168.10.32
192.168.10.64 100 (128)
192.168.10.96 101 (160)
.128
110 (192)

192.168.10.192 111 (224)

PDF created with pdfFactory Pro trial version www.pdffactory.com


Establishing SM address
• The number of bits in
the subnet will depend
on the maximum
number of hosts
required per subnet.
• The subnet mask:
using binary ones in
the host octet(s)
• (2 power of borrowed bits) – 2
= usable subnets
• (2 power of remaining host
bits)–2= usable hosts

PDF created with pdfFactory Pro trial version www.pdffactory.com


Applying the Subnet Mask

• 192.168.10.001hhhhh
• .00100000
• .00100001 (33)
• Exp: subnet
• .00100010
192.168.10.32/27 • .00100011
• Host Range ??? •…
• 192.168.10.00111110 (62)
• .00111111

PDF created with pdfFactory Pro trial version www.pdffactory.com


Example 5:

• Primary network 192.168.10.0/24


• Hosts per network: 30
• Number subnets: 4
• Borrows bits ?
• Subnets ?
• IP add for hosts ?

PDF created with pdfFactory Pro trial version www.pdffactory.com

You might also like