HT1549: Mac Basics: File Sharing

Learn about Mac Basics: File Sharing
cnicholas

Q: Why is AFP file sharing dependent on the network hardware layer?  E.g. mac1 on wireless N can't connect to Mac2 on wireless G.

I have  a home network with Gigabit wired base, a DLINK wireless N router and a DLINK wireless G router.  All are on the same subnet.  The base cisco router "connected to a cable modem" is 172.16.0.1 with netmask 255.255.255.0 and dlinkN is 172.16.0.2 and dlinkG is 172.16.0.3.  Mac1 is a MacMini with airport only able to do wireless G.  Mac2 is a Macbook Air with, of course, wireless N.  Mac3 is a Macmini Server running Lion (the MacMini is Snow Leopard).

 

Mac2 can connect to Mac1 and Mac2 IF hardwire connected.  IF the Macbook Air (Mac2) is using wi-fi on dlinkN it cannot connect to either Mac1 or Mac3.  Just as an experiment I turned on wi-fi on Mac1 (connected to dlinkG) and then chose the dlinkG connection on the MacBook Air.  THAT WORKED!!  Unless it is a routing issue this seems to imply that the AFP (aka modern AppleTalk) protocol is dependent on the type of hardware network layer that is chosen.  I am an old retired systems programmer (MVS, VM, Z/OS, Solaris type) and it has been a long time since I fought that type of network war so I'm curious as to what is going on with this.  Thanks for any info.

Posted on Sep 9, 2012 7:16 PM

Close

Q: Why is AFP file sharing dependent on the network hardware layer?  E.g. mac1 on wireless N can't connect to Mac2 on wireless G ... more

  • All replies
  • Helpful answers

  • by Camelot,

    Camelot Camelot Sep 9, 2012 8:54 PM in response to cnicholas
    Level 8 (47,243 points)
    Mac OS X
    Sep 9, 2012 8:54 PM in response to cnicholas

    I think you have some other issue going on. There's no hardware-dependency in AFP. It operates at a completely different layer in the OSI model so it doesn't matter whether each node's connection is wired ethernet, wireless-N, wireless-G or a PPP link over a dial-up modem for that matter (well, you might have other issues using dialup, but I digress )

     

    Instead, I think the problem lies more with one or other of your wireless base stations, with the Wireless-N device being the likely culprit - since the MacBook Air can connect to the server when on either wired or wireless-G connections it implies that the wireless-N router is somehow blocking the traffic.

     

    One question - you say all devices are on the same subnet, but only list the IP addresses of the various base stations and router. Are you sure the wireless-N router is acting as a simple wireless bridge and not as a NAT device? If it's in NAT mode then it would create two logical networks, one on its wired side and one on its wireless side and may block traffic traversing the connection. That may not be the case, but it's the most likely scenario I can think of given the available data.

  • by BobHarris,

    BobHarris BobHarris Sep 10, 2012 6:37 AM in response to cnicholas
    Level 6 (19,282 points)
    Mac OS X
    Sep 10, 2012 6:37 AM in response to cnicholas

    You appear to have 3 active routers in your home.  You should really ONLY have 1 active router (Cisco), and the other 2 D-Link WiFi base stations should have routing turned off.  Frequently this is done by disabling DHCP on the router, however each router has its own way of disabling routing, so your mileage may vary (try Google for help)

     

    Bonjour protocols will NOT cross a router boundary, and you have 3 of them, so depending on which router a giving Mac is connect to, it may or may not see other Macs and devices on your LAN if they are talking to a different router.

     

    Also just giving each router the same subnet only means you have 3 isolated subnets all using duplicate IP addresses.

     

    Unless you disable routing in your D-Link devices, you will have connection issues.

  • by cnicholas,

    cnicholas cnicholas Sep 10, 2012 9:37 AM in response to BobHarris
    Level 1 (0 points)
    Sep 10, 2012 9:37 AM in response to BobHarris

    Thanks Bob.  I should have mentioned the dlinkG is set to be an access point via a selection switch on the device.  It is a DIR-1522 (cheap).  I am still confused that when accessing dlinkG via the Macbook Air that I cannot see or connect to the Macmini unless I turn on the airport card on the Macmini.  Do I need to have the  dlinkG AP set to "passthru" or something similar to allow the MacAir to connect to the Macmini?

     

    I have not (yet) found out how to "force" the dlinkN (a DIR-655) into AP mode.  If bonjour can't cross router boundaries how would one access another Mac over the internet?  I am, incidently, impressed that Mac OS X can handle multiple IP stacks though (aka ethernet and wi-fi).

  • by cnicholas,

    cnicholas cnicholas Sep 10, 2012 10:30 AM in response to cnicholas
    Level 1 (0 points)
    Sep 10, 2012 10:30 AM in response to cnicholas

    Problem solved!  Thanks to all for the hints about the dlinkN (DIR-655) router.  It tuns out dlink removed (actually just hid) a feature of this router that allows AP mode.  I found a work-around on the dlink forums that allowed it to function as an AP.  That solved the problem. 

  • by BobHarris,

    BobHarris BobHarris Sep 10, 2012 10:50 AM in response to cnicholas
    Level 6 (19,282 points)
    Mac OS X
    Sep 10, 2012 10:50 AM in response to cnicholas

    I should have mentioned the dlinkG is set to be an access point via a selection switch on the device.

    I'm assuming that means the D-Link G is no longer a router, but as I do not have any of this equipment, I'm depending on your input.

     

    Anyway, that would mean you have 2 active routers and Boujour will still not cross the boundary between stuff attached to the Cisco/D-Link G combo and the D-Link N router.

     

    Bonjour is a broadcast protocol and as such it is restricted to a subnet, otherwise the world would be flooded with broadcasts from millions and millions of systems.  Thus the D-Link N router will not pass any Bonjour messages between the N side of the house and the Cisco/D-Link G side of the house.

     

    You need to figure out how to turn the D-Link N router into a WiFi access point (aka a bridge between the Cisco router and your 802.11n devices).  Try Google, or the D-Link web site.

     

    If bonjour can't cross router boundaries how would one access another Mac over the internet?

    Magic?

     

    Generally using the remote Mac's internet visible IP address.  Either the remote Mac is directly on the internet (no home NAT router), or the home router has port forwarding from the router's internet side to the local LAN side, or there is a 3rd party server acting as a middle man to establish the initial exchange, along with some NAT tricks that allow a direct connection once the 3rd party server gets things started.

     

    Note: 172.16.*.* thru 172.32.*.*, 192.168.*.* and 10.*.*.* are all non-routing IP addresses, so you cannot use them for connecting to a remote Mac.

     

    I am, incidently, impressed that Mac OS X can handle multiple IP stacks

    We are a long way from system with a few megabytes of RAM, such as the IBM systems you were using early in your career, and today's personal computer with gigabytes of RAM. There is lots of room for a full IP stack.  Also keep in mind that Mac OS X is based on Unix (just like Solaris), so it has access to robust IP stacks, and BSD Unix was one of the early systems to receive a TCP/IP stack.  Unix has lots and lots of TCP/IP experience, and Mac OS X has benefited from all that history.

  • by Camelot,

    Camelot Camelot Sep 10, 2012 1:02 PM in response to cnicholas
    Level 8 (47,243 points)
    Mac OS X
    Sep 10, 2012 1:02 PM in response to cnicholas

    If bonjour can't cross router boundaries how would one access another Mac over the internet? 

     

    The short (easy) answer to that is that Bonjour is just a discovery protocol - a way for clients to find local (to the subnet) services available. That doesn't preclude you using services in other networks - in that respect, AFP just becomes like HTTP, or SMTP or any other protocol - you need to tell the client to connect to a specific IP address.

     

    In this case, in the Finder, use Go -> Connect to Server... and enter afp://<ip,of.remore.machine> in th dialog and you'll be all set (firewall filters, NAT, etc. notwithstanding, of course )

     

    OS Bonjour will let you see nearby services. Other ones you have to know the IP address (or hostname) for.