35-POS接口典型配置举例
本章节下载: 35-POS接口典型配置举例 (232.83 KB)
目 录
本文档介绍了使用POS接口的配置举例。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解POS、SDH、SONET、PPP协议和HDLC特性。
分别用一对(接收、发送)单模光纤直接连接路由器Router A和Router B、Router A和Router C以及Router B和Router C的POS接口,通过PPP互连。每台设备上使用OSPF协议与其他两台设备互相连通。实现以下需求:
· 当Router A和Router B链路完整时,从Router A到Router B的流量转发路径为Router A—>Router B。
· 当Router A收到对端Router B发送的MS-RDI信号后,不立即关闭POS接口,在100ms内MS-RDI信号仍未结束,则自动将接口的物理状态设置为down。
· 当Router A的POS2/2/1端口down后,从Router A到Router B的流量转发路径为Router A—>Router C—>Router B。
图1 POS接口使用PPP协议光纤直连配置组网图
· 为了实现收到对端发送的MS-RDI信号后,会自动将接口的物理状态设置为down,需要配置当前接口的告警联动动作。并且设备收到对端发送的MS-RDI信号时,认为发生了RDI告警。
· 为了实现当收到对端发送的MS-RDI信号后,不立即关闭POS接口,在100ms内MS-RDI信号仍未结束才自动将接口的物理状态设置为down,需要配置接口物理连接状态抑制时间为100ms。
本举例是在SR6608-M设备的R9141P16版本上进行配置和验证的。
当两台路由器的POS接口直接相连时,应配置一端使用主时钟模式,另一端使用从时钟模式。
(1) 配置Router A接口
# 配置POS2/2/1接口的IP地址,链路类型采用PPP。
<RouterA> system-view
[RouterA] interface pos 2/2/1
[RouterA-Pos2/2/1] ip address 10.110.1.10 255.255.255.0
[RouterA-Pos2/2/1] link-protocol ppp
# 配置POS2/2/1接口时钟模式为主时钟模式。
[RouterA-Pos2/2/1] clock master
# 配置当POS2/2/1接口检测到RDI告警时,自动将接口的物理状态设置为down。
[RouterA-Pos2/2/1] alarm-detect rdi action link-down
# 设置POS接口物理连接状态抑制时间为100毫秒,即在POS接口发生up或down的时候,需要经过100毫秒后,接口状态才能变为up或down。
[RouterA-Pos2/2/1] link-delay msec 100
[RouterA-Pos2/2/1] quit
# 配置POS2/2/2接口的IP地址,链路类型采用PPP。
[RouterA] interface pos 2/2/2
[RouterA-Pos2/2/2] ip address 10.110.2.10 255.255.255.0
[RouterA-Pos2/2/2] link-protocol ppp
# 配置POS2/2/2接口时钟模式为主时钟模式。
[RouterA-Pos2/2/2] clock master
[RouterA-Pos2/2/2] quit
(2) 配置OSPF
[RouterA] ospf
[RouterA-ospf-1] area 0
[RouterA-ospf-1-area-0.0.0.0] network 10.110.1.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] network 10.110.2.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] quit
(1) 配置Router B的接口
# 配置POS2/2/1接口的IP地址,链路类型采用PPP,时钟模式采用缺省的从时钟模式。
<RouterB> system-view
[RouterB] interface pos 2/2/1
[RouterB-Pos2/2/1] ip address 10.110.1.11 255.255.255.0
[RouterB-Pos2/2/1] link-protocol ppp
[RouterB-Pos2/2/1] quit
# 配置POS2/2/2接口的IP地址,链路类型采用PPP,时钟模式采用缺省的从时钟模式。
[RouterB] interface pos 2/2/2
[RouterB-Pos2/2/2] ip address 10.110.3.10 255.255.255.0
[RouterB-Pos2/2/2] link-protocol ppp
[RouterB-Pos2/2/2] quit
(2) 配置OSPF
[RouterB] ospf
[RouterB-ospf-1] area 0
[RouterB-ospf-1-area-0.0.0.0] network 10.110.1.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] network 10.110.3.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] quit
(1) 配置Router C的接口
# 配置POS2/2/1接口的IP地址,链路类型采用PPP,时钟模式采用缺省的从时钟模式。
<RouterC> system-view
[RouterC] interface pos 2/2/1
[RouterC-Pos2/2/1] ip address 10.110.2.11 255.255.255.0
[RouterC-Pos2/2/1] link-protocol ppp
[RouterC-Pos2/2/1] quit
# 配置POS2/2/1接口的IP地址,链路类型采用PPP。
[RouterC] interface pos 2/2/2
[RouterC-Pos2/2/2] ip address 10.110.3.11 255.255.255.0
[RouterC-Pos2/2/2] link-protocol ppp
# 配置POS2/2/2接口时钟模式为主时钟模式。
[RouterA-Pos2/2/2] clock master
[RouterC-Pos2/2/2] quit
(2) 配置OSPF
[RouterC] ospf
[RouterC-ospf-1] area 0
[RouterC-ospf-1-area-0.0.0.0] network 10.110.2.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] network 10.110.3.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] quit
[RouterC-ospf-1] quit
# 完成以上配置后,在Router A上查看2.2.2.2/32的路由信息,可以看出Router A和Router B是通过直连链路进行通信的。
<RouterA> display ip routing-table 2.2.2.2 verbose
Summary Count : 1
Destination: 2.2.2.2/32
Protocol: OSPF Process ID: 1
SubProtID: 0x1 Age: 04h20m37s
Cost: 1 Preference: 10
IpPre: N/A QosLocalID: N/A
Tag: 0 State: Active Adv
OrigTblID: 0x0 OrigVrf: default-vrf
TableID: 0x2 OrigAs: 0
NBRID: 0x26000002 LastAs: 0
AttrID: 0xffffffff Neighbor: 0.0.0.0
Flags: 0x1008c OrigNextHop: 10.110.1.11
Label: NULL RealNextHop: 10.110.1.11
BkLabel: NULL BkNextHop: N/A
Tunnel ID: Invalid Interface: Pos2/2/1
BkTunnel ID: Invalid BkInterface: N/A
FtnIndex: 0x0 TrafficIndex: N/A
Connector: N/A
# 当Router A的POS2/2/1端口在100毫秒内持续收到RDI告警后,改端口状态变成Down。
<RouterA> display interface pos 2/2/1 brief
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
Pos2/2/1 DOWN DOWN --
# 当Router A的POS2/2/1端口down时,查看2.2.2.2/32的路由信息,可以看出Router A和Router B已经切换到Router C进行通信。
<RouterA> display ip routing-table 2.2.2.2 verbose
Summary Count : 1
Destination: 2.2.2.2/32
Protocol: OSPF Process ID: 1
SubProtID: 0x1 Age: 04h20m37s
Cost: 2 Preference: 10
IpPre: N/A QosLocalID: N/A
Tag: 0 State: Active Adv
OrigTblID: 0x0 OrigVrf: default-vrf
TableID: 0x2 OrigAs: 0
NBRID: 0x26000002 LastAs: 0
AttrID: 0xffffffff Neighbor: 0.0.0.0
Flags: 0x1008c OrigNextHop: 10.110.2.11
Label: NULL RealNextHop: 10.110.2.11
BkLabel: NULL BkNextHop: N/A
Tunnel ID: Invalid Interface: Pos2/2/2
BkTunnel ID: Invalid BkInterface: N/A
FtnIndex: 0x0 TrafficIndex: N/A
Connector: N/A
· Router A:
#
interface Pos2/2/1
link-protocol ppp
clock master
ip address 10.110.1.10 255.255.255.0
alarm-detect rdi action link-down
link-delay msec 100
#
interface Pos2/2/2
link-protocol ppp
clock master
ip address 10.110.1.10 255.255.255.0
#
ospf 1
area 0.0.0.0
network 10.110.1.0 0.0.0.255
network 10.110.2.0 0.0.0.255
network 1.1.1.1 0.0.0.0
#
· Router B:
#
interface Pos2/2/1
link-protocol ppp
ip address 10.110.1.11 255.255.255.0
#
interface Pos2/2/2
link-protocol ppp
ip address 10.110.3.10 255.255.255.0
#
ospf 1
area 0.0.0.0
network 10.110.1.0 0.0.0.255
network 10.110.3.0 0.0.0.255
network 2.2.2.2 0.0.0.0
#
· Router C:
#
interface Pos2/2/1
link-protocol ppp
ip address 10.110.1.10 255.255.255.0
#
interface Pos2/2/2
link-protocol ppp
clock master
ip address 10.110.1.10 255.255.255.0
#
ospf 1
area 0.0.0.0
network 10.110.2.0 0.0.0.255
network 10.110.3.0 0.0.0.255
#
为了增加Router A和Router B之间的链路带宽,并提高连接可靠性,在设备之间建立HDLC捆绑的逻辑链路。
图2 POS接口使用HDLC协议光纤直连配置举例组网图
本举例是在SR6608-M设备的R9141P16版本上进行配置和验证的。
· 只有物理POS接口可以加入HDLC捆绑。
· 一个接口只能加入一个HDLC捆绑,如果需要加入其他HDLC捆绑,必须先退出原来的HDLC捆绑。
· 加入HDLC捆绑的接口封装的链路层协议必须为HDLC。接口加入HDLC捆绑之后不允许修改链路层协议。
· 当两台路由器的POS接口直接相连时,应配置一端使用主时钟模式,另一端使用从时钟模式;
# 创建HDLC捆绑接口1,并配置IP地址。
<RouterA> system-view
[RouterA] interface hdlc-bundle 1
[RouterA-HDLC-bundle1] ip address 1.1.1.1 24
[RouterA-HDLC-bundle1] quit
# 配置POS2/2/1接口的时钟模式采用主时钟模式,链路类型采用HDLC。
[RouterA] interface pos 2/2/1
[RouterA-Pos2/2/1] clock master
[RouterA-Pos2/2/1] link-protocol hdlc
# 配置POS2/2/1接口加入到HDLC捆绑1。
[RouterA-Pos2/2/1] bundle id 1
[RouterA-Pos2/2/1] quit
# 配置POS2/2/2接口的时钟模式采用主时钟模式,链路类型采用HDLC。
[RouterA] interface pos 2/2/2
[RouterA-Pos2/2/2] clock master
[RouterA-Pos2/2/2] link-protocol hdlc
# 配置POS2/2/2接口加入到HDLC捆绑1。
[RouterA-Pos2/2/2] bundle id 1
[RouterA-Pos2/2/2] quit
# 创建HDLC捆绑接口1,并配置IP地址。
<RouterB> system-view
[RouterB] interface hdlc-bundle 1
[RouterB-HDLC-bundle1] ip address 1.1.1.2 24
[RouterB-HDLC-bundle1] quit
# 配置POS2/2/1接口的链路类型为HDLC,时钟模式采用缺省的从时钟模式。
[RouterB] interface pos 2/2/1
[RouterB-Pos2/2/1] link-protocol hdlc
# 配置POS2/2/1接口加入到HDLC捆绑1。
[RouterB-Pos2/2/1] bundle id 1
[RouterB-Pos2/2/1] quit
# 配置POS2/2/2接口的链路类型为HDLC,时钟模式采用缺省的从时钟模式。
[RouterB] interface pos 2/2/2
[RouterB-Pos2/2/2] link-protocol hdlc
# 配置POS2/2/2接口加入到HDLC捆绑1。
[RouterB-Pos2/2/2] bundle id 1
[RouterB-Pos2/2/2] quit
# Router A和Router B的HDLC捆绑接口能够互相Ping通。
[RouterA] ping –a 1.1.1.1 1.1.1.2
Ping 1.1.1.2 (1.1.1.2) from 1.1.1.1: 56 data bytes, press CTRL_C to break
56 bytes from 1.1.1.2: icmp_seq=0 ttl=255 time=0.000 ms
56 bytes from 1.1.1.2: icmp_seq=1 ttl=255 time=0.000 ms
56 bytes from 1.1.1.2: icmp_seq=2 ttl=255 time=0.000 ms
56 bytes from 1.1.1.2: icmp_seq=3 ttl=255 time=0.000 ms
56 bytes from 1.1.1.2: icmp_seq=4 ttl=255 time=0.000 ms
--- Ping statistics for 1.1.1.2 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.000/0.000/0.000/0.000 ms
# 在Router A或Router B上执行display bundle hdlc-bundle命令,可以看到HDLC捆绑接口1的捆绑信息。以Router A的显示为例。
[RouterA] display bundle hdlc-bundle 1 slot 2
Bundle: HDLC-bundle1, slot 2
Selected members: 2, Total bandwidth: 1244160 kbps
Member State Bandwidth(kbps) Priority
Pos2/2/1 Selected 622080 32768
Pos2/2/2 Selected 622080 32768
上述信息表明,POS2/2/1和POS2/2/2都处于选中状态,可以进行流量的负载分担;HDLC捆绑的带宽为1244160 kbps,是两个POS接口的带宽之和;当其中一个POS接口出现故障(如Router A的POS2/2/1端口down)时,流量可以通过另一个POS接口发送,提高了链路的连接可靠性。
· Router A:
#
interface pos 2/2/1
link-protocol hdlc
clock master
bundle id 1
#
interface pos 2/2/2
link-protocol hdlc
clock master
bundle id 1
#
interface hdlc-bundle 1
ip address 1.1.1.1 24
#
· Router B:
#
interface pos 2/2/1
link-protocol hdlc
bundle id 1
#
interface pos 2/2/2
link-protocol hdlc
bundle id 1
#
interface hdlc-bundle 1
ip address 1.1.1.2 24
#
· 《H3C SR6608-M路由器 配置指导(V9)》
· 《H3C SR6608-M路由器 命令参考(V9)》
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!