I am a total newbie when it comes to network configuration. I would like to configure my Ubuntu 18.04 PC so that it connects to a device.
I use USB to Ethernet converter and connect the ethernet jack to the device and USB connector to my PC. Regarding the device, the only information I got is device is accessible via 172.16.248.248 IP address. For that, I think I need to configure the particular network interface I use to connect to that device as static IP.
For this I execute following commands;
HOST_USB_IP=172.16.248.248
TARGET_USB_IP=172.16.248.201
INTERFACE_NAME=enxd03745fbecb2
sudo ip route del default via $HOST_USB_IP
sudo ifconfig $INTERFACE_NAME $TARGET_USB_IP netmask 255.255.255.0
sudo route add default gw $HOST_USB_IP
However, I get the following when I try to ping the device:
PING 172.16.248.248 (172.16.248.248) 56(84) bytes of data.
From 172.16.248.201 icmp_seq=1 Destination Host Unreachable
From 172.16.248.201 icmp_seq=2 Destination Host Unreachable
From 172.16.248.201 icmp_seq=3 Destination Host Unreachable
What am I missing here? What else can I try? Any guidance is much appreciated.