Skip to content

Instantly share code, notes, and snippets.

@coulof
Last active Jan 12, 2021
Embed
What would you like to do?
Tanzu + VyOS
[Match]
MACAddress=00:50:56:82:ba:db
[Network]
[Address]
Address=10.247.247.247/24
[Route]
Gateway=10.247.247.1
#Destination=0.0.0.0/0
Metric=101
[Match]
MACAddress=00:50:56:82:65:c7
[Network]
DNS=10.247.247.126
[Address]
Address=10.0.0.2/24
[Route]
Gateway=10.0.0.1
Destination=10.0.0.0/22
[Match]
MACAddress=00:50:56:82:d3:0f
[Network]
[Address]
Address=10.0.1.2/32
interfaces {
ethernet eth0 {
address 10.247.247.126/24
description OUTSIDE
hw-id 00:50:56:82:0b:8f
}
ethernet eth1 {
address 10.0.0.1/24
description WORKLOAD
hw-id 00:50:56:82:2a:42
}
ethernet eth2 {
address 10.0.1.1/24
description MANAGEMENT
hw-id 00:50:56:82:76:26
}
loopback lo {
}
}
nat {
source {
rule 100 {
outbound-interface eth0
source {
address 10.0.0.0/23
}
translation {
address masquerade
}
}
}
}
protocols {
static {
route 0.0.0.0/0 {
next-hop 10.247.247.1 {
}
}
}
}
#!/usr/bin/env ruby
ip_prefix = ARGV[0] || '10.0.0.'
name_prefix = ARGV[1] || 'tnz-management-'
(1..254).each do |ip|
puts "#{ip_prefix}#{ip}\t#{name_prefix}#{+ip}"
end
interface=workload
listen-address=10.0.1.2
expand-hosts
bogus-priv
log-queries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment