Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've installed a new copy of Ubuntu Server 10.10. To test that I executed a "ping hostname" at command line.I see that the ip address is set to the loopback(lo) inet addr:127.0.0.1. "ifconfig" returns the etho details which look good to me.
I've read somewhere that it sets to the loopback inet addr initially.Also,it doesn't allow me to ping/ssh from external machines to test it.
How,do I set the machine to use the address in etho0.
I can "ping" other hosts. Also,when I ping from other hosts to the new machine,it says
PING hostname(ip addr) 56(84 bytes of data) and stucks there.ip addr which showed up when I ping from other hosts is different from the inet address(under eth0) I get when I run "ifconfig".I guess that should be the problem.How do I configure this from command line?I don't GUI on the new machine for now
"ping hostname" looks for different ipaddr and ifconfig(for eth0) returns different ipaddr. I guess this should the problem that worrying me.
Is there anyway I can set eth0 such that it looks for same addr.I tried "ifconfig etho 129.***.**.*** up" and restarting the network.And I noticed that the inet addr was reset to previous value for eth0
I executed a "ping hostname" at command line...is set to the loopback(lo) inet addr:127.0.0.1. "ifconfig" returns the etho details which look good to me.
I guess this should the problem that worrying me.
Don't let it worry you
The "127.0.0.1" address is expected, it's normal ... and it's a Good Thing.
PING hostname(ip addr) 56(84 bytes of data) and stucks there.ip addr which showed up when I ping from other hosts is different from the inet address(under eth0) I get when I run "ifconfig".I guess that should be the problem.How do I configure this from command line?I don't GUI on the new machine for now
Andrew
I think that could be the problem; the machine from which you're pinging has translated the hostname to a different IP. Try to ping the IP address, not hostname, and see if it still stucks.
If it does, check the output from ifconfig eth0 command, the good thing that you're looking for is lying around the fourth line, it must be saying
Code:
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
If it's not UP and RUNNING, then your interface is offline, you need to bring it online (i.e. restarting network service).
One thing, what you have configured through the command prompt will be lost once you restart the service, nor it will survive in the event of reboot. To be persistent, you need to put it in your configuration file (e.g. /etc/network/interfaces).
Is there any intermediate device between your pinging machine and the troubled one?
I don't think the OP has a problem per se. I believe he's just under the mistaken impression if "ping hostname" returns 127.0.0.1, that's somehow a Bad Thing.
"ifconfig " returns expected output in the eth0(fourth line)...
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Sorry about that...Let me make my problem clear if thats confusing you guys...
I've recently installed Ubuntu Server 10.10 on the machine and
1. from new server machine: "ifconfig" returns an output with eth0 inetaddr:129.***.**.*** and ping hostname(new machine hostname) works well.
2. from other hosts: "ping hostname"(new machine hostname) looks for different ip address other than it returned in eth0 addr which I believe is the problem.
3. "ping ipaddr"(of the new machine's eth0 inet addr) from other hosts works again
So,is there any way I can configure the machine so every host look for same ip address thats returned in eth0 inet addr. I guess ping from other hosts are looking for wrong ipaddr.
I guess the hostname is pointing to different ip address which I need to set it to correct address.May be something to do with DCHP??not sure. Any idea on how to do this?
Is 129.x.x.x
a public IP given to you by your ISP?
Are you pinging from inside the local network(LAN)
or from outside the network?
If ping <hostname> times out, it means it can't resolve the IP
Do you have a DNS setup to resolve 129.x.x.x to your hostname?
But the ipaddr2 is different from the eth0 inet address.Shouldn't both the address be same??
Depends how the network is setup
Do you have a router, a modem?
How is the setup from the router, how is the setup from the network?
Does eth0 receives an ip from the router, or directly from the provider?
Is eth0 also your external IP, or is it setup via DHCP from the router?
To find the external IP from your network, got to http://www.whatismyip.com
The DNS should resolve to the external ip from the router/modem
Do you have a fixed IP?
It is connected via switch...But I'm pretty sure that they should have the same ip because it's how the other server that's connected to the same switch is behaving(which is infact working fine).It has the same eth0's inet addr and in nslookup.
However,the new server has different addresses.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.