Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
SUSE / openSUSE This Forum is for the discussion of Suse Linux.


  Search this Thread
Old 04-21-2006, 04:57 PM   #1
Registered: Nov 2003
Posts: 791

Rep: Reputation: 39
Two Separate Hostnames and IP Addresses on two NIC cards

Hi there --

I am running SuSE 9.3 on a system that has two NIC's. The eth0 NIC is on one subnet, 132.183.220.x, and eth1 is on a completely separate subnet which in its case is 192.168.0.x. There is no IP-fowarding enabled.

What I am trying to accomplish is to have a hostname associated with the address that eth0 has on its subnet and a completely different hostname for the address that eth1 is using on its subnet. How can I accomplish this? Thanks.
Old 04-21-2006, 05:01 PM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
a hostname has nothing to do with networks, it does not make sense to do what you ask. the hostname is what you get when you run the "hostname" command, which is network irrelevant. if you want to associate ip's with names, then that's DNS configuration, not hostnames
Old 04-21-2006, 05:04 PM   #3
Registered: Nov 2003
Posts: 791

Original Poster
Rep: Reputation: 39
Hi there --

To accomplish what I outlined in my e-mail, would I need to set up a DNS server on the system in question, and from there have the hostname for the 192.168.0.x network set up?
Old 04-21-2006, 06:24 PM   #4
LQ Veteran
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
As acid_kewpie already explained, there is no connection between a hostname and an IP address. The hostname is just the name that is given to the computer when Linux is installed, for example, the default hostname in Slackware is "darkstar".

I suspect that what you're really attempting to do is associate a URL (aka "website name" or "domain" such as www.[your_website].com) with an IP addrress (eg, and again as acid_kewpie explained, that's handled by DNS ("domain name server")

The following article may be of interest:


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
RH Hosting on two separate NIC cards mikerock Red Hat 2 05-09-2005 09:57 PM
Two screens on separate graphic-cards. Possible on linux? Ac1db0rN Linux - Software 2 03-13-2005 10:16 AM
cannot browse websites with thier hostnames but can with ip addresses shams Linux - Networking 1 10-20-2004 06:40 AM
certain addresses through certain network cards heathpitts Linux - Networking 1 02-26-2004 07:10 PM
iptables - allowing hostnames from ip addresses chrisfirestar Linux - Security 13 01-20-2004 10:42 PM > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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

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