Skip to content

Interfaces

A router can be the host of a number of different interface types. This page intends to describe some of the interface types that you may face in the labs, as well as provide some instructions on how to configure them. This wiki-page is non-exhaustive, and for a more complete description, see the individual router-OS pages:

VyOS Interface Reference

Ethernet

Most commonly, and possibly most recognizable from other labs/courses, ethernet interfaces act as the general backbone of wired IP networks. Historically, or most commonly in educational settings, ethernet connections are represented by twisted pair copper wire cables with RJ45 connectors. In modern deployments, the copper wires have often been replaced with light-weight fiber-connections, with a ranging set of connector-types. The reduction in manufacturing-costs and requirements for higher throughput has driven this evolution, where fiber-based connections have numerous benefits.

In the TTM4250-labs, we are exclusively configuring VyOS-routers. For this purpose the syntax to configure ethernet interfaces follows:

set interface ethernet <ethN> <configuration>
There are multiple configuration options available for ethernet interfaces, dependant on needs. As Ethernet interfaces do not feature any specific or special configuration options, we omit elaborating further on these options. See the configuration reference for more information if required.

Sub-interfaces

For certain scenarios, network operators are required to have multiple isolated networks utilize a single physical connection. This technique is especially useful when using VLANs or VPNs, e.g. when utilizing a trunk-interface carrying multiple VLANs to a single default gateway router. Dependant on the router-OS, this tecnhique has different names. For Cisco, it is referred to as a sub-interface, typically enabling dot1Q encapsulation. For VyOS, the technique is referred to as a Virtual InterFace (vif). The seperation itself is achieved either through the use of VLAN tags on the ethernet-frames sent on the interface.

To create a virtual interface in VyOS, add a "vif VLAN-ID" after your interface decriptor, before writing the rest of the interface command.

set interface ethernet <ethN> vif <vlan-id> <configuration>

Loopback

Loopback interfaces typically act as a service-interface on routers. Loopback interfaces are not tied to a physical interface on a router and are always available as long as the router is on/functioning. The use of loopback interfaces allows services that may be running on the router to be exposed, regardless of the state of the different interfaces. This is useful for instance during iBGP peering, where BGP neighborship can be upheld as long as there exists a possible path through the AS network, rather than requiring a specific interface to be online. It also allows the router to communicate with itself, in instances where it acts as both the client and server for a specific service.

To configure the loopback interface on a VyOS router, specify the loopback interface type. Take note, that there can only be 1 loopback interface on a VyOS-router, named "lo":

set interface loopback lo <configuration>

Dummy Interface

During certain situations, it may be relevant to have multiple loopback interfaces available on a router. This could be intended to seperate services, enable VPN-configurations or a plethora of other scenarios. As VyOS only accepts a single true loopback-interface, it utilizes what is referred to as a "dummy"-interface in the case where multiple loopback interfaces are required. The dummy-interface has all the same functionality of a loopback interface, but you can have multiples of them active.

To configure a dummy interface in VyOS, use the dummy interface type and a name with the format "dumN", where N is a integer:

set interface dummy <dumN> <configuration>