PDA

View Full Version : Accessing Windows shares on DHCP-based computers.


The Warlock
2005-07-23, 12:58 PM CDT
Okay, I'm trying to mount a shared folder that's on the Windows machine in my basement. The catch is that the machine doesn't have a static IP. Whenever I try "sudo mount -t cifs //WYRM/Downloads /mnt/dragon"
I end up getting:
"mount error: could not find target server. TCP name WYRM/Downloads not found No ip address specified and hostname not found"

If I specify the IP, it works fine, but the IP is changing all the time, because the machine is on DHCP. What do I do? How do I mount a shared drive that's on a computer with dynamic IP?

kg4cbk
2005-07-23, 01:11 PM CDT
Probably the easiest thing to do is set that machine up with a static IP address. Is there a particular reason it has to use DHCP?

I am not sure that the mount command will expand the name using anything other than DNS or /etc/hosts. I have an entry in my laptop's fstab file that uses a name but that name is defined in the /etc/hosts file. I don't know if mount will use netbios or a wins server to do the name to address translation.

If it is capable of using netbios you will need to make sure you have the proper ports opened on your system and you may need to have samba configured to use a wins server. 137, 138 UDP and 139 and 445 TCP ports will need to be opened.

jombeewoof
2005-07-23, 02:21 PM CDT
if dhcp is required you could extend the dhcp lease to 999 days

The Warlock
2005-07-24, 05:59 AM CDT
Probably the easiest thing to do is set that machine up with a static IP address. Is there a particular reason it has to use DHCP?

I am not sure that the mount command will expand the name using anything other than DNS or /etc/hosts. I have an entry in my laptop's fstab file that uses a name but that name is defined in the /etc/hosts file. I don't know if mount will use netbios or a wins server to do the name to address translation.

If it is capable of using netbios you will need to make sure you have the proper ports opened on your system and you may need to have samba configured to use a wins server. 137, 138 UDP and 139 and 445 TCP ports will need to be opened.

I don't know how to change the router to make it use a static IP. Do you? It's a Linksys router with 802.11b wireless. The computer I'm trying to link to is hooked up via hardline, although the one I'm typing on is not.

Is there any way to switch to smbfs instead of cifs or something? When I used to use Ubuntu, it would accept the computer's hostname instead of it's IP, but it was mounted smbfs instead of cifs.

Heon2574
2005-07-24, 06:16 AM CDT
Try smbfs.

mount -t smbfs - o guest "//WYRM/Downloads" /mnt/dragon

kg4cbk
2005-07-24, 09:07 AM CDT
You don't change the router you change the NIC configuration on the box downstairs. Go through the windows network configuration tool. it has the option to set the IP address, subnet mask, default gateway, and specify the DNS servers manually. Just choose an IP address that is not in the DHCP range you have configured on your router.