1. [root @ localhost ~] # Echo '1' & gt;/proc/sys/net/ipv4/ip_forward [root @ localhost ~] # More/proc/sys/net/ipv4/ip_forward1 Note: Start linux route settings and view the current value 2. [root @ localhost ~] # Vi/etc/sysctl. conf Note:
1. [root @ localhost ~] # Echo '1'>/proc/sys/net/ipv4/ip_forward
[Root @ localhost ~] # More/proc/sys/net/ipv4/ip_forward
1
Note: Start linux route settings and view the current setting values.
2. [root @ localhost ~] # Vi/etc/sysctl. conf
Note: To save route settings! After starting VI, enter a to enter edit mode and change the following value from 0 to 1.
Net. ipv4.ip _ forward = 1
Note: Run esc to return to the command mode. Input: wq to save and exit.
3. route-n
Note: view the route table
4. ifconfig-
Ifconfig eth0 down
Ifconfig eth0 10.0.2.15 newmask limit 255.0 up
Note: view the IP address and set the IP address value.