LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   IP_address question (https://www.linuxquestions.org/questions/linux-newbie-8/ip_address-question-56183/)

cirkut5732 04-21-2003 09:28 PM

IP_address question
 
hi everyone
what is the command that tells me my ip address?? i know windows XP uses "ipconfig" in the run command line but i dont know what it is in slackware 9.0, im sure you ALL can answer this one!!!!!!

Texicle 04-21-2003 09:30 PM

ifconfig eth0 (or whatever your NIC is). I'm pretty sure a plain ifconfig will bring it up as well.

ranger_nemo 04-21-2003 09:35 PM

One to stick in a script would be...

/sbin/ifconfig eth0 | grep "inet addr:" | cut -d" " -f12 | cut -d: -f2

It will return just the IP.

cirkut5732 04-21-2003 10:18 PM

so i take it "inet address" means internet address and mask is my subnet...right??? so is my ip address supposed to be different from what WinXP tells me it is?? its only off by a few numbers but still??

doublefailure 04-22-2003 04:02 AM

if u use dhcp
which assigns ip when your computer boots up..
ip will change from time to time.

cirkut5732 04-22-2003 03:09 PM

i use dhcp, but with windows it stays the same even after log off
and reboot. i tried configuring network with static cause i know
i have a subnet and a gateway but that wouldnt work, but ok, id like it to be the same, how would i do that

gdrobson 04-22-2003 03:27 PM

Quote:

Originally posted by cirkut5732
i use dhcp, but with windows it stays the same even after log off
and reboot. i tried configuring network with static cause i know
i have a subnet and a gateway but that wouldnt work, but ok, id like it to be the same, how would i do that

Talk to your ISP.

I had the same scenario with my ISP, when I boot up Windows 2000 I get one IP address (x.x.x.132), and for Redhat my IP is something different (x.x.x.240). To get around it I bought a cheap 4-port linksys router, which is something I wanted, so it all worked out in the end.

fwiw.

cirkut5732 04-22-2003 08:17 PM

Thanks I'll look into one of those!!


All times are GMT -5. The time now is 12:28 PM.