Evgeniy Sudyr <[email protected]> writes:

> Hi,
>
> I want to change route preference for the default route in RA messages
> which are sent to clients.
>
> On 5.9 GENERIC.MP#1888 amd64 I do have rtadvd and changing rtflags in
> rtadvd.conf doesn't changes
>
> Default router Preference (it sends default value, where I define "l" = Low).
>
> In config I have just two items set:
>
> vlan6:\
>        :raflags#64:\
>        :rtflags="l":
>
> raflags#64 (Other stateful configuration flag bit)
> rtflags="l" (Low route preference for the route)

I don't understand what "l" means here, rtadvd.conf(5) doesn't seem to
mention this as a valid setting.

> I'm always getting pref=medium for default router preference.
>
> $ ndp -rn
> fe80::xxxx:xxxx:xxxx:5e0c%vlan0 if=vlan0, flags=O, pref=medium, expire=29m52s
>
> However It works perfect for non-default route preference for the
> route, but not default e.g.:
>
> vlan6:\
>        :raflags#64:rtflags="l":rtprefix="2001:1:1:1::":rtplen#64:
>
> It will be great if someone can share working config options which
> allows to change DRFAULT router preference RA message value.

As the rtflags description says, bits 4 and 3 are used to encode the
preference.  "low" is 0x18 / 24.  :raflags#24: seems to do the trick
here.

Your mail points out three problems imo:
- tcpdump doesn't show the preference
- the documentation of raflags is lacking
- it's a shame that raflags was used instead of a nicer config
  abstraction.  I think :pref="low":managed#1: would be a bit easier
  than playing with... bits.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to