The representation and classification of IP addresses and how routers connect to multiple networks.md

IP representation
we know ipv4 address is composed of 32-bit, 32-bit we usually divided into quarters, with between every. Apart, and each is represented by a decimal familiar, as is a ip address

. 1

8.210.247.5

classified IP address

for easier management IP address, we will artificially divided IP addresses five, respectively, a, B, C, D and E classes. For these five categories, we can only use categories A, B and C. The other two categories have special effects. In addition, the IP address is divided into two, divided into network bits and host bits.



Let's look at the characteristics of IP addresses:

IP address is a hierarchical address structure, the front part is the network bit, the back is the host bit, the network bit constitutes the network number, and the host bit constitutes the host number. The use of network bits is beneficial. The router only routes and forwards packets according to the network number. This can greatly reduce the routing table items in the router, reduce the storage space of the routing table, and speed up the route search speed.

When a host has two or more IP addresses, then such a host is called a multi-homing host. Obviously, the router is a multi-homed host because the router has at least two IP addresses.

A network is a collection of hosts with the same network number, so the hosts connected by a hub or switch have the same network number, so they still belong to the same network. Different networks are connected through routers.

Routers

are used to connect multiple networks. Routers are used to connect multiple networks and then forward packets between different networks. So how does the router accomplish this task? Suppose there are two networks, A network, the network number is 10.0.0.0, and B network, the network number is 20.0.0.0, these two networks are connected by a router



When A network host A1 (10.0.0.1) wants to communicate with B network host B1 (20.0.0.1), because they are in different networks, they must be forwarded by the router. First, host A will send the sent data packet to the router through 10.0.0.255 of the router, and then forward it to host B1 through the IP 20.20.0.255 of another port of the router.

Guess you like

Origin blog.csdn.net/an17822307871/article/details/113915437