0

SOLUTION: There's a typo in the IP address on my laptop Ethernet interface (see the accepted answer). The following writeup is most probably proper setup.


I'd like to communicate with Raspberry Pi (rpi) via point-to-point Ethernet between my laptop and the rpi.

My laptop is connected to the Internet via wireless wlan0 interface managed by NetworkManager (DHCP). My Ethernet interface is eth0 and I've explicitly told NetworkManager to ignore it (nmcli dev set eth0 managed no).

rpi apparently assigns address in the range 169.245.0.0/16 to its Ethernet interface. When I run tcpdump on my laptop Ethernet interface (tcpdump -i eth0 -e) I can see the rpi talking from 169.254.85.159. I'd like to at least ping it from my laptop.


First I assign IP address 169.245.0.1/16 to the Ethernet interface on my laptop:

root@localhost ~ # ip addr add 169.245.0.1/16 dev eth0

Then I check that it has the correct address:

root@localhost ~ # ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether f5:fc:60:62:92:f1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.157/24 brd 192.168.0.255 scope global dynamic noprefixroute wlan0
       valid_lft 1893sec preferred_lft 1893sec
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 50:e5:3c:f4:34:11 brd ff:ff:ff:ff:ff:ff
    inet 169.245.0.1/16 scope global eth0
       valid_lft forever preferred_lft forever

Then I check the route table:

root@localhost ~ # ip r
default via 192.168.0.1 dev wlan0 proto dhcp metric 600
169.245.0.0/16 dev eth0 proto kernel scope link src 169.245.0.1
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.157 metric 600

I assume that anything to 169.245.0.0/16 will be picked up by second route entry.


But apparently it's picked up by default route entry:

root@localhost ~ # traceroute 169.254.85.159
traceroute to 169.254.85.159 (169.254.85.159), 30 hops max, 60 byte packets
 1  _gateway (192.168.0.1)  4.961 ms  10.669 ms  10.681 ms^C

Could you please explain why is the packet routed through the default route and what's the most proper way to set up such point to point network?


I've also tried to use the -B switch of ping to force the interface:

root@localhost ~ # ping -B eth0 169.254.85.159

Now in the tcpdump output I can see echo requests and replies from rpi but apparently it's not delivered to the ping because it's silent. Why?

0

169.245.0.0/16 to its Ethernet interface. When I run tcpdump on my laptop Ethernet interface (tcpdump -i eth0 -e) I can see the rpi talking from 169.254.85.159

You seem to have a typo. Your RPI is 169.254.85.159. And you assigned 169.245.0.0/16 to your other computer. 254!=245.

Though if your RPi is really getting a APIPA address in the 169.254/16 range it makes me wonder if you even have good connectivity.

2
  • Well, that is embarrassing. Thank you! Now it works. Should I delete the question? – Mark Howard Jan 19 '18 at 20:54
  • You don't have to delete it. – Zoredache Jan 19 '18 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.