The local-source-interface command sets a source interface and a source port number when a protocol is used for data sending.
The undo local-source-interface command deletes the source interface and source port number configured when a protocol is used for data sending.
By default, the source interface and source port are not configured.
Parameter | Description | Value |
---|---|---|
if-name |
Interface name. |
The value is a string of 1 to 63 characters without spaces. |
if-type |
Interface type. |
- |
if-number |
Interface number. |
The value is a string of 1 to 63 characters without spaces. |
port port-value |
Specifies the IPv4 source port number in protocol-based packet sending mode. |
The value is an integer ranging from 1 to 65535. |
Usage Scenario
To statically subscribe to the data sampled, you need to run the local-source-interface command to configure a source interface and a source port number (a source port number is required only when UDP is used for data sending) in the subscription view for data sending. This ensures that devices can communicate with the collector.Only one combination that consists of a source interface and a source port number can be configured for a subscription. After the configuration is complete:- The UDP message header sent along the UDP channel contains the configured source interface and source port number.- The gRPC message header sent along the gRPC channel contains the configured source interface.
Precautions
Only one of the local-source-interface and local-source-address commands can be configured in the same subscription view.