No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 13

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuration Examples

Configuration Examples

This topic provides configuration examples of NTP together with the configuration flowchart. The configuration examples explain networking requirements, configuration notes, and configuration roadmap.

Example for Configuring Authenticated NTP Unicast Client/Server Mode

Networking Requirements

As shown in Figure 3-21, Switch ModuleB, Switch ModuleC, and Switch ModuleD are on a local area network (LAN), and are connected to Switch ModuleA through a network. Switch ModuleA has synchronized its clock to an authoritative clock, the Global Positioning System (GPS).

As is required by the user, the three devices Switch ModuleB, Switch ModuleC, and Switch ModuleD on the LAN must synchronize their clocks to the clock of Switch ModuleA to ensure a precise charging service.

Figure 3-21 Networking diagram for configuring NTP unicast client/server mode

Configuration Roadmap

You can configure the authenticated unicast client/server mode to meet the user's requirement for clock synchronization on the LAN. The configuration roadmap is as follows:

  1. Configure Switch ModuleA as the primary time server.

  2. The NTP unicast client/server mode is used to synchronize the clocks of Switch ModuleA and Switch ModuleB. Switch ModuleA functions as the server, and Switch ModuleB functions as the client.

  3. The NTP unicast client/server mode is used to synchronize the clocks of Switch ModuleB, Switch ModuleC, and Switch ModuleD. Switch ModuleB functions as the server, while Switch ModuleC and Switch ModuleD function as the clients.

  4. Switch ModuleA and Switch ModuleB are connected through the network, which is not secure, so that the NTP authentication function is enabled.

When configuring NTP authentication in the unicast client/server mode, enable the NTP authentication on the client, and specify the NTP server address and the authentication key sent to the server. Otherwise, the NTP authentication is not performed, and the NTP client and server are directly synchronized.

Procedure

  1. According to Figure 3-21, configure IP addresses, and configure reachable routes between any two of Switch ModuleA, Switch ModuleB, Switch ModuleC, and Switch ModuleD.

    # Configure an IP address on Switch ModuleA. For details about the configurations of Switch ModuleB, Switch ModuleC, and Switch ModuleD, see "Configuration Files".

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan 100
    [*Switch ModuleA-vlan100] quit
    [*Switch ModuleA] interface vlanif 100
    [*Switch ModuleA-Vlanif100] ip address 2.2.2.2 24
    [*Switch ModuleA-Vlanif100] quit
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk pvid vlan 100
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 100
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] ospf 1
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 2.2.2.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [*Switch ModuleA-ospf-1] quit

  2. Configure an NTP primary clock on Switch ModuleA and enable the NTP authentication function.

    # Specify the local clock of Switch ModuleA as the primary clock, and set the clock stratum to 2.

    [*Switch ModuleA] ntp refclock-master 2

    # Enable the NTP authentication function, configure the authentication key, and specify the key as reliable.

    [*Switch ModuleA] ntp authentication enable
    [*Switch ModuleA] ntp authentication-keyid 42 authentication-mode md5 Hello@123456
    [*Switch ModuleA] ntp trusted authentication-keyid 42
    [*Switch ModuleA] commit

  3. Enable the NTP authentication function on Switch ModuleB.

    # Enable the NTP authentication function on Switch ModuleB, configure the authentication key, and specify the key as reliable.

    <Switch ModuleB> system-view
    [~Switch ModuleB] ntp authentication enable
    [*Switch ModuleB] ntp authentication-keyid 42 authentication-mode md5 Hello@123456
    [*Switch ModuleB] ntp trusted authentication-keyid 42

    # Specify Switch ModuleA as the NTP server of Switch ModuleB, and use the configured authentication key.

    [*Switch ModuleB] ntp unicast-server 2.2.2.2 authentication-keyid 42
    [*Switch ModuleB] commit

  4. Specify on Switch ModuleC that Switch ModuleB functions as the NTP server of Switch ModuleC.

    <Switch ModuleC> system-view
    [~Switch ModuleC] ntp authentication enable
    [*Switch ModuleC] ntp authentication-keyid 42 authentication-mode md5 Hello@123456
    [*Switch ModuleC] ntp trusted authentication-keyid 42
    [*Switch ModuleC] ntp unicast-server 1.0.0.1 authentication-keyid 42
    [*Switch ModuleC] commit

  5. Specify on Switch ModuleD that Switch ModuleB functions as the NTP server of Switch ModuleD.

    <Switch ModuleD> system-view
    [~Switch ModuleD] ntp authentication enable
    [*Switch ModuleD] ntp authentication-keyid 42 authentication-mode md5 Hello@123456
    [*Switch ModuleD] ntp trusted authentication-keyid 42
    [*Switch ModuleD] ntp unicast-server 1.0.0.1 authentication-keyid 42
    [*Switch ModuleD] commit

  6. Verify the configuration.

    # Check the NTP status of Switch ModuleA.

    [~Switch ModuleA] display ntp status
     clock status: synchronized
     clock stratum: 2
     reference clock ID: LOCAL(0)                                                   
     nominal frequency: 100.0000 Hz                                                 
     actual frequency: 100.0000 Hz                                                  
     clock precision: 2^18                                                          
     clock offset: 0.0000 ms                                                        
     root delay: 0.00 ms                                                            
     root dispersion: 11.18 ms                                                      
     peer dispersion: 10.00 ms                                                      
     reference time: 14:40:00.707 UTC Sep 11 2013(D5DAFF40.B538476F)                
     synchronization state: clock synchronized     

    Switch ModuleB can synchronize its clock with the clock of Switch ModuleA.

    # Check the NTP status of Switch ModuleB, and you can find that the clock status is "synchronized", indicating that the synchronization is complete. The stratum of the clock is 3, which is one stratum lower than that of the clock of the server Switch ModuleA.

    [~Switch ModuleB] display ntp status
     clock status: synchronized
     clock stratum: 3
     reference clock ID: 2.2.2.2
     nominal frequency: 100.0000 Hz                                                 
     actual frequency: 100.0000 Hz                                                  
     clock precision: 2^18                                                          
     clock offset: 0.0601 ms                                                        
     root delay: 2.24 ms                                                            
     root dispersion: 21.11 ms                                                      
     peer dispersion: 10.93 ms                                                      
     reference time: 14:41:01.127 UTC Sep 11 2013(D5DAFE15.20B955F7)                
     synchronization state: clock synchronized  

    Switch ModuleC can synchronize its clock with the clock of Switch ModuleB.

    # Check the NTP status of Switch ModuleC, and you can find that the clock status is "synchronized", indicating that the synchronization is complete. The stratum of the clock is 4, which is one stratum lower than that of the clock of the server Switch ModuleB.

    [~Switch ModuleC] display ntp status
     clock status: synchronized
     clock stratum: 4
     reference clock ID: 1.0.0.1
     nominal frequency: 100.0000 Hz                                                 
     actual frequency: 100.0000 Hz                                                  
     clock precision: 2^18                                                          
     clock offset: 0.0601 ms                                                        
     root delay: 2.24 ms                                                            
     root dispersion: 21.11 ms                                                      
     peer dispersion: 10.93 ms                                                      
     reference time: 14:41:40.127 UTC Sep 11 2013(D5DAFE15.20B955F7)                
     synchronization state: clock synchronized  

    # Check the NTP status of Switch ModuleD, and you can find that the clock status is "synchronized", indicating that the synchronization is complete. The stratum of the clock is 4, which is one stratum lower than that of the clock of the server Switch ModuleB.

    [~Switch ModuleD] display ntp status
     clock status: synchronized
     clock stratum: 4
     reference clock ID: 1.0.0.1
     nominal frequency: 100.0000 Hz  
     actual frequency: 100.0000 Hz             
     clock precision: 2^18
     clock offset: 3.8128 ms
     root delay: 31.26 ms
     root dispersion: 74.20 ms
     peer dispersion: 34.30 ms
     reference time: 14:41:24.761 UTC Sep 11 2013(D5DB00C0.C2DB7281)  
     synchronization state: clock synchronized    

Configuration Files

  • Configuration file of Switch ModuleA

    #
    sysname Switch ModuleA
    #
    ntp authentication-keyid 42 authentication-mode md5 cipher @%@%Y*E{9pQub,]x+~.C9x,V,._z@%@%
    ntp refclock-master 2
    ntp trusted authentication-keyid 42  
    ntp authentication enable
    #
    vlan batch 100
    #
    interface Vlanif100
     ip address 2.2.2.2 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     port trunk allow-pass vlan 100
    #
    ospf 1
     area 0.0.0.0
      network 2.2.2.0 0.0.0.255
    #
    return
  • Configuration file of Switch ModuleB

    #
    sysname Switch ModuleB
    #
    ntp authentication-keyid 42 authentication-mode md5 cipher @%@%Y*E{9pQub,]x+~.C9x,V,._z@%@%
    ntp trusted authentication-keyid 42
    ntp unicast-server 2.2.2.2 authentication-keyid 42
    ntp authentication enable
    #
    vlan batch 110 to 111
    #
    interface Vlanif110
     ip address 1.0.1.1 255.255.255.0
    #
    interface Vlanif111
     ip address 1.0.0.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 110
     port trunk allow-pass vlan 110
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 111
     port trunk allow-pass vlan 111
    #
    ospf 1
     area 0.0.0.0
      network 1.0.0.0 0.0.0.255
      network 1.0.1.0 0.0.0.255
    #
    return
  • Configuration file of Switch ModuleC

    #
    sysname Switch ModuleC
    #
    ntp authentication-keyid 42 authentication-mode md5 cipher @%@%Y*E{9pQub,]x+~.C9x,V,._z@%@%
    ntp trusted authentication-keyid 42
    ntp unicast-server 1.0.0.1 authentication-keyid 42
    ntp authentication enable
    #
    #
    vlan batch 111
    #
    interface Vlanif111
     ip address 1.0.0.2 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 111
     port trunk allow-pass vlan 111
    #
    return
  • Configuration file of Switch ModuleD

    #
    sysname Switch ModuleD
    #
    ntp authentication-keyid 42 authentication-mode md5 cipher @%@%Y*E{9pQub,]x+~.C9x,V,._z@%@%
    ntp trusted authentication-keyid 42
    ntp unicast-server 1.0.0.1 authentication-keyid 42
    ntp authentication enable
    #
    #
    vlan batch 111
    #
    interface Vlanif111
     ip address 1.0.0.3 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 111
     port trunk allow-pass vlan 111
    #
    return

Example for Configuring NTP Symmetric Peer Mode

Networking Requirements

As shown in Figure 3-22, three devices are on a local area network (LAN).

The clocks of the devices on the LAN need to be synchronized to facilitate device management. Switch ModuleC has synchronized its clock with an authoritative clock, the Global Positioning System (GPS), through a network. The user requires Switch ModuleD and Switch ModuleE to synchronize their clocks to the clock of Switch ModuleC.

Figure 3-22 Networking diagram for configuring the symmetric peer mode

Configuration Roadmap

You can configure the NTP protocol to synchronize time, and use the NTP symmetric peer mode to meet the user's requirement for time synchronization. The configuration roadmap is as follows:

  1. Configure the local clock of Switch ModuleC as the NTP primary clock.
  2. The NTP unicast server/client mode is used to synchronize the clocks of Switch ModuleC and Switch ModuleD. Switch ModuleC functions as the server, and Switch ModuleD functions as the client.
  3. The symmetric peer mode is used to synchronize the clocks of Switch ModuleE and Switch ModuleD. Switch ModuleE functions as the symmetric active peer and sends a clock synchronization request to Switch ModuleD.

Procedure

  1. Configure IP addresses for Switch ModuleC, Switch ModuleD, and Switch ModuleE.

    Configure an IP address for each interface according to Figure 3-22. After the configurations are complete, the three switches can ping each other.

    # Configure an IP address on Switch ModuleC. For details about the configurations of Switch ModuleD and Switch ModuleE, see "Configuration Files".

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleC
    [*HUAWEI] commit
    [~Switch ModuleC] vlan 100
    [*Switch ModuleC-vlan100] quit
    [*Switch ModuleC] interface vlanif 100
    [*Switch ModuleC-Vlanif100] ip address 10.0.0.1 24
    [*Switch ModuleC-Vlanif100] quit
    [*Switch ModuleC] interface 10ge 1/17/1
    [*Switch ModuleC-10GE1/17/1] port link-type trunk
    [*Switch ModuleC-10GE1/17/1] port trunk pvid vlan 100
    [*Switch ModuleC-10GE1/17/1] port trunk allow-pass vlan 100
    [*Switch ModuleC-10GE1/17/1] quit
    [*Switch ModuleC] commit

  2. Configure the NTP client/server mode.

    # Set the local clock of Switch ModuleC as the NTP primary clock, and set the clock stratum to 2.

    [~Switch ModuleC] ntp refclock-master 2
    [*Switch ModuleC] commit

    # Specify on Switch ModuleD that Switch ModuleC functions as the NTP server of Switch ModuleD.

    <Switch ModuleD> system-view
    [~Switch ModuleD] ntp unicast-server 10.0.0.1
    [*Switch ModuleD] commit

    After the preceding configuration is complete, Switch ModuleD can synchronize its clock with the clock of Switch ModuleC.

    # Check the NTP status of Switch ModuleD, and you can find that the clock status is "synchronized", indicating that the synchronization is complete. The stratum of the clock is 3, which is one stratum lower than that of the clock of Switch ModuleC.

    [~Switch ModuleD] display ntp status
     clock status: synchronized
     clock stratum: 3
     reference clock ID: 10.0.0.1
     nominal frequency: 100.0000 Hz                                                 
     actual frequency: 100.0000 Hz   
     clock precision: 2^18                                                          
     clock offset: 0.7388 ms                                                        
     root delay: 2.45 ms                                                            
     root dispersion: 22.08 ms                                                      
     peer dispersion: 11.20 ms                                                      
     reference time: 15:10:11.276 UTC Sep 11 2013(D5DB0668.46B1A2A4)                
     synchronization state: clock synchronized   

  3. Configure the NTP unicast symmetric peer mode.

    # Specify on Switch ModuleE that Switch ModuleD functions as the symmetric passive peer of Switch ModuleE.

    <Switch ModuleE> system-view
    [~Switch ModuleE] ntp unicast-peer 10.0.0.2
    [*Switch ModuleE] commit

    Switch ModuleE is not configured with a primary clock and its clock stratum is lower than that of Switch ModuleD, so that Switch ModuleE synchronizes its clock with the clock of Switch ModuleD.

  4. Verify the configuration.

    Monitor the status of Switch ModuleE after the synchronization. The clock of Switch ModuleE is in "synchronized" status, indicating that the synchronization is complete. The clock stratum of Switch ModuleE is 4, which is one stratum lower than that of the symmetric passive peer Switch ModuleD.

    # Check the clock status of Switch ModuleE.

    [~Switch ModuleE] display ntp status
     clock status: synchronized
     clock stratum: 4
     reference clock ID: 10.0.0.2
     nominal frequency: 100.0000 Hz               
     actual frequency: 100.0000 Hz                  
     clock precision: 2^17                                                          
     clock offset: -0.8330 ms                                                       
     root delay: 6.94 ms                                                            
     root dispersion: 33.65 ms                                                      
     peer dispersion: 22.72 ms                                                      
     reference time: 15:10:40.979 UTC Sep 11 2013(D5DB064F.FADFF822)                
     synchronization state: clock synchronized 

Configuration Files

  • Configuration file of Switch ModuleC

    #
    sysname Switch ModuleC
    #
    ntp refclock-master 2
    #
    vlan batch 100
    #
    interface Vlanif100
     ip address 10.0.0.1 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     port trunk allow-pass vlan 100
    #
    return
  • Configuration file of Switch ModuleD

    #
    sysname Switch ModuleD
    #
    ntp unicast-server 10.0.0.1
    #
    vlan batch 100
    #
    interface Vlanif100
     ip address 10.0.0.2 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     port trunk allow-pass vlan 100
    #
    return
  • Configuration file of Switch ModuleE

    #
    sysname Switch ModuleE
    #
    ntp unicast-peer 10.0.0.2
    #
    vlan batch 100
    #
    interface Vlanif100
     ip address 10.0.0.3 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 100
     port trunk allow-pass vlan 100
    #
    return

Example for Configuring Authenticated NTP Broadcast Mode

Networking Requirements

As shown in Figure 3-23, Switch ModuleF, Switch ModuleC, and Switch ModuleD are on a local area network (LAN). Switch ModuleA directly connects to Switch ModuleF. Switch ModuleC directly synchronizes its clock to an authoritative clock, the Global Positioning System (GPS), by radio.

To provide charging services, all switches (except Switch ModuleA) in Figure 3-23 are required to synchronize their clocks to a standard clock. Switch ModuleA is outside the charging range, and does not need to synchronize its clock to the standard clock.

Figure 3-23 Networking diagram for configuring authenticated NTP broadcast mode

Configuration Roadmap

You can configure the NTP protocol to synchronize time, and use the authenticated NTP broadcast mode to meet the user's requirement. The configuration roadmap is as follows:

  1. Configure Switch ModuleC as the primary time server, use the local clock as the NTP primary clock, and set the clock stratum to 3.

  2. Configure Switch ModuleC as the NTP broadcast server that sends broadcast packets from interface VLANIF10 (the corresponding physical interface is 10GE1/17/1).

  3. Configure Switch ModuleA, Switch ModuleD and Switch ModuleF as NTP broadcast clients. SwitchA uses VLANIF20 (the corresponding physical interface is 10GE1/17/1) to listen to the broadcast packets. SwitchD uses VLANIF10 (the corresponding physical interface is 10GE1/17/1) to listen to the broadcast packets. SwitchF uses interface VLANIF10 (the corresponding physical interface is 10GE1/17/2) to listen to the broadcast packets.

  4. To strengthen the network security, the NTP authentication function is enabled.

Procedure

  1. Configure an IP address for each interface according to Figure 3-23, and configure reachable routes between the switch moduleses.

    # Configure an IP address for the interface and configure a routing protocol on Switch ModuleA.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleA
    [*HUAWEI] commit
    [~Switch ModuleA] vlan 20
    [*Switch ModuleA-vlan20] quit
    [*Switch ModuleA] interface 10ge 1/17/1
    [*Switch ModuleA-10GE1/17/1] port link-type trunk
    [*Switch ModuleA-10GE1/17/1] port trunk pvid vlan 20 
    [*Switch ModuleA-10GE1/17/1] port trunk allow-pass vlan 20
    [*Switch ModuleA-10GE1/17/1] quit
    [*Switch ModuleA] interface vlanif 20
    [*Switch ModuleA-vlanif20] ip address 1.0.1.11 24
    [*Switch ModuleA-vlanif20] quit
    [*Switch ModuleA] ospf 1
    [*Switch ModuleA-ospf-1] area 0
    [*Switch ModuleA-ospf-1-area-0.0.0.0] network 1.0.1.0 0.0.0.255
    [*Switch ModuleA-ospf-1-area-0.0.0.0] quit
    [*Switch ModuleA-ospf-1] quit
    [*Switch ModuleA] commit
    

    For details about the configurations of Switch ModuleC, Switch ModuleD, and Switch ModuleF, see "Configuration Files".

  2. Configure the NTP broadcast server, and enable the authentication.

    # Configure the local clock of Switch ModuleC as the NTP primary clock, and set the clock stratum to 3.
    <Switch ModuleC> system-view
    [~Switch ModuleC] ntp refclock-master 3
    # Enable NTP authentication.
    [*Switch ModuleC] ntp authentication enable
    [*Switch ModuleC] ntp authentication-keyid 16 authentication-mode md5 Hello@123456
    [*Switch ModuleC] ntp trusted authentication-keyid 16
    # Configure Switch ModuleC as the NTP broadcast server that sends NTP broadcast packets from VLANIF10, and specify the key with the ID 16 for encryption.
    [*Switch ModuleC] interface vlanif 10
    [*Switch ModuleC-Vlanif10] ntp broadcast-server authentication-keyid 16
    [*Switch ModuleC-Vlanif10] quit
    [*Switch ModuleC] commit

  3. Configure the NTP broadcast client Switch ModuleD on a network segment the same as that of the NTP server.

    # Enable NTP authentication.
    <Switch ModuleD> system-view
    [~Switch ModuleD] ntp authentication enable
    [*Switch ModuleD] ntp authentication-keyid 16 authentication-mode md5 Hello@123456
    [*Switch ModuleD] ntp trusted authentication-keyid 16
    
    # Configure Switch ModuleD as the NTP broadcast client that listens to the NTP broadcast packets from interface VLANIF10.
    [*Switch ModuleD] interface vlanif 10
    [*Switch ModuleD-Vlanif10] ntp broadcast-client
    [*Switch ModuleD-Vlanif10] quit
    [*Switch ModuleD] commit

    After the configuration is complete, Switch ModuleD synchronizes its clock to that of Switch ModuleC. For details about the configuration of Switch ModuleF, which is similar to that of Switch ModuleC, see the corresponding configuration file.

  4. Configure the NTP broadcast client Switch ModuleA on a network segment different from that of the server.

    # Enable NTP authentication.
    [~Switch ModuleA] ntp authentication enable
    [*Switch ModuleA] ntp authentication-keyid 16 authentication-mode md5 Hello@123456
    [*Switch ModuleA] ntp trusted authentication-keyid 16
    # Configure Switch ModuleA as the NTP broadcast client that listens to the NTP broadcast packets from interface VLANIF20.
    [*Switch ModuleA] interface vlanif 20
    [*Switch ModuleA-Vlanif20] ntp broadcast-client
    [*Switch ModuleA-Vlanif20] quit
    [*Switch ModuleA] commit

  5. Verify the configuration.

    After the preceding configuration is complete, Switch ModuleD and Switch ModuleF can synchronize its clock to that of Switch ModuleC, but Switch ModuleA cannot synchronize its clock to that of Switch ModuleC.

    This is because Switch ModuleA is on a network segment different from that of Switch ModuleC, but Switch ModuleD and Switch ModuleF are on a network segment the same as that of Switch ModuleC.

    # Check the NTP status of Switch ModuleD, and you can find that the clock status is "synchronized", indicating that the synchronization is complete. The stratum of the clock is 4, which is one stratum lower than that of the clock of Switch ModuleC.

    [~Switch ModuleD] display ntp status
     clock status: synchronized
     clock stratum: 4
     reference clock ID: 3.0.1.31
     nominal frequency: 100.0000 Hz                                                 
     actual frequency: 100.0000 Hz                                                  
     clock precision: 2^17                                                          
     clock offset: 0.7305 ms                                                        
     root delay: 5.32 ms                                                            
     root dispersion: 34.86 ms                                                      
     peer dispersion: 24.28 ms                                                      
     reference time: 15:32:43.134 UTC Sep 11 2013(D5DB0B9B.2271BCDB)                
     synchronization state: clock synchronized    

    # Check the NTP status of Switch ModuleF, and you can find that the clock status is "synchronized", indicating that the synchronization is complete. The stratum of the clock is 4, which is one stratum lower than that of the clock of Switch ModuleC.

    [~Switch ModuleF] display ntp status
     clock status: synchronized
     clock stratum: 4
     reference clock ID: 3.0.1.31
     nominal frequency: 100.0000 Hz                                                 
     actual frequency: 100.0000 Hz                                                  
     clock precision: 2^17                                                          
     clock offset: 0.7192 ms                                                        
     root delay: 5.32 ms                                                            
     root dispersion: 35.82 ms                                                      
     peer dispersion: 24.28 ms                                                      
     reference time: 15:32:43.134 UTC Sep 11 2013(D5DB0B9B.2271BCDB)                
     synchronization state: clock synchronized    

Configuration Files

  • Configuration file of Switch ModuleA

    #
    sysname Switch ModuleA
    #
    ntp authentication-keyid 16 authentication-mode md5 cipher @%@%Y*E{9pQub,]x+~.C9x,V,._z@%@%
    ntp trusted authentication-keyid 16
    ntp authentication enable
    #
    vlan batch 20
    #
    interface Vlanif20
     ip address 1.0.1.11 255.255.255.0
     ntp broadcast-client
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 20
     port trunk allow-pass vlan 20
    #
    ospf 1
     area 0.0.0.0
      network 1.0.1.0 0.0.0.255
    #
    return
  • Configuration file of Switch ModuleC

    #
    sysname Switch ModuleC
    #
    ntp authentication-keyid 16 authentication-mode md5 cipher @%@%Y*E{9pQub,]x+~.C9x,V,._z@%@%
    ntp refclock-master 3
    ntp authentication enable
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 3.0.1.31 255.255.255.0
     ntp broadcast-server authentication-keyid 16
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 10
     port trunk allow-pass vlan 10
    #
    ospf 1
     area 0.0.0.0
      network 3.0.1.0 0.0.0.255
    #
    return
  • Configuration file of Switch ModuleD

    #
    sysname Switch ModuleD
    #
    ntp authentication-keyid 16 authentication-mode md5 cipher @%@%Y*E{9pQub,]x+~.C9x,V,._z@%@%
    ntp trusted authentication-keyid 16
    ntp authentication enable
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 3.0.1.32 255.255.255.0
     ntp broadcast-client
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 10
     port trunk allow-pass vlan 10
    #
    return
  • Configuration file of Switch ModuleF

    #
    sysname Switch ModuleF
    #
    ntp authentication-keyid 16 authentication-mode md5 cipher @%@%Y*E{9pQub,]x+~.C9x,V,._z@%@%
    ntp trusted authentication-keyid 16
    ntp authentication enable
    #
    vlan batch 10 20
    #
    interface Vlanif10
     ip address 3.0.1.2 255.255.255.0
     ntp broadcast-client
    #
    interface Vlanif20
     ip address 1.0.1.2 255.255.255.0
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 20
     port trunk allow-pass vlan 20
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 10
     port trunk allow-pass vlan 10
    #
    ospf 1
     area 0.0.0.0
      network 1.0.1.0 0.0.0.255
      network 3.0.1.0 0.0.0.255
    #
    return

Example for Configuring NTP Multicast Mode

Networking Requirements

As shown in Figure 3-24. Switch ModuleC directly synchronizes its clock to an authoritative clock, the Global Positioning System (GPS), by radio.

To provide charging services, the clocks of all switches on the network need to be synchronized to the clock of Switch ModuleC.

Figure 3-24 Networking diagram for configuring NTP multicast mode

Configuration Roadmap

You can configure the NTP protocol to synchronize time, and use the NTP multicast mode to meet the user's requirement. The configuration roadmap is as follows:

  1. Configure Switch ModuleC as the primary time server, use the local clock as the NTP primary clock, and set the clock stratum to 2.

  2. Configure Switch ModuleC as the NTP multicast server that sends multicast packets from interface VLANIF10 (the corresponding physical interface is 10GE1/17/1).

  3. Configure Switch ModuleD, and Switch ModuleF as NTP multicast clients. SwitchD uses interface VLANIF10 (the corresponding physical interface is 10GE1/17/1) to listen to the multicast packets. SwitchF uses interface VLANIF10 (the corresponding physical interface is 10GE1/17/2) to listen to the multicast packets.

Procedure

  1. Configure an IP address for each interface according to Figure 3-24.

    # Configure an IP address for the interface and configure a routing protocol on Switch ModuleC.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleC
    [*HUAWEI] commit
    [~Switch ModuleC] vlan 10
    [*Switch ModuleC-vlan10] quit
    [*Switch ModuleC] interface 10ge 1/17/1
    [*Switch ModuleC-10GE1/17/1] port link-type trunk
    [*Switch ModuleC-10GE1/17/1] port trunk pvid vlan 10
    [*Switch ModuleC-10GE1/17/1] port trunk allow-pass vlan 10
    [*Switch ModuleC-10GE1/17/1] quit
    [*Switch ModuleC] interface vlanif 20
    [*Switch ModuleC-Vlanif10] ip address 1.0.1.11 24
    [*Switch ModuleC-Vlanif10] quit
    [*Switch ModuleC] commit
    

    For details about the configurations of Switch ModuleD, and Switch ModuleF, see "Configuration Files".

  2. Configure the NTP multicast server.

    # Configure the local clock of Switch ModuleC as the NTP primary clock, and set the clock stratum to 2.
    <Switch ModuleC> system-view
    [~Switch ModuleC] ntp refclock-master 2
    # Configure Switch ModuleC as the NTP multicast server that sends NTP multicast packets from interface VLANIF10.
    [*Switch ModuleC] interface vlanif 10
    [*Switch ModuleC-Vlanif10] ntp multicast-server
    [*Switch ModuleC-Vlanif10] quit
    [*Switch ModuleC] commit

  3. Configure the NTP multicast client Switch ModuleD on a network segment the same as that of the NTP server.

    # Configure Switch ModuleD as the NTP multicast client that listens to the NTP multicast packets from interface VLANIF10.
    <Switch ModuleD> system-view
    [~Switch ModuleD] interface vlanif 10
    [*Switch ModuleD-Vlanif10] ntp multicast-client
    [*Switch ModuleD-Vlanif10] quit
    [*Switch ModuleD] commit

  4. Configure the NTP multicast client Switch ModuleF on a network segment the same as that of the NTP server.

    # Configure Switch ModuleF as the NTP multicast client that listens to the NTP multicast packets from interface VLANIF10.
    <Switch ModuleF> system-view
    [~Switch ModuleF] interface vlanif 10
    [*Switch ModuleF-Vlanif10] ntp multicast-client
    [*Switch ModuleF-Vlanif10] quit
    [*Switch ModuleF] commit

  5. Verify the configuration.

    After the preceding configuration is complete, Switch ModuleD and Switch ModuleF can synchronize their clocks to the clock of Switch ModuleC.

    # Check the NTP status of Switch ModuleD, and you can find that the clock status is "synchronized", indicating that the synchronization is complete. The stratum of the clock is 3, which is one stratum lower than that of the clock of the server Switch ModuleC.

    [~Switch ModuleD] display ntp status
     clock status: synchronized
     clock stratum: 3
     reference clock ID: 3.0.1.31
     nominal frequency: 100.0000 Hz                                                 
     actual frequency: 100.0000 Hz                                                  
     clock precision: 2^17                                                          
     clock offset: 0.7305 ms                                                        
     root delay: 5.32 ms                                                            
     root dispersion: 34.86 ms                                                      
     peer dispersion: 24.28 ms                                                      
     reference time: 15:32:43.134 UTC Sep 11 2013(D5DB0B9B.2271BCDB)                
     synchronization state: clock synchronized    

    # Check the NTP status of Switch ModuleF, and you can find that the clock status is "synchronized", indicating that the synchronization is complete. The stratum of the clock is 3, which is one stratum lower than that of the clock of the server Switch ModuleC.

    [~Switch ModuleF] display ntp status
     clock status: synchronized
     clock stratum: 3
     reference clock ID: 3.0.1.31
     nominal frequency: 100.0000 Hz                                                 
     actual frequency: 100.0000 Hz                                                  
     clock precision: 2^17                                                          
     clock offset: 0.7192 ms                                                        
     root delay: 5.32 ms                                                            
     root dispersion: 35.82 ms                                                      
     peer dispersion: 24.28 ms                                                      
     reference time: 15:32:43.134 UTC Sep 11 2013(D5DB0B9B.2271BCDB)                
     synchronization state: clock synchronized    

Configuration Files

  • Configuration file of Switch ModuleC

    #
    sysname Switch ModuleC
    #
    vlan batch 10
    #
     ntp refclock-master 2
    #
    interface Vlanif10
     ip address 3.0.1.31 255.255.255.0
     ntp multicast-server
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 10
     port trunk allow-pass vlan 10
    #
    return
  • Configuration file of Switch ModuleD

    #
    sysname Switch ModuleD
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 3.0.1.32 255.255.255.0
     ntp multicast-client
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 10
     port trunk allow-pass vlan 10
    #
    return
  • Configuration file of Switch ModuleF

    #
    sysname Switch ModuleF
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 3.0.1.2 255.255.255.0
     ntp multicast-client
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 10
     port trunk allow-pass vlan 10
    #
    return

Example for Configuring NTP Manycast Mode

Networking Requirements

As shown in Figure 3-25. Switch ModuleC directly synchronizes its clock to an authoritative clock, the Global Positioning System (GPS), by radio.

To provide charging services, the clocks of all switches on the network need to be synchronized to the clock of Switch ModuleC.

Figure 3-25 Networking diagram for configuring NTP manycast mode

Configuration Roadmap

You can configure the NTP protocol to synchronize time, and use the NTP manycast mode to meet the user's requirement. The configuration roadmap is as follows:

  1. Configure Switch ModuleC as the primary time server, use the local clock as the NTP primary clock, and set the clock stratum to 2.

  2. Configure Switch ModuleC as the NTP manycast server that sends manycast packets from interface VLANIF10 (the corresponding physical interface is 10GE1/17/1).

  3. Configure Switch ModuleD, and Switch ModuleF as NTP manycast clients. SwitchD uses interface VLANIF10 (the corresponding physical interface is 10GE1/17/1) to listen to the manycast packets. SwitchF uses interface VLANIF10 (the corresponding physical interface is 10GE1/17/2) to listen to the manycast packets.

Procedure

  1. Configure an IP address for each interface according to Figure 3-25.

    # Configure an IP address for the interface and configure a routing protocol on Switch ModuleC.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch ModuleC
    [*HUAWEI] commit
    [~Switch ModuleC] vlan 10
    [*Switch ModuleC-vlan10] quit
    [*Switch ModuleC] interface 10ge 1/17/1
    [*Switch ModuleC-10GE1/17/1] port link-type trunk
    [*Switch ModuleC-10GE1/17/1] port trunk pvid vlan 10
    [*Switch ModuleC-10GE1/17/1] port trunk allow-pass vlan 10
    [*Switch ModuleC-10GE1/17/1] quit
    [*Switch ModuleC] interface vlanif 20
    [*Switch ModuleC-Vlanif10] ip address 1.0.1.11 24
    [*Switch ModuleC-Vlanif10] quit
    [*Switch ModuleC] commit
    

    For details about the configurations of Switch ModuleD, and Switch ModuleF, see "Configuration Files".

  2. Configure the NTP manycast server.

    # Configure the local clock of Switch ModuleC as the NTP primary clock, and set the clock stratum to 2.
    <Switch ModuleC> system-view
    [~Switch ModuleC] ntp refclock-master 2
    # Configure Switch ModuleC as the NTP manycast server that sends NTP manycast packets from interface VLANIF10.
    [*Switch ModuleC] interface vlanif 10
    [*Switch ModuleC-Vlanif10] ntp manycast-server
    [*Switch ModuleC-Vlanif10] quit
    [*Switch ModuleC] commit

  3. Configure the NTP manycast client Switch ModuleD on a network segment the same as that of the NTP server.

    # Configure Switch ModuleD as the NTP manycast client that listens to the NTP manycast packets from interface VLANIF10.
    <Switch ModuleD> system-view
    [~Switch ModuleD] interface vlanif 10
    [*Switch ModuleD-Vlanif10] ntp manycast-client
    [*Switch ModuleD-Vlanif10] quit
    [*Switch ModuleD] commit

  4. Configure the NTP manycast client Switch ModuleF on a network segment the same as that of the NTP server.

    # Configure Switch ModuleF as the NTP manycast client that listens to the NTP manycast packets from interface VLANIF10.
    <Switch ModuleF> system-view
    [~Switch ModuleF] interface vlanif 10
    [*Switch ModuleF-Vlanif10] ntp manycast-client
    [*Switch ModuleF-Vlanif10] quit
    [*Switch ModuleF] commit

  5. Verify the configuration.

    After the preceding configuration is complete, Switch ModuleD and Switch ModuleF can synchronize their clocks to the clock of Switch ModuleC.

    # Check the NTP status of Switch ModuleD, and you can find that the clock status is "synchronized", indicating that the synchronization is complete. The stratum of the clock is 3, which is one stratum lower than that of the clock of the server Switch ModuleC.

    [~Switch ModuleD] display ntp status
     clock status: synchronized
     clock stratum: 3
     reference clock ID: 3.0.1.31
     nominal frequency: 100.0000 Hz                                                 
     actual frequency: 100.0000 Hz                                                  
     clock precision: 2^17                                                          
     clock offset: 0.7305 ms                                                        
     root delay: 5.32 ms                                                            
     root dispersion: 34.86 ms                                                      
     peer dispersion: 24.28 ms                                                      
     reference time: 15:32:43.134 UTC Sep 11 2013(D5DB0B9B.2271BCDB)                
     synchronization state: clock synchronized    

    # Check the NTP status of Switch ModuleF, and you can find that the clock status is "synchronized", indicating that the synchronization is complete. The stratum of the clock is 3, which is one stratum lower than that of the clock of the server Switch ModuleC.

    [~Switch ModuleF] display ntp status
     clock status: synchronized
     clock stratum: 3
     reference clock ID: 3.0.1.31
     nominal frequency: 100.0000 Hz                                                 
     actual frequency: 100.0000 Hz                                                  
     clock precision: 2^17                                                          
     clock offset: 0.7192 ms                                                        
     root delay: 5.32 ms                                                            
     root dispersion: 35.82 ms                                                      
     peer dispersion: 24.28 ms                                                      
     reference time: 15:32:43.134 UTC Sep 11 2013(D5DB0B9B.2271BCDB)                
     synchronization state: clock synchronized    

Configuration Files

  • Configuration file of Switch ModuleC

    #
    sysname Switch ModuleC
    #
    vlan batch 10
    #
     ntp refclock-master 2
    #
    interface Vlanif10
     ip address 3.0.1.31 255.255.255.0
     ntp manycast-server
     pim sm
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 10
     port trunk allow-pass vlan 10
    #
    return
  • Configuration file of Switch ModuleD

    #
    sysname Switch ModuleD
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 3.0.1.32 255.255.255.0
     ntp manycast-client
    #
    interface 10GE1/17/1
     port link-type trunk
     port trunk pvid vlan 10
     port trunk allow-pass vlan 10
    #
    return
  • Configuration file of Switch ModuleF

    #
    sysname Switch ModuleF
    #
    vlan batch 10 
    #
    interface Vlanif10
     ip address 3.0.1.2 255.255.255.0
     ntp manycast-client
    #
    interface 10GE1/17/2
     port link-type trunk
     port trunk pvid vlan 10
     port trunk allow-pass vlan 10
    #
    return
Translation
Download
Updated: 2019-12-13

Document ID: EDOC1000041694

Views: 61016

Downloads: 3623

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next