Más contenido relacionado
Similar a IPv4 adressing(20)
Más de AssemNazirova2(17)
Último(20)
AI: mind, matter, meaning, metaphors, being, becoming, life values von Twain Liu 刘秋艳AI: mind, matter, meaning, metaphors, being, becoming, life values IPv4 adressing
- 1. 1
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
COMPUTER NETWORKS
IPv4 Addressing
- 2. 2
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Plan
1. IPv4 address structure
2. IPv4 unicast, broadcast, and multicast
3. Types of IPv4 addresses
4. Network segmentation
5. Dividing an IPv4 network into subnets
- 3. 3
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
9.1 IPv4 address structure
- 4. 4
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Network and host part
• The IPv4 address is hierarchical and consists of a network part and a tail part.
• When determining one or another part, it is necessary to pay attention not to the
decimal value, but to the 32-bit record
• The subnet mask is used to determine the network and host part of the address.
- 5. 5
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Subnet Mask
• To identify the network and node part of the IPv4 address, the subnet mask is bitwise
compared with the IPv4 address from left to right.
• The process itself used to
determine the network and
node parts of the address
is called the logical
operation And (AND).
- 6. 6
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Prefix length
• Prefix length is a less cumbersome method used to identify the subnet mask address.
• The prefix length means the
number of bits set to one (1)
in the subnet mask.
• Therefore, you need to count
the number of bits in the
subnet mask and put a slash
before this value.
Subnet mask 32-bit address Prefix Length
255.0.0.0 11111111.00000000.00000000.00000000 /8
255.255.0.0 11111111.11111111.00000000.00000000 /16
255.255.255.0 11111111.11111111.11111111.00000000 /24
255.255.255.128 11111111.1111111111111111.10000000 /25
255.255.255.192 11111111.11111111.1111111111.11000000 /26
255.255.255.224 11111111.11111111.11111111.11100000 /27
255.255.255.240 11111111.11111111.11111111.11110000 /28
255.255.255.248 11111111.11111111.11111111.11111000 /29
255.255.255.252 11111111.11111111.11111111.11111100 /30
- 7. 7
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Network Definition: logical AND
• The logical operation And is used to determine the network address.
• Logical And is a comparison of two bits, where only 1 and 1 produces 1, and any other
combination results in 0.
• 1 And 1 = 1, 0 And 1 = 0, 1 And 0 = 0, 0 And 0 = 0
• 1 = True and 0 = False
• In order to determine the
network address of an IPv4
node, the logical operation
AND is applied bitwise to the
IPv4 address and subnet
mask.
- 8. 8
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Network address, host address and broadcast address
Each network has three types of IP addresses:
• Network address
• Host address
• Broadcast address
Сетевая часть
Раздел
хоста
Биты
хоста
Маска подсети
255.255.255.0 или /24
255 255 255
11111111 111111 1111 111111
0
00000000
Сетевой адрес
192.168.10.0 или /24
192 168 10
11000000 10100000 001010
0
00000000
Все 0
Первый адрес
192.168.10.1 или /24
192 168 10
11000000 10100000 001010
1
000001
Все 0 и 1
Последний адрес
192.168.10.254
или /24
192 168 10
11000000 10100000 001010
254
111111
Все 1 и 0
Широковещательный
адрес
192.168.10.255
или /24
192 168 10
11000000 10100000 001010
255
111111
Все 1
- 9. 9
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
9.2 IPv4 unicast, broadcast,
and multicast
- 10. 10
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Unicast transmission
• Unicast sends a packet to a single destination IP address.
• For example, computer 172.16.4.1 sends a unicast packet to the printer at
172.16.4.253.
- 11. 11
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Broadcast transmission
• The broadcast sends the packet to all other destination IP addresses.
• For example, computer 172.16.4.1 sends a broadcast packet to all IPv4 nodes.
- 12. 12
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Multicast transmission
• Multicast sends a packet to a multicast address group.
• For example, computer 172.16.4.1 sends a multicast packet to the multicast group
address 224.10.10.5.
- 13. 13
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
9.3 Types of IPv4 addresses
- 14. 14
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Public and private IPv4 addresses
• Public IPv4 addresses are addresses that are globally routed between Internet
Service Provider (ISP) routers.
• However, private addresses are not globally routable.
• There are blocks of addresses called
private addresses, which in most
companies are assigned as IPv4
addresses of internal hosts.
• Private IPv4 addresses are not unique
and can be used on any internal network.
Сетевой адрес и
префикс
Диапазон частных адресов RFC
1918
10.0.0.0/8 10.0.0.0 - 10.255.255.255
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
- 15. 15
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Routing to the Internet
• Network Address Translation (NAT) is used to convert a private IPv4 address to a public
IPv4 address.
• NAT is usually enabled on an
edge router connected to the
Internet.
• Converts private IP
addresses to public IP
addresses.
- 16. 16
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Special-purpose IPv4 addresses
Loopback addresses
• 127.0.0.0 /8 or from 127.0.0.1 to
127.255.255.254
• Usually identified only as 127.0.0.1
• Is used on the host to check the health
of the TCP/IP configuration.
Local channel addresses
• 169.254.0.0 /16 or from 169.254.0.1 to 169.254.255.254
• More commonly known as Automatic Private IP addresses (APIPA).
• Used by a Windows client for automatic configuration if there is no
available DHCP server.
- 17. 17
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Traditional class addressing
RFC 790 (1981) allocated IPv4 addresses in
classes
• Class A (0.0.0.0/8 - 127.0.0.0/8 )
• Class B (128.0.0.0 /16 - 191.255.0.0 /16 )
• Class C (192.0.0.0 /24 - 223.255.255.0
/24 )
• Class D (224.0.0.0 - 239.0.0.0)
• Class E (240.0.0.0 - 255.0.0.0)
• Classical addressing has wasted a lot of
IPv4 addresses.
The class distribution of addresses has been
replaced by classless addressing, which
ignores the rules of classes (A, B, C).
- 18. 18
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Assigning IP addresses
• IANA manages blocks of IP addresses and distributes them among regional Internet
Registrars (RIRs).
• Regional Internet Registrars
(LIRs) are responsible for
distributing IP addresses
between Internet Service
Providers (ISPs), which, in
turn, provide blocks of IPv4
addresses to organizations
and smaller providers.
- 19. 19
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
9.4 Network segmentation
- 20. 20
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Network Segmentation Broadcast Domains
• Many protocols use broadcast or multicast (for example, ARP uses broadcasts to search for
other devices, hosts send DHCP broadcasts to search for a DHCP server).
• Switches broadcast to all interfaces, except for the interface through which the newsletter was
received.
• The only device stopping broadcasts is the
router.
• Routers do not broadcast.
• Thus, each router interface is connected to a
broadcast domain, and broadcasts are
carried out only within a specific distribution
domain.
- 21. 21
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Problems with large broadcast domains
• The problem with a large broadcast domain is as
follows: nodes can generate excessive mailing and
negatively affect the operation of the network.
• To solve this problem, it is necessary to reduce the
size of the network by creating smaller broadcast
domains.
• This process is called subnet partitioning.400 LAN 1
users with the network address 172.16.0.0 /16 were
divided into two subnets of 200 users each —
172.16.0.0 /24 and 172.16.1.0/24.
• Mailing is limited to small broadcast domains.
- 22. 22
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Reasons for partitioning into subnets
• Subnetting reduces the total amount of network traffic and improves network performance.
• It can be used to implement security policies between subnets.
• The subnet reduces the number of devices affected by abnormal broadcast traffic.
• Subnets are used for a variety of reasons, including:
Местоположение Группа или функция Тип устройства
- 23. 23
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
9.5 IPv4 network subnet
- 24. 24
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Partitioning into subnets at the octet boundary
• The separation of networks is easiest to perform at the boundaries of octets /8, /16
and /24.
• Note that increasing the prefix length reduces the number of nodes in each subnet.
Prefix length Subnet mask
Subnet mask in binary system (n = network, h =
host)
Number of
hosts
/8 255.0.0.0
nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
11111111.00000000.00000000.00000000
16 777 214
/16 255.255.0.0
nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
11111111.11111111.00000000.00000000
65 534
/24 255.255.255.0
nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
11111111.11111111.11111111.00000000
254
- 25. 25
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
• In the first table 10.0.0.0/8, the subnet uses /16, and in the second table, the mask /24.
Subnet address
(256 possible
subnets)
Host range (65,534 possible
hosts in each subnet)
Broadcast
distribution
10,0.0,0/16 10,0.0.1 - 10,0.255,254 10,0.255,255
10.1.0,0/16 10.1.0.1 - 10,1.255,254 10.1.255,255
10,2.0,0/16 10,2.0.1 - 10,2.255,254 10,2.255,255
10,3.0,0/16 10.3.0.1 - 10.3.255.254 10.3.255.255.
10.4.0.0/16 10.4.0.1 - 10,4.255.254 10.4.255.255
10.5.0.0/16 10.5.0.1 - 10.5.255.254 10.5.255.255
10.6.0.0/16 10.6.0.1 - 10.6.255.254 10.6.255.255
10.7.0.0/16 107.0.1 - 10.7.255.254 10.7.255.255
... ... ...
10.255.0.0/16 10.255.0.1 - 10.255.255.254 10.255.255.255
Subnet address
(65,536 possible
subnets)
Node range (254 possible
nodes in each subnet)
Broadcast
distribution
10.0.0.0/24 10.0.0.1 - 10.0.0.254 10.0.0.255
10.0.1.0/24 10.0.1 - 10.0.1.254 10.0.1.255
10.0.2.0/24 10.0.2.1 - 10.0.2.254 10.0.2.255
… … …
10.0.255.0/24 10.0.255.1 - 10.0.255.254 10.0.255.255
10.1.0.0/24 10.1.0.1 - 10.1.0.254 10.1.0.255
10.1.1.0/24 10.1.1.1 - 10.1.1.254 10.1.1.255
10.1.2.0/24 10.1.2.1 - 10.1.2.254 10.1.2.255
… … …
10.100.0.0/24 10.100.0.1 - 10.100.0.254 10.100.0.255
... ... ...
10.255.255.0/24 10.255.255.1 - 10.2255.255.254 10.255.255.255
- 26. 26
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Partitioning into subnets at the octet boundary
• See the table to see the six ways to subnet a /24 network.
Prefix length Subnet mask
Subnet mask in binary system (c = network, y =
node)
Number of
subnets
Number
of hosts
/25 255.255.255.128
nnnnnnnn.nnnnnnnn.nnnnnnnn.nhhhhhhh
11111111.11111111.11111111. 10000000
2 126
/26 255.255.255.192
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh
11111111.11111111.11111111. 11000000
4 62
/27 255.255.255.224
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnhhhhh
11111111.11111111.11111111. 11100000
8 30
/28 255.255.255.240
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh
11111111.11111111.11111111. 11110000
16 14
/29 255.255.255.248
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnhhh
11111111.11111111.11111111. 11111000
32 6
/30 255.255.255.252
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnnhh
11111111.11111111.11111111. 11111100
64 2
- 27. 27
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
9.6 Subnet: /16 and /8
- 28. 28
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Creating subnets with the prefix /16
The table in the
figure shows all
possible scenarios of
partitioning into
subnets with the
prefix /16.
Prefix length Subnet mask Network address (c = network, x = host)
Number of
subnets
Number of
hosts
/17 255.255.128,0
nnnnnnnn.nnnnnnnn.nhhhhhhh.hhhhhhhh
11111111.11111111. 100000000000000
2 32766
/18 255.255.192,0
nnnnnnnn.nnnnnnnn.nnhhhhhh.hhhhhhhh
11111111.11111111. 1100000000000000
4 16382
/19 255.255.224.0
nnnnnnnn.nnnnnnnn.nnnhhhhh.hhhhhhhh
11111111.11111111. 111000000000000
8 8 190
/20 255.255.240,0
nnnnnnnn.nnnnnnnn.nnnnhhhh.hhhhhhhh
11111111.11111111. 1111000000000000
16 4 094
/21 255.255.248,0
nnnnnnnn.nnnnnnnn.nnnnnhhh.hhhhhhhh
11111111.11111111. 11111000,00000000
32 2 046
/22 255.255.252.0
нннннннннннннннннн. ннннннххххххххххх
111111111111.11111100.00000000
64 1 022
/23 255.255.254.0
нннннннннннннннннн. нннннннх.хххххххх
11111111.111111. 11111110,00000000
128 510
/24 255.255.255.0
нннннннннннннннннн. нннннннн.хххххх
11111111.11111111. 1111111111.00000000
256 254
/25 255.255.255.128
нннннннннннннннннн. ннннннннн.нхххххх
1111111111.111111. 11111111.10000000
512 126
/26 255.255.255.192
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh
11111111.11111111. 11111111.11000000
1024 62
/27 255.255.255.224
нннннннннннннннннн. ннннннннннххххх
11111111.11111111. 11111111.11100000
2048 30
/28 255.255.255. 240
нннннннннннннннннн. ннннннннннннчччх
11111111.11111111. 11111111.11110000
4 096 14
/29 255.255.255.248
нннннннннннннннннн. ннннннннннннчччч
11111111.11111111. 11111111.11111000
8 192 6
/30 255.255.255.252
нннннннннннннннннн. нннннннннннннч
1111111111.11111111. 11111111.111100
16 384 2
- 29. 29
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Creating subnets with the prefix /16
Consider a large enterprise that needs at least 100 subnets,
and which has chosen the private address 172.16.0.0/16 as
the internal network address.
• The figure shows the number of subnets that can be
created by borrowing bits from the third and fourth octets.
• Note that there are now up to 14 host bits that can be
borrowed (that is, the last two bits cannot be borrowed).
To meet the needs of the enterprise, you will need to borrow 7
bits (that is, 27 = 128 subnets), as shown in the figure.
- 30. 30
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Creating subnets with the prefix /16
Consider a small ISP that requires 1000 subnets for its
clients using a network address of 10.0.0.0/8, which
means that there are 8 bits in the network part and 24
bits of the node are available to borrow for subnets.
• The figure shows the number of subnets that can
be created by borrowing bits from the third and
fourth octets.
• Note that there are now up to 22 host bits that can
be borrowed (that is, the last two bits cannot be
borrowed).
To fulfill the requirement of 1000 subnets for an
enterprise, it is necessary to borrow 10 bits (i.e. 210=
1024 subnets) (a total of 128 subnets)
- 31. 31
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
9.7 Partitioning into subnets to
meet the requirements
- 32. 32
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Private and public IPv4 address space subnets
Corporate networks
• Intranet - The company's internal network usually
uses private IPv4 addresses.
• DMZ companies, Internet—facing servers.
Devices in the DMZ use public IPv4 addresses.
• The company can use 10.0.0.0/8 and a subnet on
the /16 or /24 network boundary.
• DMZ devices must be configured with public IP
addresses.
- 33. 33
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Minimizing unused IPv4 node addresses and maximizing subnets
There are two parameters to consider when planning subnets.
• The required number of node addresses in each network
• Required number of subnets
Длина
префикса
Маска подсети
Маска подсети в двоичной системе
(с = сеть, у = узел)
Количеств
о
подсетей
Количест
во узлов
/25 255.255.255.128
nnnnnnnn.nnnnnnnn.nnnnnnnn.nhhhhhhh
11111111.11111111.11111111. 10000000
2 126
/26 255.255.255.192
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnhhhhhh
11111111.11111111.11111111. 11000000
4 62
/27 255.255.255.224
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnhhhhh
11111111.11111111.11111111. 11100000
8 30
/28 255.255.255.240
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnhhhh
11111111.11111111.11111111. 11110000
16 14
/29 255.255.255.248
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnhhh
11111111.11111111.11111111. 11111000
32 6
/30 255.255.255.252
nnnnnnnn.nnnnnnnn.nnnnnnnn.nnnnnnhh
11111111.11111111.11111111. 11111100
64 2
- 34. 34
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Подсеть, удовлетворяющая требованиям
Example: effective subnetting of an IPv4 network
• In this example, the telecom operator's
headquarters allocated the private network
address 172.16.0.0/22 (10 bits in the node part)
for the branch.
• There are five sites, and therefore five internet
connections, which means that the organization
requires 10 subnets with the largest subnet
requiring 40 addresses.
• He allocated 10 subnets with subnet mask /26
(i.e. 255.255.255.192).
- 35. 35
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
9.8 VLSM
- 36. 36
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Saving IPv4 addresses
Given the topology, 7 subnets are required (i.e. four local area networks and three WAN
channels), and the largest number of nodes is in Building D with 28 nodes.
The /27 mask provides 8 subnets across 30 node IP addresses and therefore supports
this topology.
- 37. 37
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Saving IPv4 addresses
However, point-to-point WAN communication requires only two
addresses and therefore loses 28 addresses each for a total of
84 unused addresses.
• The use of a traditional subnet partitioning scheme in such a scenario is not effective
and implies an inappropriate expenditure of resources.
• VLSM was designed to avoid address loss by allowing us to divide subnets into
subnets.
- 38. 38
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
VLSM
• The left side displays the traditional subnet scheme (i.e.
the same subnet mask), and the right side shows how
VLSM can be used to subnetwork one of the subnets.
• When using VLSM, always start by meeting the
requirements for the node of the largest subnet and
continue creating subnets until the requirements for the
node of the smallest subnet are met.
• The resulting topology using VLSM.
- 39. 39
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Assigning VLSM topology addresses
• Using VLSM subnets, network addressing for local networks and communication
channels between routers can be created without unnecessary losses, as shown in
the logical topology diagram.
- 40. 40
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
9.9. Structured design
- 41. 41
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Network addressing planning
IP network planning is critical to developing a scalable solution for an enterprise network.
• To develop an addressing scheme for an IPv4 network, you need to know how many
subnets are needed, how many nodes are required for a particular subnet, which
devices are part of the subnet, which networks use private addresses, which use
public addresses, and many other determining factors.
When planning subnets, it is necessary to take into account the requirements of the
organization for the use of the network and the intended structure of subnets.
• Perform a network requirements study by examining the entire network to determine
how each area will be segmented.
• Determine the number of available node addresses and the number of subnets
needed.
• Define DHCP address pools and VLAN pools.
- 42. 42
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
Структурированное проектирование
Назначение адресов устройств
There are various types of devices on the network that need addresses, including the
following:
• End users — most of them use DHCP to reduce the number of errors and the burden
on the network support staff. IPv6 clients can obtain address information using
DHCPv6 or SLAAC.
• Servers and peripherals - They must have a predictable static IP address.
• Servers accessible from the Internet — Servers must have a public IPv4 address,
which is most often accessed using NAT.
• Intermediate devices - Addresses are assigned to such devices for network
management, monitoring and security.
• Gateway - Routers and firewall devices are the gateway for nodes in this network.
When designing an IP addressing scheme, it is usually recommended to use a ready-
made template for assigning addresses to each type of device.
- 43. 43
© Cisco и/или Партнеры, 2016 г. Все права защищены.
Конфиденциальная информация Cisco
New terms and commands
• prefix length
• logical AND
• network address
• broadcast address
• first usable address
• last usable address
• unicast, broadcast, and multicast transmissions
• private addresses
• public addresses
• Network Address Translation (NAT)
• loopback addresses
• Automatic Private IP Addressing (APIPA)
addresses
• classful addressing (Class A, B, C, D, and E)
Internet Assigned Numbers Authority (IANA)
Regional Internet Registries (RIRs)
AfriNIC, APNIC, ARIN, LACNIC, and RIPE NCC
broadcast domains
subnets
octet boundary
variable-length subnet mask (VLSM)