Skip

Why doesn't this Just Work?
July 28, 2010 11:54 PM   Subscribe

Snow Leopard DHCP Fun. I want to hook my NAS drive directly to the ethernet port on my Mac. I also want it to have a static IP. How do these things work out?

I bought a WD MyBookWorld 1TB (with the white light bar) a while back when I wanted to have network storage for my laptops. For that purpose, I plugged it into a standard home router, and assigned it a static IP of 192.168.1.10 so that I could use that address for the path for things like iTunes libraries and the sort.

Now, I purchased a fixed-place computer, which I have attached to my TV. So, I don't really need access from my laptops, and I'd rather not buy a Firewire enclosure if I don't have to. When I connected the drive to the computer, the drive share popped up in the list of Shared items, but connections failed. I tried logging into the admin settings web client by using both "mybookworld.local" and "192.168.1.10", to no avail.

So, I reset the network settings on the drive, which sets it back up to pull a DHCP address from the computer. It was assigned 168.254.48.29. Since I still want a static address, I figured I'd try something in that range, so I gave it 168.254.48.30. Still nothing.

What next?
posted by hwyengr to Computers & Internet (15 answers total) 2 users marked this as a favorite
 
What subnet mask is your computer using?
posted by Chocolate Pickle at 12:23 AM on July 29, 2010


255.255.0.0
posted by hwyengr at 12:33 AM on July 29, 2010


What IP is it? What I'm wondering is if the computer and the drive are in the same subnet.
posted by Chocolate Pickle at 12:39 AM on July 29, 2010


It's self-assigned to 169.254.171.243.

When I set the static IP for the hard drive, I didn't specify a subnet. Should that be the next step? What should I set for the default gateway? If OSX pulls the ethernet port's address by DHCP, is that going to fluctuate over time?
posted by hwyengr at 12:47 AM on July 29, 2010


That did it. I didn't notice that it toggled back to 255.255.255.0 automatically when I tried to set the static IP.

Thanks for the help.
posted by hwyengr at 12:54 AM on July 29, 2010


Firstly: be aware that, unless WD have improved the 1TB markedly over the 500G version, they're dog-slow serving files off the internal HDD over ethernet. I've got one hooked up between a PVR (USB) and Airport Express, acting as an FTP server to give wireless access to files on the PVR. Oddly enough, I can get ~3Mbps to my laptop when FTP'ing to the PVR (the PVR's slow USB is the limit there) but only 1/5th~1/10th that when accessing files off the MyBook's internal drive via SMB. This may not be enough to serve HD video, if that's what you're trying to do.

Secondly: my experience of those WD NAS drives is that they're pigs when it comes to auto MDI. I could never get them to work reliably without a crossover cable when plugged into my MacBook - sometimes it'd work, sometimes it wouldn't, sometimes it'd work long enough that it'd be seen by the MacBook, then fail. This doesn't seem to be your problem (I'm assuming you can log into the drive's admin, seeing as you know the address it's been assigned), but it's worth noting.

Thirdly: those addresses (in the 168.254.x.x range) are random defaults chosen when an address can't be obtained via DHCP. IIRC, either the WD NAS or OS X (couldn't be bothered figuring out which; my bet is on the NAS) will only talk a limited set of protocols* when using this address range. Unfortunately, the non-server version of SL doesn't explicitly give you access to the DHCP server controls, but it can be rigged to work. Your options are either:
  1. Configure the NAS to a fixed address in a usual local range (e.g. 192.168.2.10), and manually configure the ethernet port on the Mac to a similar fixed address (e.g. 192.168.2.1, netmask 255.255.255.0, router/gateway 192.168.2.1), or
  2. Set the Mac's ethernet port manually as above, turn on the bootp/DHCP server by the method described here, and let the NAS grab an address by DHCP.
On preview: OK, you solved it while I was typing ;-)

(* Actually, what I think is going on is that the NAS's SMB server fails to configure its address because it times out before the DHCP client does, but the Bonjour / SMB announcer starts up after that…)
posted by Pinback at 1:00 AM on July 29, 2010


169.254/16 is reserved for Link-Local Autoconfiguration (Zeroconf). This mean that your Mac didn't actually answer a DHCP request from the NAS, probably because your Mac isn't even running a DHCP daemon. When DHCP fails, a zeroconf device will pick a randomish IP in the 169.254 range, then send an IMCP echo (ping) request to see if anybody else is using it. It keeps trying until it finds an address that's available.

If you're plugging in the NAS, I'm assuming you're using wireless to actually connect to the router instead of having 2 network cards... There will be no gateway to set. By definition Link-Local addresses are non-routable. But you will need to make sure your computers ethernet interface also has a 169.254/16 address, and that you end up with a route to that network pointing out your wired interface. You might not, it's usually a failback and may not be configured since your computer has a valid connection through other meand. (i.e. you have a real IP, so it doesn't set up the Link-Local stuff.) You may be seeing the drives shares via some sort of broadcast mechanism. I'm unsure of how all of this Mac/Windows stuff works (where you can plug in a few computers, printers, NAS into a switch with no DHCP available anywhere and everything still works). But I suspect you're having problems because you have Wireless and Wired, and your Wireless is properly configured by DHCP from the router to your Wired doesn't get configured as you would expect.

You need to check your routing table for something like:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
And check for errors on the interface and you system logs. If everything else is set up right then you've got some real weirdness going on.
posted by zengargoyle at 1:16 AM on July 29, 2010


Doh! Yeah, what everybody else said.
posted by zengargoyle at 1:18 AM on July 29, 2010


Duh ... are you using an ethernet cross over cable? ... cause direct ethernet connections between devices do not have the right cables crossed (normally done by the hub).

Seriously ... which would also explain why it ain't getting an IP from your computer's DHCP server (assuming you correctly configured it)

Ethernet Crossover Cable ... try it.

J
posted by jannw at 2:18 AM on July 29, 2010


Oh ... on re-read ... you got it? odd?
posted by jannw at 2:20 AM on July 29, 2010


If you don't need access other than the fixed-place computer, use USB.
posted by CharlesV42 at 4:32 AM on July 29, 2010


jannw: Luckily all modern Macs have ethernet ports that configure the connection appropriately through Auto-MDIX, so that's why a crossover cable wasn't needed.
posted by sektah at 4:41 AM on July 29, 2010


You've worked this out already but I thought I'd post it so it's clear:

When assigning static IP addresses to devices, you must always specify the subnet mask.
Additionally, the subnet mask must be identical on all the devices you want to be able to 'see' each other on the network.

The most common subnet mask is 255.255.255.0 and is often what devices default to if you don't specify it.
posted by cmetom at 5:46 AM on July 29, 2010


If you don't need access other than the fixed-place computer, use USB.

But theoretically, since both devices are 1000BaseT, wouldn't throughput be faster via the ethernet? That's why I was thinking to move it over directly to the Mac and save some overhead on moving bits through the router.

Unless things haven't improved since Pinback's machine, but I haven't noticed any hiccups in streaming HD from it.
posted by hwyengr at 9:45 AM on July 29, 2010


The CPUs on those little NAS's don't usually have a lot of power. I'd first test it to see if its any faster on 1gig ethernet than USB. Most likely it won't saturate USB2.0 let alone ethernet. I guess its possible that it'll do over 400mbps, but the consumer stuff I've seen seems to top off at 200mbps, which is well within USB2.0.
posted by damn dirty ape at 10:08 AM on July 29, 2010


« Older I am an (unlicensed) architect...   |  My secondary PC screen is blin... Newer »
This thread is closed to new comments.


Post