FRR on FreeBSD 12 - problems with OSPFv3

Rodney W. Grimes freebsd-rwg at gndrsh.dnsmgr.net
Fri Oct 11 21:12:24 UTC 2019


> I just upgraded from FreeBSD 11 to 12 and upgrade from quagga to FRR at 
> the same time. I've tried frr6 and frr7 and get the same errors.
> 
> bgpd and ospfd work fine, but ospf6 doesn't work.? Not sure what I'm 
> going wrong.
> 
> If I commend out all the interfaces EXCEPT lo0, ospf6d does not crash.

What if you comment out just lo0?   Running OSPF on a loopback
interface makes no since, your not going to be able to establish
a DR/BDR pair so OSPF can never really come up on that interface,
and if it did injecting any route from 127/8 into the OSPF lsdb
would be very bad!

Though I doubt this is the source of the illegal instuction trap
it is none the less a configuration issue.

> router ospf6
>  ?ospf6 router-id 172.17.18.98
>  ?redistribute connected route-map MONKEY-ospf6
>  ?redistribute static route-map MONKEY-AND-MORE-ospf6
>  ?!interface cxl1 area 0.0.0.0
>  ?!interface cxl2 area 0.0.0.0
>  ?!interface cxl3 area 0.0.0.0
>  ?interface lo0 area 0.0.0.0
> 
> As soon as I get routes from my network, ospf6d tanks.

By tanks I take it you mean gets the trap you show below?

> Any thoughts?
> 
> 
> Here is the output from zebra and ospf6.
> 
> *** LOGS ***
> 
> 2019/10/10 23:19:31 OSPF6: Scheduling cxl1 for sso
> 2019/10/10 23:19:31 OSPF6: SPF: Scheduled in 0 msec
> 2019/10/10 23:19:31 OSPF6: SPF processing: # Areas: 1, SPF runtime: 0 
> sec 5 usec, Reason: L+
> 
> 2019/10/10 23:19:31 OSPF6: Scheduling cxl2 for sso
> 2019/10/10 23:19:31 OSPF6: SPF: Scheduled in 50 msec
> 2019/10/10 23:19:31 OSPF6: Scheduling cxl3 for sso
> 2019/10/10 23:19:31 OSPF6: Neighbor state change 172.17.24.25%cxl3: 
> [Down]->[Init] (HelloReceived)
> 2019/10/10 23:19:31 OSPF6: Neighbor state change 172.17.24.25%cxl3: 
> [Init]->[ExStart] (2-WayReceived)
> 2019/10/10 23:19:31 OSPF6: Neighbor state change 172.17.24.25%cxl3: 
> [ExStart]->[ExChange] (NegotiationDone)
> 2019/10/10 23:19:31 OSPF6: Neighbor state change 172.17.24.25%cxl3: 
> [ExChange]->[Loading] (ExchangeDone)
> 2019/10/10 23:19:31 OSPF6: SPF processing: # Areas: 1, SPF runtime: 0 
> sec 109 usec, Reason: R+, R-, L+
> 
> 2019/10/10 23:19:31 OSPF6: SPF: Scheduled in 83 msec
> 2019/10/10 23:19:31 OSPF6: SPF processing: # Areas: 1, SPF runtime: 0 
> sec 116 usec, Reason: R+, N+, L+
> 
> 2019/10/10 23:19:33 OSPF6: Neighbor state change 10.8.254.122%cxl1: 
> [Down]->[Init] (HelloReceived)
> 2019/10/10 23:19:33 OSPF6: Neighbor state change 10.8.254.122%cxl1: 
> [Init]->[ExStart] (2-WayReceived)
> 2019/10/10 23:19:33 OSPF6: Neighbor state change 10.8.254.122%cxl1: 
> [ExStart]->[ExChange] (NegotiationDone)
> 2019/10/10 23:19:33 OSPF6: Neighbor state change 10.8.254.122%cxl1: 
> [ExChange]->[Loading] (ExchangeDone)
> 2019/10/10 23:19:33 OSPF6: SPF: Scheduled in 0 msec
> 2019/10/10 23:19:33 OSPF6: SPF processing: # Areas: 1, SPF runtime: 0 
> sec 99 usec, Reason: R+, R-
> 
> 2019/10/10 23:19:36 OSPF6: Neighbor state change 172.17.24.25%cxl3: 
> [Loading]->[Full] (LoadingDone)
> 2019/10/10 23:19:36 OSPF6: SPF: Scheduled in 0 msec
> 2019/10/10 23:19:31 ZEBRA: client 32 says hello and bids fair to 
> announce only ospf6 routes vrf=0
> 2019/10/10 23:19:38 ZEBRA: [EC 4043309117] Client 'ospf6' encountered an 
> error and is shutting down.
> 2019/10/10 23:19:38 ZEBRA: release_daemon_table_chunks: Released 0 table 
> chunks
> 2019/10/10 23:19:38 ZEBRA: release_daemon_label_chunks: Released 0 label 
> chunks
> 2019/10/10 23:19:39 ZEBRA: client 32 disconnected. 100 ospf6 routes 
> removed from the rib
> 
> *** CRASH ***

Zebra process crashes after the ospf6 process has encountered some error
and shut down or are you indicatong that the OSPF6D process has crashed?

> If I run on the command line and don't background, it bombs after 7 
> seconds:
> # ospf6d
> Illegal instruction
> 
> 
> Here is the end of truss:
> # truss ospf6d
> ...
> mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 
> 34863378432 (0x81e04f000)
> mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 
> 34863382528 (0x81e050000)
> mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 
> 34863386624 (0x81e051000)
> mmap(0x0,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 
> 34863390720 (0x81e052000)
> SIGNAL 11 (SIGSEGV) code=SEGV_ACCERR trapno=12 addr=0x7fffdffffff8
> process killed, signal = 4
> 
> I wasn't seeing any CORE files when the process dumped, so I turned this 
> knob:
> sysctl kern.sugid_coredump=1
> 
> Now there is a 1 GByte core file!
> 
> # /usr/obj/usr/src/amd64.amd64/gnu/usr.bin/gdb/gdb/gdb 
> /usr/local/sbin/ospf6d ospf6d.core
> 
> (gdb) bt
> #0? 0x000000080030678c in hash_get () from /usr/local/lib/libfrr.so.0
> #1? 0x000000080033a9b2 in route_node_lookup () from 
> /usr/local/lib/libfrr.so.0
> #2? 0x0000000000241345 in ospf6_route_lookup ()
> #3? 0x000000000022e718 in ospf6_abr_examin_summary ()
> #4? 0x000000000022f13b in ospf6_abr_examin_brouter ()
> #5? 0x00000000002473ad in ospf6_top_init ()
> #6? 0x000000000022efda in ospf6_abr_examin_summary ()
> #7? 0x000000000022f13b in ospf6_abr_examin_brouter ()
> #8? 0x00000000002473ad in ospf6_top_init ()
> #9? 0x000000000022efda in ospf6_abr_examin_summary ()
> #10 0x000000000022f13b in ospf6_abr_examin_brouter ()
> #11 0x00000000002473ad in ospf6_top_init ()
> .... lines #3 - #5 repeat to over #8500 ... I stopped hitting ENTER 
> around there and quit.
> 
> 
> *** The CONFIG ***
> !
> ! Zebra configuration saved from vty
> !?? 2019/10/10 23:58:21
> !
> frr version 7.1
> frr defaults traditional
> !
> hostname red-ospf6
> password r3moved
> log file /var/log/frr/ospf6d.log
> service advanced-vty
> !
> debug ospf6 neighbor state
> !
> !
> interface cxl1
>  ?ipv6 ospf6 cost 1
>  ?ipv6 ospf6 priority 0
>  ?ipv6 ospf6 network point-to-point
> !
> interface cxl2
>  ?ipv6 ospf6 cost 1
>  ?ipv6 ospf6 priority 0
>  ?ipv6 ospf6 network point-to-point
> !
> interface cxl3
>  ?ipv6 ospf6 cost 1
>  ?ipv6 ospf6 priority 0
>  ?ipv6 ospf6 network point-to-point
> !
> interface lo0
>  ?ipv6 ospf6 cost 1
>  ?ipv6 ospf6 network broadcast

What happens if you remove this lo0 section?

> !
> router ospf6
>  ?ospf6 router-id 172.17.17.17? (made example IP)
>  ?redistribute connected route-map MONKEY-ospf6
>  ?!redistribute static route-map MONKEY-AND-MORE-ospf6
>  ?interface lo0 area 0.0.0.0
And remove this too...

>  ?interface cxl1 area 0.0.0.0
>  ?interface cxl2 area 0.0.0.0
>  ?interface cxl3 area 0.0.0.0
> !
> access-list access4 permit 127.0.0.1/32
> !
> ipv6 access-list access6 permit ::1/128
> !
> ipv6 prefix-list CustomerOspf seq 5 permit 2620:62:c000::/48 le 64
> ipv6 prefix-list CustomerOspf seq 99 deny any
> ipv6 prefix-list DefaultOnly seq 5 permit ::/0
> ipv6 prefix-list DefaultOnly seq 99 deny any
> ipv6 prefix-list MonkeyOspf seq 5 permit 2607:f598::/32 le 64
> ipv6 prefix-list MonkeyOspf seq 10 permit 2607:f598:0:dada::/64 le 128
> ipv6 prefix-list MonkeyOspf seq 99 deny any
> ipv6 prefix-list SFMix seq 5 permit 2001:504:30::/64
> ipv6 prefix-list SFMix seq 99 deny any
> !
> route-map MONKEY-AND-MORE-ospf6 permit 10
>  ?match ipv6 address prefix-list CustomerOspf
>  ?set metric-type type-2
>  ?set metric 21

Your remapping ospf6 routes to ospf external type 2?
Why?  If you want to make them higher cost routes why
not just shove the cost up on the interface towards
the customer?  I am not sure what happens if your
taking an ospf6 route, mapping it to ext2 and then
re-injecting it, that looks like a route oscillation
to me.


> !
> route-map MONKEY-AND-MORE-ospf6 permit 20
>  ?match ipv6 address prefix-list MonkeyOspf
>  ?set metric 21
> !
> route-map MONKEY-AND-MORE-ospf6 permit 30
>  ?match ipv6 address prefix-list DefaultOnly
>  ?set metric 21
> !
> route-map MONKEY-AND-MORE-ospf6 permit 40
>  ?match ipv6 address prefix-list SFMix
>  ?set metric 221
> !
> route-map MONKEY-ospf6 permit 10
>  ?match ipv6 address prefix-list MonkeyOspf
>  ?set metric-type type-2
>  ?set metric 21
> !
> route-map MONKEY-ospf6 permit 20
>  ?match ipv6 address prefix-list SFMix
>  ?set metric 20
>  ?set metric-type type-2
> !
> route-map MONKEY-ospf6 permit 30
>  ?set metric 22
> !
> line vty
>  ?access-class access4
>  ?ipv6 access-class access6
>  ?exec-timeout 0 0
> !
> 
> Any help would be appreciated.


Does ospf6 come up and run if you remove all the
route-map stuff your trying to do?   Ie, let ospf
do what ospf likes to do and use interface costs
to decide what the shortest paths are.

Or are you not actually speaking OSPF over the
cxlN interfaces and just trying to inject a
type 2 external route into your ospf lsdb?

> 
> Rudy
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
> 
> 

-- 
Rod Grimes                                                 rgrimes at freebsd.org


More information about the freebsd-net mailing list