Monday, 26 November 2018

macos - Share internet as Bridge instead as a Router using PFCTL (OS X)?


I've got an Airport Time Capsule (TC) and a Macbook Air (MBA) and another PC. The MBA connects the TC wirelessly while the PC connects to the MBA with Ethernet cable.


The problem: The MBA takes the DHCP into his own, and spreads IP's from a new IP range, leaving all the devices connecting to it disconnected from the TC's network (connected to the internet but cannot communicate with any other device connected to the TC directly).


The goal: Make any device connected to the MBA, get an IP address from the TC directly. Meaning, the MBA shall behave as a bridge from Wifi to Ethernet network adapters.


Note: After searching the internet for more than 4 hours for a solution, plus speaking with AppleCare support for more than 2 hours on the phone, I've come to a conclusion: this cannot be done using Apple's Internet Sharing feature.


This is what I get from ifconfig:


en0: flags=8863 mtu 1500
ether 84:38:35:63:98:fe
inet6 fe80::8638:35ff:fe63:98fe%en0 prefixlen 64 scopeid 0x4
inet 10.0.1.2 netmask 0xffffff00 broadcast 10.0.1.255
nd6 options=1
media: autoselect
status: active

bridge100: flags=8863 mtu 1500
options=3
ether 86:38:35:36:77:64
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
inet6 fe80::8438:35ff:fe36:7764%bridge100 prefixlen 64 scopeid 0xa
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en4 flags=3
ifmaxaddr 0 port 6 priority 0 path cost 0
nd6 options=1
media: autoselect
status: active

I would want somehow to make Bridge100 be with a 10.0.1.x IP letting my PC receive IP from the TC.


If you've got any idea how to make this happen, I would be very happy. Spent too much time looking for that answer.



Answer



You can't just bridge frames from Ethernet to a client-mode 802.11 connection because the 802.11 protocol doesn't allow it. The AP (your TC) will reject these frames because they came from a source MAC address that never 802.11-authenticated or 802.11-associated.


The way to bridge Ethernet frames across an 802.11 link is to use a relatively obscure optional provision of 802.11 known as "WDS" (Wireless Distribution System). Unfortunately it requires that both ends of the 802.11 link be configured to support it, and Apple provides no APIs to configure a Mac's Wi-Fi card for WDS mode.


You're left with the option of doing NAT, which is what Intenet Sharing does, but doesn't meet your needs, or possibly messing around with Proxy ARP, which may still not accomplish what you're really looking for.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...