1

Anyone know how to createa bridge network interface on MacOS v12.4 Mon?

I have tried:

sudo ifconfig bridge7 create
sudo ifconfig bridge7 addm en0
sudo ifconfig bridge7 up

In step two I get this:

ifconfig: BRDGADD en0: Resource busy
Chris G.
  • 153

1 Answers1

2

Short answer: see the Apple Support article "Bridge virtual network interfaces on Mac".

Long answer: On macOS, you generally shouldn't use ifconfig to modify the network setup; that'll change the "live" interface state, but it tends to get overwritten by the system configuration daemon (configd) setting things to the way it thinks they should be. Instead, use networksetup or the System Preferences utility to change the system config database, and let configd apply those changes to the live network state.

Unfortunately, networksetup doesn't seem to have options to create and manage bridge interfaces, so you'll need to use System Preferences:

  1. On your Mac, choose Apple menu > System Preferences, then click Network.
  2. Click the Action pop-up menu ("..." or gear icon), then choose Manage Virtual Interfaces.
  3. Click the Add button (+), choose New Bridge, then select the interfaces to include in the bridge.
  4. Click Create, then click Done.
  • The problem with this approach is, you can not see the bridge in the terminal when created using the settings/network ui? – Chris G. Jun 18 '22 at 06:00
  • 1
    @ChrisG. That's strange, it works for me (though I don't have a Monterey system to test with, I tried it under Catalina). I have a pre-built Thunderbolt Bridge interface (bridge0), and when I create a new one it shows up as bridge1 in the ifconfig listing. – Gordon Davisson Jun 18 '22 at 20:52
  • Thanks, really glad for info - I will try in one other machine to test it again, and come back. – Chris G. Jun 20 '22 at 16:38
  • Hmm, every time I try to add a bridge the connection goes down on the interface. – Chris G. Jun 21 '22 at 05:57