IP addresses. Subnet mask. Private and public IP addresses.

IP address - a unique software address used to communicate over the internet.

IP addresses are 32-bit numbers. The address is broken down into four 8-bit numbers (each is called an octet) (standard IPv4). 
Each octet can represent a number between 0 and 255 and is separated by a full stop, eg 192.168.1.20.

Equivalent for 11000000 10101000 00000001 00000101 is 192.168.1.5

Each IP address has two parts. How do nodes determine where the network portion is and where is the node address? The subnet mask is used for this.

Subnet mask. A 32-bit IP address mask that indicates the number of bits of an IP address reserved for a subnet address.

In the subnet mask, ones correspond to the network portion and zeros to the host address.

For example,

if IP address 192.168.1.20 and subnet mask 255.255.255.0, 

IP address

192

168

1

20

Subnet mask

255

255

255

0


then 20 - host address is in the network 192.168.1

Classes of IP addresses

Class

The first octet

Subnet mask

Number of networks and hosts

A

1-127

n.h.h.h
255.0.0.0
11111111.00000000.00000000.00000000

networks 126 (27-2)
hosts 16 777 214 (224-2)

B

128-191

n.n.h.h
255.255.0.0
11111111.11111111.00000000.00000000

networks 16 382 (214-2)
hosts 65 534 (216-2)

C

192-223

n.n.n.h
255.255.255.0
11111111.11111111.11111111.00000000

networks 2 097 150 (221-2)
hosts 254 (28-2)

D

224-239

Reserved for multicast groups.

 

E

240-255

Reserved for future use, or research and development purposes.

 


Private and public IP addresses

private IP address, also called internal, intranet, or local, is an IP address that belongs to a special range not used on the Internet. Such addresses are intended for use in local networks, the distribution of such addresses is not controlled by anyone.

IP address range

Classful description

10.0.0.0 – 10.255.255.255

single class A network

172.16.0.0 – 172.31.255.255

16 contiguous class B networks

192.168.0.0 – 192.168.255.255

256 contiguous class C networks


All other addresses are public addresses.

IPv6

IPv6 addresses consist of 8 groups of 16-bit hexadecimal values separated by colons (улыбаюсь. IPv6 addresses have the following format: aaaa:aaaa:aaaa:aaaa:aaaa:aaaa:aaaa:aaaa

Each aaaa is a 16-bit hexadecimal value, and each a is a 4-bit hexadecimal value. Following is a sample IPv6 address: 3FFE:0000:0000:0001:0200:F8FF:FE75:50DF or 3FFE:0:0:1:200:F8FF:FE75:50DF



Последнее изменение: Wednesday, 17 April 2024, 10:04