Using the same static IP address on both ethernet & airport network settings

macrumors 6502

Whenever I am working in my office with my laptop, it is connected to the Internet and to my LAN via ethernet cable. Whenever I'm working on my laptop outside of my office, it is wirelessly connected via Airport. I am trying to figure out a way in which I can automate the process of using the same static IP address on my Macbook regardless of whether I'm connected via ethernet or wirelessly via Airport.

My goal here is to find some way in which I can automatically have my Macbook switch its network configuration settings (ideally triggered whenever plugging-in (and conversely unplugging) an ethernet cable).

Long story short:

Plugging in an ethernet cable should result in Airport WiFi connection being disabled, and assigns a static IP address of 10.0.1.xx to my Macbook via it's Ethernet connection.

Unplugging the ethernet cable causes the Macbook to switch network profiles so that ethernet connection becomes disabled, and the Airport WiFi network profile then activates (and turns itself on) using the same static IP address of 10.0.1.xx address I'd previously been using with my ethernet...

Anyone have any ideas as to how I might be able to accomplish such a task?

macrumors 603

For both the Airport, and Built-in Ethernet, click on "Advanced..." and go to the TCP/IP tab. For Configure IPv4, select "Manually" and enter the desired IP, mask, and router. (you have to go to Advanced for each device)

Set the device order so Built-in Ethernet is first. The system will look for an active ethernet connection, and if none found, go to AirPort.

macrumors demi-god

You can also do this without resorting to static IP or futzing with Locations too.

Set the same DHCP Client ID on your laptop for both the Ethernet interface as well as the Airport interface. Then set up a DHCP Reservation in the Airport's configuration for that Client ID. This will cause the Airport to assign the same IP address to both the Airport as well as the Ethernet interface on the laptop, whichever is connected (or both at the same time). Then make sure that the Ethernet is above the Airport on the Network control panel in System Preferences.

macrumors 603

gr8tfly has the answer, I just wanted to add that it's a real disappointment that the airport firmware won't allow you to do this automagically via DHCP.

Click to expand...

Not sure if this will help, but the Airport can be configured to assign an IP to an individual machine tied to its MAC address. (here's a link to the latest Apple doc on designing Airport networks: Apple Airport Networks

macrumors demi-god

Not sure if this will help, but the Airport can be configured to assign an IP to an individual machine tied to its MAC address

Click to expand...

Yeah, that won't work. In fact, until recent versions of the Airport firmware this wasn't possible at all. The problem is that the Airport will not let you create two reservations for the same IP address.

So you can't create two reservations (one for each MAC address) which assign the same IP.

Now that you can do the reservation by DHCP Client ID, though, it becomes possible since it's the same, single reservation that assigns the IP to both the Airport interface and the Ethernet interface.

As an aside, you can see I edited my first post. I decided that I should probably test to make sure that it was still impossible if I was going to whinge about it online and -- lo and behold -- it works now due to the above change. So I changed my post and I'm happy.

thread startermacrumors 6502

For both the Airport, and Built-in Ethernet, click on "Advanced..." and go to the TCP/IP tab. For Configure IPv4, select "Manually" and enter the desired IP, mask, and router. (you have to go to Advanced for each device)

Set the device order so Built-in Ethernet is first. The system will look for an active ethernet connection, and if none found, go to AirPort.

Click to expand...

That did the trick!! I could have sworn that this is how I had it setup in the past at one point, but recently for some strange reason attempting to setup both my airport and ethernet with the same static IP would constantly generate a warning message that my IP was already in use...

Maybe it's because I followed your advice and setup the IPv4 settings "Manually" instead of choosing what I would typical use in the past which was "Using DHCP with Manual Address"

macrumors 603

Yeah, that won't work. In fact, until recent versions of the Airport firmware this wasn't possible at all. The problem is that the Airport will not let you create two reservations for the same IP address.

So you can't create two reservations (one for each MAC address) which assign the same IP.

Now that you can do the reservation by DHCP Client ID, though, it becomes possible since it's the same, single reservation that assigns the IP to both the Airport interface and the Ethernet interface.

As an aside, you can see I edited my first post. I decided that I should probably test to make sure that it was still impossible if I was going to whinge about it online and -- lo and behold -- it works now due to the above change. So I changed my post and I'm happy.

Click to expand...

That's good info! Thanks. I wasn't thinking the Airport was being used for both. I was thinking the Mac was setup for static on enet, then the OP wanted to leave the Airport (on the Mac) set for DHCP. Good find! It's fun to learn while teaching.

thread startermacrumors 6502

You can also do this without resorting to static IP or futzing with Locations too.

Set the same DHCP Client ID on your laptop for both the Ethernet interface as well as the Airport interface. Then set up a DHCP Reservation in the Airport's configuration for that Client ID. This will cause the Airport to assign the same IP address to both the Airport as well as the Ethernet interface on the laptop, whichever is connected (or both at the same time). Then make sure that the Ethernet is above the Airport on the Network control panel in System Preferences.

Click to expand...

I would be extremely grateful if you wouldn't mind providing me with a step by step explanation of how to do this... the alternate method that I'd previously mentioned resolved my problem wound up not being the answer I initially thought it was and I am once again having problems...

MacRumors attracts a broad audience
of both consumers and professionals interested in
the latest technologies and products. We also boast an active community focused on
purchasing decisions and technical aspects of the iPhone, iPod, iPad, and Mac platforms.