Which command will enable forwarding properly?

Your server has two fully functional NICs with correct IP configuration. The server is not forwarding traffic between the NICs. Which command will enable forwarding properly?

Your server has two fully functional NICs with correct IP configuration. The server is not forwarding traffic between the NICs. Which command will enable forwarding properly?

A.
setparam 1 > /proc/sys/net/ipv4/ip_autoconfig

B.
echo 1 > /proc/sys/net/ipv4/ip_forward

C.
cat $1 > /proc/sys/net/ethernet

D.
set $=1 /proc/sys/net/ipv4/route

Explanation/Reference:
See http://www.ibm.com/developerworks/linux/library/l-proc.html
# cat /proc/sys/net/ipv4/ip_forward
0
# echo "1" > /proc/sys/net/ipv4/ip_forward

Remember that this solution is working only until reboot, use sysctl to set ip_forwarding permanently.



Leave a Reply 0

Your email address will not be published. Required fields are marked *