LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell 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: 716

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,374

Rep: Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962Reputation: 1962
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: 716

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: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
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


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 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


All times are GMT -5. The time now is 06:49 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration