Connecting subnets using static routing

xiaoxiao2021-03-06  41

Open Linux host kernel package forwarding function

# echo 1> / proc / sys / net / ipv4 / ip_forward

Configure network interface

# ifconfig ethx xxx.xxx.xxx.xxx UP

Add route

# Route add -net xxx.xxx.xxx.0 / xx ethx

Note: To turn on the kernel package forwarding function every time you start, you need to write the startup script.

# echo "echo 1> /Proc/sys/net/ipv4/ip_forward">> - Rc.d/rc.local

转载请注明原文地址:https://www.9cbs.com/read-54426.html

New Post(0)