Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The priority configuration method and apparatus based on the intelligent synchronization bus iRAX of the present invention are described below with reference to fig. 1-7.
As shown in fig. 1, in one embodiment, a priority configuration method based on the intelligent synchronization bus iRAX includes the steps of:
step S100, the quality of service policy is configured on the router and the switch, and the highest priority is allocated to the time synchronization traffic.
By configuring a quality of service policy on the router and the switch and allocating the highest priority to the time synchronization traffic, the router and the switch can identify and preferentially process the time synchronization traffic, thereby reducing delay and jitter and ensuring the synchronization accuracy of the system.
Step S200 marks time-synchronized traffic based on DiffServ or other marking mechanism.
DiffServ (differentiated services) is a widely used traffic marking method that implements priority management of traffic by setting a specific type of service field (DSCP, differentiated Services Code Point) in the header of an IP packet. For time synchronized traffic, it is often recommended to use higher DSCP values to ensure that these packets get priority treatment in the network.
Time synchronized traffic is marked for network device identification and priority handling by using DiffServ or other marking mechanisms.
Step S300, according to the traffic shaping technology and the queuing management mechanism, configuring traffic shaping and queuing management of time-synchronous traffic.
In intelligent synchronous bus iRAX systems, traffic shaping and queuing management are important means to ensure time-synchronized traffic stable transmissions. By implementing flow shaping, the transmission rate of the data packet can be effectively controlled, thereby avoiding network jitter caused by burst flow and ensuring high-precision synchronization of the system.
According to the priority configuration method based on the intelligent synchronous bus iRAX, the highest priority is allocated to the time synchronous traffic by marking the time synchronous traffic, so that the router and the switch can identify and preferentially process the time synchronous traffic, delay and jitter are reduced, the synchronous precision of a system is ensured, meanwhile, the transmission rate of a data packet can be effectively controlled by implementing traffic shaping and queuing management, network jitter caused by burst traffic is avoided, high-precision synchronization of the system is ensured, and the accuracy of a time synchronous signal and the overall performance of the iRAX system are improved.
In this embodiment, referring to fig. 2, a quality of service policy is configured on a router and a switch, and the highest priority is allocated to time-synchronized traffic, including the steps of:
step S110, defining a new service quality strategy in the service quality configuration part of the router or the switch, setting a flow classification rule in the service quality strategy, and designating the source and target ports of the time synchronous flow.
For example:
for PTP (Precision Time Protocol ) traffic, the traffic classification rule is set to "source port=319, destination port=320", where the source port is for the master clock and the destination port is for the slave clock.
For NTP (Network Time Protocol ) traffic, the traffic classification rule is set to "source port=123".
In step S120, in the qos policy, the highest priority is allocated to the traffic conforming to the traffic classification rule.
Typically, the network devices support multiple levels of priority, and the priority of time-synchronized traffic may be set to "priority 1" or "highest priority".
In step S130, the created qos policies are applied to the corresponding interfaces to ensure that all traffic entering and exiting the interfaces is processed by the qos policies.
Specific examples are as follows:
It is assumed that in an actual network environment, a Cisco switch needs to be configured to support priority handling of time-synchronized traffic. First, a management interface of the switch needs to be logged in, and a global configuration mode is entered. Next, a quality of service policy is created as follows.
1. Create quality of service policy-input command create traffic classification and priority policy in CLI (command-LINE INTERFACE, command line interface).
2. And applying a service quality strategy, namely applying the strategy to a specific interface to ensure that time synchronous traffic can pass preferentially.
By the method, the QoS strategy can be effectively configured, and priority processing of time synchronization traffic in the network is ensured, so that the synchronization precision and reliability of the whole iRAX system are improved.
In this embodiment, referring to FIG. 3, marking time-synchronized traffic based on DiffServ or other marking mechanism, comprises the steps of:
In step S210, characteristics of the time synchronization traffic are identified, where the characteristics of the time synchronization traffic include a specific port and protocol type used by the time synchronization protocol.
For example, PTP typically uses 319 and 320 ports of the UDP protocol, while NTP uses 123 ports of UDP. From this information, the network device can identify time synchronized traffic.
In step S220, in the qos configuration section of the router or the switch, a new traffic classification rule is created, and the new traffic classification rule is matched with the time-synchronized traffic.
In the quality of service configuration, a new class is defined, named "TIMESYNCCLASS".
Matching conditions are set, for example, for PTP traffic, the rule is set to "source port=319, destination port=320". For NTP traffic, the rule is set to "source port=123".
In step S230, a specific DSCP value is allocated to the time-synchronized traffic based on the DSCP marking policy.
Typically, DSCP values of 46 (i.e., EF, expedited Forwarding) are recommended for high priority traffic.
Step S240, applying the created marking policy to the corresponding interface, so as to ensure that all traffic entering and exiting the interface is processed by the marking policy.
Specific examples are as follows:
It is assumed that in an actual network environment, a time-synchronized traffic label needs to be configured on a Cisco router. First, a management interface of a router needs to be logged in, and a global configuration mode is entered. Then, traffic classification and marking policies are created as follows.
1. Identifying traffic, namely confirming ports used by time synchronization traffic.
2. Creating marking policy.A command is input in the CLI to create traffic classification and DSCP marking policy.
3. Applying a marking policy, namely applying the policy to a specific interface, ensures that the time-synchronous traffic can be correctly marked.
In this way, time-synchronized traffic can be effectively marked, ensuring that it gets prioritized in the network, thereby improving the synchronization accuracy and reliability of the overall iRAX system.
In this embodiment, marking time-synchronized traffic based on DiffServ or other marking mechanism, further comprises the steps of:
Step S250, create a synchronization dedicated VLAN and place time synchronization traffic in the dedicated VLAN.
In intelligent synchronization bus iRAX systems, creating a synchronization dedicated VLAN (Virtual Local Area Network ) is an important measure to ensure that time-synchronized traffic is not disturbed by other network traffic. By isolating the time-synchronized traffic in a dedicated VLAN, stability and accuracy of data transmission can be effectively improved.
In this embodiment, referring to fig. 4, the steps of creating a synchronous private VLAN and placing time synchronous traffic in the private VLAN include the steps of:
In step S251, an unused virtual lan identifier is determined.
VLAN 100 may be selected, for example, as a dedicated VLAN for time-synchronized traffic.
Step S252, in the VLAN configuration portion of the network switch, a new VLAN is created.
The specific steps for creating a new VLAN are as follows:
1. a global configuration mode is entered.
2. The input command creates VLAN 100.
This creates a VLAN named "TIMESYNCVLAN" dedicated to time-synchronized traffic.
In step S253, the port that needs to transmit the time synchronization traffic is added to the synchronization dedicated VLAN.
Assuming that ports gigabit ethernet0/1 and gigabit ethernet0/2 need to be configured as transport ports for time-synchronized traffic, the specific steps are as follows:
1. Entering an interface configuration mode:
interface GigabitEthernet0/1
switchport mode access
switchport access vlan 100
2. Repeating the above steps to configure the same VLAN for the gigabit Ethernet 0/2.
Through the above steps, a dedicated VLAN will be successfully created for time-synchronized traffic and the relevant port is configured as a member of the VLAN. In this way, time-synchronized traffic will be isolated in VLAN 100, ensuring that it is not affected by other traffic, thereby improving the synchronization accuracy and reliability of the system.
Specific examples are as follows:
It is assumed that in a practical network environment, a dedicated VLAN for time-synchronized traffic needs to be configured on a Cisco switch. First, a management interface of the switch needs to be logged in, and a global configuration mode is entered. Next, VLAN 100 is created and the relevant ports are configured as members of the VLAN as follows.
1. Select VLAN ID-confirm unused VLAN ID, e.g., select VLAN 100.
2. Create VLAN-input in CLI command create VLAN 100 and named "TIMESYNCVLAN".
3. Ports are configured by adding ports (e.g., gigabit ethernet0/1 and gigabit ethernet 0/2) that need to transmit time synchronized traffic to VLAN 100.
By the method, the synchronous special VLAN can be effectively created, and the time synchronous flow is ensured to be processed preferentially in the network, so that the synchronous precision and reliability of the whole iRAX system are improved.
In this embodiment, a synchronization dedicated VLAN is created, and time synchronization traffic is placed in the dedicated VLAN, and the method further includes the steps of:
step S254, determines VLAN priority criteria and configures higher priorities for synchronous private VLANs.
In the intelligent synchronization bus iRAX system, to ensure that time-synchronized traffic gets prioritized in the network, the synchronization-specific VLAN must be prioritized. Through reasonable priority setting, delay and jitter can be effectively reduced, so that the synchronization accuracy of the system is improved.
The specific steps are as follows:
1. Selecting VLAN priority criteria:
before VLAN priority is configured, it is first necessary to select the appropriate priority criteria.
In general, the IEEE 802.1Q standard defines a range of VLAN priorities, with priority values ranging from 0 to 7, where 0 represents the lowest priority and 7 represents the highest priority. To ensure a priority handling of time-synchronized traffic, it is proposed to choose a priority value of 5 or higher.
2. Entering a switch configuration mode:
Logging in to the management interface of the network switch and entering a global configuration mode. The method comprises the following specific steps:
Connect to the exchange using SSH (Secure Shell) protocol or console;
Inputting a user name and a password for identity verification;
a global configuration mode is entered.
3. Configuring VLAN priority:
in the global configuration mode, a VLAN (e.g., VLAN 100) that needs to be configured is selected and its priority is set. The method comprises the following specific steps:
Entering VLAN configuration mode;
VLAN priority is set to 5 (or higher).
This will ensure that all packets transmitted over VLAN 100 are marked as priority 5, thereby achieving priority handling in the network.
4. Configuration port priority:
In addition to VLAN priority, priority needs to be configured for ports associated with time-synchronized traffic. The ports to be configured are assumed to be gigabit Ethernet0/1 and gigabit Ethernet0/2, and the specific steps are as follows:
Entering an interface configuration mode:
interface GigabitEthernet0/1
Setting the priority of the port:
switchport priority extend 5
Repeating the above steps to configure the same priority for gigabit ethernet 0/2.
5. Verification priority configuration:
After the configuration is completed, the command line tool can verify whether the priority configuration of the VLAN and the port is correct. The command is used to view the priority information of the VLAN and port.
Specific examples are as follows:
suppose that VLAN priority for time-synchronized traffic is configured on a Cisco switch. First, a management interface of the switch needs to be logged in, and a global configuration mode is entered. Next, the configuration was performed according to the following procedure.
1. The selection priority criteria confirm that the selection priority value is 5.
2. Entering a configuration mode, namely entering a global configuration mode after logging in.
3. VLAN priority is configured by selecting VLAN 100 and setting priority to 5.
4. Port priority is configured by setting the priorities of gigabit Ethernet0/1 and gigabit Ethernet0/2 to 5.
5. And verifying configuration, namely checking the priority configuration of the VLAN and the port by using the command to ensure that the setting is correct.
By the method, higher priority can be effectively configured for the synchronous special VLAN, and time synchronous traffic is ensured to obtain priority transmission in the network, so that the synchronous precision and reliability of the whole iRAX system are improved.
In this embodiment, referring to fig. 5, according to the traffic shaping technique and queuing management mechanism, traffic shaping and queuing management of time-synchronized traffic is configured, including the steps of:
in step S310, a traffic shaping technique is selected, the traffic shaping technique including token bucket and leaky bucket.
Wherein the token bucket allows bursty traffic but limits the average transmission rate, while the leaky bucket severely limits the output rate of the traffic. For time synchronized traffic, a token bucket approach is proposed to allow burst traffic for a short time while maintaining stable transmission.
In step S320, on the interface to be configured, traffic shaping parameters are set, where the traffic shaping parameters include burst rate, smooth rate, and token bucket or leaky bucket size.
Where burst rate is the maximum burst traffic rate allowed, typically expressed in bits per second (bps).
Smooth rate-the average transmission rate of traffic, ensuring that this rate is not exceeded over a long period of time.
The token bucket size, the capacity of the token bucket, determines how much bursty traffic can be stored.
When the traffic shaping is configured on the network equipment, the following burst rate, smooth rate and token bucket size parameters are set, and then the network equipment logs in a management interface of the network equipment to enter a configuration mode. The method comprises the following specific steps:
connect to the device using SSH or console;
Inputting a user name and a password for identity verification;
entering a global configuration mode;
And (3) implementing traffic shaping, namely selecting an interface (such as gigabit Ethernet 0/1) to be configured in a global configuration mode, and setting traffic shaping parameters, wherein the method comprises the following specific steps of:
Entering an interface configuration mode;
configuration token bucket shaping:
For example, if the smoothing rate is 1 Mbps, the burst rate is 2 Mbps, and the token bucket size is 100 KB.
Step S330, a queuing management mechanism for time-synchronized traffic is configured based on weighted fair queuing or strict priority queuing.
In the interface configuration mode, weighted fair queuing is enabled or strict priority queuing is enabled.
After the configuration is completed, the command line tool can verify whether the configuration of the traffic shaping and queuing management is correct, and the command is used for checking the traffic shaping and queuing information of the interface.
Specific examples are as follows:
Assume that traffic shaping and queuing management for time-synchronized traffic is configured on a Cisco switch. First, a management interface of the switch needs to be logged in, and a global configuration mode is entered. Next, the configuration was performed according to the following procedure.
1. Traffic shaping methods are selected, confirming use of the token bucket method.
2. The traffic shaping parameters were configured to set a smoothing rate of 1 Mbps, a burst rate of 2 Mbps, and a token bucket size of 100 KB.
3. Entering a configuration mode, namely entering a global configuration mode after logging in.
4. Traffic shaping is implemented by configuring traffic shaping on the gigabit ethernet0/1 interface.
5. Configuring queuing management mechanism, namely selecting WFQ or SPQ as queuing management mechanism.
6. And verifying configuration, namely checking traffic shaping and queuing information of the interface by using the command to ensure that the setting is correct.
By the method, traffic shaping and queuing management can be effectively implemented, and stable transmission of time synchronous traffic in a network is ensured, so that the synchronization precision and reliability of the whole iRAX system are improved.
The priority configuration device based on the intelligent synchronization bus iRAX provided by the present invention is described below, and the priority configuration device based on the intelligent synchronization bus iRAX described below and the priority configuration method based on the intelligent synchronization bus iRAX described above may be referred to correspondingly to each other.
As shown in fig. 6, in one embodiment, a priority configuration apparatus based on a smart sync bus iRAX includes an allocation module 610, a tagging module 620, and a configuration module 630.
The allocation module 610 is configured to configure quality of service policies on routers and switches and allocate the highest priority for time-synchronized traffic;
the tagging module 620 is configured to tag time-synchronized traffic based on DiffServ or other tagging mechanism;
the configuration module 630 is configured to configure traffic shaping and queuing management of time-synchronized traffic according to traffic shaping techniques and queuing management mechanisms.
The allocation module 610 is specifically configured to:
defining a new service quality strategy in a service quality configuration part of a router or a switch, setting a flow classification rule in the service quality strategy, and designating a source port and a target port of time synchronous flow;
in the QoS strategy, the highest priority is allocated for the traffic conforming to the traffic classification rule;
The created quality of service policies are applied to the corresponding interfaces to ensure that all traffic entering and exiting the interfaces is processed by the quality of service policies.
The marking module 620 is specifically configured to:
identifying characteristics of time synchronization traffic, wherein the characteristics of the time synchronization traffic comprise specific ports and protocol types used by a time synchronization protocol;
Creating a new traffic classification rule in a quality of service configuration part of the router or the switch, and matching the new traffic classification rule with the time-synchronous traffic;
Assigning a specific DSCP value to the time-synchronized traffic based on the DSCP marking policy;
The created marking strategy is applied to the corresponding interface, so that all traffic entering and leaving the interface is ensured to be processed by the marking strategy.
The marking module 620 is further specifically configured to:
a synchronized private VLAN is created and time synchronized traffic is placed in the private VLAN.
Creating a synchronous private VLAN, and placing time synchronous traffic in the private VLAN, specifically for:
determining an unused virtual local area network identifier;
creating a new VLAN in the VLAN configuration portion of the network switch;
Ports that need to transmit time synchronized traffic are added to the synchronized private VLAN.
Creating a synchronous private VLAN and placing time synchronous traffic in the private VLAN, and is also specifically configured to:
VLAN priority criteria are determined and higher priorities are configured for synchronized private VLANs.
The configuration module 630 is specifically configured to:
Selecting a flow shaping technology, wherein the flow shaping technology comprises a token bucket and a leakage bucket;
Setting flow shaping parameters on an interface to be configured, wherein the flow shaping parameters comprise burst rate, smooth rate and token bucket or leakage bucket size;
The queuing management mechanism of the time synchronous traffic is configured based on weighted fair queuing or strict priority queuing.
The priority configuration device based on the intelligent synchronous bus iRAX distributes the highest priority to the time synchronous traffic by marking the time synchronous traffic, so that a router and a switch can identify and process the time synchronous traffic preferentially, delay and jitter are reduced, the synchronous precision of a system is ensured, meanwhile, the transmission rate of a data packet can be effectively controlled by implementing traffic shaping and queuing management, network jitter caused by burst traffic is avoided, the high-precision synchronization of the system is ensured, and the accuracy of a time synchronous signal and the overall performance of the iRAX system are improved.
Fig. 7 illustrates a physical structure diagram of an electronic device, which may be an intelligent terminal, and an internal structure diagram thereof may be as shown in fig. 7. The electronic device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic device includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the electronic device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method for priority configuration based on a smart sync bus iRAX, the method comprising:
Configuring a quality of service policy on a router and a switch, and distributing the highest priority to time synchronous traffic;
marking time-synchronized traffic based on DiffServ or other marking mechanism;
And configuring traffic shaping and queuing management of the time-synchronous traffic according to traffic shaping technology and queuing management mechanism.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the electronic device to which the present inventive arrangements are applied, and that a particular electronic device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In another aspect, the present invention also provides a computer storage medium storing a computer program, which when executed by a processor, implements a priority configuration method based on an intelligent synchronization bus iRAX, the method including:
Configuring a quality of service policy on a router and a switch, and distributing the highest priority to time synchronous traffic;
marking time-synchronized traffic based on DiffServ or other marking mechanism;
And configuring traffic shaping and queuing management of the time-synchronous traffic according to traffic shaping technology and queuing management mechanism.
In yet another aspect, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. A processor of an electronic device reads the computer instructions from a computer readable storage medium, the processor executing the computer instructions to implement a priority configuration method based on a smart sync bus iRAX, the method comprising:
Configuring a quality of service policy on a router and a switch, and distributing the highest priority to time synchronous traffic;
marking time-synchronized traffic based on DiffServ or other marking mechanism;
And configuring traffic shaping and queuing management of the time-synchronous traffic according to traffic shaping technology and queuing management mechanism.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory.
By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present invention, which are described in more detail and are not to be construed as limiting the scope of the present invention. It should be noted that it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit of the invention, which are within the scope of the invention. Accordingly, the scope of the invention should be assessed as that of the appended claims.