Click to See Complete Forum and Search --> : IFCONFIG Options....???
Nailz
03-23-2001, 11:48 PM
Try as I may, I'm having trouble reconfiguring my NIC. I know I can down it (ifdown eth0) and reset the IP address, but how do I change the default gateway via the command line?
**NOTE - I JUST installed Debian and don't have X-windows or linuxconf up and running yet.
Also, how do I change the DNS server setting... or is that just an entry in resolv.conf?
I'm looking to be able to just run a command such as:
ifconfig eth0 192.168.0.2 gateway=192.168.0.1
Gaccm
03-24-2001, 02:33 AM
DNS thing: yeah change your resolv.conf file include something like this:
nameserver 207.126.103.16
do you want your current linux box to use another box as a gateway? i think you use the 'route' command but i'm not sure, but i'm pretty sure :).
cuso4
03-24-2001, 06:54 AM
if not mistaken,
route is the command you need.
eg: route add default eth0
or
route add default gw yourgateway
hope this helps :)
Nailz
03-24-2001, 08:40 AM
BEAUTIFUL....Thanks guys.
route add default gw 192.168.0.1
it added my other linux box (my firewall/router/etc) to my routing table... I completely forgot about that. I'm usually stuck in a Windows world where IP/Netmask/Gateway is all set at the same time in the same location.
I had the resolv.conf set properly so I was on the right track with that one...
Now, how do I change my eth0 from Manual Configuration to DHCP? Can that be done through ifconfig?? If not, no big deal, now that I'm routing properly, I can apt-get linuxconf and set those settings that way.
[ 24 March 2001: Message edited by: Nailz ]