Skip to content

Instantly share code, notes, and snippets.

@coulof
Last active January 12, 2021 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coulof/baf97ca912d46f6e55a6379088297b8f to your computer and use it in GitHub Desktop.
Save coulof/baf97ca912d46f6e55a6379088297b8f to your computer and use it in GitHub Desktop.
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