37-H3C SR6600_SR6600-X路由器 POS接口典型配置举例
本章节下载 (260.38 KB)
H3C SR6600/SR6600-X系列路由器
POS接口配置举例
Copyright © 2022新华三技术有限公司 版权所有,保留一切权利。
非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。
除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。
本文档中的信息可能变动,恕不另行通知。
目 录
本文档介绍了使用POS接口的配置举例。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解POS、FR、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/1/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。
本举例是在R8128版本上进行配置和验证的。
当两台路由器的POS接口直接相连时,应配置一端使用主时钟模式,另一端使用从时钟模式。
(1) 配置Router A接口
# 配置POS2/1/1接口的IP地址,链路类型采用PPP。
<RouterA> system-view
[RouterA] interface pos 2/1/1
[RouterA-Pos2/1/1] ip address 10.110.1.10 255.255.255.0
[RouterA-Pos2/1/1] link-protocol ppp
# 配置POS2/1/1接口时钟模式为主时钟模式。
[RouterA-Pos2/1/1] clock master
# 配置当POS2/1/1接口检测到RDI告警时,自动将接口的物理状态设置为down。
[RouterA-Pos2/1/1] alarm-detect rdi action link-down
# 设置POS接口物理连接状态抑制时间为100毫秒,即在POS接口发生up或down的时候,需要经过100毫秒后,接口状态才能变为up或down。
[RouterA-Pos2/1/1] link-delay msec 100
[RouterA-Pos2/1/1] quit
# 配置POS2/1/2接口的IP地址,链路类型采用PPP。
[RouterA] interface pos 2/1/2
[RouterA-Pos2/1/2] ip address 10.110.2.10 255.255.255.0
[RouterA-Pos2/1/2] link-protocol ppp
# 配置POS2/1/2接口时钟模式为主时钟模式。
[RouterA-Pos2/1/2] clock master
[RouterA-Pos2/1/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/1/1接口的IP地址,链路类型采用PPP,时钟模式采用缺省的从时钟模式。
<RouterB> system-view
[RouterB] interface pos 2/1/1
[RouterB-Pos2/1/1] ip address 10.110.1.11 255.255.255.0
[RouterB-Pos2/1/1] link-protocol ppp
[RouterB-Pos2/1/1] quit
# 配置POS2/1/2接口的IP地址,链路类型采用PPP,时钟模式采用缺省的从时钟模式。
[RouterB] interface pos 2/1/2
[RouterB-Pos2/1/2] ip address 10.110.3.10 255.255.255.0
[RouterB-Pos2/1/2] link-protocol ppp
[RouterB-Pos2/1/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/1/1接口的IP地址,链路类型采用PPP,时钟模式采用缺省的从时钟模式。
<RouterC> system-view
[RouterC] interface pos 2/1/1
[RouterC-Pos2/1/1] ip address 10.110.2.11 255.255.255.0
[RouterC-Pos2/1/1] link-protocol ppp
[RouterC-Pos2/1/1] quit
# 配置POS2/1/1接口的IP地址,链路类型采用PPP。
[RouterC] interface pos 2/1/2
[RouterC-Pos2/1/2] ip address 10.110.3.11 255.255.255.0
[RouterC-Pos2/1/2] link-protocol ppp
# 配置POS2/1/2接口时钟模式为主时钟模式。
[RouterA-Pos2/1/2] clock master
[RouterC-Pos2/1/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/1/1
BkTunnel ID: Invalid BkInterface: N/A
FtnIndex: 0x0 TrafficIndex: N/A
Connector: N/A
# 当Router A的POS2/1/1端口在100毫秒内持续收到RDI告警后,改端口状态变成Down。
<RouterA> display interface pos 2/1/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/1/1 DOWN DOWN --
# 当Router A的POS2/1/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/1/2
BkTunnel ID: Invalid BkInterface: N/A
FtnIndex: 0x0 TrafficIndex: N/A
Connector: N/A
· Router A:
#
interface Pos2/1/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/1/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/1/1
link-protocol ppp
ip address 10.110.1.11 255.255.255.0
#
interface Pos2/1/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/1/1
link-protocol ppp
ip address 10.110.1.10 255.255.255.0
#
interface Pos2/1/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协议光纤直连配置举例组网图
本举例是在R8128版本上进行配置和验证的。
· 只有物理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/1/1接口的时钟模式采用主时钟模式,链路类型采用HDLC。
[RouterA] interface pos 2/1/1
[RouterA-Pos2/1/1] clock master
[RouterA-Pos2/1/1] link-protocol hdlc
# 配置POS2/1/1接口加入到HDLC捆绑1。
[RouterA-Pos2/1/1] bundle id 1
[RouterA-Pos2/1/1] quit
# 配置POS2/1/2接口的时钟模式采用主时钟模式,链路类型采用HDLC。
[RouterA] interface pos 2/1/2
[RouterA-Pos2/1/2] clock master
[RouterA-Pos2/1/2] link-protocol hdlc
# 配置POS2/1/2接口加入到HDLC捆绑1。
[RouterA-Pos2/1/2] bundle id 1
[RouterA-Pos2/1/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/1/1接口的链路类型为HDLC,时钟模式采用缺省的从时钟模式。
[RouterB] interface pos 2/1/1
[RouterB-Pos2/1/1] link-protocol hdlc
# 配置POS2/1/1接口加入到HDLC捆绑1。
[RouterB-Pos2/1/1] bundle id 1
[RouterB-Pos2/1/1] quit
# 配置POS2/1/2接口的链路类型为HDLC,时钟模式采用缺省的从时钟模式。
[RouterB] interface pos 2/1/2
[RouterB-Pos2/1/2] link-protocol hdlc
# 配置POS2/1/2接口加入到HDLC捆绑1。
[RouterB-Pos2/1/2] bundle id 1
[RouterB-Pos2/1/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/1/1 Selected 622080 32768
Pos2/1/2 Selected 622080 32768
上述信息表明,POS2/1/1和POS2/1/2都处于选中状态,可以进行流量的负载分担;HDLC捆绑的带宽为1244160 kbps,是两个POS接口的带宽之和;当其中一个POS接口出现故障(如Router A的POS2/1/1端口down)时,流量可以通过另一个POS接口发送,提高了链路的连接可靠性。
· Router A:
#
interface pos 2/1/1
link-protocol hdlc
clock master
bundle id 1
#
interface pos 2/1/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/1/1
link-protocol hdlc
bundle id 1
#
interface pos 2/1/2
link-protocol hdlc
bundle id 1
#
interface hdlc-bundle 1
ip address 1.1.1.2 24
#
· 设备(Router A、Router B、Router C)使用POS接口通过公用帧中继网络互连,且作为用户设备,工作在帧中继的DTE方式。
· Router A利用帧中继子接口连接处于不同网段的Router B和Router C,使Router A分别与Rouer B和Router C通信。
图3 POS接口使用HDLC协议光纤直连配置举例组网图
本举例是在R8128版本上进行配置和验证的。
# 配置POS2/1/1接口的链路类型为FR。
<RouterA> system-view
[RouterA] interface pos 2/1/1
[RouterA-Pos2/1/1] link-protocol fr
# 配置帧中继接口POS2/1/1类型为DTE。
[RouterA-Pos2/1/1] fr interface-type dte
[RouterA-Pos2/1/1] quit
# 创建POS2/1/1接口的子接口1,并为其配置IP地址。
[RouterA] interface pos 2/1/1.1
[RouterA-Pos2/1/1.1] ip address 10.10.10.1 255.255.255.0
# 为帧中继接口POS2/1/1.1创建一条DLCI为50的虚电路。
[RouterA-Pos2/1/1.1] fr dlci 50
[RouterA-Pos2/1/1.1-fr-dlci-50] quit
# 接口POS2/1/1.1连接的对端路由器的IP地址为10.10.10.2,在本地POS2/1/1.1接口上有一条DLCI为50的虚电路连接到该路由器。
[RouterA-Pos2/1/1.1] fr map ip 10.10.10.2 50
[RouterA-Pos2/1/1.1] quit
# 创建POS2/1/1接口的子接口2,并为其配置IP地址。
[RouterA] interface pos 2/1/1.2
[RouterA-Pos2/1/1.2] ip address 20.10.10.1 255.255.255.0
# 为帧中继接口POS2/1/1.2创建一条DLCI为60的虚电路。
[RouterA-Pos2/1/1.2] fr dlci 60
[RouterA-Pos2/1/1.2-fr-dlci-60] quit
# 接口POS2/1/1.2连接的对端路由器的IP地址为20.10.10.2,在本地POS2/1/1.2接口上有一条DLCI为60的虚电路连接到该路由器。
[RouterA-Pos2/1/1.2] fr map ip 20.10.10.2 60
[RouterA-Pos2/1/1.2] quit
# 配置POS2/1/1接口的链路类型为FR。
<RouterB> system-view
[RouterB] interface pos 2/1/1
[RouterB-Pos2/1/1] link-protocol fr
# 配置帧中继接口POS2/1/1类型为DTE。
[RouterB-Pos2/1/1] fr interface-type dte
# 配置POS2/1/1接口的IP地址为10.10.10.2/24。
[RouterB-Pos2/1/1] ip address 10.10.10.2 255.255.255.0
# 为帧中继接口POS2/1/1创建一条DLCI为70的虚电路。
[RouterB-Pos2/1/1] fr dlci 70
[RouterB-Pos2/1/1-fr-dlci-70] quit
# 接口POS2/1/1连接的对端路由器的IP地址为10.10.10.1,在本地POS 2/1/1接口上有一条DLCI为70的虚电路连接到该路由器。
[RouterB-Pos2/1/1] fr map ip 10.10.10.1 70
[RouterB-Pos2/1/1] quit
# 配置POS2/1/1接口的链路类型为FR。
<RouterC> system-view
[RouterC] interface pos 2/1/1
[RouterC-Pos2/1/1] link-protocol fr
# 配置帧中继接口POS 2/1/1类型为DTE。
[RouterC-Pos2/1/1] fr interface-type dte
# 配置POS2/1/1接口的IP地址为20.10.10.2/24。
[RouterC-Pos2/1/1] ip address 20.10.10.2 255.255.255.0
# 为帧中继接口POS2/1/1创建一条DLCI为80的虚电路。
[RouterC-Pos2/1/1] fr dlci 80
[RouterC-Pos2/1/1-fr-dlci-70] quit
# 接口POS2/1/1连接的对端路由器的IP地址为20.10.10.1,在本地POS2/1/1接口上有一条DLCI为80的虚电路连接到该路由器。
[RouterC-Pos2/1/1] fr map ip 20.10.10.1 80
[RouterC-Pos2/1/1] quit
# 在Router A上通过display fr pvc命令可以查看接口POS2/1/1的PVC信息,发现PVC的状态为Active。
PVC information for interface Pos2/1/1 (DTE, physical UP)
DLCI: 50, Type: Dynamic, Pos2/1/1.1
Encapsulation: IETF
Creation time: 2017/02/19 14:34:42, Status: Active
Input: 2 packets, 60 bytes, 0 dropped
Output: 2 packets, 60 bytes, 0 dropped
DLCI: 60, Type: Dynamic, Pos2/1/1.2
Encapsulation: IETF
Creation time: 2017/02/19 15:03:35, Status: Active
Input: 2 packets, 60 bytes, 0 dropped
Output: 2 packets, 60 bytes, 0 dropped
# 在Router A上通过display fr map命令可以查看帧中继地址映射表。
[RouterA] display fr map
Map information for interface Pos2/1/1 (DTE)
DLCI: 50, IP 10.10.10.2, Pos2/1/1.1
Creation time: 2017/02/19 14:34:42, Status: Active
DLCI: 60, IP 20.10.10.2, Pos2/1/1.2
Creation time: 2017/02/19 15:03:35, Status: Active
# Router A和Router B可以互相ping通对方。
Ping 10.10.10.1 (10.10.10.1): 56 data bytes, press CTRL_C to break
56 bytes from 10.10.10.1: icmp_seq=0 ttl=255 time=76.007 ms
56 bytes from 10.10.10.1: icmp_seq=1 ttl=255 time=8.790 ms
56 bytes from 10.10.10.1: icmp_seq=2 ttl=255 time=1.630 ms
56 bytes from 10.10.10.1: icmp_seq=3 ttl=255 time=0.841 ms
56 bytes from 10.10.10.1: icmp_seq=4 ttl=255 time=1.012 ms
--- Ping statistics for 10.10.10.1 ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.841/17.656/76.007/29.326 ms
# Router A和Router C可以互相ping通对方。
[RouterC] ping 20.10.10.1
Ping 20.10.10.1 (20.10.10.1): 56 data bytes, press CTRL_C to break
56 bytes from 20.10.10.1: icmp_seq=0 ttl=255 time=10.007 ms
56 bytes from 20.10.10.1: icmp_seq=1 ttl=255 time=8.790 ms
56 bytes from 20.10.10.1: icmp_seq=2 ttl=255 time=1.630 ms
56 bytes from 20.10.10.1: icmp_seq=3 ttl=255 time=0.841 ms
56 bytes from 20.10.10.1: icmp_seq=4 ttl=255 time=1.012 ms
--- Ping statistics for 20.10.10.1 ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.841/17.656/76.007/29.326 ms
· Router A:
#
interface Pos2/1/1
link-protocol fr
fr interface-type dte
#
interface Pos2/1/1.1
link-protocol fr
ip address 10.10.10.1 255.255.255.0
fr map ip 10.10.10.2 50
fr dlci 50
#
interface Pos2/1/1.2
link-protocol fr
ip address 20.10.10.1 255.255.255.0
fr map ip 20.10.10.2 50
fr dlci 60
· Router B:
#
interface Pos2/1/1
link-protocol fr
fr interface-type dte
ip address 10.10.10.2 255.255.255.0
fr map ip 10.10.10.1 70
fr dlci 70
#
· Router C:
#
interface Pos2/1/1
link-protocol fr
fr interface-type dte
ip address 20.10.10.2 255.255.255.0
fr map ip 20.10.10.1 80
fr dlci 80
#
· H3C SR6600 SR6600-X 路由器 接口管理配置指导-R7607
· H3C SR6600 SR6600-X 路由器 接口管理命令参考-R7607
· H3C SR6600 SR6600-X 路由器 二层技术-广域网接入配置指导-R7607
· H3C SR6600 SR6600-X 路由器 二层技术-广域网接入命令参考-R7607
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!