0% found this document useful (0 votes)
10 views53 pages

F.networking.ch6ppt

Chapter Six provides an introduction to IP addressing and subnetting, explaining the structure and purpose of IP addresses, specifically IPv4. It details the different classes of IP addresses, their formats, and the concept of subnetting for managing IP address allocation. Additionally, it covers static and dynamic IP address assignment, as well as the importance of subnet masks in defining network and host portions of an IP address.

Uploaded by

mognhod97
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)
10 views53 pages

F.networking.ch6ppt

Chapter Six provides an introduction to IP addressing and subnetting, explaining the structure and purpose of IP addresses, specifically IPv4. It details the different classes of IP addresses, their formats, and the concept of subnetting for managing IP address allocation. Additionally, it covers static and dynamic IP address assignment, as well as the importance of subnet masks in defining network and host portions of an IP address.

Uploaded by

mognhod97
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/ 53

Chapter Six

Introduction to IP
Addressing and Subnetting
Why use IP?
2

 An IP address is a logical address of a computer which is


expressed as a four 8-bit group of bits (a total of 32
bits) separated by periods.
 Each 8-bit group of bits can be represented by a 4-digit
decimal that spans between 0 and 255.
 A host needs an IP address to participate on the
Internet
 Each host will be identified by the same network to
communicate
Basics of IPv4
3
 The IP address contains sufficient information to uniquely identify
a network and a specific computer on the network.
 IP address is an address used in order to uniquely identify a
device on an IP network.
 The address is made up of 32 binary bits, which can be divisible
into a network portion and host portion with the help of a subnet
mask.
 The 32 binary bits are broken into four octets (1 octet = 8 bits).
Each octet is converted to decimal and separated by a period
(dot).
 2n address , n= number of bits: Ip V4= 232 =4,294,967,296.
 E.g 192.168.120.01( each octet ranges from 0 to 255 decimal, or 00000000 - 11111111 binary)
Network Classes
4

 A computer’s IP address must uniquely identify not


only the computer but also the network the computer
is attached to
 the IP address is split between a network identifier
(net id) part and a host identifier (host id) part.
 The class of the address determines how many bits of
the IP address are reserved for network identification
and how many are reserved for host identification.
 five classes of IP address .
 Classes A, B, and C are classfull classes and used for
general-purpose; classes D and E are reserved for
special purposes(classless).
IPv4 Address Formats
5

CLASSES Network No. of possible Hosts per Network Default subnet mask
networks
ranges
A 1 –126 126 16,777,214 255.0.0.0
B 128-191 16,382 65,534 255.255.0.0
C 192-223 2,097,150 254 255.255.255.0
D 224-239
E 240-255
Netid and hostid

 Given the network address, we can find the class of the address,
the block, and the range of the addresses in the block
 Subnet mask determines this. (all 1s represents net Id, all 0s
represents hostId)
Class A Networks (/8 Prefixes)
7
 Each Class A network address has an 8-bit network-
prefix with the highest order bit set to 0 and a seven-bit
network number, followed by a 24-bit host-number.
 Referred to as "/8s"
 A maximum of 126 (2 -2) /8 networks can be defined
7

 Each /8 supports a maximum of 16,777,214 (2 -2) hosts


24

per network.
 Since the /8 address block contains 2 (2,147,483,648)
31

individual addresses, the /8 address space is 50% of the


total IPv4 unicast address space.
 (0.0.0.0 to 127.255.255.255) for general use
 All 0 reserved
 01111111 (127) reserved for loopback
Class B Networks (/16 Prefixes)
8
 Each Class B network address has a 16-bit network-prefix with
the two highest order bits set to 10 and a 14-bit network
number, followed by a 16-bit host-number.
 Class B networks are now referred to as"/16s" since they
have a 16-bit network-prefix.
 A maximum of 16,384 (214) /16 networks can be defined with up
to 65,534 (216-2) hosts per network.
 Since the entire /16 address block contains 230 (1,073,741,824)
addresses, it represents 25% of the total IPv4 unicast address
space.
 Range 128.x.x.x to 191.x.x.x
 Class B addresses are for intermediate networks;
Class C Networks (/24 Prefixes)
9

 Each Class C network address has a 24-bit network-prefix with


the three highest order bits set to 110 and a 21-bit network
number, followed by an 8-bit host-number.
 Class C networks are now referred to as "/24s" since they
have a 24-bit network-prefix.
 A maximum of 2,097,152 (221) /24 networks can be defined with
up to 254 (28-2) hosts per network.
 Since the entire /24 address block contains 229 (536,870,912)
addresses, it represents 12.5% (or 1/8th) of the total IPv4
unicast address space.
 Range 192.x.x.x to 223.x.x.x
 allows up to 254 hosts per network.
SPECIAL IP ADDRESSES
10
IP addresses also called Description

0.0.0.0 /0 Default route


0.0.0.0/32 This host
Used for local communications within a private network
10.0.0.0-10.255.255.255 Private IP address

Used for loopback addresses to the local host


127.0.0.0-127.255.255.255 Loopback address

Assigned automatically if the host does not get an IP from a DHCP


169.254.0.0-169.254.255.255 APIPA (Automatic Private IP server provid ed th a t th e d evice is set to obta in a n IP a d d ress
Addressing) automatically

Used for local communications within a private network


172.16.0.0-172.31.255.255 Private IP Address

Used for local communications within a private network


192.168.0.0-192.168.255.255 Private IP Address

Reserved for multicast assignments


224-239 Class D
Reserved for future use
240-255 Class E
Network Addresses and Broadcast Addresses in a subnet
Dotted-Decimal Notation
11

 To make Internet addresses easier for human users to read


and write, IP addresses are often expressed as four decimal
numbers, each separated by a dot.
 divides the 32-bit Internet address into four 8-bit (byte)
Types of IP address
12

Public and Private IP Addresses


 All hosts that connect directly to the Internet require a
unique public IP address.
 RFC 1918 is a standard that reserves several ranges of
addresses within each of the classes A, B and C.
 these private address ranges consist of a single Class A
network, 16 Class B networks and 256 Class C networks
 A very large network can use the Class A private network
which allows for over 16 million private addresses
 On medium size networks, a Class B private network could be
used, which provides over 65,000 addresses per network.
 Home and small business networks typically use a single class C
private address, which allows up to 254 hosts per network
13

Class Network Address Number of Number of


Networks Addresses
A 10.0.0.0-10.255.255.255 1 16,777,216

B 172.16.0.0 – 172.31.255.255 16 1,048,576

C 192.168.0.0 – 192.168.255.255 256 65,536

 Private addresses can be used internally by hosts in an


organization as long as the hosts do not connect directly to
the Internet. Therefore, the same set of private addresses
can be used by multiple organizations.
14

 Given the network address 132.21.0.0, find the class and


the range of the addresses
IP Address Assignment
15

 IP addresses can be assigned for devices either statically or


dynamically.
Static IP Address Assignment
 The network administrator must manually configure the
network information for a host.
 At a minimum, this includes the host IP address, subnet mask
and default gateway.
 When using static IP addressing, it is important to maintain an
accurate list of which IP addresses are assigned to which
devices.
 What is its advantage and disadvantages?
16
Dynamic IP Address Assignment
17
 On local networks it is often the
case that the user population
changes frequently.
 This is done using a protocol
known as Dynamic Host
Configuration Protocol (DHCP).
 DHCP provides a mechanism for
the automatic assignment of
addressing information such as
IP address, subnet mask, default
gateway, and other
configuration information
Advantage/disadvantage?
Subnetting
18

 Subnetting is another method of managing IP addresses


 method of dividing full network address classes into smaller
pieces
 It is not always necessary to subnet a small network. However,
for large or extremely large networks, subnetting is required
 The subnet field and the host field are created from the
original host portion for the entire network.
 To create a subnet address, a network administrator borrows
bits from the host field and designates them as the subnet
field.
Subnetting/masking
19

 The minimum number of bits that can be borrowed is two.


 The maximum number of bits borrowed can be any number that
leaves at least two bits remaining, for the host number.
 In any network (or subnet) one can use most of the IP
addresses for host addresses.
 Considerations
 1) How many total subnets does the organization need today and
in the future?
 2) How many hosts are there on the organization's largest subnet
today and in the future?
20
f ix
21 p re
ork
w
n et
ded
n
te
Ex
During subnetting
22

 Applying a mask which is larger than the default subnet mask, will divide
your network into subnets.
 This is possible by borrowing bits from the host portion to network.
 Three hierarchy (Network, Subnet and Host) addresses will be created.
 Subneting is done by borrowing bits from the host part and add them the
network part
 Example
 Network address 172.16.0.0 with /16 network mask can be
subnetted as default network mask: 255.255.0.0 or /16

Network Network Host Host

11111111 11111111 00000000 00000000


Example
23

Subnet mask 255.255.255.192 will create 4 subnet


24

 subnet mask 255.255.255.0 or /24 will be subneted as


Network Network Subnet Host

11111111 11111111 11111111 00000000

N.B
 No of possible Networks: 2N (N is the number of bits for the
network/subnet portion)=borrowed bit
 No of hosts per networks: 2H -2 (H is the number of bits for the
host portion) why we subtract 2?
 Mask And IP address = Block Address
Sunbetting process
25

A. Based on the network requirement


 Determine the number of networks required and convert it into binary.
 Reserve bits in the mask and find the increment
 Find the network ranges based on the increment
 B. based on the host requirement
 Determine the number of host required per networks and convert it
into binary.
 Reserve bits in the mask and find the increment
 Find the network ranges based on the increment

 Given an IP address, we can find the subnet address in the same way
we found the network address. We apply the mask to the address. We
can do this in two ways: straight or short-cut.
Straight Method
26

 we use binary notation for both the address and the mask and
then apply the AND operation to find the subnet address.
 Example: What is the subnetwork address if the IP address is
180.45.34.56 and the subnet mask is 255.255.240.0?
 10110100 00101101 00100010 00111000

 11111111 11111111 11110000 00000000


 10110100 00101101 00100000
0000 00000000

The subnetwork address is 180.45.32.0.


Short-Cut Method
27

If the byte in the mask is 255, copy the byte in the address.
If the byte in the mask is 0, replace the byte in the address with 0.
If the byte in the mask is neither 255 nor 0, we write the mask and
the address in binary and apply the AND operation.
Example: What is the subnetwork address if the destination
address is 19.30.84.5 and the mask is 255.255.192.0?
19.30.84.5 84= 01010100
255.255.192.0 192=11000000
19.30.64.0 subneted 64=01000000
28

 Given an IP address we can find


 Subnet mask
 Class
 First valid address
 Last valid address
 Broadcasting address
 Usable host addresses
Examples 1
29

An organization has been assigned the network number


193.1.1.0/24 and it needs to define six subnets. The largest subnet
is required to support 25 hosts.
 number of bits required =six bit
 21=2, 22=4,23=8 two unused subnets that can be reserved for future
growth.
 8 = 23, three bits are required to enumerate the eight subnets in the block.
 the organization is subnetting a /24 so it will need three more bits, or a /27, as the
extended-network-prefix expressed in dotted-decimal notation as 255.255.255.224
 each subnetwork with a 27-bit prefix represents a contiguous block of 25 (32)
individual IP addresses. since the all-0s and all-1s host addresses cannot be allocated,
there are 30 (25 -2) assignable host addresses on each subnet.
30
No of Subnet Numbers
31

Base Net: 11000001.00000001.00000001 .00000000 = 193.1.1.0/24


Subnet #0: 11000001.00000001.00000001. 000 00000 = 193.1.1.0/27
Subnet #1: 11000001.00000001.00000001. 001 00000 = 193.1.1.32/27
Subnet #2: 11000001.00000001.00000001. 010 00000 = 193.1.1.64/27
Subnet #3: 11000001.00000001.00000001. 011 00000 = 193.1.1.96/27
Subnet #4: 11000001.00000001.00000001. 100 00000 = 193.1.1.128/27
Subnet #5: 11000001.00000001.00000001. 101 00000 = 193.1.1.160/27
Subnet #6: 11000001.00000001.00000001. 110 00000 = 193.1.1.192/27
Subnet #7: 11000001.00000001.00000001. 111 00000 = 193.1.1.224/27
valid host addresses for Subnet #2
32

Subnet#2:11000001.00000001.00000001.010 00000 = 193.1.1.64/27


Host #1: 11000001.00000001.00000001.010 00001 = 193.1.1.65/27
Host #2: 11000001.00000001.00000001.010 00010 = 193.1.1.66/27
Host #3: 11000001.00000001.00000001.010 00011 = 193.1.1.67/27
Host #4: 11000001.00000001.00000001.010 00100 = 193.1.1.68/27
Host #5: 11000001.00000001.00000001.010 00101 = 193.1.1.69/27
.
.
.
Host #27: 11000001.00000001.00000001.010 11011 = 193.1.1.91/27
Host #28: 11000001.00000001.00000001.010 11100 = 193.1.1.92/27
Host #29: 11000001.00000001.00000001.010 11101 = 193.1.1.93/27
Host #30: 11000001.00000001.00000001.010 11110 = 193.1.1.94/27
 Broadcast Address : 11000001.00000001.00000001.010 11111 = 193.1.1.95
 Broadcast Address=n-1( n is 1st
valid address for next subnet)
st

 the broadcast address for Subnet #n is one less than the base address for Subnet # (n+1)
Example 2
33

 An organization has been assigned the network number


140.25.0.0/16 and it needs to create a set of subnets that
supports up to 60 hosts on each subnet.
number of bits required to define 60 hosts on each subnet=
62 =(26-2) host addresses (2 reserved)or 126=(27-2) host addresses (66 reserved)
 A block of 126 host addresses requires 7-bits in the host-number field.
 Since 7-bits of the 32-bit IP address are required for the host-number field, the
extended-prefix must be a /25 ( 32-7). 255.255.255.128
34
Each of the Subnet Numbers
35

 Base Net: 10001100.00011001 .00000000.00000000 = 140.25.0.0/16

Subnet #0: 10001100.00011001. 00000000 . 0 0000000 = 140.25.0.0/25


Subnet #1: 10001100.00011001. 00000000 . 1 0000000 = 140.25.0.128/25
Subnet #2: 10001100.00011001. 00000001 . 0 0000000 = 140.25.1.0/25
Subnet #3: 10001100.00011001. 00000001 . 1 0000000 = 140.25.1.128/25
Subnet #4: 10001100.00011001. 00000010 . 0 0000000 = 140.25.2.0/25
Subnet #5: 10001100.00011001. 00000010 . 1 0000000 = 140.25.2.128/25
Subnet #6: 10001100.00011001. 00000011 . 0 0000000 = 140.25.3.0/25
.
.
.
Subnet #510: 10001100.00011001. 11111111 . 0 0000000 = 140.25.255.0/25
Subnet #511: 10001100.00011001. 11111111 . 1 0000000 = 140.25.255.128/25
Hosts Addresses for Each Subnet
36

Subnet #3: 10001100.00011001.00000001.1 0000000 = 140.25.1.128/25


Host #1: 10001100.00011001.00000001.1 0000001 = 140.25.1.129/25
Host #2: 10001100.00011001.00000001.1 0000010 = 140.25.1.130/25
Host #3: 10001100.00011001.00000001.1 0000011 = 140.25.1.131/25
Host #4: 10001100.00011001.00000001.1 0000100 = 140.25.1.132/25
Host #5: 10001100.00011001.00000001.1 0000101 = 140.25.1.133/25
Host #6: 10001100.00011001.00000001.1 0000110 = 140.25.1.134/25
Variable Length Subnet Masks (VLSM )
37

 Allows an organization to more efficiently assign


IP address space
 Allow you to use different masks for each subnet
 Use VLSM to:
 Create a larger subnet of more than 255 host addresses
 Create very small subnets for WAN links

 Conceptually, a network is divided into subnets; some of


the subnets are further divided into sub-subnets; and
some of the sub-subnets are divided into sub2-subnets.
 VLSM permits the recursive division of a network prefix.
Differences between FLSM and VLSM Subnetting
38
Example 1

 Network A: Using 300 of 512 hosts (59% efficiency)


 Network B: Using 50 of 62 hosts (80% efficiency)

 Network C: Using 2 of 2 hosts (100% efficiency)

 Network D: Using 20 of 30 hosts (67% efficiency)

 Network E: Using 500 of 512 hosts (98% efficiency)

© Copyright 2005 – Midwest Network Services Group, LLC – all rights reserved Slide # 39
40

 Example2: Given the 172.16.0.0/16 network and requirements


below, develop a subnetting scheme with the use of VLSM:
 LAN1 must support 330 hosts
 WAN must support 2 hosts for a T1 circuit to a remote site
 LAN3 must support 6 hosts

41

 The first step is to determine what mask allows the required


number of hosts.(netid-host id)
 LAN1 requires a /23 (255.255.254.0) mask to support 330
hosts
 WAN requires a /30 (255.255.255.252) mask to support 2
hosts
 LAN3 requires a /29 (255.255.255.248) mask to support 6
hosts
 The easiest way to assign the subnets is to assign the
largest first.
 For example: You can assign the subnets in this manner:
 LAN1 —172.16.0.0/23 address range 0.0 to 1.255
 LAN3 —172.16.2.0/29 address range 0 to 7
 WAN —172.16.2.8/30 address range 8 to 11
Some protocols used with IP
42

Address Resolution Protocol


 In order for devices to communicate, the sending devices need
both, the IP addresses and the MAC addresses, of the destination
devices.
 When they try to communicate with devices whose IP addresses
they know, they must determine the MAC addresses.
 The TCP/IP suite has a protocol, called ARP that can
automatically obtain the MAC address.
 ARP enables a computer to find the MAC address of the
computer that is associated with an IP address
 E.g. 192.168.1.12  2A:w5:BB:7G:d1:F3
Reverse address resolution protocol: MAC to IP

43

 Dynamic Host Configuration protocol (DHCP)


 DHCP is a mechanism to assign unique IP addresses to DHCP
clients automatically. Under DHCP, a computer is designated as
the DHCP server.
 When a new node comes onto the network assuming it is capable
of being a DHCP client, it will broadcast a request for an IP
address.
 the DHCP server will respond by checking its table of address
assignments, selecting the next available address, and sending a
response back to the requesting node.
 The actual process is more complex.
 Read more(page 22-23)
Overview of IPv6 address(future)
44

 Motivation: why we use IPv6?


 To overcome problem of IPv4
 Internet has grown exponentially and the address space allowed
by IPv4 is saturating.
 IP retains many of the design features of the existing IPv4.
 IPv4 on its own does not provide any security features.
 Data prioritization in IPv4 is not up-to-date.
 IPv4 enabled clients can be configured manually or they need some
address configuration mechanism.
 It does not have a mechanism to configure a device to have globally
unique IP address.
Characteristics of IPv6
45
 The new features of IP v6 can be grouped into 5 main
categories:
RIR: regional internet registry
ISP: internet service provider
Site
Subnet
 Address size: 128-bit addresses instead of 32 bits.
 Header format: almost every field in the header has
been changed.
 Extension Headers: IPv6 encodes info into separate
headers
 QoS offerings: includes a mechanism which allows for
differentiated quality of service for applications.
 Extensible protocol: IPv6 does not specify all possible
protocol features
IPv6 Address Structure
46

 address is made of 128 bits divided into eight 16-bits blocks.

0010000000000001 0000000000000000 0011001000111000 1101111111100001 0000000001100011


0000000000000000 0000000000000000 1111111011111011

 Each block is then converted into Hexadecimal number system


and separated by ‘:’ symbol:
2001:0000:3238:DFE1:0063:0000:0000:FEFB

47

 IPv6 provides some rules to shorten the address


Rule 1: Discard leading Zero(es):
2001:0000:3238:DFE1:0063:0000:0000:FEFB
2001:0000:3238:DFE1:63:0000:0000:FEFB
Rule 2: If two or more blocks contain consecutive zeroes, omit all
of them and replace with double colon sign ::
2001:0000:3238:DFE1:63:0000:0000:FEFB
2001:0000:3238:DFE1:63::FEFB
if there are still blocks of zeroes in the address, they can be
shrunk down to a single zero
2001:0:3238:DFE1:63::FEFB short IPV6 address
IPv6 features
48
IPv6 Address types
49

 In IPv6, a destination address can belong to one of three


categories:
 Unicast
 Anycast
 multicast
 Unicast Address
A unicast address defines a single interface (computer or
router).
The packet sent to a unicast address will be routed to the
intended recipient
50

Any cast
 An anycast address defines a group of computers that all share
a single address.
 A packet with an anycast address is delivered to only one
member of the group, the most reachable one.
 An anycast communication is used, for example, when there are
several servers that can respond to an inquiry,
the addresses are assigned from the unicast block.
Multicast Address
 A multicast address also defines a group of computers.
 In multicasting each member of the group receives a copy.
IPV6 Reserved addresses
51
Reserved Address Description

FF02::1 A multicast address to all nodes on a link (link-local scope)

FF02::2 A multicast address to all routers on a link

FF02::5 OSPFv3 All SPF routers

FF02::6 OSPFv3 All DR routers

FF02::9 A multicast address to all routing information protocol (RIP) routers on a link

FF02::A EIGRP routers

FF02::1:FFxx:xxxx All solicited-node multicast addresses used for host auto-configuration and neighbor discovery
(similar to ARP in IPv4)

FF05::101 A multicast address to all Network Time Protocol (NTP) servers


Exercise
52

1. Compress the following


 AD00:0083:F437:0000:0100:0400:0000:0000
 DB90:0000:0000:1000:2000:0000:000D:4600
2. Expand the following
 CA11::81:48:0
 BE00::40:0:c000:1:c200
Quiz (5%)
53

 1. write short form of IPV6


 ADOO:0000:0000:FEAB:0000:OODC:00AB:0000

 2. Rewrite the full IPV6 address


 Bc:0:FE::FD4C:0:AF

3. Write the difference b/n IPV4 and IPV6?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy