Skip to content

Commit

Permalink
vjunos: Add IPv6 management addresses, fix v4 address templating
Browse files Browse the repository at this point in the history
  • Loading branch information
vista- committed Oct 29, 2024
1 parent 6143dc5 commit bf4460a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 6 deletions.
12 changes: 10 additions & 2 deletions vjunosevolved/docker/init.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ interfaces {
re0:mgmt-0 {
unit 0 {
family inet {
address {MGMT_IP_V4};
address {MGMT_IP_IPV4};
}
family inet {
address {MGMT_IP_IPV6};
}
}
}
Expand All @@ -34,7 +37,12 @@ routing-instances {
mgmt_junos {
routing-options {
static {
route 0.0.0.0/0 next-hop {MGMT_GW_V4};
route 0.0.0.0/0 next-hop {MGMT_GW_IPV4};
}
rib mgmt_junos.inet6.0 {
static {
route ::/0 next-hop {MGMT_GW_IPV6};
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions vjunosevolved/docker/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def __init__(self, hostname, username, password, conn_mode):

cfg = cfg.replace("{MGMT_IP_IPV4}", self.mgmt_address_ipv4)
cfg = cfg.replace("{MGMT_GW_IPV4}", self.mgmt_gw_ipv4)
cfg = cfg.replace("{MGMT_IP_IPV6}", self.mgmt_address_ipv6)
cfg = cfg.replace("{MGMT_GW_IPV6}", self.mgmt_gw_ipv6)
cfg = cfg.replace("{HOSTNAME}", self.hostname)
# replace CRYPT_PSWD file var with nodes given password
# (Evo does not accept plaintext passwords in config)
Expand Down
12 changes: 10 additions & 2 deletions vjunosrouter/docker/init.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ interfaces {
fxp0 {
unit 0 {
family inet {
address {MGMT_IP_V4};
address {MGMT_IP_IPV4};
}
family inet6 {
address {MGMT_IP_IPV6};
}
}
}
Expand All @@ -34,7 +37,12 @@ routing-instances {
mgmt_junos {
routing-options {
static {
route 0.0.0.0/0 next-hop {MGMT_GW_V4};
route 0.0.0.0/0 next-hop {MGMT_GW_IPV4};
}
rib mgmt_junos.inet6.0 {
static {
route ::/0 next-hop {MGMT_GW_IPV6};
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions vjunosrouter/docker/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def __init__(self, hostname, username, password, conn_mode):

cfg = cfg.replace("{MGMT_IP_IPV4}", self.mgmt_address_ipv4)
cfg = cfg.replace("{MGMT_GW_IPV4}", self.mgmt_gw_ipv4)
cfg = cfg.replace("{MGMT_IP_IPV6}", self.mgmt_address_ipv6)
cfg = cfg.replace("{MGMT_GW_IPV6}", self.mgmt_gw_ipv6)
cfg = cfg.replace("{HOSTNAME}", self.hostname)

# write changes to init.conf file
Expand Down
12 changes: 10 additions & 2 deletions vjunosswitch/docker/init.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ interfaces {
fxp0 {
unit 0 {
family inet {
address {MGMT_IP_V4};
address {MGMT_IP_IPV4};
}
family inet6 {
address {MGMT_IP_IPV6};
}
}
}
Expand All @@ -34,7 +37,12 @@ routing-instances {
mgmt_junos {
routing-options {
static {
route 0.0.0.0/0 next-hop {MGMT_GW_V4};
route 0.0.0.0/0 next-hop {MGMT_GW_IPV4};
}
rib mgmt_junos.inet6.0 {
static {
route ::/0 next-hop {MGMT_GW_IPV6};
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions vjunosswitch/docker/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def __init__(self, hostname, username, password, conn_mode):

cfg = cfg.replace("{MGMT_IP_IPV4}", self.mgmt_address_ipv4)
cfg = cfg.replace("{MGMT_GW_IPV4}", self.mgmt_gw_ipv4)
cfg = cfg.replace("{MGMT_IP_IPV6}", self.mgmt_address_ipv6)
cfg = cfg.replace("{MGMT_GW_IPV6}", self.mgmt_gw_ipv6)
cfg = cfg.replace("{HOSTNAME}", self.hostname)

# write changes to init.conf file
Expand Down

0 comments on commit bf4460a

Please sign in to comment.