radvd: ajout du préfix ULA management des bornes
This commit is contained in:
parent
0fdc00f14e
commit
1ca53b1248
1 changed files with 18 additions and 1 deletions
|
@ -34,6 +34,18 @@ for ip in rec:
|
|||
|
||||
def router_adv(**kw):
|
||||
kw['rec'] = rec_tpl
|
||||
kw.setdefault('other_prefixes', [])
|
||||
|
||||
def prefix_section(pref):
|
||||
"""Renvoie la section de conf d'un prefixe additionnel"""
|
||||
return """
|
||||
prefix %s {
|
||||
AdvOnLink on;
|
||||
AdvAutonomous on;
|
||||
AdvRouterAddr off;
|
||||
};""" % pref
|
||||
|
||||
kw['other_prefixes'] = '\n'.join(map(prefix_section, kw['other_prefixes']))
|
||||
print """
|
||||
interface %(iface)s
|
||||
{
|
||||
|
@ -45,6 +57,7 @@ interface %(iface)s
|
|||
AdvAutonomous on;
|
||||
AdvRouterAddr on;
|
||||
};
|
||||
# Les routes supplémentaires:\n %(other_prefixes)s
|
||||
|
||||
# Les récursifs:\n %(rec)s
|
||||
|
||||
|
@ -53,5 +66,9 @@ interface %(iface)s
|
|||
# NOTE: Je met \n parce qu'un "%" en début de ligne est remplacé par bcfg2 …
|
||||
|
||||
router_adv(iface='crans', prefix='2a01:240:fe3d:4::/64')
|
||||
router_adv(iface='crans.3', prefix='2a01:240:fe3d:c04::/64')
|
||||
router_adv(iface='crans.3', prefix='2a01:240:fe3d:c04::/64',
|
||||
other_prefixes=[
|
||||
# ULA de management des bornes: fda8:5d34:a228:/48
|
||||
'fda8:5d34:a228:c04::/64',
|
||||
])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue