1

I am trying to make a point to point ipv4 link with a device running Ubuntu 18.04 . if I set the device to 192.168.1.48/31 and in then OSX I set my ethernet dongle to 192.168.1.49/31, I am able to ping the device, but I am unable to ssh to it. I get Permission Denied

If I change both of these to a /24, I am able to ssh without changing anything else about the configuration.

Any idea why I am unable to do this?

3
  • Speculation, perhaps worthy of a test: if you don't configure an IP address on the .48 device at all, just connect the cable and get a layer 1 link, you might still believe you are able to ping .48 from the machine at .49 because /31 isn't a valid netmask for IPv4 over Ethernet and the behavior you're seeing an artifact of that. Commented Dec 4, 2019 at 23:44
  • What happens if you set OSX to .49/31 or to .47/31
    – aa2397
    Commented Dec 4, 2019 at 23:47
  • I think you better provide a screenshot of the terminal window (or at least full copy of the content in a code block).
    – Tom Yan
    Commented Dec 5, 2019 at 2:25

1 Answer 1

1

EDIT: in traditional terms, The IP scheme is wrong, you need a network identifier and broadcast address.

  • The valid subnet would be a /30. (255.255.255.252)
  • The network number is 192.168.1.48 /30
  • The two valid IP addresses are .49 and .50
  • And the broadcast address would be 192.168.1.51.

Apparently since 2000 with rfc3021, and implemented since linux kernel 2.6.34, /31 notation is a thing. Just to be clear, I have never actually seen this implemented

Cisco equipment seems to also support it. But both seem to state only on point-to-point links.

I saw some references at linuxquestions.org stating that you need to bring it up as a point-to-point using:

ifconfig eth0 pointtopoint <IPADDR>
4
  • 1
    tools.ietf.org/html/rfc3021
    – Tom Yan
    Commented Dec 5, 2019 at 2:22
  • @grawity is correct..I can not find a definitive answer for whether macos supports it Commented Dec 5, 2019 at 18:50
  • @kevan Lannister, the /31 subnet seems like it was meant for conservation of public IP addresses. Benefiting ISP/CLECs and large corporations that were assigned public IP blocks. If you do not fit into one of those categories, and are using private ip numbers, I don't see a reason to even use it... Commented Dec 5, 2019 at 19:19
  • Also, the TCP/IP stack of the OS must support it. Windows seems to be a no, Mac OS...? I don't have any Mac machines to test it on Commented Dec 5, 2019 at 19:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .