In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Many novices are not very clear about how to configure soft routing in linux. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
Lab name: soft routing under Linux host
Lab description: this lab does not require the installation of task software packages. Linux comes with it!
Lab topology: the ip address plan is shown in the figure:
Experimental environment: it doesn't matter whether the test machine is windows or Linux, just make sure that the machine that acts as the routing function is Linux!
The purpose of the experiment is to enable this machine of ip 192.168.1.121 and ip 10.0.0.100 to communicate with each other in Linux environment.
The steps of the experiment:
Based on the simplicity of this lab, it takes only one command for the Linux host to support the routing function, that is
Echo 1 > / proc/sys/net/ipv4/ip_forward, that is, import the number 1 into the ip_forward file of / proc/sys/net/ipv4/ip_forward.
Or # echo "1" > / proc/sys/net/ipv4/ip_forward
View:
So we can test it directly.
The network card configuration parameters of each machine will not be mentioned here!
Let's take a look at the test results directly!
This is the case with ip 192.168.1.121 ping ip 10.0.0.100; let's take a look at the reverse:
The above is a very simple example: if there is only one Linux host acting as the router, if there are multiple Linux hosts acting as the router, then we must turn on the routing function of the Linux host. In addition, a static default route must be configured to realize the communication between multiple network segments.
The following is the implemented command:
Echo 1 > / proc/sys/net/ipv4/ip_forward
Add static default rout
Route add-net segment subnet mask next hop > / etc/rc.d/rc.local
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.