IPv6下的各种路由协议

RIPng

  • 使用UDP521(源UDP端口及目的UDP端口都是521)
  • 最大跳数依然是15跳
  • 携带的网络前缀是128bis,而不是32bits
  • 下一跳地址是128bits
  • 使用Linklocal 地址作为协议数据包的源地址,发送RIPng消息到邻接RIPng路由器。使用FF02::9作为RIPng更新的目标地址
  • Distance 默认120

image-20200803215146107

  • R1
1
2
3
4
5
ipv6 unicast-routing
interface Ethernet0/0
ipv6 address 2012::1/64
ipv6 enable
ipv6 rip RIPprocess enable
  • R2
1
2
3
4
5
ipv6 unicast-routing
interface Ethernet0/0
ipv6 address 2012::2/64
ipv6 enable
ipv6 rip RIPprocess enable
  • R3
1
2
3
4
5
ipv6 unicast-routing
interface Ethernet0/0
ipv6 address 2023::3/64
ipv6 enable
ipv6 rip RIPprocess enable
  • 查看路由表测试连通性
1
2
3
4
5
6
7
8
9
10
11
12
13
14
R1#show ipv route
C 2012::/64 [0/0]
via Ethernet0/0, directly connected
L 2012::1/128 [0/0]
via Ethernet0/0, receive
R 2023::/64 [120/2]
via FE80::A8BB:CCFF:FE00:2000, Ethernet0/0
L FF00::/8 [0/0]
via Null0, receive
R1#ping 2023::3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2023::3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/12/60 ms
  • 在R1上下发默认路由
1
2
interface Ethernet0/0
ipv6 rip RIPprocess default-information originate

OSPFv3

  • OSPF V2与V3有相似之处:

    • 使用相同的基本数据包类型,如Hello、DBD、LSR、LSU、和LSA
    • 邻居发现和邻接关系形成机制是相同的
    • 支持在遵循RFC的NBMA和点到多点拓扑模式上的OSPV3操作。OSPFv3也支持CISCO的其他模式,例如点到点等
    • LSA泛洪和衰老机制是相同的
  • OSPF V2与V3的不同之处:

    • OSPFv3运行在链路上,每条链路有可以有多个OSPFv3实例

    • OSPFv3的RouterID还是32bits的,如果路由器上没有配置IPv4地址,则在OSPFv3进程中需手工指定RouterID

    • OSPFv3使用IPv6 Linklocal地址标识OSPFv3邻接的邻居

    • 新的LSA类型

      • 链路LSA(LSA类型0x0008):每条链路都有一个链路LSA,这个新类型提供了路由器的本地链路地址,并列出了链路的所有IPv6前缀
      • 区内前缀LSA(LSA类型0x2009)
      • RFC2740
      • OSPFv3使用组播地址:FF02::5及FF02::6
      • 在认证这块,不使用OSPFv2中定义的认证方法。而是使用AH及ESP扩展头部作为安全机制

image-20200803215146107

  • R1
1
2
3
4
5
6
7
8
ipv6 unicast-routing
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Ethernet0/0
ipv6 address 2012::1/64
ipv6 enable
ipv6 ospf 1 area 0
  • R2
1
2
3
4
5
6
7
8
9
10
11
12
13
ipv6 unicast-routing
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Ethernet0/0
ipv6 address 2012::2/64
ipv6 enable
ipv6 ospf 1 area 0
!
interface Ethernet0/1
ipv6 address 2023::2/34
ipv6 enable
ipv6 ospf 1 area 0
  • R3
1
2
3
4
5
6
7
8
ipv6 unicast-routing
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Ethernet0/0
ipv6 address 2023::3/64
ipv6 enable
ipv6 ospf 1 area 0
  • 检查邻居关系
1
2
3
4
5
6
7
R2#sh ipv ospf nei

OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

Neighbor ID Pri State Dead Time Interface ID Interface
3.3.3.3 1 FULL/DR 00:00:32 3 Ethernet0/1
3.3.3.3 1 FULL/DR 00:00:30 3 Ethernet0/0
  • 观察到8类和9类LSA
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
R2#sh ipv ospf nei

OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

Neighbor ID Pri State Dead Time Interface ID Interface
3.3.3.3 1 FULL/DR 00:00:32 3 Ethernet0/1
3.3.3.3 1 FULL/DR 00:00:30 3 Ethernet0/0
R2#sho ipv ospf da
R2#sho ipv ospf database

OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

Router Link States (Area 0)

ADV Router Age Seq# Fragment ID Link count Bits
2.2.2.2 73 0x80000007 0 2 None
3.3.3.3 71 0x80000007 0 1 None

Net Link States (Area 0)

ADV Router Age Seq# Link ID Rtr count
3.3.3.3 77 0x80000003 3 2

Link (Type-8) Link States (Area 0)

ADV Router Age Seq# Link ID Interface
2.2.2.2 152 0x80000002 4 Et0/1
3.3.3.3 116 0x80000002 3 Et0/1
2.2.2.2 174 0x80000001 3 Et0/0
3.3.3.3 201 0x80000001 3 Et0/0

Intra Area Prefix Link States (Area 0)

ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
3.3.3.3 77 0x80000003 3072 0x2002 3
评论
加载中,最新评论有1分钟缓存...