Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

IPv4 Addresses

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

IP Address Version 4

1
IP Address Version 4
IP Address
What Is An IP Address?
• A unique identifier for a computer or device (host) on a TCP/IP
network.
• A 32-bit binary number

Format (version 4):


• Four numbers separated by dots.
• Each number is from 0 to 255.

Example:

Note: The example IP address is a Google IP address.


3
IP Address
IP addresses are globally
managed by Internet Assigned
Numbers Authority (IANA) and
Regional Internet Registries (RIR).
IP Address

2nd Octet 3rd Octet 4th Octet


1st Octet
IP Addressing

Each address is 32 bits wide.


Valid addresses can range from
0.0.0.0 to 255.255.255.255
WHY?
Because 11111111b = 25510
Because: 111111112 = 25510
IP Addressing

32/4 = 8 10.1.1.1
28 = 256 00001010 00000001 00000001 00000001
8 8 8 8
But, computers
32
number starts at
0, so to make a
Each 8 digit group
space of 256
represents a
numbers, we number between
number from 0 to 0 and 255
255.
The Power of Two Calculator
Converting Binary to Decimal
IP Address: Analogy

9
IP Address: Analogy

10
Example
Design a Wireless LAN network that connects
a router to two wireless computers and two
wired PCs. Each hosts must be able to ping
each other. See figure below.
IP Addressing

Theoretically, a total of 4.3 billion


addresses are available.
WHY?
Because:

232 = 4,294,967,296
IP Address

The address space of


TCP/IPv4 is
4.3 billion or
4,294,967,296
IP Address
Some points to be noted about dotted decimal
notation :
1. The value of any octet is between 0 and 255
(both included).
2. There are no zeroes preceding the value in any
octet (054 is wrong, 54 is correct).
Example 1

Find the error in the following IP Address


111.56.077.78

Solution

There are no leading zeroes in


Dotted-decimal notation (077)
Example 2

Find the error in the following IP Address


75.45.511.14

Solution

In decimal notation each number <= 255


511 is out of the range
Example 3

Find the error, if any, in the following


IP addresses:
a. 111.56.045.78 b. 221.34.7.8.20
c. 75.45.301.14 d. 11100010.23.14.67
Solution

a. There are no leading zeroes in dotted-decimal notation


(045).
b. We may not have more than four numbers in an IP
address.
c. In dotted-decimal notation, each number is less than or
equal to 255; 301 is outside this range.
d. A mixture of binary notation and dotted-decimal notation
is not allowed.
IP Address: Classes

19
IP Address Classes
Using the ranges, you can determine the
class of an address from its 1st octet
value.
An address beginning with
10 is a Class A address
172 is a Class B address
192 is a Class C address.
Example:
Find the class of each address

1. 192.14.2.0 = Class C
2. 231.230.45.58 = Class D
3. 174.100.18.4 = Class B
4. 119.18.45.0 = Class A
5. 249.240.80.78 = Class E
6. 10.45.78.95 = Class A
7. 88.100.45.1 = Class A
Finding the Class in Binary Notation
Example:
Find the class of each address
1. 00000001.00001011.00001011.11101111
2. 11000001.10000011.00011011.11111111
3. 10100111.11011011.10001011.01101111
4. 11110011.10011011.11111011.00001111

5. 11100011.10011011.11111011.00001111

6. 11000111.11111011.11111011.01101111
The IP Address Classes
IP Address Intended Use
Class
Class A For very large organizations with hundreds of
thousands or millions of hosts to connect to
the Internet

Class B For medium-sized organizations with many


hundreds to thousands of hosts to connect to
the Internet

Class C For small organizations with no more than


about 250 hosts to connect to the Internet
The IP Address Classes

IP Address Intended Use


Class

Class D Reserved for IP multicasting.

Class E Reserved for experimental and future


use
The Allocation of IP Addresses
The Allocation of IP Addresses
Class A uses half of them
(2,147,483,648 addresses)
Class B uses one-fourth
(1,073,741,824 addresses)
Class C uses one-eighth (536,870,912)
Class D and Class E each use 1/16th -
they split the rest of the addresses
(268,435,456 each)
The Allocation of IP Addresses

How can we prove that we have


2,147,483,648 addresses in class A?
Solution:
In class A, only 1 bit defines the class. The
remaining 31 bits are available for the
address. With 31 bits, we can have 231 or
2,147,483,648 addresses.
The Allocation of IP Addresses

How can we prove that we have


536,870,912 addresses in class C?
Solution:
In class C, there are 3 bits that defines
the class. The remaining 29 bits are
available for the address. With 29 bits, we
can have 229 or 536,870,912 addresses.
Classful Addressing

30
IPv4 Address is Divided into Two parts:

1. The Network address


2. The Host address

Two addresses in one


IP Address
Classes

Large network
1 2 3 4

Medium network
1 2 3 4

Host ID

Small network
1 2 3 4

32
Which part belongs to the network and which
part belongs to the host?
IP Address
Class A
Large network

1 2 3 4

10.15.16.11 10.20.31.17 11.20.31.18 10 .7.35.199


34
IP Address
Class B
Medium
network

w x y z

172.16.16.11 172.15.31.17 172.16.31.18 172.16.35.199


IP Address
Class C
Small network
Host ID

1 2 3 4

192.168.1.100 192.168.0.199 192.168.0.10 192.168.0.35


36
IP Address
How To Identify An IP’s Class:

1 2 3 4

1 2 3 4

Host ID

1 2 3 4

37
IP Address
Review Questions:
• Provide the classes of the following IP addresses:

1) 192.168.0.1 Class C
2) 169.254.11.12 Class B
3) 191.67.44.33 Class B
4) 4.2.2.3 Class A
5) 127.0.0.1 Class A
6) 216.239.61.104 Class C
7) 167.93.42.193 Class B
8) 208.80.152.2 Class C
9) 128.64.32.16 Class B
10) 64.233.189.103 Class A

38
IP Address
Review Questions:
• Identify if the IP addresses are on the same IP range

1) 192.168.0.1 192.168.100.10
2) 169.254.11.12 169.245.11.13
3) 191.67.45.33 191.67.45.11
4) 4.2.2.3 4.3.2.2
5) 127.0.0.1 172.0.0.2
6) 216.239.61.104 216.239.61.105
7) 167.93.42.193 167.39.42.199
8) 208.80.152.2 208.80.155.3
9) 128.64.32.16 128.64.192.16
10) 64.233.189.103 64.123.321.111

39
IP Address
Review Questions:

15.26.37.48 172.16.200.105 15.25.154.11 172.16.11.103

1)Which computers can communicate?


Answer: Computers A and C; B and D.
2) What is the class of computers A and C?
Answer: Class A
3) What is the class of computers B and D?
40
Answer: Class B
IP Address: Exercises
Review Questions:

192.168.0.100 192.168.0.101 192.168.0.x 192.168.0.x


1)Provide an IP address for computer C in order for it to be part of the
network.
Answer: 192.168.0.x
2) Provide an IP address for computer D in order for it to be part of the
network.
Answer: 192.168.0.x
3) What is the class of the IP addresses of the computers?
41
Answer: Class C
IP Address: Subnet Mask
What Is A Subnet Mask?
• A subnet mask divides the IP address into network
address and host address.

• Subnet mask is used by a computer to determine the


location (destination) of another computer.

• It will answer the question "Is it on the same network or


on a different network?"

42
IP Address: Subnet Mask
Default Subnet Mask

Host ID

43
IP Address: Exercises
Review Questions:
• Provide the default subnet masks of the following IP
addresses: 1) 192.168.0.1 255.255.255.0
2) 169.254.11.12 255.255.0.0
3) 191.67.44.33 255.255.0.0
4) 4.2.2.3 255.0.0.0
5) 216.239.61.14 255.255.255.0
6) 249.2.5.17 N/A

44
IP Address: Checking
How to check a computer’s IP address?
• On the Open field, enter cmd
• On the Command Prompt, enter ipconfig

45
IP Address: Checking
How to check a computer’s IP address using GUI?

46
IP Address: Configuration
Static IP
• An IP address that is manually assigned by a user.
• An IP address that does not change.

Dynamic IP
• An IP address that keeps on changing.
• An IP address that is automatically assigned by a DHCP server.

DHCP server

47
IP Address: DHCP
DHCP
• Dynamic Host Configuration Protocol
• A protocol for assigning IP addresses to devices on a
network.
DHCP Server
• A device that provides IP addresses to devices on a
network.
• Most routers have built-in DHCP server.
DHCP Client
• A device that requests for an IP address.

48
IP Address: DHCP
DHCP Setup

DHCP Client DHCP Server


Obtained IP: 192.168.0.10 Static IP: 192.168.0.1
Subnet Mask: 255.255.255.0 Subnet Mask: 255.255.255.0

Available IP Addresses
192.168.0.10
192.168.0.20
192.168.0.30
192.168.0.40
192.168.0.50

DHCP Client Non-DHCP Client


Obtained IP: 192.168.0.20 Static IP: 192.168.0.99
Subnet Mask: 255.255.255.0 Subnet Mask: 255.255.255.0
49
IP Address: Configuration
How To Configure Dynamic/Static IP

50
IP Address: Reserved IP Addresses
1. APIPA
2. Broadcast
3. Network
4. Loopback
IP Address: Reserved IP Addresses
APIPA
• Automatic Private IP Addressing.
• An address that is used when there is no available DHCP server, and the computer is
configured to obtain an IP address automatically.

Format
• 169.254.X.X
• X = any number from 0-255

IP Address: 169.254.123.213
Subnet Mask: 255.255.0.0 IP Address: 169.254.71.23 IP Address: 169.254.13.21
Subnet Mask: 255.255.0.0 Subnet Mask: 255.255.0.0
IP Address: Reserved IP Addresses
Broadcast Address
• Last IP address of a network.
• Example:

53
IP Address: Reserved IP Addresses
Network Address
• An IP address that represents an entire network.
• First IP address of a network.
• Example:

IP Address: 192.168.0.10 IP Address: 192.168.0.30


Subnet Mask: 255.255.255.0 Subnet Mask: 255.255.255.0
IP Address: 192.168.0.20
Subnet Mask: 255.255.255.0
IP Address: Reserved IP Addresses
Loopback Address
• An address that is bound to an interface.
• Generally used for sending packet to the own
local computer.
What is the Network Address of the
following IP Addresses:

1. 192.99.4.11 192.99.4.0
2. 10.50.3.5 10.0.0.0
3. 222.56.23.10 222.56.23.0
4. 131.56.90.15 131.56.0.0
5. 70.56.34.1
70.0.0.0
What is the Broadcast Address of the
following IP Addresses:

1. 192.99.4.11 192.99.4.255
2. 10.50.3.5 10.255.255.255
3. 222.56.23.10 222.56.23.255
4. 131.56.90.15 131.56.255.255
5. 70.56.34.1
70.255.255.255
IP Address: Exercises
Review Questions:

Static IP Static IP Static IP Dynamic IP


172.16.11.11 172.16.22.22 172.16.33.33
255.255.0.0 255.255.0.0 255.255.0.0

1)What is the network address?


Answer: 172.16.0.0
2) What is the broadcast address?
Answer: 172.16.255.255
3) What will be the IP address of computer D?
58
Answer: APIPA or 169.254.x.x
IP Address: Private IP
Private IP Address Range
• IP addresses for private networks.

• Public IPs are the addresses that are not part of the private IP
addresses and reserved IP addresses.
IP Address: Private IP
Private IP Addresses

216.239.61.104

192.168.0.20
192.168.0.10
Networking Utilities
Utilities: Testing Connectivity
Ping (Packet Internet Groper) Command
• Used to test whether a particular computer is reachable
across an IP network.

62
Utilities: Testing Connectivity
How to ping a computer?
• Go to the Command Prompt
• Enter ping [IP address]

63
Utilities: Testing Connectivity
Testing Connection Stability
• Go to the Command Prompt
• Enter ping [IP address] –t

Note: Press Ctrl + C to stop the ping.


64
Utilities: Testing Connectivity
Pinging A Website
• Go to the Command Prompt
• Enter ping [website]

65
Thank you for listening! ☺

66

You might also like