EqLlyHJ5w6,694hQRgLWm
华三实验大全之OSPF篇(IPv6)华三实验大全之OSPF篇(IPv6) 实验目录: 1.OSPFv3多区域基本配置 2.OSPFv3创建虚链路 3.OSPFv3引入外部路由 4.OSPFv3中的stub区域 5.OSPFv3中的stub no-summary区域 一.OSPF多区域基本配置IPv6 配置ipv6地址 [R1]ipv6 [R1]int lo0 [R1-LoopBack0]ipv6 add 1::1/128 [R1-LoopBack0]int s0/2/0 [R1-Serial0/2/0]ipv6 add 2001::1/64 [R1-Serial0/2/0]q [R2]ipv6 [H3C]sys R2 [R2]int lo0 [R2-LoopBack0]ipv6 add 2::2/128 [R2-LoopBack0]int s0/2/0 [R2-Serial0/2/0]ipv6 add 2001::2/64 [R2-Serial0/2/0]int s0/2/2 [R2-Serial0/2/2]ipv6 add 2002::1/64 [R2-Serial0/2/2]q [R3]ipv6 [R3]int lo0 [R3-LoopBack0]ipv6 add 3::3/128 [R3-LoopBack0]int s0/2/0 [R3-Serial0/2/0]ipv6 add 2002::2/64 [R3-Serial0/2/0] %Dec 8 10:24:24:219 2010 R3 IFNET/4/UPDOWN: Protocol PPP IPV6CP on the interface Serial0/2/0 is UP [R3-Serial0/2/0]int s0/2/2 [R3-Serial0/2/2]ipv6 add 2003::1/64 [R3-Serial0/2/2]q [R4]ipv6 [R4]int lo0 [R4-LoopBack0]ipv6 add 4::4/128 [R4-LoopBack0]int s0/2/0 [R4-Serial0/2/0]ipv6 add 2003::2/64 [R4-Serial0/2/0] 配置ospfv3 开启ospfv3 [R1]ospfv3 [R1-ospfv3-1]router-id 1.1.1.1 注意要配置router id [R1-ospfv3-1]q [R1]int lo0 [R1-LoopBack0]ospfv3 ? INTEGER<1-65535> Process ID [R1-LoopBack0]ospfv3 1 ? area Area parameters [R1-LoopBack0]ospfv3 1 area 1 [R1-LoopBack0]int s0/2/0 [R1-Serial0/2/0]ospfv3 1 area 1 [R2]ospfv3 [R2-ospfv3-1]router-id 2.2.2.2 [R2]int s0/2/0 [R2-Serial0/2/0]ospfv3 1 area 1 [R2]int s0/2/2 [R2-Serial0/2/2]ospfv3 1 area 0 [R2-Serial0/2/2]q [R2]int lo0 [R2-LoopBack0]ospfv3 1 area 0 [R2-LoopBack0]q [R3]ospfv3 [R3-ospfv3-1]router-id 3.3.3.3 [R3-ospfv3-1]q [R3]int lo0 [R3-LoopBack0]ospfv3 1 area 0 [R3]int s0/2/0 [R3-Serial0/2/0]ospfv3 1 area 0 [R3]int s0/2/2 [R3-Serial0/2/2]ospfv3 1 area 2 [R4]ospfv3 [R4-ospfv3-1]router-id 4.4.4.4 [R4-ospfv3-1]q [R4]int s0/2/0 [R4-Serial0/2/0]ospfv3 1 area 2 [R4]int lo0 [R4-LoopBack0]ospfv3 1 area 3 [R4-LoopBack0]q 基本配置已经完成,下面是区域1学习到的区域2的网络2003::/64 [R1]display ospfv3 routing E1 - Type 1 external route, IA - Inter area route, I - Intra area route E2 - Type 2 external route, * - Selected route OSPFv3 Router with ID (1.1.1.1) (Process 1) ------------------------------------------------------------------------ *Destination: 1::1/128 Type : I Cost : 0 NextHop : directly-connected Interface: Loop0 *Destination: 2::2/128 Type : IA Cost : 1562 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 3::3/128 Type : IA Cost : 3124 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 2001::/64 Type : I Cost : 1562 NextHop : directly-connected Interface: S0/2/0 *Destination: 2002::/64 Type : IA Cost : 3124 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 2003::/64 Type : IA Cost : 4686 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 上面输出显示,我们没有学习到area3的路由4::4 解决方法:创建虚链路 二.OSPF创建虚链路 实验拓扑同实验一 vlink-peer 命令用来创建并配置一条虚连接,undo vlink-peer 命令用来删除一条已 有的虚连接。 根据 RFC2328 的规定,OSPF 的区域必须是和骨干区域保持连通的,可以使用 vlink-peer 命令建立逻辑上的连通性。在某种程度上,可以将虚连接看做一个普通 的使能了OSPF 的接口,因为在其上配置的hello、retransmit 和trans-delay 等参数 的原理是类似的。 需要注意的是,当配置虚连接验证时,由骨干区域的authentication-mode 命令来 确定使用的验证类型是MD5 密文验证或是明文验证。 相关配置可参考命令 authentication-mode 和display ospf。 注意: 全部是在area 2上做的 区域1就能学习到区域3的路由 [R1]display ospfv3 routing E1 - Type 1 external route, IA - Inter area route, I - Intra area route E2 - Type 2 external route, * - Selected route OSPFv3 Router with ID (1.1.1.1) (Process 1) ------------------------------------------------------------------------ *Destination: 1::1/128 Type : I Cost : 0 NextHop : directly-connected Interface: Loop0 *Destination: 2::2/128 Type : IA Cost : 1562 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 3::3/128 Type : IA Cost : 3124 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 4::4/128 Type : IA Cost : 4686 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 2001::/64 Type : I Cost : 1562 NextHop : directly-connected Interface: S0/2/0 *Destination: 2002::/64 Type : IA Cost : 3124 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 2003::/64 Type : IA Cost : 4686 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 2003::1/128 Type : IA Cost : 4686 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 2003::2/128 Type : IA Cost : 4686 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 上面的输出可以看出,区域1已经可以学习到区域3的路由! 三.OSPFv3引入外部路由 实验拓扑 引入路由简介 import-route 命令用来引入外部路由信息,undo import-route 命令用来取消对外 部路由信息的引入。 如果引入类型为 1 的外部路由,则在路由表中,metric 值为本路由器到达广播此条 外部路由的路由器的metric 值加上引入时使用的cost 值。如果引入类型2 的外部路 由,则路由表中的metric 值就是引入时设定的cost 值。 此命令不是累加形式,cost、type、tag 等参数应在同一条命令中一次设定,否则后 配置的命令会覆盖先配置的命令。 缺省情况下,不引入其它协议的路由信息。 我们在R3上做一条通往R4的静态路由,R4向R3上做一条默认路由 [R3]ipv6 route-static 4:: 64 2003::2 [R4]ipv6 route-static :: 0 2003::1 如果不引入直连路由的话,我们会学习不到R3直连的 2003::/64网段 查看下面的路由,我们就可以看到外部路由 [R1]display ipv6 routing-table protocol ospfv3 OSPFv3 Routing Table : Summary Count : 5 OSPFv3 Routing Table's Status : < Active > Summary Count : 5 Destination: 2::2/128 Protocol : OSPFv3 NextHop : FE80::507F:0:A697:1 Preference: 10 Interface : S0/2/0 Cost : 1562 Destination: 3::3/128 Protocol : OSPFv3 NextHop : FE80::507F:0:A697:1 Preference: 10 Interface : S0/2/0 Cost : 3124 Destination: 4::/64 Protocol : OSPFv3 NextHop : FE80::507F:0:A697:1 Preference: 150 Interface : S0/2/0 Cost : 1 Destination: 2002::/64 Protocol : OSPFv3 NextHop : FE80::507F:0:A697:1 Preference: 10 Interface : S0/2/0 Cost : 3124 Destination: 2003::/64 Protocol : OSPFv3 NextHop : FE80::507F:0:A697:1 Preference: 150 Interface : S0/2/0 Cost : 1 OSPFv3 Routing Table's Status : < Inactive > Summary Count : 0 并能ping通 [R1]ping 4::4 Error: Ping: Unknown host 4::4 [R1]ping ipv6 4::4 PING 4::4 : 56 data bytes, press CTRL_C to break Reply from 4::4 bytes=56 Sequence=1 hop limit=62 time = 44 ms Reply from 4::4 bytes=56 Sequence=2 hop limit=62 time = 40 ms Reply from 4::4 bytes=56 Sequence=3 hop limit=62 time = 50 ms Reply from 4::4 bytes=56 Sequence=4 hop limit=62 time = 30 ms Reply from 4::4 bytes=56 Sequence=5 hop limit=62 time = 30 ms --- 4::4 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/38/50 ms 四.OPPFv3中的stub区域 实验拓扑同实验三 注意: 如果要将一个区域配置成 Stub 区域,则该区域中的所有路由器都必须配置此属性。 相关配置可参考命令 default-cost。 把区域1配置为stub区域 末节区域过滤4,5类lsa,没有过滤3类lsa,所以有ospf区域内的所有路由条目。 外部路由走默认路由! [R1]display ospfv3 routing E1 - Type 1 external route, IA - Inter area route, I - Intra area route E2 - Type 2 external route, * - Selected route OSPFv3 Router with ID (1.1.1.1) (Process 1) ------------------------------------------------------------------------ *Destination: ::/0 Type : IA Cost : 1563 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 1::1/128 Type : I Cost : 0 NextHop : directly-connected Interface: Loop0 *Destination: 2::2/128 Type : IA Cost : 1562 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 3::3/128 Type : IA Cost : 3124 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 2001::/64 Type : I Cost : 1562 NextHop : directly-connected Interface: S0/2/0 *Destination: 2002::/64 Type : IA Cost : 3124 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 [R1]display ipv6 routing-table protocol ospfv3 OSPFv3 Routing Table : Summary Count : 4 OSPFv3 Routing Table's Status : < Active > Summary Count : 4 Destination: ::/0 Protocol : OSPFv3 NextHop : FE80::507F:0:A697:1 Preference: 10 Interface : S0/2/0 Cost : 1563 Destination: 2::2/128 Protocol : OSPFv3 NextHop : FE80::507F:0:A697:1 Preference: 10 Interface : S0/2/0 Cost : 1562 Destination: 3::3/128 Protocol : OSPFv3 NextHop : FE80::507F:0:A697:1 Preference: 10 Interface : S0/2/0 Cost : 3124 Destination: 2002::/64 Protocol : OSPFv3 NextHop : FE80::507F:0:A697:1 Preference: 10 Interface : S0/2/0 Cost : 3124 OSPFv3 Routing Table's Status : < Inactive > Summary Count : 0 五.OSPFv3中的stub no-summary区域 实验拓扑同实验三 简介: 完全末节区域是末节区域的升级,添加了过滤3类lsa功能,所以内部的路由也被汇总成为一条默认的路由。 注意: 完全末节区域不需要区域内的路由都开启stub no-summary ,但其他的路由器要开启stub 比如此实验, R1不必开启stub no-summary,但必须开启stub R2必须开启stub no-summary 在没有un掉R1的stub后,直接在R2上stub no-summary [R1]display ospfv3 routing E1 - Type 1 external route, IA - Inter area route, I - Intra area route E2 - Type 2 external route, * - Selected route OSPFv3 Router with ID (1.1.1.1) (Process 1) ------------------------------------------------------------------------ *Destination: ::/0 Type : IA Cost : 1563 NextHop : FE80::507F:0:A697:1 Interface: S0/2/0 *Destination: 1::1/128 Type : I Cost : 0 NextHop : directly-connected Interface: Loop0 *Destination: 2001::/64 Type : I Cost : 1562 NextHop : directly-connected Interface: S0/2/0 注意: 在删除区域时 [R2-ospfv3-1-area-0.0.0.1]un stub no-summary ^ % Too many parameters found at '^' position. [R2-ospfv3-1-area-0.0.0.1] [R2-ospfv3-1-area-0.0.0.1] [R2-ospfv3-1-area-0.0.0.1]un stub 即使是完全末节区域,删除时使用un stub R1必须是stub,在R2上配置的 stub no-summary才可生效
|