OSPF(Open Shortest Path First)는 IP에 대한 라우팅 프로토콜입니다.Distance-vector 프로토콜과 달리 링크 상태 프로토콜입니다.링크 상태 프로토콜은 소스 및 대상 시스템을 연결하는 링크의 상태에 따라 라우팅 결정을 수행합니다.링크의 상태는 해당 인터페이스에 대한 설명 및 인접 네트워킹 디바이스와의 관계입니다.인터페이스 정보에는 인터페이스의 IPv6 접두사, 네트워크 마스크, 연결된 네트워크 유형, 해당 네트워크에 연결된 라우터 등이 포함됩니다.이 정보는 다양한 유형의 LSA(link-state advertisement)에서 전파됩니다.
RFC 2740에 설명된 OSPF 버전 3은 IPv6을 지원합니다.
인터페이스에서 IPv6에 대해 OSPF를 활성화하려면 먼저 다음을 수행해야 합니다.
IPv6 네트워크에 대한 OSPF 네트워크 전략 및 계획을 완료합니다.예를 들어 여러 영역이 필요한지 여부를 결정해야 합니다.
IPv6 유니캐스트 라우팅을 활성화합니다.
인터페이스에서 IPv6를 활성화합니다.
IPv6용 OSPF에서 IPsec(IPsec) IPsec(Secure Socket Application Program Interface)를 구성하여 인증 및 암호화를 활성화합니다.
이 문서는 특정 소프트웨어 및 하드웨어 버전으로 한정되지 않습니다.
이 문서의 정보는 특정 랩 환경의 디바이스를 토대로 작성되었습니다.이 문서에 사용된 모든 디바이스는 초기화된(기본) 컨피그레이션으로 시작되었습니다.현재 네트워크가 작동 중인 경우, 모든 명령어의 잠재적인 영향을 미리 숙지하시기 바랍니다.
문서 규칙에 대한 자세한 내용은 Cisco 기술 팁 표기 규칙을 참고하십시오.
이 섹션에는 이 문서에서 설명하는 기능을 구성하기 위한 정보가 표시됩니다.
참고: 명령 조회 도구(등록된 고객만 해당)를 사용하여 이 문서에 사용된 명령에 대한 자세한 내용을 확인하십시오.
이 문서에서는 다음 네트워크 설정을 사용합니다.
다이어그램에 표시된 라우터에 대한 OSPFv3의 컨피그레이션입니다.
Stub 라우터 |
---|
ipv6 unicast-routing ipv6 cef ! interface serial 0/0 no ip address ipv6 enable ipv6 address 2001:ABAB::/64 eui-64 ipv6 ospf 1 area 2 ! ipv6 router ospf 1 router-id 3.3.3.3 area 2 stub ! |
ABR1 라우터 |
---|
ipv6 unicast-routing ipv6 cef ! interface FastEthernet0/0 no ip address speed auto ipv6 address 2003::1/124 ipv6 enable ipv6 ospf 1 area 0 ! interface Serial0/0 no ip address ipv6 address 2002:ABAB::/64 eui-64 ipv6 enable ipv6 ospf 1 area 2 ! ipv6 router ospf 1 router-id 1.1.1.1 area 2 stub no-summary ! |
ASBR 라우터 |
---|
ipv6 unicast-routing ipv6 cef ! interface FastEthernet0/0 no ip address ipv6 address 2003::2/124 ipv6 enable ipv6 ospf 1 area 0 ! interface Serial0/0 no ip address ipv6 address 2003::1:1/124 ipv6 enable ipv6 rip EXT enable ! ipv6 router ospf 1 router-id 2.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 2004:ABAB::/64 eui-64 ipv6 enable ipv6 rip EXT enable ! interface Serial0/0 no ip address ipv6 address 2003::1:2/124 ipv6 enable ipv6 rip EXT enable ! ipv6 router rip EXT |
이 섹션을 사용하여 컨피그레이션이 제대로 작동하는지 확인합니다.
Output Interpreter 도구(등록된 고객만 해당)(OIT)는 특정 show 명령을 지원합니다.OIT를 사용하여 show 명령 출력의 분석을 봅니다.
show ipv6 ospf database 명령은 라우터의 LSDB(Link State Database)를 표시합니다.
Stub_Router#show ipv6 ospf database OSPFv3 Router with ID (3.3.3.3) (Process ID 1) Router Link States (Area 2) ADV Router Age Seq# Fragment ID Link count Bits 1.1.1.1 885 0x80000007 0 1 B 3.3.3.3 919 0x80000008 0 1 None Inter Area Prefix Link States (Area 2) ADV Router Age Seq# Prefix 1.1.1.1 373 0x80000002 ::/0 Link (Type-8) Link States (Area 2) ADV Router Age Seq# Link ID Interface 1.1.1.1 964 0x80000006 5 Se0/0 3.3.3.3 1165 0x80000006 5 Se0/0 Intra Area Prefix Link States (Area 2) ADV Router Age Seq# Link ID Ref-lstype Ref-LSID 1.1.1.1 964 0x80000005 0 0x2001 0 3.3.3.3 1172 0x80000005 0 0x2001 0
show ipv6 ospf database router self-originate 명령은 라우터가 시작하고 수신하는 라우터 LSA를 표시합니다.라우터 LSA에는 주소 또는 접두사 정보가 없습니다.
Stub_Router# OSPFv3 Router with ID (3.3.3.3) (Process ID 1) Router Link States (Area 2) Routing Bit Set on this LSA LS age: 753 Options: (V6-Bit R-bit DC-Bit) LS Type: Router Links Link State ID: 0 Advertising Router: 1.1.1.1 LS Seq Number: 80000007 Checksum: 0xFCA4 Length: 40 Area Border Router Number of Links: 1 Link connected to: another Router (point-to-point) Link Metric: 64 Local Interface ID: 5 Neighbor Interface ID: 5 Neighbor Router ID: 3.3.3.3 LS age: 791 Options: (V6-Bit R-bit DC-Bit) LS Type: Router Links Link State ID: 0 Advertising Router: 3.3.3.3 LS Seq Number: 80000008 Checksum: 0x178A Length: 40 Number of Links: 1 Link connected to: another Router (point-to-point) Link Metric: 64 Local Interface ID: 5 Neighbor Interface ID: 5 Neighbor Router ID: 1.1.1.1
LSA에는 다음과 같은 비트가 있는 Options 필드가 있습니다.
V6 비트 - 라우터/링크를 라우팅 계산에 사용할지 여부를 나타냅니다.
R 비트 - "라우터 비트"입니다. 발신자가 활성 라우터인지 여부를 나타냅니다.
DC 비트 - 라우터의 수요 회로의 처리를 나타냅니다.
show ipv6 ospf database link self-originate 명령은 링크 LSA가 링크별 주소를 전달함을 보여줍니다.
Stub_Router#show ipv6 ospf database link self-originate OSPFv3 Router with ID (3.3.3.3) (Process ID 1) Link (Type-8) Link States (Area 2) LS age: 627 Options: (V6-Bit R-bit DC-Bit) LS Type: Link-LSA (Interface: Serial0/0) Link State ID: 5 (Interface ID) Advertising Router: 1.1.1.1 LS Seq Number: 80000006 Checksum: 0x215C Length: 56 Router Priority: 1 Link Local Address: FE80::D20E:16FF:FE50:0 Number of Prefixes: 1 Prefix Address: 2002:ABAB:: Prefix Length: 64, Options: None LS age: 828 Options: (V6-Bit R-bit DC-Bit) LS Type: Link-LSA (Interface: Serial0/0) Link State ID: 5 (Interface ID) Advertising Router: 3.3.3.3 LS Seq Number: 80000006 Checksum: 0xB4C2 Length: 56 Router Priority: 1 Link Local Address: FE80::D20D:16FF:FE50:0 Number of Prefixes: 1 Prefix Address: 2001:ABAB:: Prefix Length: 64, Options: None
Stub Router는 전체 stub 영역에 속하므로 ABR1 라우터는 기본 경로만 Stub 라우터로 전송합니다.
Stub_Router# show ipv6 route IPv6 Routing Table - 6 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2 ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 OI ::/0 [110/65] via FE80::D20E:16FF:FE50:0, Serial0/0 C 2001:ABAB::/64 [0/0] via ::, Serial0/0 L 2001:ABAB::D20D:16FF:FE50:0/128 [0/0] via ::, Serial0/0 O 2002:ABAB::/64 [110/128] via FE80::D20E:16FF:FE50:0, Serial0/0 L FE80::/10 [0/0] via ::, Null0 L FF00::/8 [0/0] via ::, Null0
ABR1 라우터는 영역 경계 라우터입니다.
ABR1# show ipv6 ospf Routing Process "ospfv3 1" with ID 1.1.1.1 It is an area border router SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs LSA group pacing timer 240 secs Interface flood pacing timer 33 msecs Retransmission pacing timer 66 msecs Number of external LSA 2. Checksum Sum 0x00A1E0 Number of areas in this router is 2. 1 normal 1 stub 0 nssa Reference bandwidth unit is 100 mbps Area BACKBONE(0) Number of interfaces in this area is 1 SPF algorithm executed 5 times Number of LSA 8. Checksum Sum 0x052E71 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 6 times Number of LSA 7. Checksum Sum 0x042237 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 - 9 entries Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP U - Per-user Static route I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2 ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 O 2001:ABAB::/64 [110/128] via FE80::D20D:16FF:FE50:0, Serial0/0 C 2002:ABAB::/64 [0/0] via ::, Serial0/0 L 2002:ABAB::D20E:16FF:FE50:0/128 [0/0] via ::, Serial0/0 C 2003::/124 [0/0] via ::, FastEthernet0/0 L 2003::1/128 [0/0] via ::, FastEthernet0/0 OE1 2003::1:0/124 [110/26] via FE80::D20F:BFF:FE24:0, FastEthernet0/0 OE1 2004:ABAB::/64 [110/26] via FE80::D20F:BFF:FE24:0, FastEthernet0/0 L FE80::/10 [0/0] via ::, Null0 L FF00::/8 [0/0] via ::, Null0
ASBR 라우터는 네트워크의 자동 시스템 경계 라우터입니다.직렬 0/0 인터페이스를 통해 RIP 네트워크에 연결됩니다.
ASBR# show ipv6 ospf Routing Process "ospfv3 1" with ID 2.2.2.2 It is an autonomous system boundary router Redistributing External Routes (with default metric 25) from, rip with metric-type 1 include-connected SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs LSA group pacing timer 240 secs Interface flood pacing timer 33 msecs Retransmission pacing timer 66 msecs Number of external LSA 2. Checksum Sum 0x00A1E0 Number of areas in this router is 1. 1 normal 0 stub 0 nssa Reference bandwidth unit is 100 mbps Area BACKBONE(0) Number of interfaces in this area is 1 SPF algorithm executed 2 times Number of LSA 8. Checksum Sum 0x052E71 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 156 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 69, trigger updates 6 Interfaces: Serial0/0 Redistribution: Redistributing protocol ospf 1 include-connected
이 섹션에서는 컨피그레이션 문제를 해결할 수 있습니다.
참고: debug 명령을 사용하기 전에 디버그 명령에 대한 중요 정보를 참조하십시오.
디버그 ipv6
Stub 라우터에서 OSPFv3이 활성화되면 OSPFv3 Type 1 Hello 메시지를 FF02::5 멀티캐스트 주소로 전송합니다.ABR1 라우터에서 Hello 패킷을 수신하면 마스터/슬레이브 관계를 협상한 다음 DBD 패킷을 전송하기 시작합니다.
Stub_Router#debug ipv6 ospf events Stub_Router# debug ipv6 ospf packet *Mar 1 00:14:20.999: OSPFv3: rcv. v:3 t:1 l:36 rid:1.1.1.1 aid:0.0.0.2 chk:142A inst:0 from Serial0/0 *Mar 1 00:14:21.023: OSPFv3: rcv. v:3 t:2 l:28 rid:1.1.1.1 aid:0.0.0.2 chk:EB8A inst:0 from Serial0/0 *Mar 1 00:14:21.027: OSPFv3: rcv. v:3 t:1 l:40 rid:1.1.1.1 aid:0.0.0.2 chk:E1C inst:0 from Serial0/0 *Mar 1 00:14:21.027: OSPFv3: 2 Way Communication to 1.1.1.1 on Serial0/0, state 2WAY *Mar 1 00:14:21.027: OSPFv3: Send DBD to 1.1.1.1 on Serial0/0 seq 0x1737 opt 0x0011 flag 0x7 len 28 *Mar 1 00:14:21.031: OSPFv3: Rcv DBD from 1.1.1.1 on Serial0/0 seq 0x2402 opt 0x0011 flag 0x7 len 28 mtu 1500 state EXSTART *Mar 1 00:14:21.031: OSPFv3: First DBD and we are not SLAVE *Mar 1 00:14:21.035: OSPFv3: rcv. v:3 t:2 l:88 rid:1.1.1.1 aid:0.0.0.2 chk:5CF3 inst:0 from Serial0/0 *Mar 1 00:14:21.039: OSPFv3: Rcv DBD from 1.1.1.1 on Serial0/0 seq 0x1737 opt 0x0011 flag 0x2 len 88 mtu 1500 state EXSTART *Mar 1 00:14:21.039: OSPFv3: NBR Negotiation Done. We are the MASTER *Mar 1 00:14:21.039: OSPFv3: Send DBD to 1.1.1.1 on Serial0/0 seq 0x1738 opt 0x0011 flag 0x3 len 88 *Mar 1 00:14:21.043: OSPFv3: rcv. v:3 t:2 l:28 rid:1.1.1.1 aid:0.0.0.2 chk:F85B inst:0 from Serial0/0 *Mar 1 00:14:21.047: OSPFv3: Rcv DBD from 1.1.1.1 on Serial0/0 seq 0x1738 opt 0x0011 flag 0x0 len 28 mtu 1500 state EXCHANGE *Mar 1 00:14:21.047: OSPFv3: Send DBD to 1.1.1.1 on Serial0/0 seq 0x1739 opt 0x0011 flag 0x1 len 28Send LS REQ to 1.1.1.1 length 36 LSA count 3 *Mar 1 00:14:21.051: OSPFv3: rcv. v:3 t:3 l:52 rid:1.1.1.1 aid:0.0.0.2 chk:C326 inst:0 from Serial0/0 *Mar 1 00:14:21.055: OSPFv3: rcv. v:3 t:2 l:28 rid:1.1.1.1 aid:0.0.0.2 chk:F85A inst:0 from Serial0/0
DBD 패킷이 교환되면 라우터는 LS REQ(Link-State Request) 및 LS UPD(Link-State Update) 메시지를 보내 LSDB를 구축합니다.연속적인 LS REQ 및 LS UPD 메시지 후 상태가 FULL에 도달하면 라우터는 Hello 패킷을 계속 교환합니다.
Stub_Router# *Mar 1 00:14:21.055: OSPFv3: rcv. v:3 t:4 l:144 rid:1.1.1.1 aid:0.0.0.2 chk:58BC inst:0 from Serial0/0Rcv LS REQ from 1.1.1.1 on Serial0/0 length 52 LSA count 3Send UPD to 131.88.101.156 on Serial0/0 length 128 LSA count 3 *Mar 1 00:14:21.059: OSPFv3: Rcv DBD from 1.1.1.1 on Serial0/0 seq 0x1739 opt 0x0011 flag 0x0 len 28 mtu 1500 state EXCHANGE *Mar 1 00:14:21.063: OSPFv3: Exchange Done with 1.1.1.1 on Serial0/0Rcv LS UPD from 1.1.1.1 on Serial0/0 length 144 LSA count 3 *Mar 1 00:14:21.067: OSPFv3: Synchronized with 1.1.1.1 on Serial0/0, state FULL *Mar 1 00:14:21.067: %OSPFv3-5-ADJCHG: Process 1, Nbr 1.1.1.1 on Serial0/0 from LOADING to FULL, Loading Done *Mar 1 00:14:21.687: OSPFv3: rcv. v:3 t:4 l:60 rid:1.1.1.1 aid:0.0.0.2 chk:66EB inst:0 from Serial0/0Rcv LS UPD from 1.1.1.1 on Serial0/0 length 60 LSA count 1 *Mar 1 00:14:23.683: OSPFv3: rcv. v:3 t:5 l:96 rid:1.1.1.1 aid:0.0.0.2 chk:4BB5 inst:0 from Serial0/0