0% found this document useful (0 votes)
9 views69 pages

IP - Addressing - Part 1

IP_Addressing- Part 1

Uploaded by

eng.mohamad85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views69 pages

IP - Addressing - Part 1

IP_Addressing- Part 1

Uploaded by

eng.mohamad85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 69

Chapter 6

Addressing the Network - IPV4

Part I

CCNA1-1 Chapter 6-1


Addressing the Network: IPv4

IPv4 Addresses

CCNA1-2 Chapter 6-1


Anatomy of an IPv4 Address

• Each device on a network must be uniquely identified at the


Network layer.
• For IPv4, a 32 bit source and destination address is
contained in each packet.
CCNA1-3 Chapter 6-1
Anatomy of an IPv4 Address
32 bit Binary String

Divided into OCTETS

Expressed in DOTTED DECIMAL NOTATION

• Devices use binary logic and work with strings of binary


numbers. For us, the decimal equivalent is much easier to
use and remember.
CCNA1-4 Chapter 6-1
Anatomy of an IPv4 Address
1.2

2.2
1.1
2.1

1.3
3.1
3.2

• To identify a path or "route" through a network, the address


must be composed of two parts:
• Network portion
• Host portion Chapter 6-1
CCNA1-5
Anatomy of an IPv4 Address

IP Address 192. 168. 1. 2


Binary IP Address 11000000 10101000 00000001 00000010

• Network Portion:
• Some portion of the high-order bits represents the
network address.
• At Layer 3, we define a network as a group of hosts that
have identical bit patterns in the network address portion
of their addresses.

192.168.1.2 11000000 10101000 00000001 00000010


192.168.1.67 11000000 10101000 00000001 01000011
192.168.1.204 11000000 10101000 00000001 11001100

CCNA1-6 Chapter 6-1


Anatomy of an IPv4 Address

IP Address 192. 168. 1. 2


Binary IP Address 11000000 10101000 00000001 00000010

• Host Portion:
• There are a variable number of bits that are called the
host portion of the address.
• The number of bits used in this host portion determines
the number of hosts that we can have within the network.

192.168.1.2 11000000 10101000 00000001 00000010


192.168.1.67 11000000 10101000 00000001 01000011
192.168.1.204 11000000 10101000 00000001 11001100

CCNA1-7 Chapter 6-1


Binary to Decimal Conversion

• In all number systems, the digits start with 0.


• A Base-n number system has n number of digits:
• Decimal:
• Base-10 has 10 digits
• 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
• Binary:
• Base-2 has 2 digits
• 1, 0
• Hexadecimal:
• Base-16 has 16 digits
• F, E, D, C, B, A, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
CCNA1-8 Chapter 6-1
Binary to Decimal Conversion

• Positional Notation (Decimal Number System):


• Means that a digit represents different values depending
on the position it occupies.
• The value that a digit represents is that value multiplied
by the power of the base according to the position the
digit occupies.
Position 3 2 1 0
Base 103 102 101 100
Value 1,000 100 10 1
String 2 1 3 4

(2x103) + (1x102) + (3x101) + (4x100) = 2,134


CCNA1-9 Chapter 6-1
Binary to Decimal Conversion

• Computers react only to electrical impulses.


• They work with and store data using electronic switches
that are either on (1) or off (0).
• They can only understand and use data that is in this two
state format.
• These 1's and 0's are called binary digits or bits.

CCNA1-10 Chapter 6-1


Binary to Decimal Conversion

• Positional Notation (Binary Number System):


• Means that a digit represents different values depending
on the position it occupies.
• The value that a digit represents is that value multiplied
by the power of the base according to the position the
digit occupies.
Position 7 6 5 4 3 2 1 0
Base 27 26 25 24 23 22 21 20
Value 128 64 32 16 8 4 2 1
String 0 1 1 0 1 1 0 0
(1x26) + (1x25) + (1x23) + (1x22)
64 + 32 + 8 + 4 = 108
CCNA1-11 Chapter 6-1
Binary to Decimal Conversion

Position 7 6 5 4 3 2 1 0
Base 27 26 25 24 23 22 21 20
Value 128 64 32 16 8 4 2 1
String 0 0 0 0 0 0 0 0
String 0 0 0 0 0 0 0 1
String 0 0 0 0 0 0 1 0

Range: 0 to 255

String 1 1 1 1 1 1 1 1

CCNA1-12 Chapter 6-1


Binary to Decimal Conversion

IP Address: 11001001000100010001110100000100

11001001 00010001 00011101 00000100

201 17 29 4

IP Address: 201.17.29.4
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
1
0 1
0 0 0
1 1
0 0
1 0 1
0

CCNA1-13 Chapter 6-1


Binary to Decimal Conversion

27 26 25 24 23 22 21 20
Dec. 128 64 32 16 8 4 2 1
21 0 0 0 1 0 1 0 1
50 0 0 1 1 0 0 1 0
101 0 1 1 0 0 1 0 1
150 1 0 0 1 0 1 1 0
206 1 1 0 0 1 1 1 0

CCNA1-14 Chapter 6-1


Decimal to Binary Conversion

IP Address: 201.17.29.4
201
- 128
73
- 64
27 26 25 24 23 22 21 20
9
128 64 32 16 8 4 2 1
- 8
1 1 0 0 1 0 0 1
1
- 1
0

CCNA1-15 Chapter 6-1


Decimal to Binary Conversion

IP Address: 201.17.29.4
17 201
- 16 11001001
1
- 1
27 26 25 24 23 22 21 20
0
128 64 32 16 8 4 2 1
0 0 0 1 0 0 0 1

CCNA1-16 Chapter 6-1


Decimal to Binary Conversion

IP Address: 201.17.29.4
29 201 17
- 16 11001001 00010001
13
- 8
27 26 25 24 23 22 21 20
5
128 64 32 16 8 4 2 1
- 4
0 0 0 1 1 1 0 1
1
- 1
0

CCNA1-17 Chapter 6-1


Decimal to Binary Conversion

IP Address: 201.17.29.4
4 201 17 29 4
- 4 11001001 00010001 00011101 00000100
0
27 26 25 24 23 22 21 20
Binary String:
128 110001001000100010001110100000100
64 32 16 8 4 2 1
0 0 0 0 0 1 0 0

CCNA1-18 Chapter 6-1


Decimal to Binary Conversion

27 26 25 24 23 22 21 20
Dec. 128 64 32 16 8 4 2 1
2 0 0 0 0 0 0 1 0
10 0 0 0 0 1 0 1 0
17 0 0 0 1 0 0 0 1
130 1 0 0 0 0 0 1 0
252 1 1 1 1 1 1 0 0

CCNA1-19 Chapter 6-1


Addressing the Network: IPv4

IPv4 Addresses for Different Purposes

CCNA1-20 Chapter 6-1


Types of Addresses in an IPv4 Network Range

• Three types:
Network: A special address that refers to the network
as an entity.

Broadcast: A special address used to send data to all


hosts in a network.

Host: The unique address assigned to each host


in a network.
Network and Broadcast addresses
CANNOT
CCNA1-21
be assigned to a host. Chapter 6-1
Network Address
Network Address
192 168 10 0
11000000 10101000 00001010 00000000
Broadcast Address
192 168 10 255
11000000 10101000 00001010 11111111
Host Address
192 168 10 1
11000000 10101000 00001010 00000001

• Standard way to reference a network (Lowest Address).


• All hosts in the network will have the same network bits.
• Cannot be assigned to a device.
• Each host bit in this address will be 0.
CCNA1-22 Chapter 6-1
Broadcast Address
Network Address
192 168 10 0
11000000 10101000 00001010 00000000
Broadcast Address
192 168 10 255
11000000 10101000 00001010 11111111
Host Address
192 168 10 1
11000000 10101000 00001010 00000001

• The destination address of a single packet used to


communicate to all hosts in a network (Highest Address)
• Cannot be assigned to a device.
• Each host bit in this address will be 1.
CCNA1-23 Chapter 6-1
Host Address
Network Address
192 168 10 0
11000000 10101000 00001010 00000000
Broadcast Address
192 168 10 255
11000000 10101000 00001010 11111111
Host Address
192 168 10 1
11000000 10101000 00001010 00000001

• The unique address assigned to each device on the network.


• Assign any address between the network address
(192.168.10.0) and the broadcast address (192.168.10.255).
• Addresses 192.168.10.1 through 192.168.10.254.
CCNA1-24 Chapter 6-1
Types of Communication in an IPv4 Network

• Three types:

Unicast: The process of sending a packet from one


host to an individual host.

Broadcast: The process of sending a packet from one


host to all hosts in the network.

Multicast: The process of sending a packet from one


host to a selected group of hosts.
• In all three types, the address of the originating host is
used as the source address in the packet.

CCNA1-25 Chapter 6-1


Unicast Communications

• The process of sending a packet from one host to an


individual host.

CCNA1-26 Chapter 6-1


Special Unicast Addresses

• Default Route:
• Address - 0.0.0.0 Subnet Mask – 0.0.0.0
• When configured, it tells the device….
If you don’t know where to send the frame, send it here.

CCNA1-27 Chapter 6-1


Special Unicast Addresses

• Loopback:
• Address - 127.0.0.1
• Host applications use it to communicate with each other.
• Test TCP/IP configuration on a PC – ping 127.0.0.1

CCNA1-28 Chapter 6-1


Special Unicast Addresses

• Link Local Addresses:


• Address Range 169.254.0.0 to 169.254.255.255
• Can be automatically assigned by the operating system
where no IP configuration is available.

CCNA1-29 Chapter 6-1


Special Unicast Addresses

• Test-Net Addresses:
• Address Range 192.0.2.0 to 192.0.2.255
• Used for teaching and learning purposes.
• Appear in documentation and network examples.
• Will be accepted by a network device.
• Used to provide examples in RFCs and vendor and
protocol documentation.
• Should not appear on the Internet.

Your best bet…..


STAY AWAY FROM THEM….
CCNA1-30 Chapter 6-1
Special Unicast Addresses

• Experimental Address Range:


• Address Range 240.0.0.0 to 255.255.255.254
• Reserved for future use.
• Cannot be used on IPv4 networks.
• Used for research and experimentation.

CCNA1-31 Chapter 6-1


Special Unicast Addresses

• Public and Private Addresses:


• Most IPv4 addresses are public addresses.
• A public address is one that is designated for use in
networks that are accessible on the Internet.
• Networks that require limited or no Internet access, use
private addresses.
• Private addresses are assigned from blocks of private
address space set aside for that purpose.
• 10.0.0.0/8 (10.0.0.0 to 10.255.255.255)
• 172.16.0.0/12 (172.16.0.0 to 172.31.255.255)
• 192.168.0.0/16 (192.168.0.0 to 192.168.255.255)

CCNA1-32 Chapter 6-1


Broadcast Communications

• The process of sending a packet from one host to all hosts in


the network.

CCNA1-33 Chapter 6-1


Broadcast Communications

• Broadcasts are not forwarded by a router unless specifically


configured to do so.
• The bits in the host portion of a broadcast address will be
all 1s.
CCNA1-34 Chapter 6-1
Multicast Communications

• The process of sending a packet from one host to a selected


group of hosts.

CCNA1-35 Chapter 6-1


Multicast Communications

• Multicasting involves the use


of a reserved network of
IP Addresses (224.0.0.0).

• Each host that is to


participate in a multicast
session first joins the
multicast group controlled by
the router.

• When the packet from the


source arrives at the router,
it is forwarded to all members of the multicast group.
CCNA1-36 Chapter 6-1
Multicast Communications

• The reserved multicast network or specific multicast


addresses will be displayed in the routing table of a device.
• The following is from a PC.

CCNA1-37 Chapter 6-1


Reserved and Special Purpose Addresses

Type Block Range

Network 1 per network

Broadcast 1 per network

Multicast 224.0.0.0/4 224.0.0.0 – 239.255.255.255

Default Route 0.0.0.0/8 0.0.0.0 – 0.255.255.255

Loopback 127.0.0.0/8 127.0.0.0 – 127.255.255.255

Link-local 169.254.0.0/16 169.254.0.0 – 169.254.255.255

Test-net 192.0.2.0/24 192.0.2.0 – 192.0.2.255


10.0.0.0/8 10.0.0.0 – 10.255.255.255
Private 172.16.0.0/12 172.16.0.0 – 172.31.255.255
192.168.0.0/16 192.168.0.0 – 192.168.255.255
CCNA1-38 Chapter 6-1
Addressing the Network: IPv4

IANA and ISPs

CCNA1-39 Chapter 6-1


Internet Assigned Numbers Authority (IANA)

• To have hosts accessible from the Internet, an organization


must have a block of public addresses assigned to them.
• IANA is a global organization responsible for the assignment
of IPv4, IPv6 and Multicast addresses.

Global IANA

AfriNIC APNIC LACNIC ARIN RIPE NCC


Regional Latin
Internet Europe,
Asia / America North
Registries Africa Middle East,
Pacific and America
Region Central Asia
Region Caribbean Region
Region
Region

CCNA1-40 Chapter 6-1


Internet Service Provider (ISP)

• Most companies or organizations obtain their IPv4 address


blocks from an ISP.
• The ISP loans or rents these addresses to the
organization.
• If we move our Internet connectivity, the new ISP will
provide us with addresses from the address blocks that
have been provided to them.
• Our previous ISP will loan the returned addresses to
other customers.
• ISPs have their own set of internal data networks to
manage Internet connectivity and to provide related
services (DNS, e-mail, website).

CCNA1-41 Chapter 6-1


Internet Service Provider (ISP)

• ISPs are designated by a hierarchy based on their level of


connectivity to the Internet backbone.

Very large companies Multiple, direct Internet


and Tier 2 ISPs Backbone connections

Large companies
and Tier 3 ISPs

Medium and small


companies and homes

CCNA1-42 Chapter 6-1


Addressing the Network: IPv4

Assigning Addresses

CCNA1-43 Chapter 6-1


Planning to Address the Network

• Planning and documentation is an important part of


IP Address assignment.
• Preventing duplication of addresses.
• Each host on a network MUST have a unique
address.
• Providing and controlling access.
• Some servers provide services for both internal and
external users.
• Filters and access control can be done at Layer 3.
• Monitoring security and performance.
• Examining network traffic and troubleshooting
requires a good knowledge of the addressing scheme.
CCNA1-44 Chapter 6-1
Assigning Addresses Within a Network

• The IP Addresses for hosts on a common network segment


must all have the same network portion.
• Desktop Workstations
• Laptops
• Internal Servers
• External Internet Servers
• Printers
• Routers
• Switches
• Each of these should be assigned a logical block of
addresses within the address range of the network.

CCNA1-45 Chapter 6-1


Assigning Addresses Within a Network

• Considerations – Private and Public addresses.


• Will there be more devices connected to the network than
public addresses allocated by the network's ISP?

• Will the devices need to be accessed from outside the


local network?

• If devices that may be assigned private addresses require


access to the Internet, is the network capable of providing
a Network Address Translation (NAT) service?

CCNA1-46 Chapter 6-1


Assigning Addresses Within a Network

Private Addresses Public Addresses

CCNA1-47 Chapter 6-1


Assigning Addresses Within a Network

CCNA1-48 Chapter 6-1


Assigning Addresses Within a Network

CCNA1-49 Chapter 6-1


Static or Dynamic Addressing

Static Address Assignment

CCNA1-50 Chapter 6-1


Static or Dynamic Addressing

Dynamic Address Assignment - DHCP

CCNA1-51 Chapter 6-1


Selecting Device Addresses

Use First Address Last Address


Network Address 172.16.x.0
User Hosts (DHCP Pool) 172.16.x.1 172.16.x.127
Servers 172.16.x.128 172.16.x.191
Peripherals 172.16.x.192 172.16.x.223
Networking Devices 172.16.x.224 172.16.x.253
Router 172.16.x.254
Broadcast 172.16.x.255
CCNA1-52 Chapter 6-1
Addressing the Network: IPv4

IPv4 Addresses
Prefix and Subnet Mask

CCNA1-53 Chapter 6-1


Network Prefixes

• How do you know the number of bits assigned to the network


and the number of bits assigned to the host?
• Prefix Mask:
• The address is followed by a number that represents
the number of bits (prefix length), beginning from the
left, that apply to the network.
• A slash (/) is used to separate the address and the
prefix length.

192.168.10.2/24

Means that the first 24 bits are the network portion.


The last 8 bits are the host portion.
CCNA1-54 Chapter 6-1
Network Prefixes

• Networks are not always assigned a /24 prefix.


• Depending on the number of hosts on the network, the
prefix can be different.
• Having a different prefix changes the host range and the
broadcast address.
Network Broadcast
Network Address Host Range Address
172.16.4.0/24 172.16.4.0 172.16.4.1 – 172.16.4.254 172.16.4.255
172.16.4.0/25 172.16.4.0 172.16.4.1 – 172.16.4.126 172.16.4.127
172.16.4.0/26 172.16.4.0 172.16.4.1 – 172.16.4.62 172.16.4.63
172.16.4.0/27 172.16.4.0 172.16.4.1 – 172.16.4.30 172.16.4.31

CCNA1-55 Chapter 6-1


Subnet Mask

• How do the network devices know how many bits are the
network portion and how many bits are the host portion?
• Subnet Mask:
• A 32 bit value, expressed in dotted decimal notation,
that specifies the number of network bits and the
number of host bits.
• The Prefix Mask and the Subnet Mask are different
ways of representing the same information.
• Prefix Mask of /24 or a subnet mask of 255.255.255.0
• First 24 bits are the network portion.
• The remaining 8 bits are the host portion.

CCNA1-56 Chapter 6-1


Subnet Mask

• There is a direct, one-to-one relationship between the bits of


the IP Address and the bits of the subnet mask.
• The subnet mask uses 1 and 0 bits to indicate that the
corresponding bit of the IP address is either the
network (1) or the host (0) portion.
IP Address: 172.16.4.35 / 24

Dotted Decimal Binary Octets

Host 172.16.4.35 10101100 00010000 00000100 00100011

Mask 255.255.255.0 11111111 11111111 11111111 00000000

CCNA1-57 Chapter 6-1


Subnet Mask

Subnet Mask Values Within an Octet


Mask (Decimal) Mask (Binary) Network Bits Host Bits
0 00000000 0 8
128 10000000 1 7
192 11000000 2 6
224 11100000 3 5
240 11110000 4 4
248 11111000 5 3
252 11111100 6 2
254 11111110 7 1
255 11111111 8 0
CCNA1-58 Chapter 6-1
Subnet Mask

IP Address: 10.24.36.2 / 8 Subnet Mask?


IP Address: 10.24.36.2 / 12 Subnet Mask?
IP Address: 10.24.36.2 / 16 Subnet Mask?
IP Address: 10.24.36.2 / 23 Subnet Mask?

IP Address: 10.24.36.2 255.255.224.0 Prefix Mask?


IP Address: 10.24.36.2 255.255.255.192 Prefix Mask?
IP Address: 10.24.36.2 255.255.255.252 Prefix Mask?
IP Address: 10.24.36.2 255.254.0.0 Prefix Mask?
IP Address: 10.24.36.2 255.255.240.0 Prefix Mask?
CCNA1-59 Chapter 6-1
Is the Host on My Network?

• To send a broadcast, a network device must be able to divide


the IP Address into the network and host portion.
• It uses a process called ANDing.
• The IP Address is converted to binary.
• The Binary AND Truth Table is used to compare the
bits strings of the address with the subnet mask.

A B Result
0 0 0
1 0 0
0 1 0
1 1 1
CCNA1-60 Chapter 6-1
Is the Host on My Network?

• IP Address 135.15.2.1 255.255.0.0

A B Result
0 0 0
1 0 0
0 1 0
1 1 1

Decimal Binary
0000111
IP Address 135.15.2.1 10000111 00000010 00000001
1
1111111
Subnet Mask 255.255.0.0 11111111 00000000 00000000
1
0000111
Network 135.15.0.0 10000111 00000000 00000000
1

CCNA1-61 Chapter 6-1


Reasons to Use AND

• Routers use the ANDing process to determine the route a


packet will take.
• The network number of the destination address is used to
find the network in the routing table.
• The router determines the best path for the frame.

Decimal Binary
0000111
IP Address 135.15.2.1 10000111 00000010 00000001
1
1111111
Subnet Mask 255.255.0.0 11111111 00000000 00000000
1
0000111
Network 135.15.0.0 10000111 00000000 00000000
1

CCNA1-62 Chapter 6-1


Reasons to Use AND

• The source device uses the ANDing process to determine if


the packet is to be sent to the default gateway.
• A PC will use it to determine the destination network.
• If the destination network is the same as the network
where the PC resides, the packet is sent directly to that
host.
• If the destination network is different, the packet is sent to
the default gateway.
Decimal Binary
0000111
IP Address 135.15.2.1 10000111 00000010 00000001
1
1111111
Subnet Mask 255.255.0.0 11111111 00000000 00000000
1
0000111
Network 135.15.0.0 10000111 00000000 00000000
1
CCNA1-63 Chapter 6-1
Addressing the Network: IPv4

Testing the Network Layer

CCNA1-64 Chapter 6-1


Testing the Network Layer

CCNA1-65 Chapter 6-1


Testing the Network Layer

C:>ping 10.0.0.1
Verifies that the local IP
configuration is correct.

C:>ping 10.0.0.254
Verifies that the host
can reach the gateway.

CCNA1-66 Chapter 6-1


Testing the Network Layer

C:>ping 10.0.1.2

CCNA1-67 Chapter 6-1


Testing the Network Layer

CCNA1-68 Chapter 6-1


Testing the Network Layer

• ICMPv4: Protocol for Testing and Messaging.


• Provides control and error messages and is used by ping
and traceroute.
• Host confirmation
• Unreachable destination or service
• Time exceeded
• Route redirection
• Source quench

CCNA1-69 Chapter 6-1

You might also like