LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ifconfig (https://www.linuxquestions.org/questions/linux-newbie-8/ifconfig-150423/)

Melissa22 02-25-2004 02:15 PM

ifconfig
 
I am working on a lab. I've been trying to figure out the syntax for an ifconfig command that sets the IP address of the interface eth0 to 128.143.2.3/16 with broadcast address 128.143.255.255

I wouldn't have asked this if I hadn't spent so much time, hopefully someone will know. I'm at the end of my rope.

Melissa

homey 02-25-2004 02:34 PM

Try this....
/sbin/ifconfig -a eth0 128.143.2.3 netmask 255.255.0.0 broadcast 128.143.255.255

If you want add the gateway, use this...
/sbin/route add default gw ( put the router address here )

Melissa22 02-25-2004 10:17 PM

any other thoughts?

DrOzz 02-25-2004 10:22 PM

type :
man ifconfig

as all the info you want is in there..
i was actually just looking at it :confused:


All times are GMT -5. The time now is 07:23 PM.