Download as pdf or txt
Download as pdf or txt
You are on page 1of 52

REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 1

IP Addressing and Subnetting


Data Communications (Lecture)
PECEC3

Technological University of the Philippines - Manila


REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 2

Internet Protocol Address


• IP address is a unique logical addressing
scheme used to locate devices within a
network.
• 32 bits logical addressing scheme for IPv4 and
128 bits or 12 hex digits for IPv6.
• IP address can be statically (manual) or
dynamically (DHCP) assigned.

2
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 3

Internet Protocol Address


• IP address is always paired with the Subnet
Mask, which defines the range or scope of the
network.

3
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 4

IPv4 Format

192 .168 .1 .1
11000000.10101000.00000001.00000001

255 .255 .255 .0


11111111.11111111.11111111.00000000

4
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 5

IPv4 Format

5
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 6

IANA
• Internet Assigned Numbers Association
• Global organization responsible for regulation of
domain names, port numbers, AS numbers and IP
addresses.
• Clustered in two (2) main organizations:
1. ICANN – Internet Corporation for Assigned
Names and Numbers.
2. RIR – Regional Internet Registry

6
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 7

IANA

ICANN RIR

APNIC

AFRINIC

Organizational ARIN
Structure LACNIC

RIPE NCC

7
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 8

ICANN
• Internet Corporation for Assigned Names and
Numbers
• Domain Name registration
• Association of Public IP Addresses to its
Domain Name

8
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 9

RIR
• Regional Internet Registry
• In charge with IP address regulation.
• Subdivided into five (5) regional HQ:
1. APNIC – Asia Pacific Network Information
Centre
2. ARIN – American Registry for Internet
Numbers

9
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 10

IANA
3. LACNIC – Latin America and Caribbean
Network Information Centre
4. AFRINIC – African Network Information
Centre
5. RIPE NCC - Réseaux IP Européens (European
IP Networks) Network Coordination Centre

10
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 11

Network Addressing

11
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 12

IPv4 ADDRESSES

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.

Topics discussed in this section:


Address Space
Notations
Classful Addressing
Classless Addressing
Network Address Translation (NAT)

12
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 13

Note

An IPv4 address is 32 bits long.

13
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 14

Note

The IPv4 addresses are unique


and universal.

14
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 15

Note

The address space of IPv4 is


232 or 4,294,967,296.

15
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 16

Dotted-decimal notation and binary notation for an IPv4 address

16
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 17

Example 1
Change the following IPv4 addresses from binary
notation to dotted-decimal notation.

Solution
We replace each group of 8 bits with its equivalent
decimal number and add dots for separation.

17
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 18

Example 2
Change the following IPv4 addresses from dotted-decimal
notation to binary notation.

18
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 19

Example 3
Find the error, if any, in the following IPv4 addresses.

19
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 20

Note

In classful addressing, the address


space is divided into five classes:
A, B, C, D, and E.

20
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 21

Finding the classes in binary and dotted-decimal notation

21
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 22

Example 4
Find the class of each address.
a. 00000001 00001011 00001011 11101111
b. 11000001 10000011 00011011 11111111
c. 14.23.120.8
d. 252.5.15.111

22
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 23

Number of blocks and block size in classful IPv4 addressing

23
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 24

Note

In classful addressing, a large part of the


available addresses were wasted.

24
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 25

Default masks for classful addressing

25
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 26

Note

Classful addressing, which is almost


obsolete, is replaced with classless
addressing.

26
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 27

A block of 16 addresses granted to a small organization

27
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 28

Example 5
It shows a block of addresses, in both binary and dotted-
decimal notation, granted to a small business that needs
16 addresses.

We can see that the restrictions are applied to this block.


The addresses are contiguous. The number of addresses
is a power of 2 (16 = 24), and the first address is divisible
by 16. The first address, when converted to a decimal
number, is 3,440,387,360, which when divided by 16
results in 215,024,210.

28
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 29

Note

In IPv4 addressing, a block of


addresses can be defined as
x.y.z.t /n
in which x.y.z.t defines one of the
addresses and the /n defines the mask.

29
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 30

Note

The first address in the block can be


found by setting the rightmost
32 − n bits to 0s.

30
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 31

Note

The last address in the block can be


found by setting the rightmost
32 − n bits to 1s.

31
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 32

Note

The number of addresses in the block


can be found by using the formula
232−n.

32
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 33

A network configuration for the block 205.16.37.32/28

33
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 34

Note

The first address in a block is


normally not assigned to any device;
it is used as the network address that
represents the organization
to the rest of the world.

34
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 35

Two levels of hierarchy in an IPv4 address

35
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 36

A frame in a character-oriented protocol

36
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 37

Note

Each address in the block can be


considered as a two-level
hierarchical structure:
the leftmost n bits (prefix) define
the network;
the rightmost 32 − n bits define
the host.

37
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 38

Configuration and addresses in a subnetted network

38
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 39

Three-level hierarchy in an IPv4 address

39
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 40

Example 6
An ISP is granted a block of addresses starting with
190.100.0.0/16 (65,536 addresses). The ISP needs to
distribute these addresses to three groups of customers as
follows:
a. The first group has 64 customers; each needs 256
addresses.
b. The second group has 128 customers; each needs 128
addresses.
c. The third group has 128 customers; each needs 64
addresses.
Design the subblocks and find out how many addresses
are still available after these allocations.
40
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 41

Addresses for private networks

41
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 42

A NAT implementation

42
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 43

Addresses in a NAT

43
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 44

NAT address translation

44
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 45

Five-column translation table

45
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 46

An ISP and NAT

46
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 47

Note

An IPv6 address is 128 bits long.

47
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 48

IPv6 ADDRESSES

Despite all short-term solutions, address depletion is


still a long-term problem for the Internet. This and
other problems in the IP protocol itself have been the
motivation for IPv6.

Topics discussed in this section:


Structure
Address Space

48
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 49

IPv6 address in binary and hexadecimal colon notation

49
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 50

Abbreviated IPv6 addresses

50
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 51

Example 8
Expand the address 0:15::1:12:1213 to its original.

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.

This means that the original address is.

51
Technological University of the Philippines - Manila
REF-SPP-AAA-BBB-CCC-DDD-I01-R00-09262020 | 52

52
Technological University of the Philippines - Manila

You might also like