44## Configuración básica OSPF Multiárea
55
66Se usará en multiarea:
7- - Area 0 para equipos
8- - Area 1 de router a router
7+ - Area 0 = backbone = enlaces entre routers
8+ - Las LAN pueden ir en otras áreas (1,2…)
99
1010### Paso 1: Habilitar OSPF
1111```
1212Router(config)# router ospf 1
1313```
14- ` 1 ` es el ID del proceso OSPF (local al router, no tiene que coincidir con otros).
14+ ` 1 ` es el ID del proceso OSPF (local al router).
15+ Asociar area 0 al area de conexion entre routers, y a redes rde equipos se elige area 1
1516
1617### Paso 2: Asignar redes a áreas (Multiárea)
1718```
18- Router(config-router)#network 10.0.0.0 0.255.255.255 area 0
19+ Router(config-router)#network 10.0.0.0 0.0.0.3 area 0
1920Router(config-router)#network 20.0.0.0 0.255.255.255 area 1
2021Router(config-router)#network 30.0.0.0 0.255.255.255 area 2
2122```
@@ -32,7 +33,7 @@ Router#show ip protocols
3233
3334## Habilitar MD5 Tras OSPF
3435
35- ```
36+ ``` pgsql
3637Router(config)# router ospf 1
3738Router(config)# area 0 authentication message-digest
3839```
@@ -54,6 +55,13 @@ access-list [ID] [permit|deny] [protocolo] [IP origen] [máscara wildcard] [IP d
5455```
5556** Wildcard:** Es la máscara inversa (ej. 0.0.0.63 equivale a rango de 64 IPs).
5657
58+ ### Denegar Equipos
59+ Si no se añade permit any, se bloquea todo (porque hay deny implícito).
60+ ```
61+ Router(config)#access-list 1 deny host 192.168.1.10
62+ Router(config)#access-list 1 permit any
63+ ```
64+
5765### Denegar Redes
5866Para bloquear una red en un router de destino:
5967- Crear la lista con el rango de IPs a bloquear.
@@ -146,16 +154,13 @@ Switch(config-in)#switchport access vlan 10
146154Seleccionar el puerto de conexion de Router a Vlan
147155
148156` 0.10 ` Sería para la Vlan 10, se repite el siguiente proceso para todas las Vlans a conectar
157+ El dot1Q VLAN (10,20,30...), la IP a agregar es el Gateway, resto de vlans a agregar, conexion con la interfaz principal
149158```
150159Router(config)#in gi0/0.10
151- # El dot1Q VLAN (10,20,30...)
152160Router(config-subif)#encapsulation dot1Q 10
153- # La IP a agregar es el Gateway
154161Router(config-subif)#ip address 192.168.100.1 255.255.255.0
155162Router(config-subif)#no sh
156163Router(config-subif)exit
157- # Resto de vlans a agregar
158- # Conexion con la interfaz principal
159164Router(config)#in gi0/0
160165Router(config-in)#no sh
161166```
@@ -164,7 +169,7 @@ Router(config-in)#no sh
164169Configuración red externa y red interna
165170
166171### NAT Dinámica
167- - Se crea una ACL numero 1, que da acceso a la 10.0.0.0
172+ - Se crea una ACL numero 1, que da acceso a la 10.0.0.0, esta debe dar permiso a la red interna
168173- Convierte las IP 20.0.0.3 en 20.0.0.4 es un rango de IPs
169174```
170175Router(config)#interface gi0/0
@@ -173,7 +178,7 @@ Router(config-if)#exit
173178Router(config)#interface gi0/1
174179Router(config-if)#ip nat outside
175180Router(config-if)#exit
176- Router(config)#access-list 1 permit 10.0.0 .0 0.0.0.255 (MASCARA WILDCARD [INVERSA])
181+ Router(config)#access-list 1 permit 192.168.1 .0 0.0.0.255 (MASCARA WILDCARD [INVERSA])
177182Router(config)#ip nat pool NAT_POOL 20.0.0.3 20.0.0.4 netmask 255.255.255.0 (MASCARA NORMAL)
178183Router(config)#ip nat inside source list 1 pool NAT_POOL
179184Router(config)#end
@@ -193,17 +198,38 @@ Router(config)#ip nat inside source static 10.0.0.3 20.0.0.4
193198```
194199
195200### NAT PAT Overload
201+ El NAT PAT Overload siempre va en la interfaz externa.
202+ Siendo ` g0/1 ` en este caso interfaz externa.
196203```
197204in gi0/0
198205ip nat inside
199206exit
200207in gi0/1
201208ip nat outside
202209exit
203- access-list 1 permit 10.0.0 .0 0.255.255 .255
210+ access-list 1 permit 192.168.1 .0 0.0.0 .255
204211ip nat inside source list 1 interface gi0/1 overload
205212```
206213
214+ ### Comprobaciones NAT
215+ ```
216+ show ip nat translations
217+ show ip nat statistics
218+ ```
219+
220+ ## RIP
221+ RIP (Routing Information Protocol) es un protocolo de enrutamiento dinámico de tipo vector-distancia.
222+ Su función es que los routers intercambien automáticamente las redes que conocen.
223+ ` no auto-summary ` >Evita que agrupe redes automáticamente.
224+ ` network X.X.X.X ` >Activa RIP en las interfaces que pertenezen a esa red (No requiere de máscara)
225+ ```
226+ Router(config)# router rip
227+ Router(config-router)# version 2
228+ Router(config-router)# no auto-summary
229+ Router(config-router)# network 192.168.1.0
230+ Router(config-router)# network 10.0.0.0
231+ ```
232+
207233## Enrutamiento por BGP
208234Router(config)# Router BGP Nºidentificativo del router entre 1-65535. Cada router un número diferente
209235
@@ -277,7 +303,39 @@ Mostrar MACs memorizadas en el switch:
277303Switch(config)#do show mac address-table
278304```
279305
306+ ## Port Security
307+ Configuración de seguridad en puertos
308+
309+ Es necesario activar ` switchport port-securit ` .
310+ ```
311+ Switch(config)# interface fa0/1
312+ Switch(config-if)# switchport mode access
313+ Switch(config-if)# switchport port-security
314+ Switch(config-if)# switchport port-security maximum 1
315+ Switch(config-if)# switchport port-security mac-address sticky
316+ Switch(config-if)# switchport port-security violation shutdown
317+ ```
318+
319+ ## DHCP
320+ Configuración de protocolo DHCP
321+ ```
322+ ip dhcp excluded-address 192.168.1.1 192.168.1.10
323+ ip dhcp pool LAN
324+ network 192.168.1.0 255.255.255.0
325+ default-router 192.168.1.1
326+ dns-server 8.8.8.8
327+ ```
328+
280329## Telnet
330+
331+ Asignación de IP, el ` ip default-gateway ` no va dentro de la interfaz.
332+ ```
333+ interface vlan 1
334+ ip address 192.168.1.2 255.255.255.0
335+ no shutdown
336+ exit
337+ ip default-gateway 192.168.1.1
338+ ```
281339Abrir conexiones de 0 a 15 por vty
282340```
283341Switch(config)# line vty 0 15
@@ -293,4 +351,13 @@ Switch(config)# banner motd &mensaje&
293351Guardar configuracion permanentemente
294352```
295353Switch# copy running-config startup-config
354+ ```
355+
356+ ## Comprobaciones Generales
357+ ```
358+ show ip route
359+ show ip protocols
360+ show ip ospf neighbor
361+ show ip route rip
362+ show running-config
296363```
0 commit comments