28

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.

3
  • 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." Sep 16, 2009 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. Sep 16, 2009 at 19:01
  • 1
    Time to reevaluate answers, since the accepted one is from 2009. :)
    – sjas
    Jan 19, 2015 at 19:07

2 Answers 2

7

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.

1
31

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.

2
  • 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. Oct 2, 2012 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? Nov 8, 2013 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .