2

The Internet is a huge hierarchical network structure, with hundreds of millions of devices distributed in its large and small subnets. Here we show a simplified office network, including 3 subnets, the subnets are connected by routers, and some computers and office equipment are connected to the subnets using Layer 2 switches or wireless hotspots.

The Layer 2 switch in the figure is working at the data link layer. It maintains a mapping from IP address to physical address learned through ARP (Address Resolution Protocol) to determine whether to send to a certain The data packet of the target host is forwarded from which port of the switch. So as to realize the communication with the equipment in the network segment.

The router works at the network layer. Its ports are connected to another router or switch, and each port is configured with (reaching) addresses of different subnets. The OSPF (Open Shortest Path First) protocol is used between the routers to learn from each other to form a routing table, which is used to grasp the similar "Which router can be passed through, which port, to the designated subnet, how far away "And other information.

Each host (network card) in the network has been manually configured or obtained an IP address from DHCP, including the host address, subnet mask, and default gateway. When the host 192.168.0.100/24 in subnet 3 wants to send a request to the web server 172.16.1.10/24 in subnet 1, the data packet will first be sent to the default gateway-here is the one where the wireless router connects to subnet 3 The address of the port is 192.168.0.1; the wireless router checks the routing table to obtain the optimal path to subnet 1, and forwards the data packet to the next router through the designated port; thus, the communication across the network segments is continued.

The purpose of this article is to briefly understand the different working methods of switching networks and routing networks, so as to consolidate the knowledge previously learned. Friends who are interested can read the related materials of Cisco CCNA certification for more information.

thematic catalog


陈哥聊测试
158 声望3.3k 粉丝

资深敏捷测试顾问,国内知名项目管理软件禅道团队成员。