Skip to content

Commit

Permalink
feature: vagrant-srv6
Browse files Browse the repository at this point in the history
  • Loading branch information
ziszat committed Dec 20, 2024
1 parent b322584 commit ec75cea
Showing 1 changed file with 124 additions and 0 deletions.
124 changes: 124 additions & 0 deletions extras/vagrant-srv6/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
# Node R1 configuration
config.vm.define "hosta" do |hosta|
hosta.vm.box = "bento/ubuntu-18.04"
hosta.vm.synced_folder(".", nil, :disabled => true, :id => "vagrant-root")
hosta.vm.network "private_network", ip: "10.0.0.1", virtualbox__intnet: "netv4a"
hosta.vm.provider "virtualbox" do |virtualbox|
virtualbox.memory = "256"
virtualbox.customize ['modifyvm', :id, '--nictrace2', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile2', 'tracea.pcap']
virtualbox.customize ['modifyvm', :id, '--cableconnected1', 'on']
virtualbox.customize ['modifyvm', :id, '--cableconnected2', 'on']
end
end

config.vm.define "hostb" do |hostb|
hostb.vm.box = "bento/ubuntu-18.04"
hostb.vm.synced_folder(".", nil, :disabled => true, :id => "vagrant-root")
hostb.vm.network "private_network", ip: "10.0.1.1", virtualbox__intnet: "netv4b"
hostb.vm.provider "virtualbox" do |virtualbox|
virtualbox.memory = "256"
virtualbox.customize ['modifyvm', :id, '--nictrace2', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile2', 'traceb.pcap']
virtualbox.customize ['modifyvm', :id, '--cableconnected1', 'on']
virtualbox.customize ['modifyvm', :id, '--cableconnected2', 'on']
end
end

# Node R1 configuration
config.vm.define "r1" do |r1|
r1.vm.box = "lukuenlong/ubuntu-18.04-vpp"
r1.vm.synced_folder(".", nil, :disabled => true, :id => "vagrant-root")
r1.vm.network "private_network", ip: "10.0.0.2", virtualbox__intnet: "netv4a"
r1.vm.network "private_network", ip: "2001:12::1",netmask: "64", virtualbox__intnet: "net12"

r1.vm.provider "virtualbox" do |virtualbox|
virtualbox.memory = "4096"
virtualbox.customize ['modifyvm', :id, '--nictrace2', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile2', 'trace1a.pcap']
virtualbox.customize ['modifyvm', :id, '--nictrace3', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile3', 'trace12.pcap']
virtualbox.customize ['modifyvm', :id, '--cableconnected1', 'on']
virtualbox.customize ['modifyvm', :id, '--cableconnected2', 'on']
virtualbox.customize ['modifyvm', :id, '--cableconnected3', 'on']

end
end

# Node R2 configuration
config.vm.define "r2" do |r2|
r2.vm.box = "lukuenlong/ubuntu-18.04-vpp"
r2.vm.synced_folder(".", nil, :disabled => true, :id => "vagrant-root")
r2.vm.network "private_network", ip: "2001:12::2",netmask: "64", virtualbox__intnet: "net12"
r2.vm.network "private_network", ip: "2001:23::1",netmask: "64", virtualbox__intnet: "net23"
r2.vm.network "private_network", ip: "2001:a::1",netmask: "64", virtualbox__intnet: "netserver1"

r2.vm.provider "virtualbox" do |virtualbox|
virtualbox.memory = "4096"
virtualbox.customize ['modifyvm', :id, '--nictrace2', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile2', 'trace2.pcap']
virtualbox.customize ['modifyvm', :id, '--nictrace3', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile3', 'trace21.pcap']
virtualbox.customize ['modifyvm', :id, '--nictrace4', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile4', 'trace22.pcap']
virtualbox.customize ['modifyvm', :id, '--cableconnected1', 'on']
virtualbox.customize ['modifyvm', :id, '--cableconnected2', 'on']
virtualbox.customize ['modifyvm', :id, '--cableconnected3', 'on']
end
end

# Node R3 configuration
config.vm.define "r3" do |r3|
r3.vm.box = "lukuenlong/ubuntu-18.04-vpp"
r3.vm.synced_folder(".", nil, :disabled => true, :id => "vagrant-root")
r3.vm.network "private_network", ip: "10.0.1.2", virtualbox__intnet: "netv4b"
r3.vm.network "private_network", ip: "2001:23::2",netmask: "64", virtualbox__intnet: "net23"
r3.vm.network "private_network", ip: "2001:b::1",netmask: "64", virtualbox__intnet: "netserver2"
r3.vm.provider "virtualbox" do |virtualbox|
virtualbox.memory = "4096"
virtualbox.customize ['modifyvm', :id, '--nictrace2', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile2', 'trace3.pcap']
virtualbox.customize ['modifyvm', :id, '--nictrace3', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile3', 'trace31.pcap']
virtualbox.customize ['modifyvm', :id, '--nictrace4', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile4', 'trace32.pcap']

virtualbox.customize ['modifyvm', :id, '--cableconnected1', 'on']
virtualbox.customize ['modifyvm', :id, '--cableconnected2', 'on']
virtualbox.customize ['modifyvm', :id, '--cableconnected3', 'on']
virtualbox.customize ['modifyvm', :id, '--cableconnected4', 'on']

end
end
# server1 configuration
config.vm.define "server1" do |server1|
server1.vm.box = "bento/ubuntu-18.04"
server1.vm.synced_folder(".", nil, :disabled => true, :id => "vagrant-root")
server1.vm.network "private_network", ip: "2001:a::2",netmask: "64", virtualbox__intnet: "netserver1"
server1.vm.provider "virtualbox" do |virtualbox|
virtualbox.memory = "256"
virtualbox.customize ['modifyvm', :id, '--nictrace2', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile2', 'traceserver1.pcap']
virtualbox.customize ['modifyvm', :id, '--cableconnected1', 'on']
virtualbox.customize ['modifyvm', :id, '--cableconnected2', 'on']
end
end

# server2 configuration
config.vm.define "server2" do |server2|
server2.vm.box = "bento/ubuntu-18.04"
server2.vm.synced_folder(".", nil, :disabled => true, :id => "vagrant-root")
server2.vm.network "private_network", ip: "2001:b::2",netmask: "64", virtualbox__intnet: "netserver2"
server2.vm.provider "virtualbox" do |virtualbox|
virtualbox.memory = "256"
virtualbox.customize ['modifyvm', :id, '--nictrace2', 'on']
virtualbox.customize ['modifyvm', :id, '--nictracefile2', 'traceserver2.pcap']
virtualbox.customize ['modifyvm', :id, '--cableconnected1', 'on']
virtualbox.customize ['modifyvm', :id, '--cableconnected2', 'on']
end
end
end

0 comments on commit ec75cea

Please sign in to comment.