LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Internal address? (https://www.linuxquestions.org/questions/linux-newbie-8/internal-address-521906/)

gloomz 01-22-2007 10:57 PM

Internal address?
 
Ok..

This is a pretty stupid question so humor me.

How do I find out my internal ip address?

External is whatismyip.com

but where can I find my internal ip address on Debian.

I tried ifconfig, but it just gives me my local loopback address (127.0.0.1)

What command do I need to find this out?

Thanks.

Quakeboy02 01-22-2007 11:04 PM

"I tried ifconfig"

Do it again. Your ip will be listed. Example:

Code:

me@mymachine:~$ /sbin/ifconfig
ath0      Link encap:Ethernet  HWaddr 00:0F:B5:FB:F3:33
          inet addr:192.168.0.4  Bcast:192.168.0.255  Mask:255.255.255.0


Electro 01-22-2007 11:23 PM

The internal address is actually localhost or 127.0.0.1. The IP address can be found by using ifconfig.

wahming 01-22-2007 11:41 PM

127.0.0.1 ALWAYS points to yourself. Used on any computer, 127.0.0.1 will be the address of its own network card. It's hardwired in. If by internal IP, you mean your IP on the LAN, then it's given by the line inet "addr:192.168.0.4". Hope that helps

gloomz 01-22-2007 11:42 PM

Yeah yeah I know that the internal is localhost and 127.0.0.1

But I'm trying to connect via ssh from another computer on the network, and I need the internal address to connect to it.

Because obviosly entering 127.0.0.1 will not do.

Here is what I get in ifconfig.

lo link encap: Local Loopback
inet addr:127.0.0.1 Mask: 255.0.0.0
inet 6 addr: ::1/128 Schope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1

And then the rx and tx packets but that isn't needed here.

And yes I can browse the internet using lynx, but I am having apt-get problems as well.

wahming 01-22-2007 11:44 PM

Assuming you wrote that before seeing my post, refer to above

gloomz 01-22-2007 11:52 PM

Yeah I found that post after I posted.

Yes maybe I didn't phrase that right.

I'm looking for my ip on the LAN.

And the intet addr: doesn't give that. It gives 127.0.0.1.

Quakeboy02 01-23-2007 12:13 AM

Surely there's a listing for your ethernet card in the response to ifconfig?

gloomz 01-23-2007 12:14 AM

Nope. The output I posted above was exactly word for word using the ifconfig command.

I don't know what else to do. :(

Quakeboy02 01-23-2007 12:25 AM

Can we see the output from "route" and "lspci" and "dmesg | grep eth"? Are your the administrator on that system, and are you running in some chroot sandbox where you don't have access to ethernet?

Quakeboy02 01-23-2007 12:33 AM

From your other thread, it's clear that something is borked pretty good on your system. But, it's probably a good idea to try to address all of it in one thread, since whatever it is is probably causing it all.

gloomz 01-23-2007 12:19 PM

route output:

Kernel IP routing table
Destination Gateway Genmask Flags Metric ef Use Iface

lspci output:

Host bridge: VIA technologies, Inc. VT82C598 [Apollo MVp3] (rev 04)
PCI bridge VIA technologies, Inc. VT82C598/694x [Apollo MVP3/Pro133x AGP]
ISA bridge: VIA technologies, Inc. VT82C596 ISA [Mobile South] (rev 06)
IDE interface: VIA technologies, INC. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE )rev 06)
USB Controller: VIA Technologies, INC. VT82xxxxx UHCI USB 1.1 Controller (rev 02)
Bridge: VIA Technologies, Inc. VT82C596 Power Management
Ethernet controller: Accton Technology Corporation SMC2-1211tx (rev 10)
Communication controller: PCTel Inc HSP Micromodem 56 (rev 01)
VGA compatible controller: ATI technologies Inc 3d rage IIC AGP (rev 7a)

dmesg | grep eth output:

eth0:Realtek RTL8139 at 0xea00, 00:e0:29:33:db:80, IRQ 11
eth0: Identified 8139 chip type RTL-8139A

I am the administrator of the system. I'm sitting right beside it.

I don't know what a chroot sandbox is. Care to explain?

Thanks a lot for all the help. It's a lot to go through

Cheers.

Quakeboy02 01-23-2007 02:41 PM

Well, for some reason eth0 is down and of course as a result you have no route. Have you tried rebooting the machine to see if that gets it back in order? Unless you are manually shutting down eth0 for some reason, it should work. Run "ifconfig eth0 up" and give us the output from that. Also, give us the output from "cat /etc/network/interfaces".

urka58 01-23-2007 04:07 PM

How is your network set up ? DHCP, static IP ?
As your dmesg output shows an ethernet module your card should be correctly set up. Just check the output of "lsmod" looking for a 8139too module or similar.

Configuring the NIC with a static IP
/sbin/ifconfig eth0 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0
the broadcast address is not strictly necessary as it it guessed automatically by ifconfig.

Configuring the NIC with a dynamic IP
/sbin/dhcpcd -d -t 30

I don't know what distribution you're going to set up, so may be the path of your commands could be different (/usr/sbin or /usr/local/sbin ).
I strongly suggest you set up your NIC by the tool provided by your distro the get permanent settings.

Hope this helps
Ciao

PS I did not see you're using debian

Quakeboy02 01-23-2007 04:42 PM

"How is your network set up ? DHCP, static IP ?"

That's what I'm trying to find out by asking him to post the output from "cat /etc/network/interfaces".


All times are GMT -5. The time now is 02:38 PM.