troglobit / pim6sd

PIM for IPv6 sparse mode daemon
Other
21 stars 8 forks source link

No global addresses available #5

Closed mweinelt closed 2 years ago

mweinelt commented 5 years ago

Pim6sd complains about having no global addresses available, the log shows two (on br-lan and br-wifi).

# /usr/src/pim6sd/src/pim6sd -n -f /etc/pim6sd.conf -d all
debug level 0xffffffffffffffff (mld_proto,mld_timer,mld_member,switch,trace,timeout,pkt,interfaces,kernel,cache,rsrr,pim_detail,pim_hello,pim_register,pim_join_prune,pim_bootstrap,pim_asserts,pim_cand_rp,pim_routes,pim_timers,pim_rpf)
15:57:26.173 pim6sd version 2.1.0-alpha23 starting
15:57:26.173 65536 octets allocated for the emit/recept buffer mld6
15:57:26.173 Buffer reception size for socket 4 : 262144 in 0 iterations
15:57:26.174 warning - setsockopt(IPV6_ROUTER_ALERT): Protocol not available
15:57:26.174 65536 octets allocated for the emit/recept buffer pim6
15:57:26.174 Buffer reception size for socket 5 : 262144 in 0 iterations
15:57:26.174 Interfaces world initialized...
15:57:26.174 Getting vifs from /etc/pim6sd.conf
<3>comment [#The timer granularity.] (23)
<3>comment [#More this value is small,more pim6sd will be accurate ] (55)
<3>comment [#default if not specified : 5] (29)
<3>comment [#BE SURE to have to same granularity on ALL routers,] (52)
<3>comment [#otherwise....] (14)
<3>comment [#granularity 5;] (15)
<3>comment [#syntax : phyint <interface> <disable> <metric> [metric] <preference> [preference]] (82)
<3>comment [#metric and pref are for the asserts messages] (45)
<3>comment [#samples :] (10)
<3>default_phyint_status
<3>disable
<3>end cnf [;] (1)
<3>begin phyint [phyint] (6)
<7>br-lan
<9>end phyint [;] (1)
<3>begin phyint [phyint] (6)
<7>br-wifi
<9>end phyint [;] (1)
<3>begin phyint [phyint] (6)
<7>wg-ganymede
<9>end phyint [;] (1)
<3>begin phyint [phyint] (6)
<7>wg-juno
<9>end phyint [;] (1)
<3>comment [#phyint ed1 disable;] (20)
<3>comment [#phyint de0 disable;] (20)
<3>comment [#phyint ed0 disable;] (20)
<3>comment [#phyint gif0 disable;] (21)
<3>comment [#---------------Protocol timer specifications---------------------------#] (73)
<3>comment [#Notes : theses value are the default spec value!] (49)
<3>comment [#do not touch it if you don't know what you do!!] (48)
<3>comment [#you MUST change theses values according to the granularity value!] (66)
<3>comment [#syntax :  'hello_period <number> <coef>'.] (42)
<3>comment [# number is the period in second between 2 hello messages] (57)
<3>comment [# and coef is the coef to determine the hello holdtime=hello_period*coef] (72)
<3>comment [# default if not specified: 30 3.5] (34)
<3>comment [#hello_period 30 3.5;] (21)
<3>comment [#syntax :  'join_prune_period <number> <coef>'.] (47)
<3>comment [# number is the period in second between 2 join/prune messages] (62)
<3>comment [# and coef is the coef to determine the join/prune holdtime=join_prune_period*coef] (82)
<3>comment [# default if not specified : 60 3.5] (35)
<3>comment [#join_prune_period 60 3.5;] (26)
<3>comment [#syntax :  'data_timeout <number>'.] (35)
<3>comment [# number is the time after which (S,G) state for a silent source will be deleted] (80)
<3>comment [# default if not specified  : 210 ] (34)
<3>comment [#data_timeout 210;] (18)
<3>comment [#syntax :  'register_suppression_timeout <number>'.] (51)
<3>comment [# This is the mean interval between receiving a Register-Stop and allowing] (74)
<3>comment [#Register to be send again.] (27)
<3>comment [# default if not specified  : 60] (32)
<3>comment [#register_suppression_timeout 60;] (33)
<3>comment [#syntax :  'probe_time <number>'.] (33)
<3>comment [#This is the time between sending a null Register and the Register-Suppression-Timer] (84)
<3>comment [#expiring unless it is restarted by receiving a Register-Stop.] (62)
<3>comment [#default if not specified : 5] (29)
<3>comment [#probe_time 5;] (14)
<3>comment [#syntax :  'assert_timeout <number>'.] (37)
<3>comment [#this is the interval between the last time an Assert is received and the time at which the ] (92)
<3>comment [#assert is timeout] (18)
<3>comment [#default if not specified : 180] (31)
<3>comment [#assert_timeout 180;] (20)
<3>comment [#syntax : <cand_rp> <interface> <time> [time] <priority> [priority]] (67)
<3>comment [#and time can't be <  10 ] (25)
<3>comment [#you can just type cand_rp, ] (28)
<3>comment [#samples :] (10)
<3>comment [#cand_rp;] (9)
<3>comment [#cand_rp de0;] (13)
<3>comment [#cand_rp ed0 priority 0 time 6;] (31)
<3>comment [#syntax : <group_prefix> <multicast address>/<prefix length>] (60)
<3>comment [#group_prefix ff06::15 ] (23)
<3>comment [#default if not specified : ff00::/8] (36)
<3>comment [#samples:] (9)
<3>comment [#group_prefix ff1e::15/128;] (27)
<3>comment [#group_prefix ff2e::/16;] (24)
<3>comment [#syntax : <cand_bootstrap_router> <interface> <priority> [priority] <time> [time]] (81)
<3>comment [#Typically, you can simply set cand_bootstrap_router for a candidate bootstrap] (78)
<3>comment [#router. All other parameters are optional.] (43)
<3>comment [#the bootstrap period is configurable, BUT the holdtime of a bootstrap] (70)
<3>comment [#router is not in the fields of a bootstrap message : it is hard-coded] (70)
<3>comment [#in the pim6sd include file!] (28)
<3>comment [#So be sure to have a time < PIM_BOOTSTRAP_TIMEOUT (file pimd.h )] (65)
<3>comment [#cand_bootstrap_router de0 priority 15 time 5;] (46)
<3>comment [#syntax : <switch_register_threshold> <rate> [number] <interval> [number]] (73)
<3>comment [#default rate = 50000 interval = 20s] (36)
<3>comment [#samples :] (10)
<3>comment [#TODO : not tested] (18)
<3>comment [#switch_register_threshold rate 54389 interval 45;] (50)
<3>comment [#switch_register_threshold;] (27)
<3>comment [#syntax : <switch_data_threshold> <rate> [number] <interval> [number]] (69)
<3>comment [#default rate = 50000 interval = 20s] (36)
<3>comment [#TODO : not tested] (18)
<3>comment [#samples:] (9)
<3>comment [#switch_data_threshold interval 100 rate 1000;] (46)
<3>comment [#syntax : <default_source_metric> [number]] (42)
<3>comment [#default_source_metric 1243;] (28)
<3>comment [#syntax : <default_source_preference> [number]] (46)
<3>comment [#default_source_preference 123 ;] (32)
parse successed.
15:57:26.177 pim_hello_period set to: 30
15:57:26.177 pim_hello_holdtime set to: 105
15:57:26.177 pim_join_prune_period set to: 60
15:57:26.178 pim_join_prune_holdtime set to: 210
15:57:26.178 timer interval set to: 5
15:57:26.178 PIM data timeout set to: 210
15:57:26.178 PIM register suppression timeout set to: 60
15:57:26.178 PIM register probe time set to: 5
15:57:26.178 PIM assert timeout set to: 180
15:57:26.178 reg_rate_limit set to 100000 (bits/s)
15:57:26.178 reg_rate_interval set to  20 s.
15:57:26.178 data_rate_limit set to 100000 (bits/s)
15:57:26.178 data_rate_interval set to 20 s.
15:57:26.178 Getting vifs from kernel
15:57:26.181 warning - Not registering detected interface lo: Operation not permitted
15:57:26.181 warning - Not registering detected interface lo: Operation not permitted
15:57:26.181 warning - Not registering detected interface enp1s0: Operation not permitted
15:57:26.181 warning - Not registering detected interface enp2s0: Operation not permitted
15:57:26.182 Installing br-lan (2003:d4:bf07:7c02::1 on subnet ::/64) ,as vif #4 - rate = 0
15:57:26.182 Installing br-lan (fd42:23:42:100::1 on subnet ::/64) ,as vif #4 - rate = 0
15:57:26.182 Installing br-lan (fe80::846a:6ff:fec9:1426 on subnet ::/64) ,as vif #4 - rate = 0
15:57:26.182 warning - Not registering detected interface wlp4s0: Operation not permitted
15:57:26.182 Installing br-wifi (2003:d4:bf07:7c03::1 on subnet ::/64) ,as vif #4 - rate = 0
15:57:26.182 Installing br-wifi (fd42:23:42:110::1 on subnet ::/64) ,as vif #4 - rate = 0
15:57:26.182 Installing br-wifi (fe80::dc70:c7ff:fe97:4611 on subnet ::/64) ,as vif #4 - rate = 0
15:57:26.183 warning - Not registering detected interface br-iot: Operation not permitted
15:57:26.183 warning - Not registering detected interface br-mgmt: Operation not permitted
15:57:26.183 warning - Not registering detected interface br-mesh: Operation not permitted
15:57:26.183 warning - Not registering detected interface enp2s0.42: Operation not permitted
15:57:26.183 warning - Not registering detected interface enp2s0.100: Operation not permitted
15:57:26.183 warning - Not registering detected interface enp2s0.120: Operation not permitted
15:57:26.184 warning - Not registering detected interface enp2s0.200: Operation not permitted
15:57:26.184 Installing wg-ganymede (fd42:23:42:ff00::1 on subnet ::/64) ,as vif #4 - rate = 0
15:57:26.184 Installing wg-ganymede (fe80::1 on subnet ::/64) ,as vif #4 - rate = 0
15:57:26.184 Installing wg-juno (fd42:23:42:ff01::1 on subnet ::/64) ,as vif #4 - rate = 0
15:57:26.184 Installing wg-juno (fe80::1 on subnet ::/64) ,as vif #4 - rate = 0
15:57:26.184 warning - Not registering detected interface vnet0: Operation not permitted
15:57:26.185 warning - Not registering detected interface vnet1: Operation not permitted
15:57:26.185 warning - Not registering detected interface ppp0: Operation not permitted
15:57:26.185 warning - Not registering detected interface ppp0: Operation not permitted
15:57:26.185 There's no global address available
troglobit commented 5 years ago

Yeah, this seems to be one of the known "bugs", or limitations, in the current implementation. It's even mentioned in the BUGS section in the man page:

pim6sd requires the node running the daemon to have an IPv6 global address.

Not sure what to do about that ...

mweinelt commented 5 years ago

ULA is apparently fine, it just wants something other than link-local. But what happened was the following:

default_phyint_status disable;

phyint ip6gre1;
phyint wg-io;

This did not enable any interface. After i added phyint [...] enable; it worked, even using a ULA address.

troglobit commented 5 years ago

Aha, good catch! Would you mind writing something up in the README about how to set things up without globally scoped IPv6 address? I think that would really help other people trying pim6sd out.

I'm not even remotely fluent yet in IPv6 so any input from someone else would be greatly appreciated :)

mweinelt commented 5 years ago

Sure thing, let's just wait until we've got things up and running, so we can reduce the number of commits.

troglobit commented 5 years ago

Thanks, but you don't need to worry about that, not for my sake at least. Looking forward to your PR :)

mweinelt commented 5 years ago

As soon as we've exchanged some multicast routes :)

troglobit commented 5 years ago

That's fair. Just remember PIM is quite different from DVMRP (which is flood and prune based). PIM requires a) working unicast routes between peers, and b) someone sending and someone wanting to receive multicast. Otherwise it'll be very quiet. Pretty sure you're aware of this, just a friendly reminder.

mweinelt commented 5 years ago

We, @T-X and I, are playing amongst each other. The idea is to use DN42 (www.dn42.net) as a larger test-bed. Unicast routing is working quite well there, using BGP between AS and a multitude of different IGPs.

troglobit commented 5 years ago

Cool, good luck guys! 😎👍

mweinelt commented 4 years ago

We wrote some docs to get things up and running back then. @T-X just published them here https://dn42.dev/howto/IPv6-Multicast.

troglobit commented 4 years ago

Very nice and informative. Thank you for sharing!

leoplo commented 2 years ago

I do not think I am getting this error for the same reasons as above but it throws the same error in the end. My use case is to run pim6sd in SSM mode with re6st (based on babeld) for unicast routing.

For now I am trying the simple configuration :

default_phyint_status disable;                
phyint lo enable;              
phyint eth0 enable mld_version any;

But this fails :

$ sudo pim6sd -f ssm.conf -n -d all                                                                 
debug level 0xffffffff: mld_proto, mld_timer, mld_member, mld, switch, trace, mtrace, traceroute, timeout, callout, pkt, packets, interfaces, vif, kernel, cache, mfc, k_cache, k_mfc, rsrr, pim_detail, pim_hello, p
im_neighbors, pim_register, registers, pim_join_prune, pim_j_p, pim_jp, pim_bootstrap, pim_bsr, bsr, bootstrap, pim_asserts, pim_cand_rp, pim_c_rp, pim_rp, rp, pim_routes, pim_routing, pim_mrt, pim_timers, pim_rpf
, rpf, pim, routes, routing, mrt, routers, mrouters, neighbors, timers, asserts, all, 3
17:00:43.044 pim6sd version 2.1.0-beta1 starting                                       
17:00:43.045 65536 octets allocated for the emit/recept buffer mld6                 
17:00:43.045 Buffer reception size for socket 4 : 262144 in 0 iterations
17:00:43.046 65536 octets allocated for the emit/recept buffer pim6                           
17:00:43.047 Buffer reception size for socket 5 : 262144 in 0 iterations                       
17:00:43.047 Interfaces world initialized...                                                
17:00:43.047 Getting vifs from ssm.conf                                                     
<3>comment [## SSM configuration example] (28)                                              
<3>comment [## syntax : phyint <interface> <disable> <metric> [metric] <preference> ] (72)  
<3>comment [##         [preference] [version <version>]] (43)                               
<3>comment [##   metric and pref are for the asserts messages] (49)                         
<3>comment [#phyint ed1 enable version 1;       # speaks only MLDv1] (49)                    
<3>comment [#phyint de0 enable version 2;       # speaks only MLDv2] (49)                   
<3>comment [#phyint fxp0 enable version any;    # speaks MLDv2 and MLDv1-compat mode] (69)  
<3>comment [#phyint gif0 disable;               # not enables multicast on gif0] (54)        
<3>default_phyint_status                                    
<3>disable                                    
<3>end cnf [;] (1)                                              
<3>begin phyint [phyint] (6)                                           
<7>lo
<9>enable
<9>end phyint [;] (1)
<3>begin phyint [phyint] (6)
<7>eth0
<9>enable
<9>mld_version
<9>any
<9>end phyint [;] (1)
<3>comment [## Normally, the following parameters need not be configured.] (61)
<3>comment [##---------------Protocol timer specifications---------------------------#] (74)
<3>comment [## The timer granularity.] (25)
<3>comment [##   More this value is small, more pim6sd will be accurate.] (60)
<3>comment [##   default if not specified : 5] (33)
<3>comment [##   BE SURE to have to same granularity on ALL routers, otherwise....] (70)
<3>comment [#granularity 5;] (15)
<3>comment [## Notes : theses value are the default spec value!] (51)
<3>comment [##         do not touch it if you don't know what you do!!] (58)
<3>comment [##         you MUST change theses values according to the granularity value!] (76)
<3>comment [## syntax :  'hello_period <number> <coef>'.] (44)
<3>comment [##   number is the period in second between 2 hello messages.] (61)
<3>comment [##   coef is the coef to deterimine the hello holdtime = hello_period * coef.] (77)
<3>comment [##   default if not specified: 30 3.5] (37)
<3>comment [#hello_period 30 3.5;] (21)
<3>comment [## syntax :  'join_prune_period <number> <coef>'.] (49)
<3>comment [##    number is the period in second between 2 join/prune messages.] (67)
<3>comment [##    coef is the coef to deterimine the join/prune holdtime] (60)
<3>comment [##    = join_prune_period * coef.] (33)
<3>comment [## default if not specified : 60 3.5] (36)
<3>comment [#join_prune_period 60 3.5;] (26)
<3>comment [## syntax :  'data_timeout <number>'.] (37)
<3>comment [##    number is the time after which (S,G) state for a silent source will ] (74)
<3>comment [##    be deleted.] (17)
<3>comment [##    default if not specified  : 210 ] (38)
<3>comment [#data_timeout 210;] (18)
<3>comment [## syntax :  'assert_timeout <number>'.] (39)
<3>comment [##    this is the interval between the last time an Assert is received and ] (75)
<3>comment [##    the time at which the assert is timeout.] (46)
<3>comment [##    default if not specified : 180] (36)
<3>comment [#assert_timeout 180;] (20)
<3>comment [## syntax : default_source_metric <number>] (42)
<3>comment [#default_source_metric 1243;] (28)
<3>comment [## syntax : default_source_preference <number>] (46)
<3>comment [#default_source_preference 123;] (31)
parse successed.                           
17:00:43.052 pim_hello_period set to: 30         
17:00:43.052 pim_hello_holdtime set to: 105        
17:00:43.052 pim_join_prune_period set to: 60      
17:00:43.053 pim_join_prune_holdtime set to: 210                            
17:00:43.053 timer interval set to: 5                          
17:00:43.053 PIM data timeout set to: 210     
17:00:43.053 PIM register suppression timeout set to: 60
17:00:43.053 PIM register probe time set to: 5
17:00:43.054 PIM assert timeout set to: 180
17:00:43.055 mld version for eth0 is v1 v2
17:00:43.055 reg_rate_limit set to 100000 (bits/s)
17:00:43.056 reg_rate_interval set to  20 s.
17:00:43.056 data_rate_limit set to 100000 (bits/s)
17:00:43.056 data_rate_interval set to 20 s.
17:00:43.056 Getting vifs from kernel
17:00:43.058 Installing lo (2401:whatever1 on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.058 Installing lo (2401:whatever2 on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.059 Installing lo (2401:whatever3 on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.059 Installing lo (2401:whatever4 on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.059 Installing lo (2401:whatever5 on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.059 Installing lo (2401:whatever6 on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.060 Installing lo (2401:whatever7 on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.060 Installing lo (2401:whatever8 on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.060 Installing lo (2401:whatever9 on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.061 Installing lo (2401:whatever10 on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.061 Installing lo (2401:whatever11 on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.061 Installing lo (::1 on subnet ::/128) ,as vif #2 - rate = 0
17:00:43.062 Installing eth0 (fe80::whatever on subnet ::/64) ,as vif #2 - rate = 0
17:00:43.062 warning - Not registering detected interface re6stnet-tcp: Operation not permitted
17:00:43.062 warning - Not registering detected interface re6stnet1: Operation not permitted
17:00:43.063 warning - Not registering detected interface re6stnet2: Operation not permitted
17:00:43.063 warning - Not registering detected interface re6stnet3: Operation not permitted
17:00:43.063 warning - Not registering detected interface re6stnet4: Operation not permitted
17:00:43.064 warning - Not registering detected interface re6stnet5: Operation not permitted
17:00:43.064 warning - Not registering detected interface re6stnet6: Operation not permitted
17:00:43.065 warning - Not registering detected interface re6stnet7: Operation not permitted
17:00:43.065 warning - Not registering detected interface re6stnet8: Operation not permitted
17:00:43.066 warning - Not registering detected interface re6stnet9: Operation not permitted
17:00:43.066 warning - Not registering detected interface re6stnet10: Operation not permitted
17:00:43.066 There's no global address available

All my network interfaces except lo have one local ipv6 address and lo has a bunch of global ipv6 addresses. I do not get why There's no global address available if lo has some. Even if I disable interface eth0 and I keep to Any-source mode (I do not enable MLD), I am getting this error.

I guess the software might not like that global addresses are on the loopback interface. Did someone else already tried to enable lo interface only ?

troglobit commented 2 years ago

I have to look into this in detail, of course, but could you post the output of ip -br link and ip -br addr? Also, could you try setting up a separate dummy interface instead of using loopback? E.g. ip link add foo0 type dummy; ip link set foo0 multicast on; ...

leoplo commented 2 years ago
olimex@a20-olinuxino:~$ ip -br link
lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP> 
eth0             UP             macAddress1 <BROADCAST,MULTICAST,UP,LOWER_UP> 
can0             DOWN           <NOARP,ECHO> 
enx00e04c88743d  DOWN           macAddress2 <NO-CARRIER,BROADCAST,MULTICAST,UP> 
re6stnet-tcp     UNKNOWN        macAddress3 <BROADCAST,MULTICAST,UP,LOWER_UP> 
re6stnet1        DOWN           macAddress4 <BROADCAST,MULTICAST> 
re6stnet2        DOWN           macAddress5 <BROADCAST,MULTICAST> 
re6stnet3        DOWN           macAddress6 <BROADCAST,MULTICAST> 
re6stnet4        DOWN           macAddress7 <BROADCAST,MULTICAST> 
re6stnet5        DOWN           macAddress8 <BROADCAST,MULTICAST> 
re6stnet6        DOWN           macAddress9 <BROADCAST,MULTICAST> 
re6stnet7        DOWN           macAddress10 <BROADCAST,MULTICAST> 
re6stnet8        DOWN           macAddress11 <BROADCAST,MULTICAST> 
re6stnet9        DOWN           macAddress12 <BROADCAST,MULTICAST> 
re6stnet10       DOWN           macAddress13 <BROADCAST,MULTICAST>

lo interface not being able to do multicast nor broadcast but having the ipv6 global addresses and the other interfaces (like eth0) being able to do it but only having local ipv6 address could be the issue ? i.e. Does the current implementation allows to run MLD on an interface with only a local ipv6 address (like eth0 here) and get the global ipv6 from another interface not supporting multicast (lo) ?

user@a20-olinuxino:~$ ip -br addr
lo               UNKNOWN        127.0.0.1/8 10.0.whatever1/32 10.0.whatever2/32 10.0.whatever3/32 10.0.whatever4/32 10.0.whatever5/32 10.0.whatever6/32 10.0.whatever7/32 10.0.whatever8/32 10.0.whatever9/32 10.0.whatever10/32 2401:whatever11/64 2401:whatever12/64 2401:whatever13/64 2401:whatever14/64 2401:whatever15/64 2401:whatever16/64 2401:whatever17/64 2401:whatever18/64 2401:whatever19/64 2401:whatever20/64 2401:whatever21/64 ::1/128 
eth0             UP             192.168.99.90/24 fe80::321f:whatever/64 
can0             DOWN           
enx00e04c88743d  DOWN           169.0.1.2/8 
re6stnet-tcp     UNKNOWN        fe80::4e8:whatever/64 
re6stnet1        DOWN           
re6stnet2        DOWN           
re6stnet3        DOWN           
re6stnet4        DOWN           
re6stnet5        DOWN           
re6stnet6        DOWN           
re6stnet7        DOWN           
re6stnet8        DOWN           
re6stnet9        DOWN           
re6stnet10      DOWN