소개
이 문서에서는 인터페이스에서 IPv6에 대해 OSPF(Open Shortest Path First) 버전 3을 활성화하는 방법을 설명합니다.
사전 요구 사항
요구 사항
인터페이스에서 IPv6용 OSPF를 활성화하기 전에 다음을 수행해야 합니다.
-
IPv6 네트워크에 대한 OSPF 네트워크 전략 및 계획을 완료합니다. 예를 들어, 여러 영역이 필요한지 여부를 결정합니다.
-
IPv6 유니캐스트 라우팅을 활성화합니다.
-
인터페이스에서 IPv6를 활성화합니다.
-
인증 및 암호화를 활성화하기 위해 IPv6용 OSPF에서 IPsec(IP Security) API(Secure Socket Application Program Interface)를 구성합니다.
사용되는 구성 요소
이 문서는 특정 소프트웨어 및 하드웨어 버전으로 한정되지 않습니다.
이 문서의 정보는 특정 랩 환경의 디바이스를 토대로 작성되었습니다. 이 문서에 사용된 모든 디바이스는 초기화된(기본) 컨피그레이션으로 시작되었습니다. 현재 네트워크가 작동 중인 경우 모든 명령의 잠재적인 영향을 미리 숙지하시기 바랍니다.
표기 규칙
문서 규칙에 대한 자세한 내용은 Cisco 기술 팁 표기 규칙을 참고하십시오.
배경 정보
OSPF(Open Shortest Path First)는 IP용 라우팅 프로토콜입니다. 이는 거리 벡터 프로토콜과는 반대로 링크 상태 프로토콜입니다.
링크 상태 프로토콜은 소스 및 대상 머신을 연결하는 링크의 상태를 기반으로 라우팅을 결정합니다.
링크의 상태는 해당 인터페이스 및 네이버 네트워킹 디바이스와의 관계에 대한 설명입니다.
인터페이스 정보에는 인터페이스의 IPv6 접두사, 네트워크 마스크, 연결된 네트워크 유형, 해당 네트워크에 연결된 라우터 등이 포함됩니다.
이 정보는 다양한 유형의 LSA(링크 상태 광고)에서 전파됩니다. RFC 2740에 설명된 OSPF 버전 3은 IPv6를 지원합니다.
구성
이 섹션에는 이 문서에서 설명하는 기능을 구성하기 위한 정보가 표시됩니다.
참고: 이 문서에서 사용되는 명령에 대한 자세한 내용을 보려면 명령 조회 도구 /a>를 사용하십시오.
참고: 등록된 Cisco 사용자만 내부 Cisco 툴 및 정보에 액세스할 수 있습니다.
네트워크 다이어그램
이 문서에서는 이 네트워크 설정을 사용합니다.
네트워크 다이어그램
설정
다음은 다이어그램에 표시된 라우터에 대한 OSPFv3의 컨피그레이션입니다.
스텁 라우터 |
ipv6 unicast-routing
ipv6 cef
!
interface GigabitEthernet0/0
no ip address
ipv6 address FD01:ABAB::/64 eui-64 ipv6 enable
ipv6 ospf 1 area 2 ipv6 ospf network point-to-point
!
ipv6 router ospf 1
router-id 10.3.3.3
area 2 stub
!
|
ABR1 라우터 |
ipv6 unicast-routing
ipv6 cef
!
interface GigabitEthernet1
no ip address
speed auto
ipv6 address FD03::1/124
ipv6 enable
ipv6 ospf 1 area 0
!
interface GigabitEthernet2
no ip address
ipv6 address FD02:ABAB::/64 eui-64
ipv6 enable
ipv6 ospf 1 area 2 ipv6 ospf network point-to-point
!
ipv6 router ospf 1
router-id 10.1.1.1
area 2 stub no-summary
!
|
ASBR 라우터 |
ipv6 unicast-routing
ipv6 cef
!
interface GigabitEthernet1
no ip address
ipv6 address FD03::2/124
ipv6 enable
ipv6 ospf 1 area 0
!
interface GigabitEthernet2
no ip address
ipv6 address FD03::1:1/124
ipv6 enable
ipv6 rip EXT enable
!
ipv6 router ospf 1
router-id 10.2.2.2
default-metric 25
redistribute rip EXT metric-type 1 include-connected
!
ipv6 router rip EXT
redistribute ospf 1 match internal external 1 external 2 include-connected
! |
외부 라우터 |
ipv6 unicast-routing ipv6 cef
!
interface Loopback0
no ip address
ipv6 address FD04:ABAB::/64 eui-64
ipv6 enable
ipv6 rip EXT enable
!
interface GigabitEthernet0/0
no ip address
ipv6 address FD03::1:2/124
ipv6 enable
ipv6 rip EXT enable
!
ipv6 router rip EXT
|
다음을 확인합니다.
설정이 올바르게 작동하는지 확인하려면 이 섹션을 활용하십시오.
출력 인터프리터 도구는 특정 show 명령을 지원합니다. OIT를 사용하여 show 명령 출력 분석을 볼 수 있습니다.
show ipv6 ospf database 명령은 라우터의 LSDB(링크 상태 데이터베이스)를 표시합니다.
참고:등록된 Cisco 사용자만 내부 Cisco 툴 및 정보에 액세스할 수 있습니다.
Stub_Router#show ipv6 ospf database
OSPFv3 Router with ID (10.3.3.3) (Process ID 1)
Router Link States (Area 2)
ADV Router Age Seq# Fragment ID Link count Bits
10.1.1.1 5 0x8000000F 0 1 B
10.3.3.3 38 0x8000000E 0 1 None
Inter Area Prefix Link States (Area 2)
ADV Router Age Seq# Prefix
10.1.1.1 5 0x80000002 ::/0
Link (Type-8) Link States (Area 2)
ADV Router Age Seq# Link ID Interface
10.1.1.1 5 0x8000000A 8 Gi0/0
10.3.3.3 292 0x80000005 2 Gi0/0
Intra Area Prefix Link States (Area 2)
ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
10.1.1.1 5 0x8000000B 0 0x2001 0
10.3.3.3 548 0x80000002 0 0x2001 0
show ipv6 ospf database router 명령은 라우터가 시작되고 수신되는 라우터 LSA를 표시합니다. 라우터 LSA는 주소 또는 접두사 정보를 전달하지 않습니다.
Stub_Router#show ipv6 ospf database router
OSPFv3 Router with ID (10.3.3.3) (Process ID 1)
Router Link States (Area 2)
Routing Bit Set on this LSA
LS age: 141
Options: (V6-Bit, R-Bit, DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 10.1.1.1
LS Seq Number: 8000000F
Checksum: 0x9C2C
Length: 40
Area Border Router
Number of Links: 1
Link connected to: another Router (point-to-point)
Link Metric: 1
Local Interface ID: 8
Neighbor Interface ID: 2
Neighbor Router ID: 10.3.3.3
LS age: 174
Options: (V6-Bit, R-Bit, DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 10.3.3.3
LS Seq Number: 8000000E
Checksum: 0xBBF
Length: 40
Number of Links: 1
Link connected to: another Router (point-to-point)
Link Metric: 1
Local Interface ID: 2
Neighbor Interface ID: 8
Neighbor Router ID: 10.1.1.1
LSA에는 다음과 같은 비트가 포함된 Options 필드가 있습니다.
-
V6 bit — 라우터/링크를 라우팅 계산에 사용해야 하는지 여부를 나타냅니다.
-
R bit — "라우터 비트"입니다. 발신자가 활성 라우터인지 여부를 나타냅니다.
-
DC 비트 - 수요 회로의 라우터 처리를 나타냅니다.
show ipv6 ospf database link self-originate 명령은 링크 LSA가 링크별 주소를 전달함을 보여줍니다.
Stub_Router#show ipv6 ospf database link self-originate
OSPFv3 Router with ID (10.3.3.3) (Process ID 1)
Link (Type-8) Link States (Area 2)
LS age: 650
Options: (V6-Bit, R-Bit, DC-Bit)
LS Type: Link-LSA (Interface: GigabitEthernet0/0)
Link State ID: 2 (Interface ID)
Advertising Router: 10.3.3.3
LS Seq Number: 80000005
Checksum: 0x8578
Length: 56
Router Priority: 1
Link Local Address: FE80::5054:FF:FE00:3A
Number of Prefixes: 1
Prefix Address: FD01:ABAB::
Prefix Length: 64, Options: None
스텁 라우터는 Totally-Stub 영역에 속하므로 ABR1 라우터는 기본 경로만 스텁 라우터에 전송합니다.
Stub_Router#show ipv6 route
IPv6 Routing Table - default - 5 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
lA - LISP away, a - Application
OI ::/0 [110/2] via FE80::5054:FF:FE00:15, GigabitEthernet0/0
C FD01:ABAB::/64 [0/0]
via GigabitEthernet0/0, directly connected
L FD01:ABAB::5054:FF:FE00:3A/128 [0/0]
via GigabitEthernet0/0, receive
O FD02:ABAB::/64 [110/2]
via FE80::5054:FF:FE00:15, GigabitEthernet0/0
L FF00::/8 [0/0]
via Null0, receive
ABR1 라우터는 영역 경계 라우터입니다.
ABR1#show ipv6 ospf
Routing Process "ospfv3 1" with ID 10.1.1.1
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
It is an area border router
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 50 msecs
Minimum hold time between two consecutive SPFs 200 msecs
Maximum wait time between two consecutive SPFs 5000 msecs
Initial LSA throttle delay 50 msecs
Minimum hold time for LSA throttle 200 msecs
Maximum wait time for LSA throttle 5000 msecs
Minimum LSA arrival 100 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Retransmission limit dc 24 non-dc 24
EXCHANGE/LOADING adjacency limit: initial 300, process maximum 300
Number of external LSA 2. Checksum Sum 0x011699
Number of areas in this router is 2. 1 normal 1 stub 0 nssa
Graceful restart helper support enabled
Reference bandwidth unit is 100 mbps
RFC1583 compatibility enabled
Area BACKBONE(0)
Number of interfaces in this area is 1
SPF algorithm executed 17 times
Number of LSA 8. Checksum Sum 0x05579B
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 2
Number of interfaces in this area is 1
It is a stub area, no summary LSA in this area
Generates stub default route with cost 1
SPF algorithm executed 20 times
Number of LSA 7. Checksum Sum 0x0380EA
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
ABR1 라우터는 ASBR 라우터로부터 외부 경로(RIP 경로)를 수신합니다.
ABR1#show ipv6 route
IPv6 Routing Table - default - 8 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
ld - LISP dyn-eid, lA - LISP away, le - LISP extranet-policy
lp - LISP publications, a - Application, m - OMP
O FD01:ABAB::/64 [110/2]
via FE80::5054:FF:FE00:3A, GigabitEthernet2
C FD02:ABAB::/64 [0/0]
via GigabitEthernet2, directly connected
L FD02:ABAB::5054:FF:FE00:15/128 [0/0]
via GigabitEthernet2, receive
C FD03::/124 [0/0]
via GigabitEthernet1, directly connected
L FD03::1/128 [0/0]
via GigabitEthernet1, receive
OE1 FD03::1:0/124 [110/26] via FE80::5054:FF:FE00:3E, GigabitEthernet1 OE1 FD04:ABAB::/64 [110/26] via FE80::5054:FF:FE00:3E, GigabitEthernet1
L FF00::/8 [0/0]
via Null0, receive
ASBR 라우터는 네트워크의 자동 시스템 경계 라우터입니다. 직렬 0/0 인터페이스를 통해 RIP 네트워크에 연결됩니다.
ASBR#show ipv6 ospf
Routing Process "ospfv3 1" with ID 10.2.2.2
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
It is an autonomous system boundary router
Redistributing External Routes (with default metric 25) from,
rip EXT with metric-type 1 include-connected
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 50 msecs
Minimum hold time between two consecutive SPFs 200 msecs
Maximum wait time between two consecutive SPFs 5000 msecs
Initial LSA throttle delay 50 msecs
Minimum hold time for LSA throttle 200 msecs
Maximum wait time for LSA throttle 5000 msecs
Minimum LSA arrival 100 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Retransmission limit dc 24 non-dc 24
EXCHANGE/LOADING adjacency limit: initial 300, process maximum 300
Number of external LSA 2. Checksum Sum 0x011699
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Graceful restart helper support enabled
Reference bandwidth unit is 100 mbps
RFC1583 compatibility enabled
Area BACKBONE(0)
Number of interfaces in this area is 1
SPF algorithm executed 10 times
Number of LSA 8. Checksum Sum 0x05579B
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
ASBR#show ipv6 rip
RIP process "EXT", port 521, multicast-group FF02::9, pid 678
Administrative distance is 120. Maximum paths is 16
Updates every 30 seconds, expire after 180
Holddown lasts 0 seconds, garbage collect after 120
Split horizon is on; poison reverse is off
Default routes are not generated
Periodic updates 267, trigger updates 11
Full Advertisement 1, Delayed Events 0
Interfaces:
GigabitEthernet2
Redistribution:
Redistributing protocol ospf 1 with transparent metric (internal, external 1 & 2, ) include-connected
문제 해결
이 섹션에서는 컨피그레이션 문제를 해결합니다.
참고: debug 명령을 사용하기 전에 debug 명령에 대한 중요한 정보를 참조하십시오.
ipv6 디버그
Stub Router에서 OSPFv3가 활성화되면 즉시 OSPFv3 Type 1 Hello 메시지를 FF02::5 멀티캐스트 주소로 전송합니다. ABR1 라우터에서 Hello 패킷을 수신하면 Primary/Secondary 관계를 협상한 다음 DBD 패킷 전송을 시작합니다.
Stub_Router#debug ipv6 ospf events
Stub_Router#debug ipv6 ospf packet
Stub_Router#debug ipv6 ospf adj
*Mar 8 17:47:01.324: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FF02::5: ver:3 type:1 len:36 rid:10.3.3.3 area:0.0.0.2 chksum:A0F9 inst:0
*Mar 8 17:47:03.307: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FF02::5: ver:3 type:1 len:36 rid:10.1.1.1 area:0.0.0.2 chksum:A31C inst:0
*Mar 8 17:47:03.308: OSPFv3-1-IPv6 ADJ Gi0/0: Added 10.1.1.1 to nbr list
*Mar 8 17:47:03.308: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:1 len:40 rid:10.3.3.3 area:0.0.0.2 chksum:470D inst:0
*Mar 8 17:47:03.320: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:1 len:40 rid:10.1.1.1 area:0.0.0.2 chksum:4707 inst:0
*Mar 8 17:47:03.321: OSPFv3-1-IPv6 ADJ Gi0/0: 2 Way Communication to 10.1.1.1, state 2WAY
*Mar 8 17:47:03.321: OSPFv3-1-IPv6 ADJ Gi0/0: Nbr 10.1.1.1: Prepare dbase exchange
*Mar 8 17:47:03.322: OSPFv3-1-IPv6 ADJ Gi0/0: Send DBD to 10.1.1.1 seq 0x983C9C0 opt 0x11 flag 0x7 len 28
*Mar 8 17:47:03.322: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:2 len:28 rid:10.3.3.3 area:0.0.0.2 chksum:7A33 inst:0
*Mar 8 17:47:03.328: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:2 len:148 rid:10.1.1.1 area:0.0.0.2 chksum:141A inst:0
*Mar 8 17:47:03.329: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv DBD from 10.1.1.1 seq 0x983C9C0 opt 0x11 flag 0x2 len 148 mtu 1500 state EXSTART
*Mar 8 17:47:03.330: OSPFv3-1-IPv6 ADJ Gi0/0: NBR Negotiation Done. We are the MASTER
*Mar 8 17:47:03.330: OSPFv3-1-IPv6 ADJ Gi0/0: Nbr 10.1.1.1: Summary list built, size 7
*Mar 8 17:47:03.331: OSPFv3-1-IPv6 ADJ Gi0/0: Send DBD to 10.1.1.1 seq 0x983C9C1 opt 0x11 flag 0x1 len 128
*Mar 8 17:47:03.331: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:2 len:128 rid:10.3.3.3 area:0.0.0.2 chksum:F771 inst:0
*Mar 8 17:47:03.334: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:3 len:64 rid:10.1.1.1 area:0.0.0.2 chksum:C6FA inst:0
*Mar 8 17:47:03.335: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:2 len:28 rid:10.1.1.1 area:0.0.0.2 chksum:7C3D inst:0
DBD 패킷이 교환되면 라우터는 LSDB를 구축하기 위해 LS REQ(Link-State Request) 및 LS UPD(Link-State Update) 메시지를 보냅니다. 연속적인 LS REQ 및 LS UPD 메시지 후 그리고 상태가 FULL에 도달하면 라우터는 Hello 패킷을 계속 교환합니다.
Stub_Router#
*Mar 8 17:47:03.337: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv LS REQ from 10.1.1.1 length 64 LSA count 4
*Mar 8 17:47:03.337: OSPFv3-1-IPv6 ADJ Gi0/0: Send LS UPD to FE80::5054:FF:FE00:15 length 172 LSA count 4
*Mar 8 17:47:03.338: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:4 len:172 rid:10.3.3.3 area:0.0.0.2 chksum:D2CE inst:0
*Mar 8 17:47:03.339: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv DBD from 10.1.1.1 seq 0x983C9C1 opt 0x11 flag 0x0 len 28 mtu 1500 state EXCHANGE
*Mar 8 17:47:03.339: OSPFv3-1-IPv6 ADJ Gi0/0: Exchange Done with 10.1.1.1
*Mar 8 17:47:03.340: OSPFv3-1-IPv6 ADJ Gi0/0: Send LS REQ to 10.1.1.1 length 40
*Mar 8 17:47:03.340: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:3 len:40 rid:10.3.3.3 area:0.0.0.2 chksum:FD46 inst:0
*Mar 8 17:47:03.343: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:4 len:72 rid:10.1.1.1 area:0.0.0.2 chksum:825E inst:0
*Mar 8 17:47:03.345: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv LS UPD from Nbr ID 10.1.1.1 length 72 LSA count 2
*Mar 8 17:47:03.345: OSPFv3-1-IPv6 ADJ Gi0/0: Synchronized with 10.1.1.1, state FULL
*Mar 8 17:47:03.346: %OSPFv3-5-ADJCHG: Process 1, Nbr 10.1.1.1 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
관련 정보