I'm having problems trying to set a static IP address on my Intel Galileo Gen 2 with the most recent IoT devkit image installed. I'd like to make a persistent IP configuration for my Galileo since I'm using Eclipse for programming.
Since I've the new IoT devkit image installed, there's no "/etc/network/interfaces" file as there was before. Hence I'm using connmanctl as recommended.
- Inside "network" of System Preferences on Mac, I've configured the IPv4 manually, choosing the IP as being 192.168.1.27, the subnet mask being 255.255.0.0 and the router being 192.168.1.1. In accordance with the instructions in the book I've also set the DNS servers as 22.214.171.124 and 126.96.36.199. I've left out "internet sharing" for now.
- Finally, inside the shell I've run: ifconfig enp0s20f6 192.168.1.27 netmask 255.255.0.0 up in order to set the IP address
- From there I've tried pinging my computer's local connection 192.168.1.17 but it fails with nothing received.
- Then I've done: route add default gw 192.168.1.1 net mask 255.255.0.0 to set up a default route. I've tried pinging my computer again but still nothing.
- Since my configuration seems to be broken, the connmanctl actions seem pointless, however I've tried regardless.
- I've used $connmanctl config <service> --ipv4 manual <ip address> <netmask> <gateway> to try and set my static IP.
- I substituted: $connmanctl config ethernet_984fee01703b_cable --ipv4 manual 192.168.1.27 255.255.0.0 192.168.1.1
I haven't been able to ssh into 192.168.1.27 and Eclipse hasn't been able to connect either. The IP isn't static and resets itself after losing power.
One question I have is whether the IP address you manually assign to the ethernet port (inside System Preferences) has to be identical to the IP address you assign from inside the shell (see lines 1 & 2). At the bottom of page 268 in the book it says: Using the ifconfig command, type the valid IP address to be configured in your network...
Also, is there anything behind the subnet mask you use? When I first connected my ethernet cable to the board, it defaulted to 255.255.0.0 and that's what I went with. I've also tried 255.255.255.0 but to no avail.
Sorry if this is too long but I've just been trying to provide as much info as possible. Thanks for your help in advance.