Configure Interface Addresses in TNSR

Now that the TNSR CLI is open, start configuring the TNSR instance. First, configure the network interfaces and bring them up.

In TNSR, type show interface to view the interface configurations. Here’s an example of what will appear:

TNSR-Instance1 tnsr# show interface

Interface: NetVSC2
    Admin status: down
    Link down, 100 Mbit/sec, full duplex
    Link MTU: 9206 bytes
    MAC address: 00:0d:3a:41:f6:b1
    IPv4 Route Table: ipv4-VRF:0
    IPv6 Route Table: ipv6-VRF:0
    counters:
      received: 0 bytes, 0 packets, 0 errors
      transmitted: 0 bytes, 0 packets, 0 errors
      0 drops, 0 punts, 0 rx miss, 0 rx no buffer

Interface: NetVSC3
    Admin status: down
    Link down, 100 Mbit/sec, full duplex
    Link MTU: 9206 bytes
    MAC address: 00:0d:3a:41:f7:20
    IPv4 Route Table: ipv4-VRF:0
    IPv6 Route Table: ipv6-VRF:0
    counters:
      received: 0 bytes, 0 packets, 0 errors
      transmitted: 0 bytes, 0 packets, 0 errors
      0 drops, 0 punts, 0 rx miss, 0 rx no buffer

The interface order follows the same order NICs were passed to parameter --nics to az vm create at Launch an Instance. In this guide, the VM has NetVSC2 as WAN and NetVSC3 as LAN.

During the process of creating Network Interfaces, a private IP address was assigned to each interface. We will configure those addresses on the interfaces in TNSR in order to communicate with other instances in the Virtual Network.

Configure WAN interface:

  1. Discover assigned IP address in the Azure CLI.

    $ az network nic show \
        -g TNSR-Resource-Group \
        -n TNSR-WAN-nic \
        --query "ipConfigurations[].privateIpAddress" \
        -o tsv
    10.5.0.4
    
  2. Configure the interface in the TNSR CLI.

    TNSR-Instance1 tnsr# configure
    TNSR-Instance1 tnsr(config)# interface NetVSC2
    TNSR-Instance1 tnsr(config-interface)# ip address 10.5.0.4/24
    TNSR-Instance1 tnsr(config-interface)# enable
    TNSR-Instance1 tnsr(config-interface)# description TNSR-Instance1 WAN
    TNSR-Instance1 tnsr(config-interface)# exit
    

This sets an address, brings up the interface, and sets a description to serve as a reminder of the interface identity & purpose.

Substitute a different Private IP address/mask and description as needed.

Configure LAN interface:

  1. Discover the assigned IP address from the Azure CLI.

    $ az network nic show \
        -g TNSR-Resource-Group \
        -n TNSR-LAN-nic \
        --query "ipConfigurations[].privateIpAddress" \
        -o tsv
    10.5.1.4
    
  2. Configure the interface in the TNSR CLI.

    TNSR-Instance1 tnsr(config)# interface NetVSC3
    TNSR-Instance1 tnsr(config-interface)# ip address 10.5.1.4/24
    TNSR-Instance1 tnsr(config-interface)# enable
    TNSR-Instance1 tnsr(config-interface)# description TNSR-Instance1 LAN
    TNSR-Instance1 tnsr(config-interface)# exit
    

Again, substitute the interface Private IP address/mask and description as needed.

Check the interface status in TNSR again by typing show interface.

TNSR-Instance1 tnsr# show interface

Interface: NetVSC2
    Description: TNSR-Instance1 WAN
    Admin status: up
    Link up, 100 Mbit/sec, full duplex
    Link MTU: 9206 bytes
    MAC address: 00:0d:3a:41:f6:b1
    IPv4 Route Table: ipv4-VRF:0
    IPv4 addresses:
        10.5.0.4/24
    IPv6 Route Table: ipv6-VRF:0
    counters:
      received: 480 bytes, 8 packets, 0 errors
      transmitted: 822 bytes, 9 packets, 0 errors
      8 drops, 0 punts, 0 rx miss, 0 rx no buffer

Interface: NetVSC3
    Description: TNSR-Instance1 LAN
    Admin status: up
    Link up, 100 Mbit/sec, full duplex
    Link MTU: 9206 bytes
    MAC address: 00:0d:3a:41:f7:20
    IPv4 Route Table: ipv4-VRF:0
    IPv4 addresses:
        10.5.1.4/24
    IPv6 Route Table: ipv6-VRF:0
    counters:
      received: 0 bytes, 0 packets, 0 errors
      transmitted: 892 bytes, 10 packets, 0 errors
      0 drops, 0 punts, 0 rx miss, 0 rx no buffer

The output shows that the interfaces are up and configured, and the counters show that a few packets have been received.

It is now possible to verify connectivity with the ping command from the TNSR CLI.

TNSR-Instance1 tnsr# ping www.netgate.com
PING www.netgate.com (208.123.73.73) 56(84) bytes of data.
64 bytes from www.netgate.com (208.123.73.73): icmp_seq=1 ttl=49 time=19.6 ms
64 bytes from www.netgate.com (208.123.73.73): icmp_seq=2 ttl=49 time=19.5 ms
64 bytes from www.netgate.com (208.123.73.73): icmp_seq=3 ttl=49 time=19.4 ms
64 bytes from www.netgate.com (208.123.73.73): icmp_seq=4 ttl=49 time=20.1 ms
64 bytes from www.netgate.com (208.123.73.73): icmp_seq=5 ttl=49 time=19.5 ms
64 bytes from www.netgate.com (208.123.73.73): icmp_seq=6 ttl=49 time=19.5 ms
64 bytes from www.netgate.com (208.123.73.73): icmp_seq=7 ttl=49 time=19.6 ms
64 bytes from www.netgate.com (208.123.73.73): icmp_seq=8 ttl=49 time=19.6 ms
64 bytes from www.netgate.com (208.123.73.73): icmp_seq=9 ttl=49 time=19.5 ms
64 bytes from www.netgate.com (208.123.73.73): icmp_seq=10 ttl=49 time=19.5 ms

--- www.netgate.com ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9014ms
rtt min/avg/max/mdev = 19.435/19.616/20.136/0.262 ms