Mac OS X,  Mac OS X Server,  Mac Security

Mac OS X 10.5: Advanced Networking Options

I originally posted this at http://www.318.com/TechJournal

Slight change from how things were done in Tiger/Tiger Server, but all the old options are there if you look. The first change is that now there is a wizard that you can use to configure your network interface. Since this is on more advanced topics we’ll skip that but it’s worth noting.

Another shift is that a network interface is now referred to as a Service. So when you go to add a interface you will associate it with a Service Name. If you remove a Service using the – icon in the list you can always readd it by clicking on the + in the services list, selecting the interface and assigning it a Service Name. If you check ifconfig you will find that if you remove a service and readd it then it will come back up with the BSD name that it originally had. For example, remove the Firewire Service, Apply your changes, readd the Firewire Service and in ifconfig it will still show as fw0 in the list. If you add a second service for fw0 and assign it unique IP stack information then it too will show as a second IP address under the same BSD interface as can be seen below:
inet 192.168.210.110 netmask 0xffffff00 broadcast 192.168.210.255
inet 10.0.0.9 netmask 0xffff0000 broadcast 10.0.255.255

In order to setup a second IP address for one NIC using the GUI for Leopard:
Open System Preferences and go to the Network Preference Pane.
Click on the interface you would like to run a second IP address on.
Click on the cog wheel at the bottom of the list.
Click on Duplicate Service.
Type the name for your new Interface and click OK.
Click on the New Interface and click the Advanced button.
Click on TCP/IP and enter the appropriate IP information.
If needed, enter information for DNS, WINS and Proxies under their respective tabs.
Click on OK.
Click on Apply.

Now, rather than use one NIC you might want to use two NICs as one, or use Link Aggregation. Assuming the switch supports it and you have that side of things configured, here’s where you configure Link Aggregation:
Open System Preferences and go to the Network Preference Pane.
Click on the cog wheel at the bottom of the list.
Click on Manage Virtual Interfaces…
Click on the + icon.
Click on New Link Aggregate.
Enter the name for the new Link Aggregate “bond”.
Check the boxes for the interfaces that support Link Aggregation in the list.
Open Terminal and run ifconfig.
Find bond in the list and verify that the correct MAC addresses for your aggregated NICs are in the list of MAC addresses for bond0 (or whatever BSD name was given to your bond when it was created).

To reorder services, click on a service and use the cog wheel to select the Set Service Order… option. From here you will be able to drag services up or down the list. The first service in the Service Order is still the default service that traffic will reply to. Therefore, if you want to actually use the additional services to respond to traffic you will still need to use the route command as has been used in *nix for a long time.