[ipv6only] nat64 est routeur sur le vlan 6 (anciennement vlan gratuit)
This commit is contained in:
parent
2fedcf4b81
commit
2509592a87
4 changed files with 18 additions and 5 deletions
|
@ -62,13 +62,8 @@ if has("vlan-radin"):
|
|||
subnet 10.42.0.0 netmask 255.255.0.0 {
|
||||
interface eth3;
|
||||
option domain-name-servers %s;
|
||||
option routers 10.42.0.10;
|
||||
authoritative;
|
||||
default-lease-time 86400;
|
||||
deny unknown-clients;
|
||||
option root-path "/";
|
||||
next-server 138.231.136.98;
|
||||
filename "pxelinux.0";
|
||||
pool {
|
||||
range 10.42.1.1 10.42.255.200;
|
||||
failover peer "dhcp-failover";
|
||||
|
|
|
@ -81,6 +81,8 @@ iface %(interface)s inet static
|
|||
netmask 255.255.0.0
|
||||
broadcast 10.42.255.255
|
||||
mtu 1496""" % { 'interface': interface, 'ip': radinip() }
|
||||
print
|
||||
radin6(interface)
|
||||
|
||||
elif mode == "accueil":
|
||||
print """auto %(interface)s
|
||||
|
@ -165,6 +167,11 @@ def admip6(If):
|
|||
else: alt = ''
|
||||
return "2a01:240:fe3d:c804:" + alt + If_Mac[If]
|
||||
|
||||
def radinip6(If):
|
||||
if len(If_Mac[If].split(':'))<4: alt = ':'
|
||||
else: alt = ''
|
||||
return "2001:470:c8b9:a4:" + alt + If_Mac[If]
|
||||
|
||||
def pub6(interface, mode = 'serveur'):
|
||||
""" fonction permettant d'ajouter une adressse ipv6 a l'interface donnee en argument.
|
||||
Le mode permet de faire la distinction entre les simples serveurs et les routeurs.
|
||||
|
@ -184,6 +191,12 @@ def adm6(interface):
|
|||
netmask 64""" % { 'interface': interface, 'ip6': admip6(interface) }
|
||||
print
|
||||
|
||||
def radin6(interface):
|
||||
print """iface %(interface)s inet6 static
|
||||
address %(ip6)s
|
||||
netmask 64""" % { 'interface': interface, 'ip6': radinip6(interface) }
|
||||
print
|
||||
|
||||
Probe_Mac = metadata.Probes["mac"].split('\n')
|
||||
If_Mac = dict(zip(Probe_Mac[:-1:2], Probe_Mac[1::2]))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue