a] ip command - show / manipulate routing, devices, policy routing and tunnels
- sudo ip route add default via x.x.x.x
b] route command - show / manipulate the IP routing table
- sudo route add default gw x.x.x.x
c] Save routing information to a configuration file so that after reboot you get same default gateway.
- # vi /etc/network/interfaces
- Find eth0 or desired network interface and add following option
- gateway x.x.x.x
- Save and close the file. Restart networking:
- # /etc/init.d/networking restart
0 comments:
Post a Comment