Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

GNS3 seventh bullet from scratch (use GNS3 to simulate router static routing function)

2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

A router is a hardware device that connects two or more networks and acts as a gateway between networks, reading the address in each packet and then deciding how to transmit it. It is usually a computer that can understand different protocols, such as the Ethernet protocol used by a local area network and the TCP/IP protocol used by the Internet. In this way, the router can analyze the destination addresses of packets from different types of networks, convert the addresses of non-TCP/IP networks into TCP/IP addresses, or vice versa, and then send each packet to the designated location according to the selected routing algorithm. So routers can connect non-TCP/ IP networks to the Internet.

The principle is that devices in the network mainly use their IP addresses to communicate with each other, and routers can only forward data according to specific IP addresses. The IP address consists of a network address and a host address. In Internet, the network address and host address are determined by the subnet mask. The subnet mask is 32-bit like the IP address, and the two correspond one to one. "1" in the subnet mask corresponds to the network address in the IP address, and "0" corresponds to the host address. The network address and the host address constitute a complete IP address. The network address of the IP address must be the same on the same network. Communication between computers can only take place between IP addresses with the same network address, and if you want to communicate with computers on other network segments, they must be forwarded through the router. IP addresses with different network addresses cannot communicate directly, even if they are very close. Multiple ports of a router can connect multiple network segments, and the network address of the IP address of each port must be the same as the network address of the connected network segment. Different ports have different network addresses and corresponding network segments, so that hosts in each network segment can send data to the router through the IP address of their own network segment.

Then there is the simulation. Let's assume that there are two PCs with different IP, PC1 (IP address 192.168.10.10) and PC2 (IP address 192.168.30.30). How can these two PCs with the same network segment be connected to each other? we need routing function.

Let's configure it according to the IP in the figure above, and let's start the experiment without saying much.

Next we are going to set up a static route and add the routing table to the network segment 192.168.30.0 that we cannot reach.

According to the diagram at the beginning, we also configure the IP and routing of Route 2, so that our routing configuration is complete, and then we need to configure the IP addresses of two PCs.

In this way, the IP addresses of our two PC are configured. PC1 (192.168.10.10), PC2 (192.168.30.30) can they be connected to each other in different network segments?

Okay, the results of our experiment are successful.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report