Opennhrp does not work.

2 posts / 0 new
Last post
#1 Thu, 2017-04-27 18:18
fatihusta
  • fatihusta's picture
  • Offline
  • Last seen: 11 months 3 days ago
  • Joined: 2017-04-27

Hi
I'm trying opennhrp and multipoint gre tunnel without ipsec. (I will adding ipsec later.)
My config below.
Where is my mistake?

Alpine Linux: 3.5 + edge upgrade

####################
#Hub

ip tunnel add tun0 mode gre local 10.1.1.51 key 1234
ip link set dev tun0 up multicast on allmulticast on
ip address add 172.16.1.1/24 brd + dev tun0

#cat /etc/opennhrp/opennhrp.conf 
interface tun0
 cisco-authentication password
 holding-time 300
 multicast dynamic
 redirect

# opennhrpctl interface show
Status: ok
 
Interface: tun0
Index: 10
Protocol-Address: 172.16.1.1/24
Flags: redirect configured
Holding-Time: 300
Route-Table: 254
GRE-Key: 1234
MTU: 1472
NBMA-MTU: 0
NBMA-Address: 10.1.1.51

# opennhrpctl cache show
Status: ok
 
Interface: tun0
Type: local
Protocol-Address: 172.16.1.255/32
Alias-Address: 172.16.1.1
Flags: up
 
Interface: tun0
Type: local
Protocol-Address: 172.16.1.1/32
Flags: up

######################
#Spoke

ip tunnel add tun0 mode gre local 10.1.1.52 key 1234
ip link set dev tun0 up multicast on allmulticast on
ip address add 172.16.1.2/24 brd + dev tun0

/etc/opennhrp/opennhrp.conf
interface tun0 
 map 172.16.1.1/24 10.1.1.51 register
 cisco-authentication password
 holding-time 300
 shortcut
 multicast nhs
 redirect

#opennhrpctl interface show
Status: ok
 
Interface: tun0
Index: 9
Protocol-Address: 172.16.1.2/24
Flags: shortcut redirect configured
Holding-Time: 300
Route-Table: 254
GRE-Key: 1234
MTU: 1472
NBMA-MTU: 0
NBMA-Address: 10.1.1.52

 opennhrpctl cache show
Status: ok
 
Interface: tun0
Type: local
Protocol-Address: 172.16.1.255/32
Alias-Address: 172.16.1.2
Flags: up
 
Interface: tun0
Type: local
Protocol-Address: 172.16.1.2/32
Flags: up
 
Interface: tun0
Type: static
Protocol-Address: 172.16.1.1/24
NBMA-Address: 10.1.1.51

#####################

#Result from spoke

ping 172.16.1.1
PING 172.16.1.1 (172.16.1.1) 56(84) bytes of data.
From 172.16.1.2 icmp_seq=1 Destination Host Unreachable
From 172.16.1.2 icmp_seq=2 Destination Host Unreachable
From 172.16.1.2 icmp_seq=3 Destination Host Unreachable

When I add this command then working.
Hub
ip neighbor replace 172.16.1.2 lladdr 10.1.1.52 dev tun0

Spoke
ip neighbor replace 172.16.1.1 lladdr 10.1.1.51 dev tun0

But duplicate packet.

#ping from spoke

 # ping 172.16.1.1
PING 172.16.1.1 (172.16.1.1) 56(84) bytes of data.
64 bytes from 172.16.1.1: icmp_seq=1 ttl=64 time=0.441 ms
64 bytes from 172.16.1.1: icmp_seq=1 ttl=64 time=0.527 ms (DUP!)
64 bytes from 172.16.1.1: icmp_seq=2 ttl=64 time=0.331 ms
64 bytes from 172.16.1.1: icmp_seq=2 ttl=64 time=0.428 ms (DUP!)
^C
--- 172.16.1.1 ping statistics ---
2 packets transmitted, 2 received, +2 duplicates, 0% packet loss, time 1018ms
rtt min/avg/max/mdev = 0.331/0.431/0.527/0.074 ms

Thanks.

Tue, 2017-05-02 19:41
fatihusta
  • fatihusta's picture
  • Offline
  • Last seen: 11 months 3 days ago
  • Joined: 2017-04-27

I found my mistake.

1- I Cloned Alpine Linux on Virtual box. I checked Cloned options reinstall mac adress but not worked. So i saw duplicate packet.
2-opennhrp script syntax error. Starting opennhrp service but script syntax fail error message on the fly. I traced log file and found syntax error. /var/log/messages

thanks.

Log in or register to post comments