LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-15-2004, 09:08 PM   #1
Jose Muņiz
Member
 
Registered: Jul 2003
Location: Mexico City
Distribution: Slackware 9.1, SuSE 9.1
Posts: 248

Rep: Reputation: 32
Knowing your IP


I am in a LAN but I would like to know the IP with which all my LAN connects to the internet. That is not something I can get with the /sbin/ifconfig command. I'd also like to know my hostname so that I can add it to the known host list in mysql in order to access it.

Thank you.
 
Old 06-15-2004, 10:16 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
www.whatismyip.com
 
Old 06-15-2004, 10:19 PM   #3
carmstrong
LQ Newbie
 
Registered: May 2004
Location: Pittsburgh, PA, USA
Distribution: Fedora Core 1
Posts: 19

Rep: Reputation: 0
Hostname should be cat /etc/hostname

(At least for Debian, only distro I've used)
 
Old 06-15-2004, 10:20 PM   #4
Jose Muņiz
Member
 
Registered: Jul 2003
Location: Mexico City
Distribution: Slackware 9.1, SuSE 9.1
Posts: 248

Original Poster
Rep: Reputation: 32
Well um... I was looking for something more... like a Linux command or something.
 
Old 06-15-2004, 10:30 PM   #5
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
There is no command to show your external IP, since it is actually the external IP of the router not your machine.

Unless your comment was directed to carmstrong, in which case, the command to show the hostname is simply "hostname".
 
Old 06-16-2004, 05:00 AM   #6
winshade
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Rep: Reputation: 0
hostname

type hostname

to get your hostname

chances are you are behind a NAT router / firewall your ip address could be masqd so you could find the gateway ip address is your internet ip.

take a look at the network article on www.tldp.org.

hope this helps

shady
 
Old 06-16-2004, 06:04 AM   #7
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
The number everyone uses to get to the internet is called the GATEWAY..

Type route -n to get it, (if you are set up properly)... it's the default number..
 
Old 06-16-2004, 07:15 AM   #8
sporadic235
Member
 
Registered: May 2004
Location: Osaka
Distribution: FreeBSD 5.2, Mandrake 9.2
Posts: 39

Rep: Reputation: 15
you can use the command:

arp -a

with this, you will also see which ip address binds to what mac address
 
Old 06-16-2004, 09:55 AM   #9
superztnt
LQ Newbie
 
Registered: Jun 2004
Location: Iowa
Distribution: Suse 9.0, Fedora Core 2
Posts: 18

Rep: Reputation: 0
If you log into your router it will give you the address that the outside world is seeing. I have a Netgear router and the
heading that I look under is router status. I shows my network ip and the ip that my isp gives me.
 
Old 06-18-2004, 08:05 PM   #10
jackyopensrc
LQ Newbie
 
Registered: Jul 2003
Location: Kuala Lumpur,Malaysia.
Distribution: Red Hat 7.3
Posts: 16

Rep: Reputation: 0
Knowing your IP

ifconfig -a - This is to show your ethernet card information.

ip addr (RedHat ) - This is to display the IP Address from your host.
 
Old 06-19-2004, 11:21 AM   #11
dclark
LQ Newbie
 
Registered: Mar 2004
Location: Blacklick, OH
Distribution: Suse 10
Posts: 22

Rep: Reputation: 15
as root, type ifstatus and the device ex. ifstatus wlan0 for first wireless or ifstatus eth0 for first ethernet device. Should list all needed info for you
 
Old 06-26-2004, 02:01 PM   #12
handlemybiz
LQ Newbie
 
Registered: Jan 2003
Posts: 1

Rep: Reputation: 0
traceroute

If you already have an IP address on the network, try a traceroute to an outside ip or website. The routed ips to the final destination should show you the outside ip
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Knowing what's installed on my machine.. brynjarh Linux - Newbie 4 05-25-2004 05:34 PM
knowing the disk space vidyaraj Linux - Software 5 03-08-2004 07:33 AM
Knowing my php version mchanea Programming 1 03-01-2004 03:06 PM
Knowing when a computer has been disconected krozinsky Linux - Networking 2 01-11-2004 02:36 PM
Knowing what runs behind hhegab Linux - Distributions 2 09-28-2003 09:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration