-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
125 lines (118 loc) · 4.48 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
VAGRANT_COMMAND = ARGV[0]
Vagrant.configure("2") do |config|
config.vm.provider :libvirt do |libvirt|
libvirt.management_network_address = "192.168.121.0/24"
libvirt.default_prefix = "two-router-t_"
end
config.vm.define "r1" do |r1|
r1.vm.provider :libvirt do |domain|
domain.management_network_mac = "08:4f:a9:00:00:01"
domain.qemu_use_session = false
end
r1.vm.box = "cisco/csr1000v"
r1.vm.synced_folder ".", "/vagrant", disabled: true
r1.ssh.insert_key = false
r1.vm.boot_timeout = 360
r1.vm.allow_fstab_modification = false
r1.vm.allow_hosts_modification = false
r1.vm.guest = :freebsd
r1.vm.provider :libvirt do |domain|
domain.nic_adapter_count = 8
domain.memory = 4096
domain.cpus = 2
domain.driver = "kvm"
end
r1.vm.provider :libvirt do |domain|
end
r1.vm.network :private_network,
:libvirt__tunnel_type => "udp",
:libvirt__tunnel_local_ip => "127.1.1.1",
:libvirt__tunnel_local_port => "10002",
:libvirt__tunnel_ip => "127.1.1.2",
:libvirt__tunnel_port => "10002",
:libvirt__iface_name => "vgif_r1_2",
auto_config: false
r1.vm.network :private_network,
:libvirt__tunnel_type => "udp",
:libvirt__tunnel_local_ip => "127.1.1.1",
:libvirt__tunnel_local_port => "10003",
:libvirt__tunnel_ip => "127.1.1.3",
:libvirt__tunnel_port => "10003",
:libvirt__iface_name => "vgif_r1_3",
auto_config: false
end
config.vm.define "r2" do |r2|
r2.vm.provider :libvirt do |domain|
domain.management_network_mac = "08:4f:a9:00:00:02"
domain.qemu_use_session = false
end
r2.vm.box = "cisco/csr1000v"
r2.vm.synced_folder ".", "/vagrant", disabled: true
r2.ssh.insert_key = false
r2.vm.boot_timeout = 360
r2.vm.allow_fstab_modification = false
r2.vm.allow_hosts_modification = false
r2.vm.guest = :freebsd
r2.vm.provider :libvirt do |domain|
domain.nic_adapter_count = 8
domain.memory = 4096
domain.cpus = 2
domain.driver = "kvm"
end
r2.vm.provider :libvirt do |domain|
end
r2.vm.network :private_network,
:libvirt__tunnel_type => "udp",
:libvirt__tunnel_local_ip => "127.1.1.2",
:libvirt__tunnel_local_port => "10002",
:libvirt__tunnel_ip => "127.1.1.1",
:libvirt__tunnel_port => "10002",
:libvirt__iface_name => "vgif_r2_2",
auto_config: false
r2.vm.network :private_network,
:libvirt__tunnel_type => "udp",
:libvirt__tunnel_local_ip => "127.1.1.2",
:libvirt__tunnel_local_port => "10003",
:libvirt__tunnel_ip => "127.1.1.3",
:libvirt__tunnel_port => "10002",
:libvirt__iface_name => "vgif_r2_3",
auto_config: false
end
config.vm.define "r3" do |r3|
r3.vm.provider :libvirt do |domain|
domain.management_network_mac = "08:4f:a9:00:00:03"
domain.qemu_use_session = false
end
r3.vm.box = "cisco/csr1000v"
r3.vm.synced_folder ".", "/vagrant", disabled: true
r3.ssh.insert_key = false
r3.vm.boot_timeout = 360
r3.vm.allow_fstab_modification = false
r3.vm.allow_hosts_modification = false
r3.vm.guest = :freebsd
r3.vm.provider :libvirt do |domain|
domain.nic_adapter_count = 8
domain.memory = 4096
domain.cpus = 2
domain.driver = "kvm"
end
r3.vm.provider :libvirt do |domain|
end
r3.vm.network :private_network,
:libvirt__tunnel_type => "udp",
:libvirt__tunnel_local_ip => "127.1.1.3",
:libvirt__tunnel_local_port => "10002",
:libvirt__tunnel_ip => "127.1.1.2",
:libvirt__tunnel_port => "10003",
:libvirt__iface_name => "vgif_r3_2",
auto_config: false
r3.vm.network :private_network,
:libvirt__tunnel_type => "udp",
:libvirt__tunnel_local_ip => "127.1.1.3",
:libvirt__tunnel_local_port => "10003",
:libvirt__tunnel_ip => "127.1.1.1",
:libvirt__tunnel_port => "10003",
:libvirt__iface_name => "vgif_r3_3",
auto_config: false
end
end