LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to set Gateway by command line (https://www.linuxquestions.org/questions/linux-networking-3/how-to-set-gateway-by-command-line-206237/)

vanhelsing 07-17-2004 10:02 AM

How to set Gateway by command line
 
I know that to IP addres and Netmask use command

"ifconfig eth0 161.246.xx.xx netmask 255.255.255.0 up "

but I don't know How to set Gateway and DNS?
pls, tell me how to set that ?

foo_bar_foo 07-17-2004 11:42 AM

add a "network to be gatewayed" by a certain device say eth1.
route add mygateway eth1
route add -net 192.168.32.0 netmask 255.255.255.0 gw mygateway


All times are GMT -5. The time now is 04:26 AM.