OSPF
OSPF encuentra rutas mirando el estado del enlace. su métrica se basa en mirar el estado del ancho de banda de un enlace. Es un protocolo que utiliza Dijkstra para llegar a converger. La ventaja con respecto a RIP de este protocolo es que se reenvia la información de los routers sin modificar, llamados LSA(Line State Advertisment), aunque utiliza más recursos que RIP (memoria, CPU), tarda menos tiempo en converjer. Estos LSA envian el identificador del enlace, la ip el número de secuencia, y el coste.
No se envía toda la tabla de datos sin que se envían "hello", de esta manera conseguimos descongestionar la red.
Se trata de un protocolo jerárquico, donde tenemos que tener un área 0(backbone), donde se pueden poner más de 30 routers. los routers que estén en el límite del área estarán en el ABR (Area Border Route).
Soporta autenticación MD5 y de contraseña simple.
Soporta balanceo de trafico de igual coste (está predeterminado en 4 caminos)
Es un protocolo de classless, es decir, advierte la máscara.
Ejemplos de utilización de OSPF en un router:
RouterC(config)#router ospf 1
RouterC(config-router)#network 10.140.1.2 0.0.0.0 area 0
RouterC(config-router)#network 10.4.4.3 0.0.0.0 area 0
RouterC(config-router)#network 10.45.45.1 0.0.0.0 area 0
RouterC(config-router)#exit
RouterC(config)#int s0/0
RouterC(config-if)#ip ospf authentication
RouterC(config-if)#ip ospf authentication-key cisco (Esto se hace para que si ponemos un router nuevo de prueba, no anuncie nuevas rutas al sistema)
RouterC(config-if)#exit
RouterC(config)#exit
RouterC#sh
*Mar 11 03:41:46.466: %OSPF-5-ADJCHG: Process 1, Nbr 10.168.1.113 on Serial0/1 from LOADING to FULL, Loading Done
*Mar 11 03:41:46.938: %SYS-5-CONFIG_I: Configured from console by console protocols
Global values:
Internet Protocol routing is enabled
RouterC#sh ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 22 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 2, receive version 2
Interface Send Recv Triggered RIP Key-chain
Ethernet0/0 2 2
Serial0/0 2 2
Serial0/1 2 2
Loopback0 2 2
Automatic network summarization is not in effect
Maximum path: 4
Routing for Networks:
3.0.0.0
10.0.0.0
Routing Information Sources:
Gateway Distance Last Update
10.45.45.2 120 00:00:17
10.140.3.1 120 00:00:11
Distance: (default is 120)
Routing Protocol is "ospf 1"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 10.168.1.97
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
10.4.4.3 0.0.0.0 area 0
10.45.45.1 0.0.0.0 area 0
10.140.1.2 0.0.0.0 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
10.140.4.1 110 00:01:21
10.168.1.113 110 00:01:21
10.168.1.65 110 00:01:21
10.168.1.81 110 00:01:21
Distance: (default is 110)
RouterC#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 16 subnets, 3 masks
O 10.5.5.3/32 [110/65] via 10.45.45.2, 00:02:42, Serial0/1
C 10.45.45.0/24 is directly connected, Serial0/1
O 10.23.23.0/24 [110/973] via 10.45.45.2, 00:02:42, Serial0/1
R 10.5.5.0/24 [120/1] via 10.45.45.2, 00:00:01, Serial0/1
C 10.4.4.0/24 is directly connected, Ethernet0/0
O 10.3.3.0/24 [110/919] via 10.45.45.2, 00:02:42, Serial0/1
O 10.2.2.0/24 [110/983] via 10.45.45.2, 00:02:42, Serial0/1
O 10.1.1.0/24 [110/138] via 10.45.45.2, 00:02:43, Serial0/1
O 10.140.4.0/24 [110/128] via 10.45.45.2, 00:02:43, Serial0/1
O 10.140.2.0/24 [110/909] via 10.45.45.2, 00:02:43, Serial0/1
C 10.140.3.0/24 is directly connected, Serial0/0
O 10.140.1.0/24 [110/909] via 10.45.45.2, 00:02:43, Serial0/1
C 10.168.1.96/28 is directly connected, Loopback0
R 10.168.1.112/28 [120/1] via 10.45.45.2, 00:00:04, Serial0/1
R 10.168.1.64/28 [120/2] via 10.140.3.1, 00:00:01, Serial0/0
R 10.168.1.80/28 [120/2] via 10.140.3.1, 00:00:01, Serial0/0