community – How do I manually configure the IP quantity and gateway IP for a tool related to my Mac on a shared Ethernet connection?

0
27
community – How do I manually configure the IP quantity and gateway IP for a tool related to my Mac on a shared Ethernet connection?


I’ve a tool operating embedded Linux and busybox that doesn’t have WiFi, solely Ethernet.

When at dwelling I efficiently join that gadget to the identical router (by a swap) as my Mac and configure it utilizing ifconfig eth0 192.168.1.63 && route add default gw 192.168.1.254. (busybox on the gadget doesn’t embrace the udhcp consumer.)

However when touring I would like to attach the gadget on to my Mac with an Ethernet cable, by an Anker USB 3 to Ethernet adapter. I enabled Web Sharing on my Mac.

Inside System Data below Community the Ethernet adapter exhibits as “AX88179A”. It exhibits “IPv4 Addresses: 169.254.2.40”.

enter image description here

Listed here are the outcomes from ifconfig en8:

en8: flags=8963 mtu 1500
    choices=404
    ether a0:ce:c8:74:6c:ef
    inet6 fe80::4bc:d253:1602:7ba9percenten8 prefixlen 64 secured scopeid 0x1d
    inet 169.254.128.214 netmask 0xffff0000 broadcast 169.254.255.255
    nd6 choices=201
    media: autoselect (100baseTX )
    standing: energetic

My questions are:

The way to I assign an IP quantity to the gadget that the Mac will have the ability to discover a path to?

How do I decide the gateway IP quantity to make use of on the gadget?

Will the Mac (correctly configured) route packets to my embedded gadget? (eg. Can I efficiently ping a bunch exterior the subnet from the gadget?)

How do I decide the IP quantity for the gadget that I can use on hosts exterior this subnet? Maybe, that is not attainable, since solely the Mac–which is appearing as a router–is seen.

So can I configure the Mac to ahead packets for specified ports to my gadget? (This might permit join GDB operating on a pc that’s not on the subnet to GDB Server operating on the gadget with an particular port. I’d specify the Mac’s IP quantity in GDB.)

Replace: Seamus‘s remark suggests I assign one IP quantity to my Mac and one to the gadget, each on the identical subnet. I assume so long as each begin with 169.254. they are going to be on the identical subnet, because the subnet masks is 255.255.0.0.

However what does the IP quantity 169.254.128.214 within the outcomes of ifconfig en8 point out? Is that already assigned to my Mac? Or do I would like to decide on a special one for my Mac? And what IP quantity do I exploit for the gateway that I specify on the embedded gadget?

LEAVE A REPLY

Please enter your comment!
Please enter your name here