Tip
This is the documentation for the 24.06 version. Looking for the documentation of the latest version? Have a look here.
Host Interfaces¶
Host interfaces are interfaces which have not been allocated to the dataplane. As such, these exist separate from other types of TNSR interfaces. As the name implies, they are available for use by the host operating system. These interfaces are primarily used for host OS management.
Host interfaces may be managed from TNSR as described in this section, or using another mechanism in the host OS, such as Netplan.
Note
TNSR automatically imports host OS interface configuration settings from the installer or cloud deployment mechanisms. This allows TNSR to manage these pre-defined host interfaces.
Administrators can still manage host OS interfaces manually. To prevent TNSR from importing or altering manual host OS network settings, the settings must not be placed in common filenames used by the installer or cloud provider deployment mechanisms.
Warning
To be used as a host interface, an interface must not be used by the dataplane. To return an interface from dataplane to host control, see Remove TNSR NIC for Host Use.
See also
Host Interface Configuration¶
To configure a host interface, from config
mode, use the host interface
<name>
command to enter config-host-if
mode. The <name>
parameter is
the name of the interface in the host operating system. To see a list of
available interfaces, use show host interface
.
config-host-if
mode contains the following commands:
- description <text>:
A brief text description of this interface, such as
Management
.- enable|disable:
Enables or disables the interface.
- ip address <ipv4-prefix>:
Sets a static IPv4 address and CIDR mask to use on the interface.
- ip dhcp-client (enable|disable):
Enable or disable the IPv4 DHCP client for this interface to obtain an IPv4 address automatically.
This will also obtain and use a default route for the host namespace if one is supplied by the DHCP server.
- ip dhcp-client hostname <name>:
Set the hostname used by the DHCP client when requesting a lease from a DHCP server.
- ipv6 address <ipv6-prefix>:
Sets a static IPv6 address and prefix to use on the interface.
- ipv6 dhcp-client (enable|disable):
Enable or disable the IPv6 DHCP client for this interface to obtain an IPv6 address automatically.
Note
The host OS will not start a DHCPv6 client unless the OS observes a router advertisement on that interface with a “managed” or “other configuration” flag set. For this feature to work properly, ensure there is a working IPv6 router on the network segment attached to the host OS interface.
- mtu <mtu-value>:
Sets the maximum transmission unit size for the interface.
Host Interface Example¶
This example configures the host OS interface enp8s0f1
with an IP address
of 10.2.178.2/24
and an MTU of 1500
:
tnsr# configure
tnsr(config)# host int enp8s0f1
tnsr(config-host-if)# ip address 10.2.178.2/24
tnsr(config-host-if)# mtu 1500
tnsr(config-host-if)# enable
tnsr(config-host-if)# exit
tnsr(config)# exit
To confirm that the settings were applied to the interface, use show host
interface
:
tnsr# show host interface enp8s0f1
Interface: enp8s0f1
Link up
Link MTU: 1500 bytes
MAC address: 00:90:0b:7a:8a:6a
IPv4 addresses:
10.2.178.2/24
As additional confirmation, check how the interface looks in the host operating system using a shell command:
tnsr# host shell ip addr show enp8s0f1
7: enp8s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:90:0b:7a:8a:6a brd ff:ff:ff:ff:ff:ff
inet 10.2.178.2/24 scope global enp8s0f1
valid_lft forever preferred_lft forever
Host Interface Status¶
The show host interface (<name>|ipv4|ipv6|link)
command shows the current
status of host interfaces. When run without parameters, show host interface
will print the status of all host interfaces.
The command also supports the following parameters:
- <name>:
The name of an interface. Restricts the output to only the single given interface.
- ipv4:
Restricts the output to include only interface IPv4 addresses.
- ipv6:
Restricts the output to include only interface IPv6 addresses.
- link:
Restricts the output to include only interface link status information, including the MTU and MAC address.
Any subset of these parameters may be given in the same command to include the desired information.