1. MAC address
- For every network card, there’s one
6
Bytes (48 bits) MAC address,The only global
, solidified in the card’s ROM, as specified by the IEEE802 standard- The first three bytes: unique identifier of the organization assigned to the vendor by the IEEE registration Authority
- The last three bytes: the network interface identifier, as determined by the vendor
- Take one of Nokia’s network cards
Unique identifier of the organization | Network interface identifier |
---|---|
40 and 55-82 | 0A-8C-6D |
- OUI query
- standards-oui.ieee.org/oui/oui.txt
- mac.bmcx.com/
1. MAC address representation
- Windows: a line between each byte (
-
Interval)- 40-55-82-0A-8C-6D
- Linux, Android, Mac, iOS: Colon () between each byte
:
Interval)- 40:55:82:0A:8C:6D
- Packet Tracer: a dot (
.
Interval)- 4055.820 a. 8 c6d
- when
48
For a whole1
Is the broadcast address - Windows computers can use commands from terminals
ipconfig /all
Check the MAC address of the network adapter - Macs can use commands from the terminal
ifconfig -a
Check the MAC address of the nic address
2. Obtain the MAC address
- If you do not know the MAC address of the host, you can obtain the MAC address by sending ARP broadcasts
- After the IP address and MAC address mapping information is obtained, the DEVICE caches ARP cache
- MAC addresses obtained through ARP broadcast belong to dynamic cache
- The storage time is short (2 minutes by default). When the MAC address of the host is expired, the host is automatically deleted. Because the MAC address of the host can be changed, the target host cannot be found if the cache is used all the time
- Relevant command
- Arp -a: Queries all ARP caches
- Arp -a [host ADDRESS]: queries the ARP cache
- Arp -d [host ADDRESS]: deletes arp cache
- Arp -s Host ADDRESS MAC address: add a cache (static cache, stored for a long time, different systems store for different time)
Second, the ARP
- ARP: An address resolution protocol that obtains MAC addresses from IP addresses
- RARP: reverse address resolution protocol
- Use the same header structure as ARP
- In contrast, ARP is used to translate MAC addresses into IP addresses
- Later, BOOTP and DHCP were replaced
Third, the ICMP
- ICMP: Internet Control message protocol
- ICMP in IPv4 is called ICMPv4, and ICMP in IPv6 is called ICMPv6
- Usually used to return error messages
- For example, the TTL expiration value is unreachable
- ICMP error messages always include the source data and are returned to the sender
4. IP address
- IP Address: Every host on the Internet has an IP address
- The original version was IPv4, 32bit(4 bytes), and on November 25, 2019, the world ran out of IP addresses
- Later came the IPv6 version, 128 bits.
Note: If the version is not specified, the default is IPv4
- With the IP address
192.168.1.10
As an example
1100, 0000, | 1010, 1000, | 0000, 0001, | 0000, 1010, |
---|---|---|---|
Part 1 | Part 2 | Part 3 | Part 4 |
1100, 0000, | 1010, 1000, | 0000, 0001, | 0000, 1010, |
192 | 168 | 1 | 10 |
1. IP address composition
- The IP address consists of two parts: network ID and host ID.
- The network ids of computers on the same network segment are the same
- By using the subnet mask, you can calculate the network ID: subnet mask & IP address
1100 0000.1010 1000.0000 0001.0000 1010 IP address: 192.168.1.10&1111 1111.1111.1111.1111 1111.0000 0000 Subnet mask: 255.255.255.0 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 0001.0000 0000 segment: 192.168.1.0 1100 0000.1010 1000.0000 0001 corresponding to subnet mask 1111 1111.1111.1111 1111 is 0000 1010 corresponding to subnet mask 0000 0000 That's the host IDCopy the code
- Network segment: The host ID is in addition to the network ID
0
For example192.168.1.0
- There is no way to get a network segment from an IP address, such as an IP address
130.168.1.10
We can’t see the network segment of this IP address - You can calculate the network segment where the IP address resides only by using a subnet mask, for example, a subnet mask
255.255.0.0
, you can calculate the IP address130.168.1.10
Network segment is130.168.0.0
Where, the network ID130.168
, the host ID0.0
- Host ids in IP addresses are assigned to different computers on the same network segment
- For example, network segment
130.168.0.0
In theory, it can be allocated to130.168.0.0
~130.168.255.255
, a total of256 * 256 = 65536
computer - However,
130.168.0.0
Represents a network segment that cannot be assigned to a computer 130.168.255.255
Represents broadcast address, that is, broadcast to all connected computers in the same network segment- So the number of computers is zero
256 * 256-2 = 65534
computer
- For example, network segment
- Four computers are placed on Packet Tracer, and their subnet masks are uniformly as
255.255.255.0
The IP addresses are annotated by notes, so they are all on the same network segment192.168.1.0
on
- through
Ping 192.168.1.255
, can send broadcast to all computers, both:The host ID
The maximum size of the255
Is used to send broadcast to all computers in the same network segment, cannot be assigned to a hostThe host ID
-
Therefore, a minimum of 0 and a maximum of 255 host ids have special functions and cannot be assigned to hosts as host ids
-
For example, network segment 130.168.0.0
- The minimum host bit value
130.168.0.0
Used as a network segment, - Maximum host bit
130.168.255.255
As a broadcast address - So the range of assignable computer IP addresses is
130.168.0.1
~130.168.255.254
The number is256 * 256-2 = 65534
- The minimum host bit value
-
Before communicating with other computers, the computer checks whether the target host and itself are on the same network segment
- Same network segment: Does not need to be forwarded by a router
- Different network segments are forwarded to routers for forwarding
2. IP address classification
- Class A Address: The default subnet mask is 255.0.0.0
8bit | 24bit |
---|---|
Network ID0 At the beginning |
ID the host |
- Class B address: Default subnet mask 255.255.0.0
16bit | 16bit |
---|---|
Network ID10 At the beginning |
ID the host |
- Class C address: The default subnet mask is 255.255.255.0
24bit | 8bit |
---|---|
Network ID110 At the beginning |
ID the host |
- Class D address: with
1110
Beginning, multicast address - Class E address: with
1111
The beginning is reserved for future use - Only class A/B/C addresses can be assigned to hosts
(1) Class A address
- Because the first part of the network ID has to be
0
, so the value range is0000 0000 ~ 0111 1111
- Network ID
0
Can’t use,127
As a reserved field, where127.0.0.1
Is the local loopback address, which is the host address- The first part that can be assigned to a host ranges from
1~126
- The host ID
- The values of parts 2, 3, and 4 range from 0 to 255
- Among them
0.0.0
and255.255.255
The network segment and broadcast address cannot be assigned - Therefore, the maximum number of hosts supported by each Class A network is 256 * 256 * 256-2 = 2^ 24-2 = 16777214
(2) Class B address
- Because the first two digits of the network ID have to be
10
, so the value range is1000 0000 0000 0000 ~ 1011 1111 1111 1111
- Network ID
- The first part that can be assigned to a host ranges from
128 ~ 191
The value range of the second part is0 ~ 255
- The first part that can be assigned to a host ranges from
- The host ID
- The value range for parts 3 and 4 is
0 ~ 255
- The maximum number of hosts supported by a Class B network is 256 x 256-2 = 2^ 16-2 = 65534
- The value range for parts 3 and 4 is
(3) Class C address
- Because the first three digits of the network ID have to be
110
, so the value range is1100 0000 0000 0000 0000 0000 ~ 1101 1111 1111 1111 1111 1111 1111
- Network ID
- That can be assigned to the host
- The range of values in Part 1 is
192 ~ 223
- The value range for parts 2 and 3 is
0 ~ 255
- The host ID
- The range of values in Part 4 is
0 ~ 255
- The maximum number of hosts that a class C address can hold is 256-2 = 254
- The range of values in Part 4 is
(4) Class D address
- No subnet mask, used for multicast (multicast) addresses
- Part 1 The value range is
224 ~ 239
- Part 1 The value range is
(5) Class E address
- Reserved for future use
- The first part is the range
240 ~ 255
- The first part is the range
3. Subnet mask
1. CIDR representation method of subnet mask
- CIDR: classless interzone route
- CIDR representation of a subnet mask
192.168.1.100/24
On behalf ofSubnet mask
There are24个1
, that is,255.255.255.0
123.210.100.200/16
On behalf ofSubnet mask
There are16个1
, that is,255.255.0.0
- In order to
/
willThe IP address
andSubnet mask
Partition, for example:192.168.1.100/24
In theThe IP address
is192.168.1.100
.Subnet mask
is24个1
, that is:1111 1111 1111 1111 1111 1111 0000 0000
, equivalent to the255.255.255.0
123.210.100.200/16
In theThe IP address
is123.210.100.200
.Subnet mask
is16个1
, that is:1111 1111 1111 0000 0000 0000
, equivalent to the255.255.0.0
2. Why should subnets be divided?
- If 200 hosts need to reside on the same network segment, you can allocate a Class C network segment, for example
192.168.1.0/24
- A total of 254 available IP addresses:
192.168.1.1 ~ 192.168.1.254
- With 54 more idle IP addresses, this situation is not a waste of resources
- A total of 254 available IP addresses:
- If you need 500 hosts on the same network segment, assign a Class B network segment, for example
191.100.0.0/16
- 65,534 available IP addresses:
191.100.0.1 ~ 191.100.255.254
- There are 65034 more idle IP addresses, which is a huge waste of resources
- 65,534 available IP addresses:
- How to minimize IP address waste?
- Divide subnets properly.
3. Subnets
-
Subnet division: Use the host bit as the subnet bit to create multiple subnets
-
Divide the available
- Equal-length subnet division: Divide a network segment into multiple subnets. The number of available IP addresses on each network is the same
- Variable length subnet division: The number of available IP addresses for each word network can vary
-
Subnet delimit separator: www.ab126.com/web/3552.ht…
-
Procedure for dividing subnets
- Determine the length of the subnet mask
- Determine the IP address available to the first and last host in the subnet
4. Equal-length subnets – Divide them into 2 subnets
- There is a class C address with a network ID
192.168.0
, the subnet mask is255.255.255.0
That is, the network segment is192.168.0.0/24
, a total of configurable254
host - Now the network segment is divided into two words. You only need to move the subnet mask one bit to the right, that is:
255.255.255.128/25
- A network segment:
- The host ID range is yes
192.168.0.1 ~ 192.168.0.126
- Network segment:
192.168.0.0
- Broadcast Address:
192.168.0.127
- The host ID range is yes
1100 0000.1010 1000.0000 0000.0000 0000 & 1111 1111.1111 1111.1111 1111.1000 0000 Subnet mask: 255.255.255.128/25 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - 1100 0000.1010 1000.0000 0000.0000 0000 segment: 192.168.0.0/25Copy the code
- B segment
- Host ID Range only
192.168.0.129 ~ 192.168.0.254
- Network segment:
192.168.0.128
- Broadcast Address:
192.168.0.255
- Host ID Range only
1100 0000.1010 1000.0000 0000.1000 0000&1111 1111.1111 1111.1111 1111.1000 0000 Subnet mask: 255.255.255.128/25 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - 1100 0000.1010 1000.0000 0000.1000 0000 segment: 192.168.0.128/25Copy the code
5, isometric subnets – isometric subnets are divided into 4 subnets
- Network segment
192.168.0.0/24
Is divided into four subnets. You only need to move the subnet mask two places to the right
Subnet mask: 1111 1111.1111.1111.1111.0000 0000 255.255.255.0/24 1111 1111.111111.1111.1100 0000 255.255.255.192/26Copy the code
- A network segment:
192.168.0.0/26
1100 0000.1010 1000.0000 0000.0000 0000 & 1111 1111.1111 1111.1111 1111.1100 0000 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 0000.0000 0000Copy the code
- B segment:
192.168.0.64/26
1100 0000.1010 1000.0000 0000.0100 0000&1111 1111.1111 1111.1111 1111.1100 0000 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 0000.0100 0000Copy the code
- C segment:
192.168.0.128/26
1100 0000.1010 1000.0000 0000.1000 0000&1111 1111.1111 1111.1111 1111.1100 0000 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 0000.1000 0000Copy the code
- D segment:
192.168.0.192/26
1100 0000.1010 1000.0000 0000.1100 0000&1111 1111.1111 1111.1111 1111.1100 0000 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 0000.1100 0000Copy the code
6. Divide variable length subnets
- If the length of a subnet address block is the same as that of the original network segment
(1/2)^n
, then- Add n 1s to the subnet mask of the original network segment
- Subnets are not equally long, and their subnet masks are different
- Suppose the figure above is correct
192.168.0.0/24
Create a variable-length subnet- C Network segment: The subnet mask is yes
255.255.255.128/25
. That is:1111 1111.1111 1111.1111 1111.1000 0000
- B Network segment: The subnet mask is yes
255.255.255.192/26
. That is:1111 1111.1111 1111.1111 1111.1100 0000
- A Network segment: The subnet mask is yes
255.255.255.192/27
. That is:1111 1111.1111 1111.1111 1111.1110 0000
- D Network segment: The subnet mask is yes
255.255.255.192/30
. That is:1111 1111.1111 1111.1111 1111.1111 1100
- E Network segment: The subnet mask is yes
255.255.255.192/30
. That is:1111 1111.1111 1111.1111 1111.1111 1100
- C Network segment: The subnet mask is yes
7. Think about questions
- Can the following two devices communicate normally?
- First equipment
- IP address:
192.168.0.10
- Subnet mask:
255.255.255.0
- Network segment:
192.168.0.0
- IP address:
- Second device
- IP address:
192.168.10.10
- Subnet mask:
255.255.0.0
- Network segment:
192.168.0.0
- IP address:
- You can find that the two devices are on the same network segment and can send messages in theory
- And in fact,
Computer 0
Is unable toComputer 1
message-sending - And that’s because,
Computer 0
I don’t knowComputer 1
theSubnet mask
, just know thatComputer 1
theThe IP address
, so it’s calculatingComputer 1
theNetwork segment
Is usedComputer 0
In and of itselfSubnet mask
Computer 0
theSubnet mask
:255.255.255.0
Computer 1
theThe IP address
:192.168.10.10
- After calculation,
Computer 1
Network segment when:192.168.10.0
- So,
Computer 0
Can’t giveComputer 1
Send a message
Fourth, super net
- Hypernet: As opposed to a subnet, it combines multiple contiguous network segments into a larger network segment
- Requirements: Originally 200 computers used 192.168.. 0.0/24 network segment, now we want to add 200 devices to the same network segment
- 200 are in network segment 192.168.0.0/24 and 200 are in network segment 192.168.1.0/24
- Merge 192.168.0.0/24 and 192.168.1.0/24 into one network segment: 192.168.0.0/23
192.168.0.0/24 1100 0000.1010 1000.0000 0000.0000 0000 & 1111 1111.1111 1111.1111 1111.0000 0000 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - 1100 0000.1010 1000.0000 0000.0000 0000Copy the code
192.168.1.0/24 1100 0000.1010 1000.0000 0001.0000 0000&1111 1111.1111 1111.1111 1111.0000 0000 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - 1100 0000.1010 1000.0000 0001.0000 0000Copy the code
192.168.0.0/23 1100 0000.1010 1000.0000 0000.0000 0000 & 1111 1111.1111 1111.1111 1110.0000 0000 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - 1100 0000.1010 1000.0000 0000.0000 0000Copy the code
1, thinking,
- Can the IP address 192.168.0.255/23 be assigned to a computer?
192.168.0.255/23 1100 000 | 1111 IP address: 0.1111 1000.0000 0000.1010 192.168.0.255 & 1111 111 | 0000 subnet mask 0.0000 1111.1111 1111.1111: 255.255.254.0 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | -- -- -- -- -- -- -- -- -- -- - 1100 0000.1010 1000.0000 000 | 0000 segment: 0.0000 192.168.0.0/23Copy the code
- 192.168.0.255/23 is not a network segment
192.168.0.0/23
Is not a broadcast address - Therefore, the IP address 192.168.0.255/23 can be assigned to computers
192.168.0.0/23
The maximum IP address of is192.168.0.1/23
, that is:1100 0000.1010 1000.0000 0001.1111 1111
2. Merge the four network segments
- Move the subnet mask two bits to the left to merge four network segments
- Merge 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24, and 192.168.3.0/24 into network segment 192.168.0.0/22
3, think
- The following two network segments can be moved to the left by the subnet mask
1
Do bits merge?
192.168.1.0/24
The subnet mask is moved one bit to the left. The network segment is192.168.0.0/23
192.168.0.0/23 1100 0000.1010 1000.0000 0001.0000 0000 192.168.1.0/24 & 1111 1111.1111 1110.0000 0000 255.255.254.0 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - 1100 0000.1010 1000.0000 0000.0000 0000 192.168.0.0/23Copy the code
192.168.2.0/24
The subnet mask is moved one bit to the left. The network segment is192.168.2.0/23
192.168.2.0/23 1100 0000.1010 1000.0000 0010.0000 0000 192.168.1.0/24 & 1111 1111.1111 1111.1111 1110.0000 0000 255.255.254.0 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - 1100 0000.1010 1000.0000 0010.0000 0000 192.168.2.0/23Copy the code
- If I move one to the left,
192.168.0.0/23
and192.168.2.0/23
Therefore, they cannot be merged into the same network segment
4. The law of merging network segments
(1) The number of network segments that can be merged when the subnet mask is moved to the left
- Merge two network segments, move the subnet mask 1 bit to the left, merge four network segments, move the subnet mask 2 bits to the left, merge eight network segments, move the subnet mask 3 bits to the left
- Namely: suppose
n
Is the number of network segments,n
is2
thek
Power (k>=1
), the subnet mask moves to the leftk
Bit can mergen
A network segment
(2) The network segment that can be merged
- Assuming that
n
is2
thek
Power (k>=1
), the following network segments are available
1100 0000.1010 1000.0000 0000.0000 0000 192.168.0.0/24 1100 0000.1010 1000.0000 0001.0000 0000 192.168.1.0/24 1100 0000.1010 1000.0000 0010.0000 0000 192.168.2.0/24 1100 0000.1010 1000.0000 0011.0000 0000 192.168.3.0/24 1100 0000.1010 1000.0000 0100.0000 0000 192.168.4.0/24 1100 0000.1010 1000.0000 0101.0000 0000 192.168.5.0/24 1100 0000.1010 1000.0000 0110.0000 0000 192.168.6.0/24 1100 0000.1010 1000.0000 0111.0000 0000 192.168.7.0/24 1100 0000.1010 1000.0000 1000.0000 0000 192.168.8.0/24 1100 0000.1010 1000.0000 1001.0000 0000 192.168.9.0/24 1100 0000.1010 1000.0000 1010.0000 0000 192.168.10.0/24 1100 0000.1010 1000.0000 1011.0000 0000 192.168.11.0/24 1100 0000.1010 1000.0000 1100.0000 0000 192.168.12.0/24 1100 0000.1010 1000.0000 1101.0000 192.168.13.0/24 1100 0000.1010 1000.0000 1110.0000 0000 192.168.14.0/24 1100 0000.1010 1000.0000 1111.0000 0000 192.168.15.0/24...Copy the code
- If the network number of the first network segment can be
n
Divisible, so it starts off continuousn
Two network segments, can pass the left shiftk
Bit subnet mask to merge
- Assuming that
n=2
When,k=1
1100 0000.1010 1000.0000 0000.0000 0000 192.168.0.0/24 First network segment 1100 0000.1010 1000.0000 0001.0000 0000 192.168.1.0/24 The second segment -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 0010.0000 0000 192.168.2.0/24 First network segment 1100 0000.1010 1000.0000 0011.0000 0000 192.168.3.0/24 Second network segment -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 0100.0000 0000 192.168.4.0/24 first segment 1100 0000.1010 1000.0000 0101.0000 0000 192.168.5.0/24 second segment -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 0110.0000 0000 192.168.6.0/24 First network segment 1100 0000.1010 1000.0000 0111.0000 0000 192.168.7.0/24 The second segment -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 1000.0000 0000 192.168.8.0/24 First network segment 1100 0000.1010 1000.0000 1001.0000 0000 192.168.9.0/24 Second network segment -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 1010.0000 0000 192.168.10.0/24 first segment 1100 0000.1010 1000.0000 1011.0000 0000 192.168.11.0/24 Second network segment -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 1100.0000 0000 192.168.12.0/24 first segment 1100 0000.1010 1000.0000 1101.0000 0000 192.168.13.0/24 Second network segment -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 1110.0000 0000 192.168.14.0/24 first segment 1100 0000.1010 1000.0000 1111.0000 0000 192.168.15.0/24 second network segment...Copy the code
- Cut the way above, each
2
Network segments are divided into1
Groups, each groupFirst network segment
The network number can be2
Evenly divided, each network segment moves to the left1
Bits can be merged into a new network segment
- Assuming that
n=4
When,k=2
1100 0000.1010 1000.0000 0000.0000 0000 192.168.0.0/24 First network segment 1100 0000.1010 1000.0000 0001.0000 0000 192.168.1.0/24 Second network segment 1100 0000.1010 1000.0000 0010.0000 0000 192.168.2.0/24 Third network segment 1100 0000.1010 1000.0000 0011.0000 0000 192.168.3.0/24 fourth segment -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 0100.0000 0000 192.168.4.0/24 First network segment 1100 0000.1010 1000.0000 0101.0000 0000 192.168.5.0/24 Second network segment 1100 0000.1010 1000.0000 0110.0000 0000 192.168.6.0/24 Network segment 3 1100 0000.1010 1000.0000 0111.0000 0000 192.168.7.0/24 Network segment 4 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 1000.0000 0000 192.168.8.0/24 first segment 1100 0000.1010 1000.0000 1001.0000 0000 192.168.9.0/24 Second network segment 1100 0000.1010 1000.0000 1010.0000 0000 192.168.10.0/24 Third network segment 1100 0000.1010 1000.0000 1011.0000 0000 192.168.11.0/24 Fourth network segment -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 1100.0000 0000 192.168.12.0/24 first segment 1100 0000.1010 1000.0000 1101.0000 0000 192.168.13.0/24 Second network segment 1100 0000.1010 1000.0000 1110.0000 0000 192.168.14.0/24 Network segment 3 1100 0000.1010 1000.0000 1111.0000 0000 192.168.15.0/24 Network segment 4...Copy the code
- Cut the way above, each
4
Network segments are divided into1
Groups, each groupFirst network segment
The network number can be4
Evenly divided, each network segment moves to the left2
Bits can be merged into a new network segment
- Assuming that
n=8
When,k=3
1100 0000.1010 1000.0000 0000.0000 0000 192.168.0.0/24 First network segment 1100 0000.1010 1000.0000 0001.0000 0000 192.168.1.0/24 Second network segment 1100 0000.1010 1000.0000 0010.0000 0000 192.168.2.0/24 Third network segment 1100 0000.1010 1000.0000 0011.0000 0000 192.168.3.0/24 Fourth network segment 1100 0000.1010 1000.0000 0100.0000 0000 192.168.4.0/24 Fifth network segment 1100 0000.1010 1000.0000 0101.0000 0000 192.168.5.0/24 6th network segment 1100 0000.1010 1000.0000 0110.0000 0000 192.168.6.0/24 7th network segment 1100 0000.1010 1000.0000 0111.0000 0000 eighth segment 192.168.7.0/24 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1100 0000.1010 1000.0000 1000.0000 0000 192.168.8.0/24 First network segment 1100 0000.1010 1000.0000 1001.0000 0000 192.168.9.0/24 second network segment 1100 0000.1010 1000.0000 1010.0000 0000 192.168.10.0/24 Third network segment 1100 0000.1010 1000.0000 1011.0000 0000 192.168.11.0/24 fourth network segment 1100 0000.1010 1000.0000 1100.0000 0000 192.168.12.0/24 Network segment 5 1100 0000.1010 1000.0000 1101.0000 0000 192.168.13.0/24 Network segment 6 1100 0000.1010 1000.0000 1110.0000 0000 192.168.14.0/24 Seventh network segment 1100 0000.1010 1000.0000 1111.0000 0000 192.168.15.0/24 The eighth network segment...Copy the code
- Cut the way above, each
8
Network segments are divided into1
Groups, each groupFirst network segment
The network number can be8
Evenly divided, each network segment moves to the left3
Bits can be merged into a new network segment
- Such as:
- The first network segment is binary
0
At the end, so it starts to be continuous2
Two network segments can be moved to the left1
Bit subnet mask to merge - The first network segment is binary
00
At the end, so it starts to be continuous4
Two network segments can be moved to the left2
Bit subnet mask to merge - The first network segment is binary
000
At the end, so it starts to be continuous8
Two network segments can be moved to the left3
Bit subnet mask to merge - .
- The first network segment is binary
5, judge a play alone is the subnet began to ultra net
- First of all,
- Look at the type of network segment: Class A network, class B network, class C network?
- By default, the bits of A class A subnet mask are 8, the bits of A Class B subnet mask are 16, and the bits of A class C subnet mask are 24
- then
- If the subnet mask has more bits than the default subnet mask, it is a subnet
- If the number of bits in the subnet mask is smaller than the default subnet mask, the network is hypernet
- Such as
- 25.100.0.0/16 is A Class A subnet
- 200.100.0.0/16 is a class C hypernet