You are on page 1of 8

Guía Huawei R&S v2.

OSPF básico

 Configure OSPF 1 area 0 publicando las interfaces directamente conectadas (incluya loopbacks).

R1
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.0 0.0.0.255
network 10.1.12.0 0.0.0.255

interface LoopBack0
ospf network-type broadcast

R2
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 2.2.2.0 0.0.0.255
network 10.1.12.0 0.0.0.255
network 10.1.23.0 0.0.0.255

interface LoopBack0
ospf network-type broadcast

R3
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.0 0.0.0.255
network 10.1.23.0 0.0.0.255

interface LoopBack0
ospf network-type broadcast

[R2]display ospf peer brief


OSPF Process 1 with Router ID 10.1.12.2
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
0.0.0.0 GigabitEthernet0/0/0 1.1.1.1 Full
0.0.0.0 GigabitEthernet0/0/1 3.3.3.3 Full
----------------------------------------------------------------------------

1
Guía Huawei R&S v2.0

[R2]display ip routing-table protocol ospf


Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 3 Routes : 3
OSPF routing table status : <Active>
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/24 OSPF 10 2 D 10.1.23.2 GigabitEthernet0/0/1
2.2.2.2/24 OSPF 10 1 D 10.1.23.2 GigabitEthernet0/0/1
10.1.12.0/24 OSPF 10 2 D 10.1.23.2 GigabitEthernet0/0/1
OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0

[R2]display ospf interface


OSPF Process 1 with Router ID 2.2.2.2
Interfaces
Area: 0.0.0.0 (MPLS TE not enabled)
IP Address Type State Cost Pri DR BDR
10.1.12.2 Broadcast BDR 1 1 10.1.12.1 10.1.12.2
10.1.23.2 Broadcast BDR 1 1 10.1.23.3 10.1.23.2
2.2.2.2 P2P P-2-P 0 1 0.0.0.0 0.0.0.0

[R1]display ospf interface


OSPF Process 1 with Router ID 1.1.1.1
Interfaces
Area: 0.0.0.0 (MPLS TE not enabled)
IP Address Type State Cost Pri DR BDR
10.1.12.1 Broadcast DR 1 1 10.1.12.1 10.1.12.2
1.1.1.1 Broadcast P-2-P 0 1 0.0.0.0 0.0.0.0

[R1]display ospf lsdb router self-originate


OSPF Process 1 with Router ID 1.1.1.1
Area: 0.0.0.0
Link State Database
Type : Router
Ls id : 1.1.1.1
Adv rtr : 1.1.1.1
Ls age : 1019
Len : 48
Options : E
seq# : 80000006
chksum : 0x23de
Link count: 2
* Link ID: 10.1.12.1
Data : 10.1.12.1
Link Type: TransNet
Metric : 1
* Link ID: 1.1.1.1
Data : 255.255.255.255
Link Type: StubNet
Metric : 0
Priority : Medium

2
Guía Huawei R&S v2.0

 Para asegurar una rápida detección de vecindad OSPF, configure las interfaces G0/0/0 de R1 y R2
de manera que tengan un intervalo hello de 1 segundo y un holdtime de 4 segundos. Solo
modifique el interval hello.

[R1]display ospf interface GigabitEthernet 0/0/0 verbose

OSPF Process 1 with Router ID 1.1.1.1


Interfaces
Interface: 10.1.12.1 (GigabitEthernet0/0/0)
Cost: 1 State: DR Type: Broadcast MTU: 1500
Priority: 1
Designated Router: 10.1.12.1
Backup Designated Router: 10.1.12.2
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1
IO Statistics
Type Input Output
Hello 337 341
DB Description 2 3
Link-State Req 1 1
Link-State Update 9 6
Link-State Ack 5 6
ALLSPF GROUP
ALLDR GROUP
OpaqueId: 0 PrevState: Waiting
Effective cost: 1, enabled by OSPF Protocol

R1
interface GigabitEthernet 0/0/0
ospf timer hello 1

R2
interface GigabitEthernet 0/0/0
ospf timer hello 1

[R2]display ospf interface GigabitEthernet 0/0/0


OSPF Process 1 with Router ID 2.2.2.2
Interfaces
Interface: 10.1.12.2 (GigabitEthernet0/0/0)
Cost: 1 State: DR Type: Broadcast MTU: 1500
Priority: 1
Designated Router: 10.1.12.2
Backup Designated Router: 10.1.12.1
Timers: Hello 1 , Dead 4 , Poll 120 , Retransmit 5 , Transmit Delay 1

3
Guía Huawei R&S v2.0

 Configure R2 tal que, si no recibe un reconocimiento desde R3 para un LSA, este espere 10 segundos para
reenviar el LSA.

[R2]display ospf interface GigabitEthernet 0/0/1

OSPF Process 1 with Router ID 2.2.2.2


Interfaces
Interface: 10.1.23.2 (GigabitEthernet0/0/1)
Cost: 1 State: BDR Type: Broadcast MTU: 1500
Priority: 1
Designated Router: 10.1.23.3
Backup Designated Router: 10.1.23.2
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1

R2
interface GigabitEthernet0/0/1
ospf timer retransmit 10

[R2]display ospf interface GigabitEthernet 0/0/1


OSPF Process 1 with Router ID 2.2.2.2
Interfaces
Interface: 10.1.23.2 (GigabitEthernet0/0/1)
Cost: 1 State: BDR Type: Broadcast MTU: 1500
Priority: 1
Designated Router: 10.1.23.3
Backup Designated Router: 10.1.23.2
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 10 , Transmit Delay 1

4
Guía Huawei R&S v2.0

OSPF AutoCost
 Configure OSPF con la siguiente disposición:
Router Interface IGP Area
R1 Gi0/0/0 OSPF 0
R2 Gi0/0/0 OSPF 0
R3 Gi0/0/0 OSPF 0
R4 Gi0/0/0 OSPF 0
R4 Se0/0/0 OSPF 45
R5 Se0/0/0 OSPF 45

 Dentro del dominio OSPF se instalarán interface 10gigaEthernet. Modifique el valor del ancho de banda de
referencia para que los resultados del costo OSPF sean consistentes.

Antes de configurar el BW de referencia verifiquemos los costos de los distintos enlaces.

R1
ospf 1
area 0.0.0.0
network 10.0.100.0 0.0.0.255

R2
ospf 1
area 0.0.0.0
network 10.0.100.0 0.0.0.255

R3
ospf 1
area 0.0.0.0
network 10.0.100.0 0.0.0.255

R4
ospf 1
area 0.0.0.0
network 10.0.100.0 0.0.0.255

5
Guía Huawei R&S v2.0

area 0.0.0.45
network 10.0.45.0 0.0.0.255

R5
ospf 1
area 0.0.0.45
network 10.0.45.0 0.0.0.255

[R4]display ospf peer brief


OSPF Process 1 with Router ID 10.0.100.4
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
0.0.0.0 GigabitEthernet0/0/0 10.0.100.1 Full
0.0.0.0 GigabitEthernet0/0/0 10.0.100.2 Full
0.0.0.0 GigabitEthernet0/0/0 10.0.100.3 Full
0.0.0.45 Serial0/0/0 10.0.45.5 Full
----------------------------------------------------------------------------

[R5-ospf-1]display ospf interface Serial 0/0/0 verbose


OSPF Process 1 with Router ID 10.0.45.5
Interfaces
Interface: 10.0.45.5 (Serial0/0/0) --> 10.0.45.4
Cost: 1562 State: P-2-P Type: P2P MTU: 1500
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1
IO Statistics
Type Input Output
Hello 883 913
DB Description 4 6
Link-State Req 2 2
Link-State Update 17 7
Link-State Ack 5 14
ALLSPF GROUP
OpaqueId: 0 PrevState: Down

[R1]display ospf interface GigabitEthernet 0/0/0 verbose


OSPF Process 1 with Router ID 10.0.100.1
Interfaces
Interface: 10.0.100.1 (GigabitEthernet0/0/0)
Cost: 1 State: DROther Type: Broadcast MTU: 1500
Priority: 1
Designated Router: 10.0.100.2
Backup Designated Router: 10.0.100.3
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1
IO Statistics
Type Input Output
Hello 4905 1586
DB Description 8 13
Link-State Req 3 3
Link-State Update 110 32
Link-State Ack 82 70
ALLSPF GROUP
OpaqueId: 0 PrevState: Waiting
6
Guía Huawei R&S v2.0

Como podemos observar, el costo para las interfaces GigabitEthernet es de 1 y los enlaces seriales un costo de
1562. Podemos calcular este valor con la fórmula:
BW Ref.
Costo OSPF = ------------------
BW interface
Al cambiar el costo de referencia OSPF debemos considerar el dominio OSPF completo. El proceso OSPF nos
advierte con el siguiente log:
Info: Reference bandwidth is changed. Please ensure that the reference bandwidth
that is configured for all the routers are the same.

R1
ospf 1
bandwidth-reference 10000

R2
ospf 1
bandwidth-reference 10000
R3
ospf 1
bandwidth-reference 10000

R4
ospf 1
bandwidth-reference 10000

R5
ospf 1
bandwidth-reference 10000

[R5-ospf-1]display ospf interface Serial 0/0/0


OSPF Process 1 with Router ID 10.0.45.5
Interfaces
Interface: 10.0.45.5 (Serial0/0/0) --> 10.0.45.4
Cost: 65535 State: P-2-P Type: P2P MTU: 1500
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1

[R1-GigabitEthernet0/0/0]display ospf interface GigabitEthernet 0/0/0


OSPF Process 1 with Router ID 10.0.100.1
Interfaces
Interface: 10.0.100.1 (GigabitEthernet0/0/0)
Cost: 10 State: DROther Type: Broadcast MTU: 1500
Priority: 1
Designated Router: 10.0.100.2
Backup Designated Router: 10.0.100.3
Timers: Hello 10 , Dead 40 , Poll 120 , Retransmit 5 , Transmit Delay 1

Como vemos en la salida anterior, el valor del costo en la GigabitEthernet0/0/0 de R1 se ha incrementado de 1 a 10


puesto que aumentamos el valor para el BW de referencia OSPF. Evidentemente si el valor del costo se ha
confgiurado manualmente en la interface no veremos cambios en el costo OSPF.
Podemos calcular el costo de la interface para OSPF utilizando la formula:
7
Guía Huawei R&S v2.0

BW Ref.
Costo OSPF = ------------------
BW interface

10.000.000.000
Costo OSPF = ------------------ = 10
GigabitEthernet0/0/0 1000.000.000

You might also like