LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-05-2004, 07:41 PM   #1
Steerpike
LQ Newbie
 
Registered: Nov 2004
Location: Walnut Creek, CA
Posts: 29

Rep: Reputation: 15
Fully Qualified Host Name on a private network


I've struggled with this for some time and am finally giving in and asking for help!

I've installed linux (SuSE 9.2) on my laptop at home, and connected it wirelessly to my home network and broadband router, and am connected to the network and the internet with no problems (posting this from the laptop now). I've tried both dhcp and static; got both working.

Here's what I'm struggling with - I want to install an Oracle product, and the instructions say I must get a 'fully qualified host name' response when I enter the command 'hostname' - that is, I must get a response of 'hostname.domainname'.

I've set /etc/HOSTNAME to sequoia.shchris.com . 'shchris.com' is a made-up domain name, I can find no record of it 'in the real world', so there should be no clash with any real domain handed out by a DNS server.

I've assigned a static ip of 192.168.0.161 to the wlan0 card (The card I'm using).
I've set /etc/hosts to
192.168.0.161 sequoia.shchris.com sequoia

My home network is set to 192.168.0.xxx.
I can ping sequoia.shchris.com with no problem (on the machine).
I can ping 192.168.0.161
I can ping 192.168.0.99 (my gateway)
I can ping (eg) yahoo.com

I cannot ping shchris.com on the machine (unknown host).

I don't know what I can do, if anything, to set the domainname and get it working.

The reason it matters is, I'm getting a timeout while configuring the oracle product (10g AS Forms and Reports Services), and the limited info I can find suggests the machine 'must' have a fully qualified host name.

Note: I CAN type 'domainname shchris.com', after which, 'domainname' responds with 'shchris.com'. BUT - 'hostname' still responds with only 'sequoia'.

Thanks!!!!

EDIT: I just tried (simple, huh?!) typing 'hostname sequoia.shchris.com', and after that, 'hostname' does respoind with 'sequoia.shchris.com', and I CAN ping sequoia.shchris.com ... but how do I make this persistent ... why is it not 'set' by putting the fully qualified name in the '/etc/HOSTNAME' file????

Thanks!!!

Last edited by Steerpike; 12-05-2004 at 07:44 PM.
 
Old 12-06-2004, 02:15 AM   #2
Draygo
Member
 
Registered: May 2004
Location: Frisco, TX
Distribution: Debian Unstable
Posts: 73

Rep: Reputation: 15
You might see if you have an /etc/hostname file and seeing its contents. Try using that file to set your hostname.

Hope that helps.
 
Old 12-06-2004, 10:17 AM   #3
Steerpike
LQ Newbie
 
Registered: Nov 2004
Location: Walnut Creek, CA
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks. Buried in the detail above (I tried to provide a lot of detail but it may make it hard to see some 'facts'!) is the fact that ...

I set file /etc/HOSTNAME to sequoia.shchris.com

but after doing so, the 'hostname' command still only responded with 'sequoia', and a ping of sequoia.shchris.com failed.

Dynamically typing the command 'hostname sequoia.shchris.com' DID cause 'hostname' to respond with the fully qualified name, and ping worked.

So the file /etc/HOSTNAME did not seem to help with regards to the 'domain' portion.

Thanks
 
Old 12-10-2004, 07:59 PM   #4
smithtodda
Member
 
Registered: Sep 2003
Location: 43 8' N 89 20' W
Distribution: SUSE primarily, but also Slackware, Fedora, Ubuntu, and KNOPPIX.
Posts: 59

Rep: Reputation: 15
Did you figure it out yet? I'm interested in the resolution of your issue, as I will soon be crossing the exact same bridge as you with my own network here at home.

Todd
 
Old 12-13-2004, 11:18 PM   #5
Steerpike
LQ Newbie
 
Registered: Nov 2004
Location: Walnut Creek, CA
Posts: 29

Original Poster
Rep: Reputation: 15
Not really. I would like to better understand this.

For now, I simply issue the command

hostname sequoia.shchris.com

and that sets a fully qualified hostname. But I have no idea how else to do this, to make it more presistent.
 
Old 12-14-2004, 06:48 AM   #6
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
EDIT: I just tried (simple, huh?!) typing 'hostname sequoia.shchris.com', and after that, 'hostname' does respoind with 'sequoia.shchris.com', and I CAN ping sequoia.shchris.com ... but how do I make this persistent ... why is it not 'set' by putting the fully qualified name in the '/etc/HOSTNAME' file????

Each linux distro has its own network init script (which calls hostname) that is run at system bootup. Unfortunately, I have never used the SuSE distro so I can't answer your question on which file is read (or sourced) by the network init script to set the system hostname. Hopefully, someone who uses the SuSE distro will reply.

In the mean time, you can always search your systems init scripts for something like "hostname" and see which init script is actually setting your systems hostname. i.e. On redhat...
Code:
[root@excelsior rc.d]# pwd
/etc/rc.d
[root@excelsior rc.d]# grep hostname *
rc.sysinit:HOSTNAME=`/bin/hostname`
rc.sysinit:# Set the hostname.
rc.sysinit:update_boot_stage RChostname
rc.sysinit:action $"Setting hostname ${HOSTNAME}: " hostname ${HOSTNAME}
rc.sysinit:     # Reset the hostname.
rc.sysinit:     action $"Resetting hostname ${HOSTNAME}: " hostname ${HOSTNAME}
Note: The above is a little misleading due to the search string. when you actually view rc.sysinit, you see that it sources the /etc/sysconfig/network file which sets the HOSTNAME variable that is then used by the hostname command.
Code:
[root@excelsior rc.d]# grep HOSTNAME /etc/sysconfig/network
HOSTNAME=excelsior.mydomain.com

<cut/paste from rc.sysinit>
    # Reread in network configuration data.
    if [ -f /etc/sysconfig/network ]; then
        . /etc/sysconfig/network
 
        # Reset the hostname.
        action $"Resetting hostname ${HOSTNAME}: " hostname ${HOSTNAME}
    fi
My point being, I'd be willing to bet that the SuSE distro does something very similar in its init scripts to set the systems hostname.

I cannot ping shchris.com on the machine (unknown host).

Setting your systems domainname does NOT equal being able to ping the domain name. See: man resolv.conf and man hostname. Since you are using a laptop without a DNS server that is authoritative for shchris.com, then I would suggest that you edit /etc/hosts and add the domain name as an alias. i.e.
Code:
192.168.0.161 sequoia.shchris.com shchris.com sequoia
Good Luck!
 
  


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
Fully qualified hostname gubak Linux - Newbie 8 07-23-2004 11:56 PM
Fully Qualified Domain Name tumana Linux - Networking 4 06-10-2004 02:58 AM
Apache fully qualified somain name? tharris Linux - Networking 2 09-02-2003 10:09 AM
Fully Qualified Domain Names? MasterC Linux - Networking 7 05-19-2003 01:38 PM
need fully qualified hostname before log-in - how? BrianK Linux - Networking 7 03-12-2002 06:21 PM


All times are GMT -5. The time now is 06:14 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