LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-30-2005, 04:11 AM   #1
blaroe
Member
 
Registered: Jun 2003
Location: Surrey, England
Distribution: Ubuntu Edgy
Posts: 67

Rep: Reputation: 15
Issues setting hostname with DHCP


Running Hoary...

My Ubuntu machine name is not showing up in my network and I cannot figure out why this is happening. Here's where I am so far:

I have set the hosts file and hostname file to contain the name of my machine as follows:

/etc/host
Code:
127.0.0.1 mymachine localhost localhost.localdomain

# The following lines are desirable for IPv6 capable hosts
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
and
/etc/hostname
Code:
mymachine
My default gateway and DNS server entries are properly set in the network app.

I can ping the machine via its address - i.e., ping 10.0.0.1 returns and I can access the SMB shares using the ip address - i.e. \\10.0.0.1\myshare functions flawlessly.

Any ideas from the experts?

bl
 
Old 05-30-2005, 04:27 AM   #2
saneax
Member
 
Registered: Aug 2004
Distribution: Gentoo, Suse, Fedora, Debian
Posts: 86

Rep: Reputation: 15
in you ifcfg-eth0...
put an extra line with
DHCP_HOSTNAME=mymachine
 
Old 05-30-2005, 04:46 AM   #3
blaroe
Member
 
Registered: Jun 2003
Location: Surrey, England
Distribution: Ubuntu Edgy
Posts: 67

Original Poster
Rep: Reputation: 15
cheers thanks!

I also cracked it by uncommenting 'send host name "myhostname"' in /etc/dhcp3/dhclient.conf.

Don't know for sure which is right - probably both

bl
 
  


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
dhcp hostname ahz10 Linux - Networking 1 05-06-2005 03:40 PM
Get hostname from DHCP microft Linux - Networking 2 07-18-2004 03:31 PM
Setting DHCP Hostname Tap-Out Linux - General 1 12-07-2003 05:15 PM
PB with DHCP and HostName jp515 *BSD 1 11-21-2003 04:57 AM
hostname changes with DHCP nathangg Linux - Networking 1 02-24-2003 07:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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