When Edison is not connected to WiFi but only over the USB host network, the network-gadget-init service may be used to configure the default gateway and the DNS resolution. Obviously the host needs to permit USB networking (eg. interface enp0s29f7u1 with network 192.168.3.0/24) and packet forwarding (net.ipv4.ip_forward = 1 in /etc/sysctl.conf with correct iptables configuration - Masquerading) when accessing other networks like Internet.
I just wanted to share this for others.
Description=USB Ethernet gadget
ExecStartPre=-/bin/sh -c "echo 'connect' > /sys/class/udc/dwc3-device.1/soft_connect"
ExecStart=-/bin/sh -c " ifconfig usb0 192.168.3.15; route add default gw 192.168.3.1; echo 'nameserver 192.168.10.206' > /etc/resolv.conf"
ExecReload=-/bin/sh -c " ifconfig usb0 192.168.3.15"
I was looking to accomplish USB network sharing. However, the host computer and Edison are sharing the same IP address over USB. How do I configure the network-gadget file you posted if that happens? In addition, do I use the same nameserver?