Skip to main content
The 2024 Developer Survey results are live! See the results
add netmask
Source Link
Tim Hilt
  • 237
  • 3
  • 11

I have a Dragino-Yun v2.4-shield, which is a device that can be connected with an Arduino to give it networking-capabilities. It has An Ethernet-Port and Wifi. I don't have a wifi-antenna at the moment so i tried connecting to it via the Ethernet-Port.

According to the manual, the address 172.31.255.254 is assigned to the Ethernet-Port in a /4 subnet (DNS-mask: 255.255.255.252). I started with a blank Arch-Linux-ISO on a ThinkPad and got it so far, as to pinging the device was succesfull. According to the manual it should also be possible to connect via ssh, but that didn't work.

I then rebooted and wanted to ran the commands cleanly, but didn't have any success on the second try. Here are the commands i ran, following this Archwiki-page (enp0s25 is the ethernet-link of my ThinkPad):

$ systemctl stop dhcpcd
$ ip link set enp0s25 up  # It is up by default though
$ ip addr add 172.31.255.253/4 dev enp0s25
$ ip route add default via 172.31.255.252
$ ping 172.31.255.254 -c3
PING 172.31.255.254 (172.31.255.254) 56(84) bytes of data.
FROM 172.31.255.253 icmp_seq=1 Destination Host Unreachable
FROM 172.31.255.253 icmp_seq=2 Destination Host Unreachable
FROM 172.31.255.253 icmp_seq=3 Destination Host Unreachable
--- 172.31.255.254 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4054ms
pipe 3

I will add, that i have very little networking-experience. Where am i wrong? Is there something i've missed?

I have a Dragino-Yun v2.4-shield, which is a device that can be connected with an Arduino to give it networking-capabilities. It has An Ethernet-Port and Wifi. I don't have a wifi-antenna at the moment so i tried connecting to it via the Ethernet-Port.

According to the manual, the address 172.31.255.254 is assigned to the Ethernet-Port in a /4 subnet (DNS-mask: 255.255.255.252). I started with a blank Arch-Linux-ISO on a ThinkPad and got it so far, as to pinging the device was succesfull. According to the manual it should also be possible to connect via ssh, but that didn't work.

I then rebooted and wanted to ran the commands cleanly, but didn't have any success on the second try. Here are the commands i ran, following this Archwiki-page (enp0s25 is the ethernet-link of my ThinkPad):

$ systemctl stop dhcpcd
$ ip link set enp0s25 up  # It is up by default though
$ ip addr add 172.31.255.253 dev enp0s25
$ ip route add default via 172.31.255.252
$ ping 172.31.255.254 -c3
PING 172.31.255.254 (172.31.255.254) 56(84) bytes of data.
FROM 172.31.255.253 icmp_seq=1 Destination Host Unreachable
FROM 172.31.255.253 icmp_seq=2 Destination Host Unreachable
FROM 172.31.255.253 icmp_seq=3 Destination Host Unreachable
--- 172.31.255.254 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4054ms
pipe 3

I will add, that i have very little networking-experience. Where am i wrong? Is there something i've missed?

I have a Dragino-Yun v2.4-shield, which is a device that can be connected with an Arduino to give it networking-capabilities. It has An Ethernet-Port and Wifi. I don't have a wifi-antenna at the moment so i tried connecting to it via the Ethernet-Port.

According to the manual, the address 172.31.255.254 is assigned to the Ethernet-Port in a /4 subnet (DNS-mask: 255.255.255.252). I started with a blank Arch-Linux-ISO on a ThinkPad and got it so far, as to pinging the device was succesfull. According to the manual it should also be possible to connect via ssh, but that didn't work.

I then rebooted and wanted to ran the commands cleanly, but didn't have any success on the second try. Here are the commands i ran, following this Archwiki-page (enp0s25 is the ethernet-link of my ThinkPad):

$ systemctl stop dhcpcd
$ ip link set enp0s25 up  # It is up by default though
$ ip addr add 172.31.255.253/4 dev enp0s25
$ ip route add default via 172.31.255.252
$ ping 172.31.255.254 -c3
PING 172.31.255.254 (172.31.255.254) 56(84) bytes of data.
FROM 172.31.255.253 icmp_seq=1 Destination Host Unreachable
FROM 172.31.255.253 icmp_seq=2 Destination Host Unreachable
FROM 172.31.255.253 icmp_seq=3 Destination Host Unreachable
--- 172.31.255.254 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4054ms
pipe 3

I will add, that i have very little networking-experience. Where am i wrong? Is there something i've missed?

Source Link
Tim Hilt
  • 237
  • 3
  • 11

Configure static IP-adress to connect to device in subnet

I have a Dragino-Yun v2.4-shield, which is a device that can be connected with an Arduino to give it networking-capabilities. It has An Ethernet-Port and Wifi. I don't have a wifi-antenna at the moment so i tried connecting to it via the Ethernet-Port.

According to the manual, the address 172.31.255.254 is assigned to the Ethernet-Port in a /4 subnet (DNS-mask: 255.255.255.252). I started with a blank Arch-Linux-ISO on a ThinkPad and got it so far, as to pinging the device was succesfull. According to the manual it should also be possible to connect via ssh, but that didn't work.

I then rebooted and wanted to ran the commands cleanly, but didn't have any success on the second try. Here are the commands i ran, following this Archwiki-page (enp0s25 is the ethernet-link of my ThinkPad):

$ systemctl stop dhcpcd
$ ip link set enp0s25 up  # It is up by default though
$ ip addr add 172.31.255.253 dev enp0s25
$ ip route add default via 172.31.255.252
$ ping 172.31.255.254 -c3
PING 172.31.255.254 (172.31.255.254) 56(84) bytes of data.
FROM 172.31.255.253 icmp_seq=1 Destination Host Unreachable
FROM 172.31.255.253 icmp_seq=2 Destination Host Unreachable
FROM 172.31.255.253 icmp_seq=3 Destination Host Unreachable
--- 172.31.255.254 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4054ms
pipe 3

I will add, that i have very little networking-experience. Where am i wrong? Is there something i've missed?