LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 04-21-2006, 03:57 PM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

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, 04:01 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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, 04:04 PM   #3
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

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, 05:24 PM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
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, 123.111.222.333) and again as acid_kewpie explained, that's handled by DNS ("domain name server")

The following article may be of interest: http://www.howstuffworks.com/dns.htm/printable
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 10:37 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
Open Source Consulting | Domain Registration