Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Toggle AppleTalk between Ethernet and Airport UNIX
Being a mobile PowerBook user, I always find myself needing to switch AppleTalk back and forth between Airport and Ethernet, depending on where my printer is, and what kind of network I'm on. I put the following simple bash script together to toggle between AppleTalk and Ethernet (assuming en0 and en1 interface names, respectively), making the switch a one-click process, and saving me lots of trips to System Prefs.

Just copy and paste this script into a text file, name the file with the .command file suffix, chmod to 755, then drop it on your dock, and click on it to toggle AppleTalk.
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[8,818 views]  

Toggle AppleTalk between Ethernet and Airport | 10 comments | Create New Account
Click here to return to the 'Toggle AppleTalk between Ethernet and Airport' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Toggle AppleTalk between Ethernet and Airport
Authored by: ptwithy on Oct 08, '04 12:21:06PM

Can't you just create two 'Locations' in the Network preference pane (by duplicating your normal one) and then editing one to enable AppleTalk on the other interface? Then you can just use the Apple/Locations menu to switch back and forth.

Perhaps this doesn't work if you already are using Locations for other network settings. I find that the default Automatic location works for me 99% of the time.



[ Reply to This | # ]
Toggle AppleTalk between Ethernet and Airport
Authored by: davewalcott on Oct 08, '04 01:15:58PM

Duplicating locations is actually what I used to do. In my case, since I move around a lot between different networks, I have lots of locations configured (some of which change), and it seemed unnecessary to have two of each just for AppleTalk, which is why I wrote the script.



[ Reply to This | # ]
Toggle AppleTalk between Ethernet and Airport
Authored by: kirkmc on Oct 08, '04 02:02:42PM

I'll chime in and suggest using the built-in locations function to do what you want. Why re-invent the wheel?

---
Read my blog: Kirkville -- http://www.mcelhearn.com
Musings, Opinion and Miscellanea, on Macs, iPods and more



[ Reply to This | # ]
Toggle AppleTalk between Ethernet and Airport
Authored by: davewalcott on Oct 08, '04 04:48:14PM
Well, perhaps the scripts' value is subtle (or not at all if you just have one network location configured in system prefs), but, as I said, if you have lots of locations, it's a bit easier and simpler to not have to duplicate a location whenever you create or change one, just so AppleTalk works.

[ Reply to This | # ]
Or just use the airport icon...
Authored by: jriskin on Oct 08, '04 05:15:14PM

If you have it setup to use the airport by default in the network control panel (i believe it uses the top connection first), you should be able to just click on the airport icon and 'disable airport'.

Don't even need to open a control panel or run a script. Its there all the time. To get back to the Airport network you re-enable it.

OS X is pretty smart about switching connections, you can even disable one in the middle of a Finder copy and it will just suddenly go faster or slower depending on the connection.



[ Reply to This | # ]
Or just use the airport icon...
Authored by: jscarry on Oct 08, '04 08:56:55PM

I use your method for file transfer to my server, the Appletalk connection is much slower. But I've always had trouble switching the Appletalk connection when I want to print. Is there any way to have Location Manager automatically turn Appletalk off on the Airport and on on the Ethernet?



[ Reply to This | # ]
Toggle AppleTalk between Ethernet and Airport
Authored by: dave_williams on Oct 09, '04 05:24:26AM

Have a look at Location X at http://homepage.mac.com/locationmanager/. Allows you to set up multiple locations, covering network type and settings including proxies, plus energy settings, default printers, Mail and Entourage, sound level, plus options to run scripts. Accessible at all times from the menu bar. Can't beat it if you move around a lot.

Dave



[ Reply to This | # ]
Toggle AppleTalk between Ethernet and Airport
Authored by: gshenaut on Oct 09, '04 11:24:54AM

Well, maybe this is a dumb question, but what does it mean to "toggle appletalk between ethernet and airport"? I thought that appletalk was a protocol that worked over tcp/ip (or at least over ethernet). I move around a bit in my home network (two wireless gateways plus wired ethernet), and if I set any of them as the current default network, appletalk seems "just to work".

Think of this as a teachable moment: what am I not getting here?

Thanks,

Greg Shenaut



[ Reply to This | # ]
Toggle AppleTalk between Ethernet and Airport
Authored by: snarke on Oct 09, '04 08:28:25PM

The history of AppleTalk has made it rather confusing, especially since it's often misused. AppleTalk is a Level 4 network protocol. Other Level 4 protocols include Novell Netware, Banyan Vines, TCP/IP (well, thats actually TCP, and IP, a Level 3 protocol), and NetBEUI. Two gizmos can communicate over a network in any of these ways. That network could be ethernet, WiFi, Bluetooth, TokenRing, or modems. A NetBEUI computer will just ignore AppleTalk on its Ethernet connector, and vice versa.

When AppleTalk runs on the old fashioned Apple network, with the round connectors, Apple called it LocalTalk. The same protocol on Ethernet was called EtherTalk. (One name to combine the wiring and the scheme for communicating across it.) OSX does not use AppleTalk except to be backward compatible; it now does AppleTalk-like things with TCP/IP.

For example, I have had a printer plugged into my Ethernet port and printed to it with AppleTalk while going online through my Airport card. TCP/IP was assigned to the Airport, but AppleTalk was going out my Ethernet port. It can be a bit confusing if I'm file sharing that way, because my server Mac can (and has) show up three times on the list. Once for the modern OSX TCP/IP Rendezvous way of sharing files, once (by using the Chooser from OS9/Classic) through its AppleTalk sharing, and once via the Samba (SMB) where both my Mac and the server were speaking the Windows networking language.

Hopefully that helped a little.



[ Reply to This | # ]
Toggle AppleTalk between Ethernet and Airport
Authored by: gshenaut on Oct 12, '04 12:23:56AM

Thanks. I think I see the distinctions you are making. Maybe my confusion is due to my tcp/ip-centric view of the world, along with my only ever use of the Mac being under OS/X.

Greg Shenaut



[ Reply to This | # ]