-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpagina12.html
299 lines (268 loc) · 7.64 KB
/
pagina12.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="main.css">
<title>12-Comandos IOS </title>
</head>
<body>
<h1>
12-Comandos IOS.
</h1>
<p>
<h2>General.</h2>
<p>
CTRL-ALT-6 para parar un comando incorrecto. <br>
? para conseguir siguientes comandos <br>
TAB para autocompletar. <br>
Un comando con no deshace el comando.
</p>
<h2>Modos</h2>
<p>
Press RETURN to get started - Desactivado.
<br>
Router > <br>
Show para mostrar información. <br>
enable para configuración (privated commands). <br>
Router # <br>
Resto de comandos .
Configure terminal para cambiar la configuración. <br>
Router (config)# <br>
Raíz de la configuración.
<hr>
Para activar la configuración:
<blockquote>
<code>
Router > enable <br>
Router # configure terminal <br>
Router (configure)#
</code>
</blockquote>
<hr>
Para salvar la configuración:
<blockquote>
<code>
Router# write memory <br>
Router# copy running-config startup-config <br>
</code>
</blockquote>
</p>
<h2>
Asignar IP.
</h2>
<blockquote>
<code>
Router(config)# interface fa0/0 <br>
Router(config-if)# ip address 192.168.6.1 255.255.255.0 <br>
Router(config-if)# no shutdown <br>
Router(config-if)# exit <br>
Router(config)#
</code>
</blockquote>
<h2>Consultar IP.</h2>
<pre>
<blockquote>
<code>
Router > show ip interface
Router > show ip interface brief
</code>
</blockquote>
</pre>
<h2>Enrutamiento</h2>
<h3>Añadir/Borrar ruta</h3>
<pre>
<code>
Router >(config)# ip route 172.16.0.0 255.255.255.0 192.168.6.254
</code>
<code>
Router >(config)# no ip route 172.16.0.0 255.255.255.0 192.168.6.254
</code>
</pre>
<h2>Consultar rutas</h2>
<blockquote>
<code>
Router > show ip route
</code>
</blockquote>
<hr>
<h2>VLAN</h2>
<h3>Consultar VLANs</h3>
<blockquote>
<code>
Switch > show vlan brief <br>
Switch > show interfaces trunk
</code>
</blockquote>
<h3>Crear una VLAN</h3>
<blockquote>
<code>
Switch(config)# vlan 2 <br>
Switch(config-vlan)# name NOMBREVLAN <br>
Switch(config-vlan)# exit
</code>
</blockquote>
<h3>Asignar un puerto a una VLAN.(access)</h3>
<blockquote>
<code>
Switch(config)# interface FastEthernet0/1 <br>
Switch(config-if)#switchport access vlan 2
</code>
</blockquote>
<h3>Asignar un puerto como Trunk</h3>
<blockquote>
<code>
Switch(config)# interface FastEthernet0/1 <br>
Switch(config-if)# switchport mode trunk
</code>
</blockquote>
<h3>Permitir/denegar una VLAN en un puerto trunk.</h3>
<blockquote>
<code>
Switch(config)# interface FastEthernet0/1 <br>
Switch(config-if)# switchport trunk allowed vlan remove 2 <br>
Switch(config-if)# switchport trunk allowed vlan add 2
</code>
</blockquote>
<h2>Routers</h2>
<p>
Los routers pueden tener interfaces virtuales, a las que llegan las tramas 802.1q de cierta VLAN.
Estas interfaces se configuran como las demás, y se añaden a la tabla de rutaas de la misma forma.
<blockquote>
<code>
Router(config)#interface fa0/0.1 <br>
Router(config-subif)# encap dot1q 2 <br>
Router(config-subif)# ip address 192.168.6.1 255.255.255.0 <br>
Router(config-subif)# exit <br>
Router(config)# interface fa0/0 <br>
Router(config-if)# no shutdown <br>
Router(config-if)# exit
</code>
<code>
Router# show interfaces
</code>
</blockquote>
</p>
<h2>STP</h2>
<p>
Consultar y poner la prioridad de un switch. <br>
<code>
Switch# show spanning-tree <br>
Switch(config)# spanning-tree vlan 1 priority 1
</code>
</p>
<h2>Link Agregation</h2>
<p>
Se añade a un mimso channelgroup todos los enlaces conectados al mismo switch.
<code>
Switch(config)# interface fa0/1 <br>
Switch(config-if)# channel-group 1 mode active
</code>
</p>
<h2>ACL</h2>
<h3>Numeración</h3>
<p>
Se identifican por un número:
<ul>
<li>Estándar
<ul>
<li>1 a 99</li>
<li>1300 a 1999</li>
</ul>
</li>
<li>
Ampliadas
<ul>
<li>100 a 199</li>
<li>2000 a 2699</li>
</ul>
</li>
</ul>
Una interfaz ouede tener una ACL asociada en cada sentido:
<ul>
<li>
Entradas de paquetes (Inbound)
</li>
<li>
Salida de paquetes (Outbound)
</li>
</ul>
</p>
<h3>Consultar ACLs definidas.</h3>
<code>
Router# show ip access-list
</code>
<h3>Asociar una ACL a una interfaz</h3>
<code>
Router(config)# interface fa0/1 <br>
Router(config-if)# ip access-group 'NUMEROACL' out o in
</code>
<h3>Desasociar una ACL a una interfaz</h3>
<code>
Router(config)# interface fa0/1 <br>
Router(config-if)# no ip access-group 'NUMEROACL' out o in
</code>
<h3>ACL estándar.</h3>
Crear una ACL o añadir una regla <br>
<code>
Router(config)# access-list 'nº' permit/deny 'host|source-wildcard|any'
</code>
Borrar una ACL. <br>
<code>
Router(config)# no access-list 'nº'
</code>
<h3>ACL extendidas.</h3>
Protocolo IP ( hay más opciones, no explicadas aquí.)
<code>
Router(config)# access-list <numero> <permit o deny> ip
<host|source source-wildcard|any>
<host|destination destination-wildcard|any>
</code>
<h2>Procesamiento de ACL</h2>
<p>
Al llegar un paquete.
<pre>
1. Si la interfax no tiene ACL de entrada se acepta.
2. Si tiene ACL, se revisan las reglas de la lista:
1. Se compueban en orden.
2. Si alguna deniega el paquete, se rechaza.
3. Si alguna acepta el paquete, se acepta.
4. Si ninguna se aplica al paquete, se rechaza.
</pre>
Antes de enviar un paquete:
<pre>
1. Si la interfaz no tiene ACL de salida, se envía.
2. Si tiene ACL, se revisan las reglas de la lista:
1. Se comprueban en orden.
2. Si alguna deniega el paquete, se desecha.
3. Si alguna acepta el paquete, se envía.
4. Si ninguna se plica al paquete, se desecha.
</pre>
<h3>Comandos útiles</h3>
<p>
Una vez creada una ACL (más adelante) es necesario:
- Asignar y desasignar ACL a interfaces. <br>
- Borrar y consultar ACL creadas.
<hr>
El WILDCARD es la máscara de red con ceros y unos invertidos. <br>
Ejemplo: La red 192.168.1.0/24se especifica como
192.168.1.0 0.0.0.255
<br>
Son equivalentes las siguientes direcciones:
<pre>
any
0.0.0.0 255.255.255.255
</pre>
Ejemplo: No dejes pasar el tráfico con origen en la red: 192.168.1.0/8
<code>
access-list 10 deny 192.168.1.0 0.0.0.255
</code>
</p>
</p>
</p>
<address>
Human Computing 3.0 ©
</address>
</body>
</html>