Fedora Linux Support Community & Resources Center
  #1  
Old 29th May 2005, 11:29 PM
Mario_D Offline
Registered User
 
Join Date: May 2005
Posts: 13
Setting Hostname and DHCP_hostname

Hello,

I am trying to understand networking in a mixed (windows and linux) environment. I have been able to FTP from Windows to my FC3 box, but only if I provide the IP address number. I would like to be able to FTP to the FC3 box by name. It's name is 'antec' . Currently the response I get is "unknown host"

I would appreciate pointers.

Here is what I have :

Ethernet cards on both machines
Linksys Router BEFSR41
Linux Fedora Core 3

Configuration files follow:

------/etc/sysconfig/networking/devices/ifcfg-eth0-----------
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
DHCP_HOSTNAME=antec

-----/etc/sysconfig/network-----------------------
NETWORKING=yes
HOSTNAME=localhost.localdomain

-----/etc/hosts--------------------
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain
-----------------------------------
Reply With Quote
  #2  
Old 29th May 2005, 11:41 PM
Firewing1 Offline
Registered User
 
Join Date: Dec 2004
Location: Canada
Age: 23
Posts: 9,224
Hey,
to change regular hostname, add this line to /etc/hosts:
127.0.0.1 NewHostname.localdomain NewHostname
and change the line on /etc/sysconfig/network
HOSTNAME=localhost.localdomain
to
HOSTNAME=NewHostname.localdomain
Obviously, [b]NewHostname[/b[ is your new name...
Firewing1
__________________
[+] My open source software and blog
[+] Some of my howtos: (for full list, click here)
Reply With Quote
  #3  
Old 30th May 2005, 12:01 AM
fsck Offline
Registered User
 
Join Date: May 2005
Location: London, UK
Posts: 704
First, do what firewing said. The linux machine doesn't appear to have it's hostname set. You should probably fix that.
Second, if you are using dhcp then there is no guarantee that you will keep the same address for very long, consider using static IP.
Third, you need address resolution. This is either provided by DNS/WINS, in which case contact your network administrator, or by you.
If you only have the two machines, you need to tell the windows machine what address you mean when you use the name "antec", You need to add the following line:
Code:
x.x.x.x  antec
(change "x.x.x.x" to the IP address of the machine "antec")
to the file
Code:
C:\WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS
for windows XP, or
Code:
C:\WINNT\SYSTEM32\DRIVERS\ETC\HOSTS
for Windows 2000.

This tells Windows that when you say "antec" you mean address "x.x.x.x".

C.
Reply With Quote
  #4  
Old 30th May 2005, 01:12 AM
Brian1 Offline
Registered User
 
Join Date: Nov 2004
Location: Seymour, Indiana
Posts: 2,509
Also can be set in /etc/sysconfig/network as well.
Reply With Quote
  #5  
Old 30th May 2005, 02:33 PM
Mario_D Offline
Registered User
 
Join Date: May 2005
Posts: 13
Thanks to Firewing1 and fsck. I now have correct naming of my machine as antec.

My next step is to set my ethernet card to a static IP via the GNOME Network Configuration tool.
Reply With Quote
  #6  
Old 31st May 2005, 10:44 AM
projkt4 Offline
Registered User
 
Join Date: Apr 2004
Location: 192.168.0.0
Age: 31
Posts: 37
how would i accomplish this without changing the hosts files on my local network.
basically how would i go about making the fix described in this thread by having teh dns do its job?
that is if i am correct in assuming that the dynamic name server is supposed to link ips with hostnames.
Reply With Quote
  #7  
Old 31st May 2005, 01:38 PM
fsck Offline
Registered User
 
Join Date: May 2005
Location: London, UK
Posts: 704
DNS is the Domain Name Service, and yes it is designed to resolve names to IP addresses. There's a good guide on the LDP pages: http://www.tldp.org/LDP/nag/node34.h...CTION004600000

C.
Reply With Quote
  #8  
Old 31st May 2005, 06:35 PM
jsturtevant Offline
Registered User
 
Join Date: Apr 2005
Age: 56
Posts: 11
i have a similar situation... I have set hostname on a new FC3 box. I am using DHCP so the new system obtains it's IP from the DHCP server. How do I get FC3 to register this new host with DNS so that the other systems can find the new system via DNS.
Reply With Quote
  #9  
Old 31st May 2005, 06:51 PM
fsck Offline
Registered User
 
Join Date: May 2005
Location: London, UK
Posts: 704
Well, I'll tell you how I work here. I've got 172.16.3 which contains only static IP's, but given out using DHCP. That is, the clients are set up to request addresses using dhcp when the interfaces are started, and the dhcp server will always give the same IP address to the same interface, specified using the MAC address. I do this so I can easily change all the IP addresses of my clients by changing the dhcpd.conf on the server and waiting for leases to expire.

I've also got 172.16.4 which is a dynamic IP range for any other clients who want to connect to the network, because their hostnames/IPs I don't really care about.

Then I set up DNS to resolve the IPs in 172.16.3 to the correct hostnames, and away I went.

Of course, if you rely on an ADSL router or any other system which cannot allocate IP addresses to specific MAC addresses, then static IP is probably the way forward.

C.
Reply With Quote
  #10  
Old 31st May 2005, 07:53 PM
jsturtevant Offline
Registered User
 
Join Date: Apr 2005
Age: 56
Posts: 11
i do something similar. I have a Linksys WRT with sveasoft firmware. When I place an entry in the DHCP table to handout an IP to a specific MAC address the hostname is also placed in DNS.

I would think there would be some way for a dynamic host to place it's hostname in the DNS table after it's been allocated an IP by DHCP.

Thanks,
Jim
Reply With Quote
  #11  
Old 31st May 2005, 08:04 PM
fsck Offline
Registered User
 
Join Date: May 2005
Location: London, UK
Posts: 704
Yes, some implementations of dhcpd can alter dns zones, and there are scripts and so-forth which facilitate this on systems where dhcpd won't do it directly. Also, some routers will do dynamic dns. See http://www.mattfoster.clara.co.uk/ddns.htm for an example, or google "dynamic dns dhcp" or similar for more options.
Reply With Quote
Reply

Tags
dhcphostname, hostname, setting

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up hostname exutable Servers & Networking 13 4th January 2008 09:54 AM
FC4 hangs after setting hostname conai EOL (End Of Life) Versions 3 26th March 2006 05:53 PM
Crashes on 'setting Hostname' thesupremeg33k Using Fedora 2 24th April 2005 06:27 PM
setting hostname infiniteedge Servers & Networking 7 2nd December 2004 04:19 PM
Setting the hostname on startup PompeyBlue Servers & Networking 17 9th July 2004 04:25 PM


Current GMT-time: 03:59 (Friday, 19-12-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Creek Side - Stockholm-Arlanda Airport (ARN) Travel Photos on Instagram - Marina of Koper Travel Photos - Te Whiti Park Instagram Photos - Texas State Fair Photos on Instagram