Repository navigation
Expand file tree
/
Copy pathVagrantfile
More file actions
116 lines (110 loc) · 5.23 KB
/
Copy pathVagrantfile
File metadata and controls
116 lines (110 loc) · 5.23 KB
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
Vagrant.configure("2") do |config|
config.vm.provider :virtualbox do |v|
v.memory = 1024
end
config.vm.define "inetRouter1" do |inetRouter1|
inetRouter1.vm.box = "centos/7"
inetRouter1.vm.hostname = "inetRouter1"
inetRouter1.vm.network :private_network, ip: '192.168.250.1', adapter: 2, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter1-3"
inetRouter1.vm.network :private_network, ip: '192.168.251.1', adapter: 3, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter1-2"
inetRouter1.vm.network :private_network, ip: '192.168.200.1', adapter: 4, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter11-31"
inetRouter1.vm.network :private_network, ip: '192.168.210.1', adapter: 5, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter11-21"
inetRouter1.vm.provision "ansible" do |ansible|
ansible.playbook = "playbooks/ospf.yml"
ansible.extra_vars = {
"zebra_password" => "zebrapass",
"enable_zebra_password" => "enablezebra",
"zebra_eth1_ip" => "192.168.250.1/29",
"zebra_eth2_ip" => "192.168.251.1/29",
"zebra_eth3_ip" => "192.168.200.1/29",
"zebra_eth4_ip" => "192.168.210.1/29",
"ospf_password" => "ospfpass",
"cost_eth1" => "200",
"cost_eth2" => "20",
"cost_eth3" => "200",
"cost_eth4" => "20",
"ospf_router_id" => "192.168.250.1",
"ospf_network_1" => "192.168.250.0/29",
"ospf_network_2" => "192.168.251.0/29",
"ospf_network_3" => "192.168.200.0/29",
"ospf_network_4" => "192.168.210.0/29",
"desc_eth1" => "inetRouter1-3",
"desc_eth2" => "inetRouter1-2",
"desc_eth3" => "inetRouter11-31",
"desc_eth4" => "inetRouter11-21"
}
ansible.verbose = true
end
end
config.vm.define "inetRouter2" do |inetRouter2|
inetRouter2.vm.box = "centos/7"
inetRouter2.vm.hostname = "inetRouter2"
inetRouter2.vm.network :private_network, ip: '192.168.251.2', adapter: 2, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter1-2"
inetRouter2.vm.network :private_network, ip: '192.168.252.2', adapter: 3, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter3-2"
inetRouter2.vm.network :private_network, ip: '192.168.210.2', adapter: 4, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter11-21"
inetRouter2.vm.network :private_network, ip: '192.168.220.2', adapter: 5, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter31-21"
inetRouter2.vm.provision "ansible" do |ansible|
ansible.playbook = "playbooks/ospf.yml"
ansible.extra_vars = {
"zebra_password" => "zebrapass",
"enable_zebra_password" => "enablezebra",
"zebra_eth1_ip" => "192.168.251.2/29",
"zebra_eth2_ip" => "192.168.252.2/29",
"zebra_eth3_ip" => "192.168.210.2/29",
"zebra_eth4_ip" => "192.168.220.2/29",
"ospf_password" => "ospfpass",
"cost_eth1" => "20",
"cost_eth2" => "20",
"cost_eth3" => "20",
"cost_eth4" => "20",
"ospf_router_id" => "192.168.251.2",
"ospf_network_1" => "192.168.251.0/29",
"ospf_network_2" => "192.168.252.0/29",
"ospf_network_3" => "192.168.210.0/29",
"ospf_network_4" => "192.168.220.0/29",
"desc_eth1" => "inetRouter1-2",
"desc_eth2" => "inetRouter3-2",
"desc_eth3" => "inetRouter11-21",
"desc_eth4" => "inetRouter31-21"
}
ansible.verbose = true
end
end
config.vm.define "inetRouter3" do |inetRouter3|
inetRouter3.vm.box = "centos/7"
inetRouter3.vm.hostname = "inetRouter3"
inetRouter3.vm.network :private_network, ip: "192.168.252.1", adapter: 2, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter3-2"
inetRouter3.vm.network :private_network, ip: "192.168.250.2", adapter: 3, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter1-3"
inetRouter3.vm.network :private_network, ip: "192.168.220.1", adapter: 4, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter31-21"
inetRouter3.vm.network :private_network, ip: "192.168.200.2", adapter: 5, netmask: "255.255.255.248", virtualbox__intnet: "inetRouter11-31"
inetRouter3.vm.provision "ansible" do |ansible|
ansible.playbook = "playbooks/ospf.yml"
ansible.extra_vars = {
"zebra_password" => "zebrapass",
"enable_zebra_password" => "enablezebra",
"zebra_eth1_ip" => "192.168.252.1/29",
"zebra_eth2_ip" => "192.168.250.2/29",
"zebra_eth3_ip" => "192.168.220.1/29",
"zebra_eth4_ip" => "192.168.200.2/29",
"ospf_password" => "ospfpass",
"cost_eth1" => "20",
"cost_eth2" => "200",
"cost_eth3" => "20",
"cost_eth4" => "20",
"ospf_router_id" => "192.168.252.1",
"ospf_network_1" => "192.168.252.0/29",
"ospf_network_2" => "192.168.250.0/29",
"ospf_network_3" => "192.168.220.0/29",
"ospf_network_4" => "192.168.200.0/29",
"desc_eth1" => "inetRouter3-2",
"desc_eth2" => "inetRouter1-3",
"desc_eth3" => "inetRouter31-21",
"desc_eth4" => "inetRouter11-31"
}
ansible.verbose = true
end
end
config.vm.provision "shell" do |shell|
shell.path = "./files/sshd_cfg.sh"
end
end