Hello There, Guest! Login Register
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Telegram Push notifications

#41
How interesting. Are you using some kind of dongle for networking or something?

What does this output: sudo nems-info nic
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
#42
(12-11-2018, 12:09 PM)Robbie Ferguson Wrote: How interesting. Are you using some kind of dongle for networking or something?

What does this output: sudo nems-info nic


No, NEMS is connected directly to a switch by cable...


Code:
$ sudo nems-info nic

eth0 proto ra

#43
Thanks.
What is the full output of this command? ip route get "172.217.10.142"
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
#44
(12-11-2018, 02:29 PM)Robbie Ferguson Wrote: Thanks.
What is the full output of this command? ip route get "172.217.10.142"


Code:
ip route get "172.217.10.142"
172.217.10.142 via 192.168.0.1 dev eth0 src 192.168.0.28
   cache

#45
Try as I might, I am yet unable to replicate the problem you're experiencing.

What is the output of this command?


Code:
cat /usr/local/bin/nems-info | grep proto



Thanks!
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
#46
Code:
$ cat /usr/local/bin/nems-info | grep proto
 interface=`ip route get "$host_ip" | grep -Po '(?<=(dev )).*(?= src| proto)'`


BR
#47
Thanks. So you have the latest software, and all should work correctly. It makes no sense that your nems-info nic is outputting "eth0 proto ra" since your nems-info script contains grep -Po '(?<=(dev )).*(?= src| proto)'`... the return from that would be eth0 in your case as per (dev )).*(?= src| proto). Even manually echoing your result I still get eth0.

echo "172.217.10.142 via 192.168.0.1 dev eth0 src 192.168.0.28" | grep -Po '(?<=(dev )).*(?= src| proto)'

You are experiencing the issue on NEMS 1.4.1 on a Pi?
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
#48
Yes, this is 1.4.1 on a Pi.
However, I had a closer look at the output of the nems-info  script.
Code:
host_ip=$(getent ahosts "$host" | awk '{print $1; exit}')


returns: 
Code:
2a00:1450:400e:806::200e


so, this is an IPV6 address...

Code:
interface=`ip route get "$host_ip"`

returns:

Code:
2a00:1450:400e:806::200e from :: via fe80::de53:7cff:feec:d56b dev eth0 proto ra src 2a02:1812:1709:ac00:ba27:ebff:fe42:c170 metric 1024 hoplimit 64 pref high

The grep that this is piped to probably gets confused...

EDIT: I experimented somewhat with the grep command and this does the trick:


Code:
| grep -Po '(?<=dev )[^ ]+'



Code:
echo "2a00:1450:400e:806::200e from :: via fe80::de53:7cff:feec:d56b dev eth0 proto ra src 2a02:1812:1709:ac00:ba27:ebff:fe42:c170 metric 1024 hoplimit 64 pref high" | grep -Po '(?<=dev )[^ ]+'
eth0

#49
Oh okay - the result you had posted was IPv4. I'll do some testing with the IPv6 result - thanks.

grep -Po '(?<=(dev )).*(?= src| proto)' -- this selects the text between "dev " and either " src" or " proto". By deleting the second part, you'd break the result on most board, resulting in a result like you are reporting.

This is why I'm confused by your result of 172.217.10.142 via 192.168.0.1 dev eth0 src 192.168.0.28.

As you can see, eth0 is between "dev " and " src" - so the result would be eth0.

I think you tested and gave me answers from the wrong system  :)

I'll fix it based on the new info. I see the problem based on your IPv6 result.

Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
#50
Please run sudo nems-update

Should be fixed now.

Thanks baggins!
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
 
Forum Jump:

Users browsing this thread: 2 Guest(s)