当前位置:首页 > ProCurve交换机配置手册
Switch_B(vlan-40)# ip address 198.168.40.1/24 相关的查看命令
Switch_A# sh ip rip general
RIP global parameters RIP protocol : enabled Auto-summary : enabled Default Metric : 1 Route changes : 7 Queries : 0
RIP interface information
IP Address Status Send mode Recv mode Metric Auth --------------- ----------- ---------------- ---------- ----------- ---- 10.10.10.2 enabled V2-only V2-only 1 none RIP peer information
IP Address Bad routes Last update timeticks --------------- ----------- --------------------- 10.10.10.3 0 27
Switch_B# sh ip rip general
RIP global parameters RIP protocol : enabled Auto-summary : enabled Default Metric : 1 Route changes : 5 Queries : 0
RIP interface information
IP Address Status Send mode Recv mode Metric Auth --------------- ----------- ---------------- ---------- ----------- ---- 10.10.10.3 enabled V2-only V2-only 1 none RIP peer information
IP Address Bad routes Last update timeticks --------------- ----------- --------------------- 10.10.10.2 0 16
Switch_A# sh ip rip interface RIP interface information
IP Address Status Send mode Recv mode Metric Auth --------------- ----------- ---------------- ---------- ----------- ---- 10.10.10.2 enabled V2-only V2-only 1 none Switch_B# sh ip rip interface RIP interface information
IP Address Status Send mode Recv mode Metric Auth --------------- ----------- ---------------- ---------- ----------- ---- 10.10.10.3 enabled V2-only V2-only 1 none Switch_A# sh ip route rip IP Route Entries
Destination Network Mask | Gateway Type Sub-Type Metric --------------- --------------- + --------------- --------- ---------- ------ 30.0.0.0 255.0.0.0 | 10.10.10.3 rip 2 Switch_B# sh ip route rip IP Route Entries
Destination Network Mask | Gateway Type Sub-Type Metric --------------- --------------- + --------------- --------- ---------- ------ 20.0.0.0 255.0.0.0 | 10.10.10.2 rip 2
Destination Network Mask | Gateway Type Sub-Type Metric --------------- --------------- + --------------- --------- ---------- ------ 10.10.10.0 255.255.255.0 | VLAN10 connected 0 20.20.20.0 255.255.255.0 | VLAN20 connected 0 30.0.0.0 255.0.0.0 | 10.10.10.3 rip 2 127.0.0.0 255.0.0.0 | reject static 0 127.0.0.1 255.255.255.255 | lo0 connected 0 Switch_B# sh ip route IP Route Entries
Destination Network Mask | Gateway Type Sub-Type Metric --------------- --------------- + --------------- --------- ---------- ------ 10.10.10.0 255.255.255.0 | VLAN10 connected 0 20.0.0.0 255.0.0.0 | 10.10.10.2 rip 2
30.30.30.0 255.255.255.0 | VLAN30 connected 0 127.0.0.0 255.0.0.0 | reject static 0 127.0.0.1 255.255.255.255 | lo0 connected 0 198.168.40.0 255.255.255.0 | VLAN40 connected 0 Switch_A# sh ip rip peer RIP peer information
IP Address Bad routes Last update timeticks --------------- ----------- --------------------- 10.10.10.3 0 6
Switch_B# sh ip rip peer RIP peer information
IP Address Bad routes Last update timeticks --------------- ----------- --------------------- 10.10.10.2 0 23
Switch_A# sh ip rip restrict RIP restrict list IP Address Mask
--------------- --------------- Switch_B# sh ip rip restrict OSPF restrict list IP Address Mask
--------------- ---------------
198.168.40.0 255.255.255.0
3.5 OSPF 路由协议的基本概念 开放最短路径优先协议(Open Shortest Path First,OSPF)是由 Internet 工程任务组(IETF) 开发的路由选择协议,用来替代存在一些问题的 RIP 协议。现在,OSPF 协议是 IETF 组织 建议使用的内部网关协议(IGP)。OSPF 协议是一个链路状态协议,正如它的命名所描述的, OSPF 使用 Dijkstra 的最短路径优先算法(SPF),而且是开放的。这里所说的开放是指它不 属于任何一个厂商或组织所私有。
像所有的链路状态协议一样,OSPF 协议和距离矢量协议相比,一个主要的改善就在于它 的快速收敛,这样使 OSPF 协议可以支持更大的互连网络,并且不容易受到有害路由选择信 息的影响。OSPF 协议的其他一些特性有:
? 使用了区域的概念,这样可以有效地减少路由选择协议对路由器的 CPU 和内存的占 用,划分区域还可以降低路由选择协议的通信量,这使构建一个层次化的互联网络拓 扑成为可能;
? 完全无类别地处理地址问题,排除了像不连续的子网这样的有类别路由选择协议的问
题;
? 支持无类别的路由选择表查询、VLSM 和用来进行有效地址管理的超网技术; ? 支持无大小限制的、任意的度量值;
? 支持使用多条路由路径的效率更高的等价负载均衡;
? 使用保留的组播地址来减少对不宣告 OSPF 报文的设备的影响; ? 支持更安全的路由选择认证;
? 使用可以跟踪外部路由的路由标记。 HP 5300 系列交换机支持 OSPF,5400 系列交换机需要许可证,2600 系列不支持 OSPF 3.6 OSPF 的配臵
如下图所示为两台交换机之间运行 OSPF 路由协议,以单一 OSPF 区域为例
交换机 A 的配臵如下 Switch_A(config)# vlan 10 Switch_A(vlan-10)# untag a1
Switch_A(vlan-10)# ip address 10.10.10.2/24
Switch_A(vlan-10)# exit Switch_A(config)# ip routing Switch_A(config)# router ospf Switch_A(ospf)# area 0.0.0.0
Switch_A(ospf)# redistribute connected Switch_A(ospf)# vlan 10
Switch_A(vlan-10)# ip ospf area 0.0.0.0 Switch_A(vlan-10)# vlan 20 Switch_A(vlan-20)# untag b1
Switch_A(vlan-20)# ip address 20.20.20.2/24 交换机 B 的配臵如下: Switch_B(config)# vlan 10 Switch_B(vlan-10)# untag a1
Switch_B(vlan-10)# ip address 10.10.10.3/24
Switch_B(vlan-10)# exit Switch_B(config)# ip routing Switch_B(config)# router ospf Switch_B(ospf)# area 0.0.0.0
Switch_B(ospf)# redistribute connected Switch_B(ospf)# restrict 198.168.40.0/24 Switch_B(ospf)# vlan 10
Switch_B(vlan-10)# ip ospf area 0.0.0.0 Switch_B(vlan-10)# vlan 30 Switch_B(vlan-30)# untag b1
Switch_B(vlan-30)# ip address 30.30.30.2/24 Switch_B(vlan-30)# vlan 40 Switch_B(vlan-40)# untag b4
Switch_B(vlan-40)# ip address 198.168.40.1/24 相关的查看命令:
show ip ospf general show ip ospf interface show ip route ospf show ip route show ip ospf neighbor
show ip ospf database link-state
show ip ospf database external-link-state show ip ospf restrict 3.7 路由重分发
当路由器使用路由选择协议进行路由通告时,如果该路由是通过其他方式获取的,那么路 由器将要执行重新分配。这里所谓的其他方式可能是另外一个路由选择协议、静态路由或直 连目标网络。例如,路由器可能同时运行 OSPF 进程和 RIP 进程。如果设臵 OSPF 进程通告 来自 RIP 进程的路由,这就叫做重新分配 RIP。
下面的示例配臵是在运行 RIP 和 OSPF 两个路由协议之间做重分发: 5304xl(config)# router rip 5304xl(rip)# redistribute ospf 5304xl(rip)# exit
共分享92篇相关文档