The routing table for the system is display with the ip route show command.
Routing must be enabled with a tunable kernel parameter, named net.ipv4.ip_forward
- 0 = discard foreign packet
- 1 = forward foreign packets to the network interface determined by the routing table
Edit /etc/sysctl.conf for permanent change and run sysctl -p to reload it
To add a route dynamically
# ip route add IP/netmask via router_IP
To persistent add a route, edit /etc/sysconfig/network-scripts/route-iface
ADDRESS0=network
NETMASK0=netmask
GATEWAY0=router_ip
No comments:
Post a Comment