- Table of Contents
- Related Documents
-
| Title | Size | Download |
|---|---|---|
| 03-Common container and open application commands | 62.31 KB |
Common container and open application commands
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 VLAN-interface 2 as the source IPv4 address for outgoing open application packets.
<Sysname> system-view
[Sysname] tpa ip source interface vlan-interface 2
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 VLAN-interface 2 as the source IPv6 address for outgoing open application packets.
<Sysname> system-view
[Sysname] tpa ipv6 source interface vlan-interface 2
# Use 3001: : 1 as the source IPv6 address for outgoing open application packets.
<Sysname> system-view
[Sysname] tpa ipv6 source ipv6 3001::1
tpa socket client-port-range
Use tpa socket client-port-range to specify the range of port numbers to be reserved for open client applications.
Use undo tpa socket client-port-range to restore the default.
Syntax
tpa socket client-port-range start-port end-port
undo tpa socket client-port-range
Default
The port number range reserved for open client applications is 64512 to 65535.
Views
System view
Predefined user roles
network-admin
Parameters
start-port: Specifies the start port number, in the range of 32768 to 65535.
end-port: Specifies the end port number, in the range of 32768 to 65535. The end port number must be equal to or greater than the start port number.
Usage guidelines
The device forwards received packets to applications based on the destination port numbers in the packets. To avoid port conflicts and to correctly forward packets destined for open client applications, reserve port numbers for the open client applications.
The reserved port numbers cannot include the port numbers being used by Comware client applications. Before executing this command, execute the following commands to identify the TCP and UDP port numbers that Comware applications are using:
· display system internal tcp port-info
· display system internal udp port-info
To change the reserved port number range while one or more open client applications are running:
1. Identify whether the new range includes the port numbers that the open client applications are using.
2. If not, stop the open client applications that are using an out-of-range port number. You can restart the applications after you change the reserved port number range.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Reserve port numbers 32768 through 60999 for open client applications.
<Sysname> system-view
[Sysname] tpa socket client-port-range 32768 60999
tpa socket server-port
Use tpa socket server-port-range to specify the port numbers to be reserved for open server applications.
Use undo tpa socket server-port to delete port numbers reserved for open server applications.
Syntax
tpa socket server-port port-id1 [ to port-id2 ]
undo tpa socket server-port [ port-id1 [ to port-id2 ] ]
Default
No port numbers are reserved for open server applications.
Views
System view
Predefined user roles
network-admin
Parameters
port-id1: Specifies a port number in the range of 1024 to 65535.
port-id1 to port-id2: Specifies a range of port numbers. The port-id1 and port-id2 arguments represent the start port number and end port number, respectively. Both port numbers are in the range of 1024 to 65535. The end port number must be equal to or greater than the start port number.
Usage guidelines
The device forwards received packets to applications based on the destination port numbers in the packets. To avoid port conflicts and to correctly forward packets destined for open server applications, reserve port numbers for the open server applications.
The reserved port numbers cannot include the port numbers being used by Comware client applications or open client applications. Before executing this command, execute the following commands to identify the TCP and UDP port numbers that Comware applications are using:
· display system internal tcp port-info
· display system internal udp port-info
If you execute this command multiple times, all of the specified port numbers are reserved for open server applications.
If you do not specify an option for the undo tpa socket server-port command, the command deletes all port numbers reserved for open server applications.
Examples
# Reserve port number 10000 for open server applications.
<Sysname> system-view
[Sysname] tpa socket server-port 10000
# Reserve port numbers 10000 through 10010 for open server applications.
<Sysname> system-view
[Sysname] tpa socket server-port 10001 to 10010
