OcNOS-SP : System Management Guide : System Management Command Reference : Source Interface Commands
Source Interface Commands
This chapter is a reference for source interface commands. The source Interface feature routes management traffic to a dedicated interface using iptables NAT rules.
The source interface feature is supported for the protocols shown in Table 37-110.
Table 37-110: Source interface protocols and port numbers
Protocol
Default port number
Tacacs+
49
Radius
1812 and 1813
Snmp
161 and 162
Ntp
123
Syslog
514
Note: Because management applications are allowed only on the default and management VRF, the commands in this chapter are supported on the "management" and "default" VRFs only.
This chapter contains these commands:
ip source-interface
Use this command to configure the IPv4 source interface for a protocol.
Use the no form of this command to remove the IPv4 source interface for a protocol.
Note: It is possible that the router may establish an outgoing TCP connection using an interface that does not have a valid or routable IP address. In such case, the user must specify the address of a different interface to use as the source IP address for the outgoing connection. For this scenario, the command ip source-interface or ipv6 source-interfaceis used.
Command Syntax
ip source-interface IFNAME (tacacs+|ntp|snmp|syslog|radius) (port (0|<1025-65535>)|) (vrf VRF_NAME|)
no ip source-interface IFNAME (tacacs+|ntp|snmp|syslog|radius)
Parameters
IFNAME
Interface name (lo or physical interface)
tacacs+
Terminal Access Controller Access Control System
ntp
Network Time Protocol
snmp
Simple Network Management Protocol
syslog
syslog
radius
Remote Authentication Dial-In User Service
<1025-65535>
Port number. Default value is as per the protocol.
VRF_NAME
Virtual Routing and Forwarding name
Default
The default port 0 is assigned to the protocol.
Command Mode
Configure mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#ip source-interface xe1 ntp
(config)#ip source-interface xe2 radius port 1025
(config)#ip source-interface xe3 syslog port 65535 vrf management
ipv6 source-interface
Use this command to configure the IPv6 source interface for a protocol.
Use the no form of this command to remove the IPv6 source interface for a protocol.
Command Syntax
ipv6 source-interface IFNAME (tacacs+|ntp|snmp|syslog|radius) (port (0|<1025-65535>)|) (vrf VRF_NAME|)
no ipv6 source-interface IFNAME (tacacs+|ntp|snmp|syslog|radius)
Parameters
IFNAME
Interface name (lo or physical interface)
tacacs+
Terminal Access Controller Access Control System protocol
ntp
Network Time Protocol
snmp
Simple Network Management Protocol
syslog
syslog
radius
Remote Authentication Dial-In User Service
<1025-65535>
Port number. Default value is as per the protocol.
VRF_NAME
Virtual Routing and Forwarding name
Default
The default port 0 is assigned to the protocol.
Command Mode
Configure mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#ipv6 source-interface xe1 ntp
(config)#ipv6 source-interface xe2 radius port 1025
(config)#ipv6 source-interface xe3 syslog port 65535 vrf management
show ip source-interface detail
Use this command to display the IPv4 source interface status in detail.
Command Syntax
show ip source-interface detail
Parameters
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#show ip source-interface detail
Source-Interface Detailed Information
=====================================
Protocol : tacacs+
Interface : lo
Address : 1.1.1.1
Status : Active
VRF Name : Default
 
Protocol : radius
Interface : lo
Address : 1.1.1.1
Status : Active
VRF Name : Default
Table 37-111 explains the output fields.
Table 37-111: Output fields
Field
Description
Protocol
tacacs+, ntp, snmp, syslog, or radius
Interface
Interface name (lo or physical interface)
Address
IP address
Status
Whether active or inactive
VRF Name
Virtual Routing and Forwarding name
show ipv6 source-interface detail
Use this command to display the IPv6 source interface status in detail.
Command Syntax
show ipv6 source-interface detail
Parameters
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#show ipv6 source-interface detail
Source-Interface Detailed Information
=====================================
Protocol : tacacs+
Interface : lo
Address : ::1
Status : Active
VRF Name : Default
 
Protocol : radius
Interface : lo
Address : ::1
Status : Active
VRF Name : Default
Table 37-111 explains the output fields.
 
show running-config ip source-interface
Use this command to display the IPv4 source interface running configuration.
Command Syntax
show running-config ip source-interface
Parameters
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced in OcNOS version 4.0
Example
#show running-config ip source-interface
ip source-interface lo tacacs+ port 1025
ip source-interface lo radius
ip source-interface lo.management ntp vrf management
ip source-interface lo.management syslog port 1026 vrf management
ip source-interface ge3 snmp
show running-config ipv6 source-interface
Use this command to display the IPv6 source interface running configuration.
Command Syntax
show running-config ipv6 source-interface
Parameters
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#show running-config ipv6 source-interface
ipv6 source-interface lo tacacs+ port 1025
ipv6 source-interface lo radius
ipv6 source-interface lo.management ntp vrf management
ipv6 source-interface lo.management syslog port 1026 vrf management
ipv6 source-interface ge3 snmp