Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
12-02-2005, 08:54 AM
|
#1
|
LQ Newbie
Registered: Dec 2003
Distribution: Ubuntu 5.10 Breezy Badger
Posts: 3
Rep:
|
two NIC's with different hostnames, but hostname() returns only one hostname
Hi there,
Here is the situation, I have a server with two NIC's with two hostnames on them
hostname IP NIC
dgrid2 | 141.12.12.141 | eth0
dgrid2-2 | 141.12.12.142 | eth1
the problem is that when I for example ssh into dgrid2-2 and then initiate
$hostname
i get
dgrid2-2
BUT when i ssh into dgrid2 (without any problems) and
$hostname
i get the same
dgrid2-2
I am not sure what other info/files you need in order to get the whole picture but I will provide them by request.
Any info or suggestion will be appreciated thanks in advance
Last edited by a_ayarov; 12-02-2005 at 08:58 AM.
|
|
|
12-03-2005, 06:48 PM
|
#2
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
Your system has only one REAL host name. Your NICs can have different VIRTUAL names for the host.
The "hostname" command always returns the REAL hostname so doesn't care how you got to the host (eth0, eth1, ppp0, console, dumb terminal, teleportation  etc...)
|
|
|
12-11-2005, 06:54 PM
|
#3
|
LQ Newbie
Registered: Dec 2003
Distribution: Ubuntu 5.10 Breezy Badger
Posts: 3
Original Poster
Rep:
|
Thanks a bunch,
btw sorry for the late reply 
|
|
|
All times are GMT -5. The time now is 08:11 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|