- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
03-Common container and open application commands | 70.20 KB |
Common container and open application commands
tpa data sync
Use tpa data sync to back up data for user-created Docker containers.
Syntax
tpa data sync
Views
System view
Predefined user roles
network-admin
Usage guidelines
In standalone mode, this command backs up data for user-created Docker containers to the standby MPU so the containers can continue to use the data after an active/standby switchover.
Examples
# Back up data for user-created Docker containers.
<Sysname> system-view
[Sysname] tpa data sync
…Synchronization succeeded.
tpa ip send-to-cpu
Use tpa ip send-to-cpu to configure the device to precondition certain incoming IPv4 packets of open applications and send the packets to its CPUs.
Use undo tpa ip send-to-cpu to restore the default.
Syntax
For TCP protocol packets:
tpa ip send-to-cpu protocol 6 { destination-port destination-port-number | source-port source-port-number } *
undo tpa ip send-to-cpu protocol 6 { destination-port destination-port-number | source-port source-port-number } *
For UDP protocol packets:
tpa ip send-to-cpu protocol 17 { destination-port destination-port-number | source-port source-port-number } * [ destination-ip destination-ip-address ]
undo tpa ip send-to-cpu protocol 17 { destination-port destination-port-number | source-port source-port-number } * [ destination-ip destination-ip-address ]
For packets of other protocols:
tpa ip send-to-cpu protocol protocol-number [ destination-ip destination-ip-address ]
undo tpa ip send-to-cpu protocol protocol-number [ destination-ip destination-ip-address ]
Default
In system view:
The device processes incoming open application IPv4 packets as follows:
· Unicast packets that are destined for the device itself—Sends the packets to CPUs.
· Broadcast packets—Sends the packets to CPUs.
· Multicast packets—Does not send the packets to CPUs.
Interface view:
The configuration in system view is used.
Views
System view
Interface view
Predefined user roles
network-admin
Parameters
protocol protocol-number: Specifies a protocol number in the range of 1 to 255. Values 6 and 7 indicate protocols TCP and UDP, respectively.
destination-port destination-port-number: Specifies a destination port number in the range of 1 to 65535. If you do not specify this option, the packet matching rule does not identify packets by destination port number. This option is supported only if the specified protocol is TCP or UDP.
source-port source-port-number: Specifies a source port number in the range of 1 to 65535. If you do not specify this option, the packet matching rule does not identify packets by source port number. This option is supported only if the specified protocol is TCP or UDP.
destination-ip destination-ip-address: Specifies a destination IP address, which can be 255.255.255.255 or in the range of 224.0.0.0 to 239.255.255.255. If you do not specify this option, the device does not send multicast packets of open applications to CPUs. This option is supported only if the specified protocol is not TCP.
Usage guidelines
You can configure the device to precondition incoming open application packets that match certain rules and then send the packets to its CPUs. Preconditioning actions include rate limiting packets to prevent open application packets from using too many CPU resources.
You can execute this command multiple times to configure multiple packet matching rules.
If you execute this command in interface view, the configuration applies to the current interface. If you execute this command in system view, the configuration applies to all interfaces. If you execute this command in both interface view and system view, the device preconditions incoming open application packets that match the rules configured in either view.
The configured rules also apply to RPM application packets. For more information about RPM applications, see "Hosting RPM applications."
Examples
# Configure the device to precondition incoming open application IPv4 packets that use protocol number 6, destination port number 50000, and source port number 40000.
<Sysname> system-view
[Sysname] tpa ip send-to-cpu protocol 6 destination-port 50000 source-port 40000
tpa ip source
Use tpa ip source to specify a source IPv4 address for outgoing open application packets.
Use undo tpa ip source to restore the default.
Syntax
tpa ip source interface interface-type interface-number
undo tpa ip source
Default
In system view:
Open applications use the primary IPv4 address of interface Loopback 0 as the source IPv4 address for outgoing packets.
Views
System view
Predefined user roles
network-admin
Parameters
interface interface-type interface-number: Specifies an interface by its type and number. The primary IPv4 address of the interface will be used as the source IPv4 address for outgoing open application packets.
Usage guidelines
For the following applications to communicate with indirectly connected networks, you must specify a source IP address for their outgoing packets:
· RPM applications.
· Guest Shell container applications.
· Open applications in containers that share the network namespace of Comware.
The applications will use the IPv4 address as the source IPv4 address for packets that they send.
As a best practice, specify a loopback interface as the source interface. The physical layer status of a loopback interface is always up unless the loopback interface is manually shut down.
Make sure the specified interface has an IPv4 address and is in up state. Make sure a connection is available between the interface and the destination device.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Use the primary IPv4 address of interface HundredGigE 1/0/1 as the source IPv4 address for outgoing open application packets.
<Sysname> system-view
[Sysname] tpa ip source interface hundredgige 1/0/1
tpa ipv6 send-to-cpu
Use tpa ipv6 send-to-cpu to configure the device to precondition certain incoming IPv6 packets of open applications and send the packets to its CPUs.
Use undo tpa ipv6 send-to-cpu to restore the default.
Syntax
For IPv6 TCP protocol packets:
tpa ipv6 send-to-cpu protocol 6 { destination-port destination-port-number | source-port source-port-number } *
undo tpa ipv6 send-to-cpu protocol 6 { destination-port destination-port-number | source-port source-port-number } *
For IPv6 UDP protocol packets:
tpa ipv6 send-to-cpu protocol 17 { destination-port destination-port-number | source-port source-port-number } * [ destination-ipv6 destination-ipv6-address ]
undo tpa ipv6 send-to-cpu protocol 17 { destination-port destination-port-number | source-port source-port-number } * [ destination-ipv6 destination-ipv6-address ]
For packets of other protocols:
tpa ipv6 send-to-cpu protocol protocol-number [ destination-ipv6 destination-ipv6-address ]
undo tpa ipv6 send-to-cpu protocol protocol-number [ destination-ipv6 destination-ipv6-address ]
Default
In system view:
The device processes incoming open application IPv6 packets as follows:
· Unicast packets that are destined for the device itself—Sends the packets to CPUs.
· Multicast packets—Does not send the packets to CPUs.
Interface view:
The configuration in system view is used.
Views
System view
Interface view
Predefined user roles
network-admin
Parameters
protocol protocol-number: Specifies a protocol number in the range of 1 to 255. Values 6 and 7 indicate protocols TCP and UDP, respectively.
destination-port destination-port-number: Specifies a destination port number in the range of 1 to 65535. If you do not specify this option, the packet matching rule does not identify packets by destination port number. This option is supported only if the specified protocol is TCP or UDP.
source-port source-port-number: Specifies a source port number in the range of 1 to 65535. If you do not specify this option, the packet matching rule does not identify packets by source port number. This option is supported only if the specified protocol is TCP or UDP.
destination-ipv6 destination-ipv6-address: Specifies a destination IPv6 address, which can be a valid multicast IPv6 address. If you do not specify this option, the device does not send multicast IPv6 packets of open applications to CPUs. This option is supported only if the specified protocol is not TCP.
Usage guidelines
You can configure the device to precondition incoming open application packets that match certain rules and then send the packets to its CPUs. Preconditioning actions include rate limiting packets to prevent open application packets from using too many CPU resources.
You can execute this command multiple times to configure multiple packet matching rules.
If you execute this command in interface view, the configuration applies to the current interface. If you execute this command in system view, the configuration applies to all interfaces. If you execute this command in both interface view and system view, the device preconditions open application packets that match the rules configured in either view.
The configured rules also apply to RPM application packets. For more information about RPM applications, see "Hosting RPM applications."
Examples
# Configure the device to precondition incoming open application IPv6 packets that use protocol number 6, destination port number 50000, and source port number 40000.
<Sysname> system-view
[Sysname] tpa ipv6 send-to-cpu protocol 6 destination-port 50000 source-port 40000
tpa ipv6 source
Use tpa ipv6 source to specify a source IPv6 address for outgoing open application packets.
Use undo tpa ipv6 source to restore the default.
Syntax
tpa ipv6 source { interface interface-type interface-number | ipv6 ipv6-address }
undo tpa ipv6 source
Default
In system view:
Open applications use an IPv6 address of interface Loopback 0 is used as the source IPv6 address for outgoing packets.
Views
System view
Predefined user roles
network-admin
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
ipv6 ipv6-address: Specifies an IPv6 address, which must be an IPv6 global unicast address.
Usage guidelines
For the following applications to communicate with indirectly connected networks, you must specify a source IPv6 address for their outgoing packets:
· RPM applications.
· Guest Shell container applications.
· Open applications in containers that share the network namespace of Comware.
The applications will use the IPv6 address as the source IPv6 address for packets that they send.
If you specify a source interface, the first effective IPv6 global unicast address in the output from the display ipv6 interface command is used as the source IPv6 address. Follow these guidelines:
· Make sure the interface is in up state and a connection is available between the interface and the destination device.
As a best practice, specify a loopback interface as the source interface. The physical layer status of a loopback interface is always up unless the loopback interface is manually shut down.
· Make sure the interface has an IPv6 global unicast address. If the interface does not have an IPv6 global unicast address, the configuration does not take effect.
· As a best practice, make sure the interface has only one IPv6 global unicast address. If the interface has multiple IPv6 global unicast addresses, a source IPv6 address change might occur.
If you use the tpa ipv6 source ipv6 command to specify a source IPv6 address, make sure the IPv6 address belongs to an interface on the device. If the IPv6 address does not belong to an interface on the device, the configuration does not take effect.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Use an IPv6 address of interface HundredGigE 1/0/1 as the source IPv6 address for outgoing open application packets.
<Sysname> system-view
[Sysname] tpa ipv6 source interface hundredgige 1/0/1
# Use 3001: : 1 as the source IPv6 address for outgoing open application packets.
<Sysname> system-view
[Sysname] tpa ipv6 source ipv6 3001::1