In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Purpose: PC9 and PC10 are interconnected.
Analysis: it can be seen from the figure that there are two routers connected between pc9 and pc10. In order to achieve the purpose of the experiment, the core problem is to configure the IP address of the two ports of router R1, and then configure the static route. The specific commands are as follows:
1 manually configure IP addresses 192.168.1.1 and 192.168.1.2 for pc9 and pc10, and manually configure gateway 192.168.1.254, respectively
And 192.168.2.254.
2 configure the router
(1) configure R1
Router > enable / / enter privileged mode
Router#configure terminal / / enter privileged mode
Router (config) # hostname R1 / / modify the router name
R1 (config) # interface gig0/0 / / enter interface gig0/0
R1 (config-if) # no shut / / enable interface gig0/0
R1 (config-if) # ip address192.168.1.254 255.255.255.0 / / configure this interface gateway
R1 (config-if) # exit
Enter gig0/1 in configuration mode and configure the gateway to 192.168.20.1 according to the above command
Configure a static IP address:
R1 (config) # ip route 192.168.2.0 255.255.255.0 gig0/1
Analysis: add a static route to the network segment 192.168.2.0 on the port gig0/1 of router R1
Another command to configure a static IP address:
R1 (config) # ip route 192.168.2.0 255.255.255.0 192.168.20.2
Parse; access the network segment 192.168.2.0 / 24 through the R2 port with the IP address 192.168.20.2
The two commands have the same effect.
Successfully configured verification command: R1 verify show ip route / / View the routing table
At this point, R1 has been configured, and R2 has been configured with the same command. Configuration is complete, enter the command ping 192.168.2.1 in pc9, and you can communicate with ping. The purpose of the experiment is achieved.
Summary: 1 Gateway corresponds to a port, not a device
2 the device where the gateway is located must have the function of a router
3 Gateways are needed only when different network segments communicate
4 when configuring static routes with R1 (config) # ip route 192.168.2.0 255.255.255.0 192.168.20.2, the IP address of the peer device is used.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.