MacOS – Issue with bridging Ethernet to Wi-Fi

ethernetmacoswifi

I've connected a Pi directly to my iMac via Ethernet cable. The Pi has an address 169.254.121.172 and the iMac has an address 169.254.10.117. I can connect to the Pi via SSH and can ssh back to the Mac ok. Internet sharing has been turned on (sharing Wi-Fi to Ethernet). I just can't resolve any addresses on the Internet. I have added the iMac's IP as a gateway and when I traceroute to 8.8.8.8 I can see it hitting the iMac but the packets get no further. There is a bridge0 which has an IP 169.254.10.117 and it does resolve when pinged from the Pi. I'm running Yosemite 10.10.5. Ideas anyone?

Best Answer

the 169.254.x.x address space is known as Link-Local addressing & by definition does not leave the building.

In a computer network, a link-local address is a network address that is valid only for communications within the network segment (link) or the broadcast domain that the host is connected to.

Link-local addresses are usually not guaranteed to be unique beyond a single network segment. Routers therefore do not forward packets with link-local addresses.

Source : Wikipedia - Link-local address

A link-local address is usually self-generated by a computer if it cannot find a DHCP server.
If your network has no DHCP server [your router ought to contain one] then you need to use manually-assigned addresses in the same subnet as your router/gateway. Nominally, for a home or small business, these would be in the 192.168.x.x space.