Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-16-2001, 12:36 AM
|
#1
|
Member
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473
Rep:
|
Name resolution on a DHCP network!!!?
My two linux boxes are behind an internet gateway/router on a DHCP network. They work just fine. Both happily ping each other. But due to DHCP, I am not able to atttach a name to each machine. Is there a way for me to ping other machine based solely on machine name and not IP address? I dont want to use static IP.
(ON a windows based network, wins resolution would take care of mapping name to IP. My both machines, however, run linux.)
Last edited by concoran; 12-16-2001 at 12:37 AM.
|
|
|
12-16-2001, 11:33 AM
|
#2
|
Member
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182
Rep:
|
I'm no expert but I have a similar situation using 1 linux box and 2 win98 clients. Samba and Windows WINS handle the nameserver issue but I still have problems logging into samba. The way I fixed it is to put the clients in the /etc/hosts file.
DHCP seems to assign an IP to a hardware address and maintains that IP unlees you change the network card. So in your case, I think you can add the IP's of your 2 machines to the /etc/hosts file (both machines) because even though they are assigned by DHCP dynamically, they are essentially static once assigned
|
|
|
12-16-2001, 12:57 PM
|
#3
|
Member
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473
Original Poster
Rep:
|
Well, since you are using W98, name resolutions is not difficult since 98 screams all the time about it's ip address. But not so in linux.
DHCP doesn't bind hardware to an ip address. Infact, I get a different IP everytime. It is based on what IP number is free when you log onto network. In my case, whichever machies start first ( i have only two on the network), gets 192.168.0.2. The second one gets 3. This is precisely the reason why I can't map a name to an IP in /etc/hosts.
|
|
|
12-16-2001, 01:04 PM
|
#4
|
LQ Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163
Rep:
|
this is fixed by assigning the mac address to an ip address in dhcpd.conf
host TECH1 {
hardware ethernet 00::xx:d4:a0:r5:17;
fixed-address 192.168.0.5;
}
and the /etc/hosts file is the answer for name resolution
by having dhcp assign the fixed ip the name will also be assigned the ip in etc/hosts
/var/lib/dhcp/dhcpd.leases will contain the host names and mac addresses of all computers that have been assigned an ip by the dhcpd daemon.
Last edited by DavidPhillips; 12-16-2001 at 01:08 PM.
|
|
|
12-16-2001, 04:59 PM
|
#5
|
Member
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 473
Original Poster
Rep:
|
Thanks David,
I was wondering if Linux has a NetBEUI equivalent.
|
|
|
03-19-2002, 11:40 AM
|
#6
|
Member
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 814
Rep:
|
This is a total piece of cake, but it took me having to read the excellent "Using Samba" O'Reilly book to find out how to do it.
Make one of your Linux machines that is always up on your network a WINS server. This is very simple to do:
Add to your [global] section of the smb.conf file
wins support = yes
Then to any other Linux machines on your network, in their smb.conf files (again in the [global] section):
wins server = xxx.xxx.xxx.xxx
name resolve order = wins lmhosts hosts bcast
where xxx.xxx.xxx.xxx is the IP address of the machine you've made the WINS server in the first step.
You can change the name resolve order order (sic) to whatever you like. You might want to look up the static IP addresses first I suppose, in which case put lmhosts first.
On any Wind*ws clients, go to Notwork Neighbourhood and make the WINS server on there point to IP address xxx.xxx.xxx.xxx
Stop and start your samba daemons, reboot your Windoze clients and hey presto, you can ping to the netbios names to your heart's content.
It really is that easy, but it took me bloody ages to work out!
Cheers,
Rob
|
|
|
All times are GMT -5. The time now is 05:24 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|