组播MAC封装1588v2报文使全网时钟同步示例
1588v2可作为时钟同步协议,在全网范围内传递BITS服务器的频率和时间信号,使无线承载网和无线接入网达到全网时钟同步状态。NE40E设备默认的1588v2报文的封装方式是组播MAC封装,对于支持组播MAC封装1588v2报文的基站,采用全网BC的方案将使全网时钟同步变得十分简单。
组网需求
如图9-8所示,承载网承载了NodeB之间的无线业务,且承载网全部节点都支持1588v2协议,核心节点PE1和PE2都由BITS服务器授时。NodeB-2不支持1588v2,但是支持以同步以太方式同步频率。NodeB-1和NodeB-3都支持1588v2。最终,PE1与PE2通过动态选源,确立GrandMaster Clock后,向全网传递1588v2时间信号。无线基站和承载网设备可达到频率同步,支持1588v2的基站和承载网设备之间还可以达到时间同步状态。
由于承载网中所有设备都支持1588v2,所以可以采用全网BC的方式传递时钟信息。对于不支持1588v2的NodeB-2,可采用E1线路的时钟信号传递频率信息。
数据准备
为完成此配置例,需准备如下的数据:
1588链路的延时测量机制:pdelay
设备所在1588v2域的值
Announce报文的发送时间间隔,接收超时次数
Sync报文的发送时间间隔
PDelay报文的发送时间间隔
操作步骤
- 配置各接口的IP地址和OSPF协议(略)
- 配置PE1和PE2分别通过各自的时钟接口注入BITS时钟信号
- 配置PE1、PE2、CE1和CE2都为BC
- 验证配置结果
完成上述配置,执行命令display ptp all state,可以看到设备当前1588v2协议的运行状态。以CE1为例可以看到CE1的1588v2接口GigabitEthernet0/2/0的状态为slave,和当前同步到的父节点和Grandmaster时钟源的clock-id。这说明CE1设备已经同步到了主时钟源。
<CE1> display ptp all
Device config info ------------------------------------------------------------------ PTP state :enabled Domain value :1 Slave only :no Device type :BC Set port state :no Local clock ID :000a0bfffe0c0d42 Acl :no Virtual clock ID :no Acr :no BMC run info ------------------------------------------------------------------ Grand clock ID :000a0bfffe0c0dd4 Receive number :GigabitEthernet0/2/0 Parent clock ID :000a0bfffe0c0dd4 Parent portnumber :6417 Priority1 :128 Priority2 :128 Step removed :1 Clock accuracy :49 Clock class :187 Time Source :160 UTC Offset :0 UTC Offset Valid :False Time Scale :ARB Time Traceable :False Leap :None Frequence Traceable:False Port info Name State Delay-mech Ann-timeout Type Domain ------------------------------------------------------------------------ GigabitEthernet0/2/0 slave pdelay 10 BC 1 Time Performance Statistics(ns): Slot 1 Card 0 Port 0 ------------------------------------------------------------------------ Realtime(T2-T1) :534 Pathdelay :0 Max(T2-T1) :887704804 Min(T2-T1) :512 Clock source info Clock Pri1 Pri2 Accuracy Class TimeSrc Signal Switch Direction In-Status ------------------------------------------------------------------------ local 200 128 0x31 187 0xa0 - - - - bits1 128 128 0x20 6 0x20 none off -/- abnormal
配置文件
CE1的配置文件
# sysname CE1 # ptp enable ptp device-type bc ptp domain 1 # interface GigabitEthernet0/2/0 undo shutdown ip address 172.16.0.2 255.255.255.0 ptp enable ptp delay-mechanism pdelay # interface GigabitEthernet0/1/0 undo shutdown ip address 10.10.0.1 255.255.255.0 ptp enable ptp delay-mechanism pdelay # ospf 1 area 0.0.0.0 network 172.16.0.0 0.0.0.255 network 10.10.0.0 0.0.0.255 #
CE2的配置文件
# sysname CE2 # ptp enable ptp device-type bc ptp domain 1 # interface GigabitEthernet0/1/0 undo shutdown ip address 192.168.0.2 255.255.255.0 ptp enable ptp delay-mechanism pdelay # interface GigabitEthernet0/1/1 undo shutdown ip address 172.20.0.1 255.255.255.0 ptp enable ptp delay-mechanism pdelay # ospf 1 area 0.0.0.0 network 192.168.0.0 0.0.0.255 network 172.20.0.0 0.0.0.255 #
PE1的配置文件
# sysname PE1 # ptp enable clock bits-type bits1 1pps input ptp clock-source bits1 on ptp clock-source bits1 priority1 2 ptp device-type bc ptp domain 1 interface GigabitEthernet0/1/0 undo shutdown ip address 172.16.0.1 255.255.255.0 ptp enable ptp delay-mechanism pdelay interface GigabitEthernet0/2/0 undo shutdown ip address 10.0.0.1 255.255.255.0 # ospf 1 area 0.0.0.0 network 10.0.0.0 0.0.0.255 network 172.16.0.0 0.0.0.255 #
PE2的配置文件
# sysname PE2 # ptp enable clock bits-type bits1 1pps input ptp clock-source bits1 on ptp clock-source bits1 priority1 1 ptp device-type bc ptp domain 1 interface GigabitEthernet0/1/0 undo shutdown ip address 192.168.0.1 255.255.255.0 ptp enable ptp delay-mechanism pdelay interface gigabitethernet 0/2/0 undo shutdown ip address 10.0.0.1 255.255.255.0 ptp enable ptp delay-mechanism pdelay # ospf 1 area 0.0.0.0 network 10.0.0.0 0.0.0.255 network 192.168.0.0 0.0.0.255 #