LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Default Gateway using ifconfig (https://www.linuxquestions.org/questions/linux-networking-3/default-gateway-using-ifconfig-206965/)

nafsnipe685 07-19-2004 11:28 AM

Default Gateway using ifconfig
 
im trying to figure out how to set up the default gateway with ifconfig with a command similar to
ifconfig eth0 inet 192.168.1.1
wich is to setup the ip address, any clues?

nafsnipe685 07-19-2004 11:31 AM

oh and by the way im using slackware 9, wich really doesnt matter since ifconfig is the same on all linux systems.

netmask 07-19-2004 11:32 AM

ifconfig is used to set an ip address to your interface:

ifconfig eth0 192.168.0.1 netmask 255.255.255.0 for example.

To set a default gateway, you need to use the route command:

route add default gw 192.168.0.1 for example.

nafsnipe685 07-19-2004 11:39 AM

thanks!! Works


All times are GMT -5. The time now is 07:45 AM.