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

齐天大圣
Release: 2020-12-11 11:59:11
Original
2081 people have browsed it

IP representation

We know that the ipv4 address is composed of 32 bits. We usually divide the 32 bits into four equal parts, each part Separated by ., and each part is expressed in decimal notation that we are familiar with. The following is an IP address

8.210.247.5
Copy after login

Classification of IP address

In order to manage IP addresses more conveniently, we artificially divide IP addresses into five categories, namely A, B, C, D and E. For these five categories, we can only use categories A, B and C. The other two categories have special functions. In addition, the IP address is divided into two parts, namely the network bit and the host bit.

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

Let’s look at the characteristics of IP addresses:

  • The IP address is a hierarchical address structure, the first part is the network bit , followed by the host bit, the network bit constitutes the network number, and the host bit constitutes the host number. There are benefits to using network bits. The router only routes and forwards packets based on the network number. This can greatly reduce the items in the routing table in the router, reduce the storage space of the routing table, and speed up the search for routes.

  • 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 hosts connected through a hub or switch have the same network number, so they still belong to the same network. Different networks are connected through routers.

Router connects multiple networks

Router is used to connect multiple networks, and then connect between different networks group forwarding. So how does the router accomplish this task? Suppose there are two networks, network A with the network number 10.0.0.0, and network B with the network number 20.0.0.0. The two networks are connected through a router

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

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 data packet to the router through 10.0.0.255 of the router, and then forward it to host B1 through IP 20.20.0.255 of another port of the router.

The above is the detailed content of The representation and classification of IP addresses and how routers connect multiple networks.md. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!