-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIOS_cmd.txt
343 lines (336 loc) · 6.77 KB
/
IOS_cmd.txt
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
#Starter:
enab
conf t
hostname <name>
no ip domain-lookup
line con 0
exec-timeout 0 0
logging synchronous
exit
do wr
!
#Building A Distribution (OSPF) Network = DHCP Server
#Configure DHCP pools on Building A Distribution (OSPF) Network
#A_Router
int g0/0
no shut
!
int g0/0.5
encapsulation dot1q 5
ip addr 192.168.51.1 255.255.255.224
!
int g0/0.10
encapsulation dot1q 10
ip addr 192.168.51.33 255.255.255.224
!
int g0/0.15
encapsulation dot1q 15
ip addr 192.168.51.65 255.255.255.224
!
int g0/0.20
encapsulation dot1q 20
ip addr 192.168.51.97 255.255.255.224
!
int g0/1
ip address 10.51.0.9 255.255.255.252
no shut
!
int g0/2
ip address 10.51.0.6 255.255.255.252
no shut
!
ip dhcp pool net5
network 192.168.51.0 255.255.255.224
default-router 192.168.51.1
!
ip dhcp pool net10
network 192.168.51.32 255.255.255.224
default-router 192.168.51.33
!
ip dhcp pool net15
network 192.168.51.64 255.255.255.224
default-router 192.168.51.65
!
ip dhcp pool net20
network 192.168.51.96 255.255.255.224
default-router 192.168.51.97
!
ip dhcp pool net25
network 172.16.51.0 255.255.255.240
default-router 172.16.51.1
!
ip dhcp pool net30
network 172.16.51.16 255.255.255.240
default-router 172.16.51.17
!
ip dhcp pool net35
network 172.16.51.32 255.255.255.240
default-router 172.16.51.33
!
ip dhcp pool net40
network 172.16.51.48 255.255.255.240
default-router 172.16.51.49
!
#avoid initial DHCPD-4-PING_CONFLICT
ip dhcp excluded-address 192.168.51.1
ip dhcp excluded-address 192.168.51.33
ip dhcp excluded-address 192.168.51.65
ip dhcp excluded-address 192.168.51.97
ip dhcp excluded-address 172.16.51.1
ip dhcp excluded-address 172.16.51.17
ip dhcp excluded-address 172.16.51.33
ip dhcp excluded-address 172.16.51.49
!
#Building A1 VTP Server = fdauti_1
#Building A1 is root switcvh for it's segement
#A1
vtp mode server
vtp domain fdauti_1
spanning-tree vlan 1,5,15,20,25 root primary
!
#A2
vtp mode client
vtp domain fdauti_1
!
#A3
vtp mode client
vtp domain fdauti_1
!
#Building A4 VTP Server = fdauti_2
#Building A4 is root switch for it's segment
#A4
vtp mode server
vtp domain fdauti_2
spanning-tree vlan 1,25,30,35,40 root primary
!
#A5
vtp mode client
vtp domain fdauti_2
!
#Configure an etherchannel where redundant L2 links exists
#A4
int range f0/22-24
channel-group 1 mode desirable
!
#A5
int range f0/22-24
channel-group 1 mode desirable
!
#Configure all trunks to only allow traffic to and from vlans within the topology
#Configure unused ports into a dummy vlan (99)
#Configure switch ports connected to PCs with portfast
#A1
vlan 5
vlan 10
vlan 15
vlan 20
vlan 99
!
int g1/1
switchport mode trunk
switchport trunk allowed vlan 5,10,15,20
!
int g2/1
switchport mode trunk
switchport trunk allowed vlan 5,10,15,20
!
int g0/1
switchport mode trunk
switchport trunk allowed vlan 5,10,15,20
!
#A2
int g0/1
switchport mode trunk
switchport trunk allowed vlan 5,10,15,20
!
int f0/1
switchport access vlan 5
spanning-tree portfast
spanning-tree bpduguard enable
!
int f0/2
switchport access vlan 10
spanning-tree portfast
spanning-tree bpduguard enable
!
int f0/3
switchport access vlan 15
spanning-tree portfast
spanning-tree bpduguard enable
!
int g0/2
switchport access vlan 99
!
#A3
int g0/1
switchport mode trunk
switchport trunk allowed vlan 5,10,15,20
!
int f0/1
switchport access vlan 20
spanning-tree portfast
spanning-tree bpduguard enable
!
int f0/2
switchport access vlan 10
spanning-tree portfast
spanning-tree bpduguard enable
!
int f0/3
switchport access vlan 15
spanning-tree portfast
spanning-tree bpduguard enable
!
int g0/2
switchport access vlan 99
!
#A4_MLS
vlan 25
vlan 30
vlan 35
vlan 40
vlan 99
!
int vlan 25
ip addr 172.16.51.1 255.255.255.240
ip helper-address 192.168.51.1
int vlan 30
ip addr 172.16.51.17 255.255.255.240
ip helper-address 192.168.51.1
int vlan 35
ip addr 172.16.51.33 255.255.255.240
ip helper-address 192.168.51.1
int vlan 40
ip addr 172.16.51.49 255.255.255.240
ip helper-address 192.168.51.1
!
int g0/2
no switchport
ip address 10.51.0.5 255.255.255.252
no shut
!
int f0/1
switchport access vlan 25
spanning-tree portfast
spanning-tree bpduguard enable
!
int f0/2
switchport access vlan 30
spanning-tree portfast
spanning-tree bpduguard enable
!
int f0/3
switchport access vlan 35
spanning-tree portfast
spanning-tree bpduguard enable
!
int range f0/4-21
switchport access vlan 99
!
int g0/1
switchport access vlan 99
!
#int range f0/22-24
int po1
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 25,30,35,40
!
#A5
#int range f0/22-24
int po1
switchport mode trunk
switchport trunk allowed vlan 25,30,35,40
!
int f0/1
switchport access vlan 40
spanning-tree portfast
spanning-tree bpduguard enable
!
int f0/2
switchport access vlan 30
spanning-tree portfast
spanning-tree bpduguard enable
!
int f0/3
switchport access vlan 25
spanning-tree portfast
spanning-tree bpduguard enable
!
int range f0/4-21
switchport access vlan 99
!
int range g0/1-2
switchport access vlan 99
!
#Configure OSPF Protocol (on all required devices) to allow connectivity between VLANS
#A_Router
router ospf 1
network 10.51.0.4 0.0.0.3 area 0
network 10.51.0.8 0.0.0.3 area 0
network 192.168.51.0 0.0.0.31 area 0
network 192.168.51.32 0.0.0.31 area 0
network 192.168.51.64 0.0.0.31 area 0
network 192.168.51.96 0.0.0.31 area 0
!
#A4_MLS
ip routing
router ospf 1
network 10.51.0.4 0.0.0.3 area 0
network 172.16.51.0 0.0.0.15 area 0
network 172.16.51.16 0.0.0.15 area 0
network 172.16.51.32 0.0.0.15 area 0
network 172.16.51.48 0.0.0.15 area 0
!
#Core
int g0/0
ip addr 10.51.0.10 255.255.255.252
no shut
int g0/1
ip addr 10.85.0.14 255.255.255.252
no shut
int g0/2
ip addr 18.0.0.2 255.255.255.252
no shut
!
ip route 0.0.0.0 0.0.0.0 18.0.0.1
!
router ospf 1
network 18.0.0.0 0.0.0.3 area 0
network 10.51.0.8 0.0.0.3 area 0
default-information originate
redistribute eigrp 100 subnets
!
router eigrp 100
network 18.0.0.0 0.0.0.3
network 10.85.0.12 255.255.255.252
no auto-summary
redistribute static
redistribute ospf 1 metric 1000000 10 255 1 1500
!
#Core router NAT
ip nat pool ndd430b 18.0.0.2 18.0.0.2 netmask 255.255.255.252
access-list 1 permit 172.16.51.0 0.0.0.15
access-list 1 permit 172.16.51.16 0.0.0.15
access-list 1 permit 172.16.51.32 0.0.0.15
access-list 1 permit 172.16.51.48 0.0.0.15
access-list 1 permit 192.168.51.0 0.0.0.31
access-list 1 permit 192.168.51.32 0.0.0.31
access-list 1 permit 192.168.51.64 0.0.0.31
access-list 1 permit 192.168.51.96 0.0.0.31
access-list 1 permit 172.16.85.64 0.0.0.15
access-list 1 permit 172.16.85.80 0.0.0.15
access-list 1 permit 172.16.85.96 0.0.0.15
access-list 1 permit 172.16.85.112 0.0.0.15
access-list 1 permit 192.168.85.128 0.0.0.31
access-list 1 permit 192.168.85.160 0.0.0.31
access-list 1 permit 192.168.85.192 0.0.0.31
access-list 1 permit 192.168.85.224 0.0.0.31
ip nat inside source list 1 pool ndd430b overload
int g0/2
ip nat outside
int g0/0
ip nat inside
int g0/1
ip nat inside
!