ungleich-staticcms/content/u/blog/ipv6-router-advertisement-without-default-router/contents.lr
Nico Schottelius c6aeb83eda --typo
2020-01-31 23:06:07 +01:00

68 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

title: Announcing IPv6 networks without becoming the default router
---
pub_date: 2020-01-31
---
author: ungleich network team
---
twitter_handle: ungleich
---
_hidden: no
---
_discoverable: yes
---
abstract:
You can also announce prefixes without becoming the default router
---
body:
## TL;DR
Use **AdvDefaultLifetime 0** in your radvd.conf
## Background
Sometimes you have multiple routers in a network and you don't want a
router to become the default router for clients, but it should still
announce an IPv6 prefix.
## radvd
Luckily radvd supports an option to notify the clients of this. From the manpage of radvd.conf(5):
```
AdvDefaultLifetime seconds
The lifetime associated with the default router in units of seconds. The
maximum value corresponds to 18.2 hours. A lifetime of 0 indicates that
the router is not a default router and should not appear on the default
router list. The router lifetime applies only to the router's usefulness
as a default router; it does not apply to information contained in other
message fields or options. Options that need time limits for their infor
mation include their own lifetime fields.
Must be either zero or between MaxRtrAdvInterval and 9000 seconds.
Default: 3 * MaxRtrAdvInterval (Minimum 1 second).
```
## Sample configuration
A configuration from one of our test sites looks as follows:
```
interface eth0
{
AdvSendAdvert on;
MinRtrAdvInterval 3;
MaxRtrAdvInterval 5;
AdvDefaultLifetime 0;
prefix 2a0a:e5c1:111:10c::/64 { };
};
```
Client in this test network assign themselves an additional IPv6
address from this prefix.