IPv6中OSPFv3配置与协议分析(Huawei)

  1. 掌握OSPFv3的基本配置。
  2. 理解OSPFv3邻居关系建立过程。
  3. 了解OSPFv3协议的各种LSDB同步过程。
  4. 了解OSPFv3各种LSA的格式及作用。

配置命令:

[rta]dis cu

[V200R003C00]

#

 sysname rta

#

 snmp-agent local-engineid 800007DB03000000000000

 snmp-agent

#

 clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

 drop illegal-mac alarm

#

ipv6

#

 set cpu-usage threshold 80 restore 75

#

aaa

 authentication-scheme default

 authorization-scheme default

 accounting-scheme default

 domain default

 domain default_admin

 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

 local-user admin service-type http

#

ospfv3 1

 router-id 1.1.1.1

#

firewall zone Local

 priority 15

#

interface GigabitEthernet0/0/0

 ipv6 enable

 ipv6 address 1::1/64

 undo ipv6 nd ra halt

 ospfv3 1 area 0.0.0.1

#

interface GigabitEthernet0/0/1

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

interface LoopBack1

 ipv6 enable

 ipv6 address 3::1/128

 ospfv3 1 area 0.0.0.1

#

user-interface con 0

 authentication-mode password

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

 

<rtb>dis cu

[V200R003C00]

#

 sysname rtb

#

 snmp-agent local-engineid 800007DB03000000000000

 snmp-agent

#

 clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

 drop illegal-mac alarm

#

ipv6

#

 set cpu-usage threshold 80 restore 75

#

aaa

 authentication-scheme default

 authorization-scheme default

 accounting-scheme default

 domain default

 domain default_admin

 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

 local-user admin service-type http

#

ospfv3 1

 router-id 2.2.2.2

#

firewall zone Local

 priority 15

#

interface GigabitEthernet0/0/0

 ipv6 enable

 ipv6 address 1::2/64

 undo ipv6 nd ra halt

 ospfv3 1 area 0.0.0.1

#

interface GigabitEthernet0/0/1

 ipv6 enable

 ipv6 address 2::1/64

 undo ipv6 nd ra halt

 ospfv3 1 area 0.0.0.0

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

interface LoopBack1

 ipv6 enable

 ipv6 address 4::1/128

 ospfv3 1 area 0.0.0.1

#

interface LoopBack2

 ipv6 enable

 ipv6 address 5::1/128

 ospfv3 1 area 0.0.0.0

#

user-interface con 0

 authentication-mode password

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

 

<rtc>dis cu

[V200R003C00]

#

 sysname rtc

#

 snmp-agent local-engineid 800007DB03000000000000

 snmp-agent

#

 clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

 drop illegal-mac alarm

#

ipv6

#

 set cpu-usage threshold 80 restore 75

#

aaa

 authentication-scheme default

 authorization-scheme default

 accounting-scheme default

 domain default

 domain default_admin

 local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

 local-user admin service-type http

#

ospfv3 1

 router-id 3.3.3.3

 import-route direct

#

firewall zone Local

 priority 15

#

interface GigabitEthernet0/0/0

#

interface GigabitEthernet0/0/1

 ipv6 enable

 ipv6 address 2::2/64

 undo ipv6 nd ra halt

 ospfv3 1 area 0.0.0.0

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

interface LoopBack1

 ipv6 enable

 ipv6 address 6::1/128

 ospfv3 1 area 0.0.0.0

#

interface LoopBack2

 ipv6 enable

 ipv6 address 7::1/128

 ospfv3 1 area 0.0.0.0

#

user-interface con 0

 authentication-mode password

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

<rtc>

配置结束后检查设备联通性:ping2::2.

RTA上的路由表

[rta]dis ipv6 routing-table

Routing Table : Public

Destinations : 10 Routes : 10

 

 Destination  : ::1                             PrefixLength : 128

 NextHop      : ::1                             Preference   : 0

 Cost         : 0                               Protocol     : Direct

 RelayNextHop : ::                              TunnelID     : 0x0

 Interface    : InLoopBack0                     Flags        : D

 

 Destination  : 1::                             PrefixLength : 64

 NextHop      : 1::1                            Preference   : 0

 Cost         : 0                               Protocol     : Direct

 RelayNextHop : ::                              TunnelID     : 0x0

 Interface    : GigabitEthernet0/0/0            Flags        : D

 

 Destination  : 1::1                            PrefixLength : 128

 NextHop      : ::1                             Preference   : 0

 Cost         : 0                               Protocol     : Direct

 RelayNextHop : ::                              TunnelID     : 0x0

 Interface    : GigabitEthernet0/0/0            Flags        : D

 

 Destination  : 2::                             PrefixLength : 64

 NextHop      : FE80::2E0:FCFF:FED0:28AE        Preference   : 10

 Cost         : 2                               Protocol     : OSPFv3

 RelayNextHop : ::                              TunnelID     : 0x0

 Interface    : GigabitEthernet0/0/0            Flags        : D

 

 Destination  : 3::1                            PrefixLength : 128

 NextHop      : ::1                             Preference   : 0

 Cost         : 0                               Protocol     : Direct

 RelayNextHop : ::                              TunnelID     : 0x0

 Interface    : LoopBack1                       Flags        : D

 

 Destination  : 4::1                            PrefixLength : 128

 NextHop      : FE80::2E0:FCFF:FED0:28AE        Preference   : 10

 Cost         : 1                               Protocol     : OSPFv3

 RelayNextHop : ::                              TunnelID     : 0x0

 Interface    : GigabitEthernet0/0/0            Flags        : D

 

 Destination  : 5::1                            PrefixLength : 128

 NextHop      : FE80::2E0:FCFF:FED0:28AE        Preference   : 10

 Cost         : 1                               Protocol     : OSPFv3

 RelayNextHop : ::                              TunnelID     : 0x0

 Interface    : GigabitEthernet0/0/0            Flags        : D

 

 Destination  : 6::1                            PrefixLength : 128

 NextHop      : FE80::2E0:FCFF:FED0:28AE        Preference   : 10

 Cost         : 2                               Protocol     : OSPFv3

 RelayNextHop : ::                              TunnelID     : 0x0

 Interface    : GigabitEthernet0/0/0            Flags        : D

 

 Destination  : 7::1                            PrefixLength : 128

 NextHop      : FE80::2E0:FCFF:FED0:28AE        Preference   : 10

 Cost         : 2                               Protocol     : OSPFv3

 RelayNextHop : ::                              TunnelID     : 0x0

 Interface    : GigabitEthernet0/0/0            Flags        : D

 

 Destination  : FE80::                          PrefixLength : 10

 NextHop      : ::                              Preference   : 0

 Cost         : 0                               Protocol     : Direct

 RelayNextHop : ::                              TunnelID     : 0x0

 Interface    : NULL0                           Flags        : D

 

RTA上的OSPFv3路由出现前缀为1-7的路由条目:

RTA的链路状态数据库:

[rta]dis ospfv3 lsdb

 

* indicates STALE LSA

 

           OSPFv3 Router with ID (1.1.1.1) (Process 1)

               Link-LSA (Interface GigabitEthernet0/0/0)

 

Link State ID   Origin Router    Age   Seq#       CkSum  Prefix

0.0.0.3         1.1.1.1          0638  0x80000001 0x3131      1

0.0.0.3         2.2.2.2          0539  0x80000001 0x19bd      1

 

               Router-LSA (Area 0.0.0.1)

 

Link State ID   Origin Router    Age   Seq#       CkSum    Link

0.0.0.0         1.1.1.1          0528  0x80000005 0xf21a      1

0.0.0.0         2.2.2.2          0444  0x80000006 0xd531      1

 

               Network-LSA (Area 0.0.0.1)

 

Link State ID   Origin Router    Age   Seq#       CkSum

0.0.0.3         1.1.1.1          0528  0x80000001 0x7a9b

 

               Inter-Area-Prefix-LSA (Area 0.0.0.1)

 

Link State ID   Origin Router    Age   Seq#       CkSum

0.0.0.1         2.2.2.2          0341  0x80000001 0x5199

0.0.0.2         2.2.2.2          0408  0x80000001 0x514d

0.0.0.3         2.2.2.2          0308  0x80000001 0x5942

0.0.0.4         2.2.2.2          0275  0x80000001 0x5b3e

 

               Inter-Area-Router-LSA (Area 0.0.0.1)

 

Link State ID   Origin Router    Age   Seq#       CkSum

3.3.3.3         2.2.2.2          0265  0x80000001 0xed18

 

               Intra-Area-Prefix-LSA (Area 0.0.0.1)

 

Link State ID   Origin Router    Age   Seq#       CkSum  Prefix  Reference

0.0.0.1         1.1.1.1          0522  0x80000005 0x3635      1  Router-LSA

0.0.0.2         1.1.1.1          0527  0x80000001 0x1a9d      1  Network-LSA

0.0.0.1         2.2.2.2          0444  0x80000001 0x66ff      1  Router-LSA

 

 

查看link-LSA的详细信息:

 

[rta]dis ospfv3 lsdb link

 

 

           OSPFv3 Router with ID (1.1.1.1) (Process 1)

 

 

               Link-LSA (Interface GigabitEthernet0/0/0)

 

  LS Age: 672

  LS Type: Link-LSA

  Link State ID: 0.0.0.3

  Originating Router: 1.1.1.1

  LS Seq Number: 0x80000001

  Retransmit Count: 0

  Checksum: 0x3131

  Length: 56

  Priority: 1

  Options: 0x000013 (-|R|-|-|E|V6)

  Link-Local Address: FE80::2E0:FCFF:FE12:608

  Number of Prefixes: 1

 

   Prefix: 1::/64

    Prefix Options: 0 (-|-|-|-|-)

 

 

 

  LS Age: 573

  LS Type: Link-LSA

  Link State ID: 0.0.0.3

  Originating Router: 2.2.2.2

  LS Seq Number: 0x80000001

  Retransmit Count: 0

  Checksum: 0x19BD

  Length: 56

  Priority: 1

  Options: 0x000013 (-|R|-|-|E|V6)

  Link-Local Address: FE80::2E0:FCFF:FED0:28AE

  Number of Prefixes: 1

 

   Prefix: 1::/64

    Prefix Options: 0 (-|-|-|-|-)

观察邻居建立及LSDB同步过程:

  1. 在RTA的g0/0/0口先shutdiown,在undo shutdown,然后进行抓包:
  2. hello报文:

RTA发送的hello报文,报文源地址为RTA的接口的链路本地地址,目的地址为ALLSPFRouters组播地址,OSPFv3头和hello报文中没有携带ipv6地址信息,仅携带 routerID

OSPFv3各种LSA分析:

Router LSA不在包含地址前缀信息,仅仅描述了路由器周围的拓扑连接情况因为RTB只有一个接口,所以只给RTA发送一条。

RTB发送的LSU:

 

  1. Link-LSA
  2. Intra-area-prefix-LSA
  3. Network-LSA

猜你喜欢

转载自blog.csdn.net/Aee86_/article/details/81479187