Skip to content

Commit 2a2847c

Browse files
committed
multiarea ospf with mixed devies
Signed-off-by: Dinesh G Dutt <dd.ps4u@gmail.com>
1 parent 4cfa309 commit 2a2847c

File tree

6 files changed

+209
-0
lines changed

6 files changed

+209
-0
lines changed

netlab/multiarea-ospf/ansible.cfg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[defaults]
2+
ansible_managed = # Ansible Managed File
3+
filter_plugins = ./filter_plugins
4+
forks=10
5+
gathering=explicit
6+
host_key_checking=False
7+
interpreter_python=auto_silent
8+
inventory=hosts.yml
9+
retry_files_enabled=false
10+
roles_path=./roles
11+
ssh_args="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
12+
stdout_callback=yaml
13+
deprecation_warnings=False
14+
15+
[persistent_connection]
16+
command_timeout=60
17+
18+
[paramiko_connection]
19+
host_key_auto_add=no
20+
host_key_checking=no
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
- hosts: sjc-l2:sjc-s2
3+
tasks:
4+
- name: Add vagrant as a user to run net commands
5+
become: yes
6+
lineinfile:
7+
path: /etc/netd.conf
8+
regexp: '^users_with_show = root, cumulus'
9+
line: users_with_show = root, cumulus, vagrant
10+
11+
- name: Restart netd
12+
become: yes
13+
service: name=netd state=restarted
14+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ip route vrf management 192.168.50.250/32 192.168.14.1
2+
dns domain sqsystems.net
3+
ip name-server 8.8.8.8
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ip domain name sqsystems.net
2+
ip name-server 8.8.8.8
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ip domain-name sqsystems.net
2+
ip name-server 8.8.8.8

netlab/multiarea-ospf/topology.yml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
---
2+
message: |
3+
Multi-area OSPF
4+
5+
plugin: [ multilab ]
6+
defaults.multilab.id: 14
7+
8+
defaults.device: linux
9+
10+
vlans:
11+
red:
12+
role: route
13+
ospf:
14+
area: 0.0.0.1
15+
blue:
16+
role: route
17+
ospf:
18+
area: 0.0.0.2
19+
green:
20+
role: route
21+
ospf:
22+
area: 0.0.0.3
23+
24+
groups:
25+
lldp-hosts:
26+
members: [sjc-h1, sjc-h3, sjc-h5]
27+
config: [ linux-lldp-install.j2 ]
28+
29+
non-lldp-hosts:
30+
members: [sjc-h2, sjc-h4, sjc-h6]
31+
32+
eos-nodes:
33+
members: [ sjc-l1, sjc-s4 ]
34+
config: [ eos-dns-time-cfg.j2 ]
35+
36+
nxos-nodes:
37+
members: [ sjc-l3, sjc-s3, sjc-s5 ]
38+
config: [ nxos-dns-time-cfg.j2 ]
39+
40+
csr-nodes:
41+
members: [ sjc-s1 ]
42+
config: [ ios-dns-time-cfg.j2 ]
43+
44+
cumulus-nodes:
45+
members: [ sjc-s2, sjc-l2 ]
46+
config: [ cls-enable-netd.j2 ]
47+
48+
nodes:
49+
sjc-l1:
50+
module: [ vlan, ospf, bfd ]
51+
device: eos
52+
vlans:
53+
red:
54+
55+
sjc-l2:
56+
module: [ vlan, ospf, bfd ]
57+
device: cumulus
58+
vlans:
59+
blue:
60+
61+
sjc-l3:
62+
module: [ vlan, ospf, bfd ]
63+
device: nxos
64+
vlans:
65+
green:
66+
67+
sjc-s1:
68+
module: [ vlan, ospf, bfd ]
69+
device: csr
70+
71+
sjc-s2:
72+
module: [ vlan, ospf, bfd ]
73+
device: cumulus
74+
75+
sjc-s3:
76+
module: [ vlan, ospf, bfd ]
77+
device: nxos
78+
79+
sjc-s4:
80+
module: [ vlan, ospf, bfd ]
81+
device: eos
82+
83+
sjc-s5:
84+
module: [ vlan, ospf, bfd ]
85+
device: nxos
86+
87+
sjc-h1:
88+
sjc-h2:
89+
sjc-h3:
90+
sjc-h4:
91+
sjc-h5:
92+
sjc-h6:
93+
94+
links:
95+
- sjc-s1:
96+
sjc-s4:
97+
ospf:
98+
area: 0.0.0.0
99+
- sjc-s1:
100+
sjc-s5:
101+
ospf:
102+
area: 0.0.0.0
103+
- sjc-s2:
104+
sjc-s4:
105+
ospf:
106+
area: 0.0.0.0
107+
- sjc-s2:
108+
sjc-s5:
109+
ospf:
110+
area: 0.0.0.0
111+
- sjc-s3:
112+
sjc-s4:
113+
ospf:
114+
area: 0.0.0.0
115+
- sjc-s3:
116+
sjc-s5:
117+
ospf:
118+
area: 0.0.0.0
119+
- sjc-s1:
120+
sjc-l1:
121+
ospf:
122+
area: 0.0.0.1
123+
- sjc-s2:
124+
sjc-l1:
125+
ospf:
126+
area: 0.0.0.1
127+
- sjc-s1:
128+
sjc-l2:
129+
ospf:
130+
area: 0.0.0.2
131+
- sjc-s2:
132+
sjc-l2:
133+
ospf:
134+
area: 0.0.0.2
135+
- sjc-s3:
136+
sjc-l3:
137+
ospf:
138+
area: 0.0.0.3
139+
- sjc-l1:
140+
vlan.access: red
141+
sjc-h1:
142+
- sjc-l1:
143+
vlan.access: red
144+
sjc-h2:
145+
- sjc-l2:
146+
vlan.access: blue
147+
sjc-h3:
148+
- sjc-l2:
149+
vlan.access: blue
150+
sjc-h4:
151+
- sjc-l3:
152+
vlan.access: green
153+
sjc-h5:
154+
- sjc-l3:
155+
vlan.access: green
156+
sjc-h6:
157+
158+
validate:
159+
ping_sjc-h3:
160+
nodes: [sjc-h1]
161+
plugin: ping('sjc-h3')
162+
ping_sjc-h4:
163+
nodes: [sjc-h2]
164+
plugin: ping('sjc-h4')
165+
ping_sjc-h6:
166+
nodes: [sjc-h5]
167+
plugin:
168+
ping('sjc-h6')

0 commit comments

Comments
 (0)