I'm trying to connect Ethernet from my Mac-Mini to devices on an unmanaged switch (Brainboxes SW-504). It's not working.
The Mac connects via wifi to a linksys router serving network addresses 192.168.2.0 255.255.255.0 with DHCP. This is working.
I've set the ethernet configuration to manual and assigned its address to be 192.168.1.120 with subnet mask 255.255.255.0 in order to create a separate class C subnet.
There is no router on the 192.168.1 subnet -- just 3 devices (2 raspberry pi's and a custom board). The three devices have hard addresses at 192.168.1.121, 192.168.1.122 and 192.168.123. All three are communicating with each other via ethernet cables plugged to the switch.
For development and debugging, I need to connect the Mac to these devices but have thus far been unsuccessful at finding a configuration that works. I can't even ping them.
ifconfig says about the ethernet (en0) and wifi (en1) interfaces:
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV> ether a8:20:66:4a:d5:5a nd6 options=201<PERFORMNUD,DAD> media: autoselect (100baseTX <full-duplex,flow-control>) status: active en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether 88:53:95:2c:9a:0d inet6 fe80::1085:342e:6382:e6b4%en1 prefixlen 64 secured scopeid 0x8 inet 192.168.2.103 netmask 0xffffff00 broadcast 192.168.2.255 nd6 options=201<PERFORMNUD,DAD> media: autoselect status: active
Note that the assigned ip for en0 is not appearing in the above. The GUI network setup is showing it as intended and indicates no error.
networksetup -getinfo Ethernet gives:
Manual Configuration IP address: 192.168.1.120 Subnet mask: 255.255.255.0 Router: (null) IPv6: Manual IPv6 IP address: IPv6 Router: none IPv6 Prefix Length: 0 Ethernet Address: a8:20:66:4a:d5:5a
netstat -rn gives:
Destination Gateway Flags Refs Use Netif Expire default 192.168.2.1 UGSc 66 49 en1 default link#13 UCSI 0 0 bridge0 ! default link#15 UCSI 0 0 bridge1 ! 127 127.0.0.1 UCS 0 0 lo0 127.0.0.1 127.0.0.1 UH 1 7877 lo0 169.254 link#8 UCS 1 0 en1 ! 192.168.2 link#8 UCS 3 0 en1 ! 192.168.2.1/32 link#8 UCS 1 0 en1 ! 192.168.2.1 14:91:82:71:2f:e2 UHLWIir 28 199 en1 1153 192.168.2.81 74:40:bb:19:9d:a5 UHLWI 0 327 en1 996 192.168.2.103/32 link#8 UCS 0 0 en1 ! 192.168.2.183 f4:f5:d8:ca:f5:18 UHLWIi 1 919 en1 1190 192.168.2.251 88:1f:a1:16:8e:a4 UHLWI 0 0 en1 285 192.168.3 link#15 UC 1 0 bridge1 ! 192.168.4 link#13 UC 1 0 bridge0 ! 224.0.0/4 link#8 UmCS 2 0 en1 ! 18.104.22.168 1:0:5e:0:0:fb UHmLWI 0 0 en1 22.214.171.124 1:0:5e:7f:ff:fa UHmLWI 0 408 en1 255.255.255.255/32 link#8 UCS 1 0 en1 ! 255.255.255.255 ff:ff:ff:ff:ff:ff UHLWbI 0 6 en1 !
EDIT: Some progress ...
Following @pToker's suggestion to try setting a temporary route with
ifconfig I've arrived at a tolerable but still imperfect configuration:
- With the GUI, Set a permanent manual address (192.168.2.2) for Wi-Fi and reserve that address on my router.
- With the GUI, Set a permanent manual address (192.168.1.120) for Ethernet.
- After startup, run
sudo ifconfig en0 inet 192.168.1.120 netmask 255.255.255.0
I'd love understand how to make it all work from the Network Preferences GUI (or why it's not possible if that's the case).