Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I bridge two wired ethernet interfaces on Mac OS X (e.g. the current MacPro comes with two ethernet ports)?

Googling turned up (e.g. this Apple forum post and this openvpn post) that this is fairly easy on Linux (using the brctl command) and under Windows (via Network Connections > right-click > Bridge Connections), but how is it done under Mac OS X?

BTW: There also doesn't seem to be a macport for brctl ('port search brctl' didn't turn up any results)

Note: I don't want to have 'internet sharing', which creates a new network (by handing out network addresses in a new range). I want to really 'bridge' two interfaces so to keep the same network subnet.

share|improve this question
    
You need to explain what your end goal is. The links you provided don't help. As the first link's response post says, "I cannot fathom what it is you are trying to do here." –  Stu Thompson Sep 16 '09 at 18:42
    
As the first link did, I am afraid that I have to suggest to look up 'network bridge' if you're not familiar with the concept. As a simplified summary, i want to use a Mac as a sort of hub. –  Rabarberski Sep 16 '09 at 19:01
1  
@stu: which doesn't mean I don't appreciate you take the time the read and comment on my question :-) –  Rabarberski Sep 16 '09 at 19:11
add comment

7 Answers

up vote 6 down vote accepted

If you want to build a real Ethernet bridge (Layer 2 bridge) on Mac OS X, answer is, you simply can't without third-party software. That's just the way it is, there is nothing in the kernel or in userspace to do this.

The only software I know capable of doing this is IPNetRouterX, which is not free. Never tried it myself.

share|improve this answer
    
The answer I was looking for. Thanks! –  Rabarberski Sep 17 '09 at 4:59
add comment

As of Mountain Lion, you can configure bridges using ifconfig:

sudo ifconfig bridge0 create
sudo ifconfig bridge0 addm en0 addm en1
sudo ifconfig bridge0 up

See man ifconfig for more options.

It doesn't work well with wifi interfaces however due to how they handle lookups.

share|improve this answer
    
As for the edit that should've been a comment: I assume you're not on Mountain Lion (10.8.x). Please check again that you are. –  Per Johansson Oct 2 '12 at 11:08
    
I happen to be having trouble with wifi -- can you give me any more data on why it doesn't work well? –  a paid nerd Nov 8 '13 at 15:56
add comment

This post claims to get it working, using a special script (tap-up-down.sh) he found on a mailing list: http://blog.acmelab.org/2008/07/20/mac-os-x-openvpn-bridge-ssh-tunnel-vpn-goodness/

I'm having the same problem: I set up a bridged OpenVPN on a linux server, and am trying to get on to its network from a OSX client. I haven't tried the link above myself, but I'd be interested if anyone else has tried it.

share|improve this answer
add comment

As far as I can read, you are looking for the link aggregation. Go to System Preferences -> Network -> then select the small cog in the bottom left side (next to the + and -) and choose Manage Virtual Interfaces -> select the + in the bottom left and choose New link aggregate. Then you select the two wired interfaces and call it whatever you like. After that it will appear in the network list as one network interface.

share|improve this answer
2  
Link Aggregation/LACP/802.3ad is not designed for bridging networks but instead to give higher bandwidth throughput and link redundancy. en.wikipedia.org/wiki/802.3ad –  Chealion Sep 17 '09 at 14:16
add comment

I concur with James W.

My situation is that my ISP provides me a WiFi/wired router. The router is upstairs, near my wife's workstation. My work area is two floors below - no option to pull Cat5/6 cables from the router to my workstation. I have a Mac mini OS X 10.5 (which has a built-in WiFi adapter and a built-in wired ethernet adpater and a two PCs in my work area, both with built-in wired ethernet, but no WiFi adapters. I also have a mini-switch for wired ethernet.

My only solution (without buying more hardware -- which goes against my cheap-a__ bastard grain) for connecting my work area to the internet is to use the WiFi connection that my Mac gives me. The question then becomes: what option should I choose for extending that connection to the pair of PCs?

The obvious answer is to use Mac's nice little Internet Connection Sharing (ICS) function. However, I run a bit torrent client on one of my PCs, which I wish to make available to the internet via port-forwarding through my ISP router -- it's how you "pay back" for the benefit that I'm reaping, right, citizens? This means that simple ICS won't do the trick, since I would then need to port-forward through my Mac as well (which, incidentally, I have a difficult time learning how to do, even when consulting Google to tap y'all's smart brians).

An elegant solution would be to bridge the connection through the Mac, right? So that my PC is on the same network as the ISP router (whose port-forwarding functions are built-in and easily managed).

How to do it? As James W says, is it true that there' a sole solution (which costs $100)? Say it ain't so, Joe!

share|improve this answer
add comment

I found a way that seems to work.

  1. Open System Preferences
  2. Click on Sharing
  3. Click on the lock and type in your password to unlock the preference pane (if this applies)
  4. Click on Internet Sharing (the text and not the box)
  5. Select "Airport" from the "Share your connection from:" drop-down menu
  6. Check the checkbox next to "Ethernet" in the "To computers using:" list
  7. Lock the preference pane (if this applies)
  8. Plug the ethernet cable into the computer
  9. Test out the internet connection

In the Network preference pane, the ethernet should be a yellow circle and should say "Self-assigned IP address", this is normal, and ignore it. I tested it with different sites and it looks like it worked. I'm not sure about BitTorrent programs (though, I'm pretty sure there it would work if a web browser works). I don't know about the port forwarding, maybe someone else can figure that part out.

share|improve this answer
3  
No, this is internet sharing, creating and handing out a new range of IP addresses. Bridging is different. –  Rabarberski Dec 30 '10 at 9:39
add comment

a bit late, but this feature is called "bond" in OS X: see

networksetup -h | grep -i bond
networksetup -isBondSupported <hardwareport>
networksetup -createBond <bondname> <hardwareport1> <hardwareport2> <...>
networksetup -deleteBond <bonddevicename>
networksetup -addDeviceToBond <hardwareport> <bonddevicename>
networksetup -removeDeviceFromBond <hardwareport> <bonddevicename>
networksetup -listBonds
networksetup -showBondStatus <bonddevicename>
share|improve this answer
3  
Isn't bonding something different? As far as I know, bonding means taking two interfaces together to increase the bandwith (see e.g. the wikipedia entry en.wikipedia.org/wiki/Channel_bonding ) –  Rabarberski Mar 27 '11 at 8:20
    
your right … it was misleading .. and didn't work btw. The closest thing i've found was: hintsforums.macworld.com/showthread.php?t=107086 but the driver "lagg" is not available on OS X Client. –  boecko Apr 21 '11 at 7:50
add comment

protected by studiohack May 21 '11 at 0:51

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.