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.
Since the TNSR LAN interface was added to the instance after launching the
instance, it will not be visible yet to the TNSR data plane unless the instance
has been rebooted. Check which interfaces are visible to TNSR by typing show
interface
at the CLI prompt.
Here’s an example of what will appear:
tnsr# show interface
Interface: VirtualFunctionEthernet0/6/0
Admin status: down
Link down, 100 Gbit/sec, full duplex
Link MTU: 9216 bytes
MAC address: 0a:54:d0:7c:df:c0
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, 2 rx miss, 0 rx no buffer
Only one interface is visible on this instance: the WAN interface which was attached at the time the instance launched.
If all of the TNSR instances, other than the Management Interface, are not
displayed by show interface
, restart the data plane and the missing
interfaces will appear:
tnsr# configure
tnsr(config)# service dataplane restart
Success
tnsr(config)# exit
Check the interfaces again:
tnsr# show interface
Interface: VirtualFunctionEthernet0/6/0
Admin status: down
Link down, 100 Gbit/sec, full duplex
Link MTU: 9216 bytes
MAC address: 0a:54:d0:7c:df:c0
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: VirtualFunctionEthernet0/7/0
Admin status: down
Link down, 100 Gbit/sec, full duplex
Link MTU: 9216 bytes
MAC address: 0a:0a:7b:cd:89:6e
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
After the restart a second interface is visible: the TNSR LAN interface.
When all of the interfaces that are attached are present, the instance is ready to start enabling and configuring IP addresses on interfaces.
During the process of creating Network Interfaces, a private IP address was assigned to each interface. The next step is to configure those addresses on the interfaces in TNSR in order to communicate with other instances in the VPC.
Configure WAN interface:
Navigate to https://console.aws.amazon.com/ec2/
Click Instances
Click the button next to the TNSR interface to select it
Look at the bottom of the page, under the Description tab to see Network Interfaces
Click on eth1
Find the field named “Private IP address” in the popup
Configure the interface in the CLI:
tnsr# configure tnsr(config)# interface VirtualFunctionEthernet0/6/0 tnsr(config-interface)# ip address 10.5.0.222/24 tnsr(config-interface)# enable tnsr(config-interface)# description eth1 eni-beaa7c21 WAN 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:
Navigate to https://console.aws.amazon.com/ec2/
Click Instances
Click the button next to the TNSR interface to select it
Look at the bottom of the page, under the Description tab to see Network Interfaces
Click on eth2
Find the field named “Private IP address” in the popup
Configure the interface in the CLI:
tnsr(config)# interface VirtualFunctionEthernet0/7/0 tnsr(config-interface)# ip address 10.5.1.218/24 tnsr(config-interface)# enable tnsr(config-interface)# description eth2 eni-6fa572f0 LAN tnsr(config-interface)# exit tnsr(config)# exit
Again, substitute the interface Private IP address/mask and description as needed.
Check interface status again:
tnsr# show interface
Interface: VirtualFunctionEthernet0/6/0
Description: eth1 eni-beaa7c21 WAN
Admin status: up
Link up, unknown, unknown duplex
Link MTU: 9216 bytes
MAC address: 0a:54:d0:7c:df:c0
IPv4 Route Table: ipv4-VRF:0
IPv4 addresses:
10.5.0.222/24
IPv6 Route Table: ipv6-VRF:0
counters:
received: 798 bytes, 19 packets, 0 errors
transmitted: 1604 bytes, 28 packets, 0 errors
0 drops, 0 punts, 5 rx miss, 0 rx no buffer
Interface: VirtualFunctionEthernet0/7/0
Description: eth2 eni-6fa572f0 LAN
Admin status: up
Link up, unknown, unknown duplex
Link MTU: 9216 bytes
MAC address: 0a:0a:7b:cd:89:6e
IPv4 Route Table: ipv4-VRF:0
IPv4 addresses:
10.5.1.218/24
IPv6 Route Table: ipv6-VRF:0
counters:
received: 1925 bytes, 30 packets, 0 errors
transmitted: 1226 bytes, 19 packets, 0 errors
20 drops, 0 punts, 27 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 to the VPC gateway on each subnet with
the ping
command. The VPC gateway address is the base address of a subnet +
1. e.g.:
VPC gateway IP address for 10.5.0.0/24:
Base address 10.5.0.0 + 1 = 10.5.0.1
VPC gateway IP address for 10.5.1.0/24: 10.5.1.1
Base address 10.5.1.0 + 1 = 10.5.1.1
tnsr# ping 10.5.0.1 source 10.5.0.222 count 3
PING 10.5.0.1 (10.5.0.1) 56(84) bytes of data.
64 bytes from 10.5.0.1: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 10.5.0.1: icmp_seq=2 ttl=64 time=0.231 ms
64 bytes from 10.5.0.1: icmp_seq=3 ttl=64 time=0.220 ms
--- 10.5.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.096/0.182/0.231/0.062 ms
tnsr# ping 10.5.1.1 source 10.5.1.218 count 3
PING 10.5.1.1 (10.5.1.1) 56(84) bytes of data.
64 bytes from 10.5.1.1: icmp_seq=1 ttl=64 time=0.071 ms
64 bytes from 10.5.1.1: icmp_seq=2 ttl=64 time=0.123 ms
64 bytes from 10.5.1.1: icmp_seq=3 ttl=64 time=0.157 ms
--- 10.5.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.071/0.117/0.157/0.035 ms
Interface Naming¶
The names that are displayed for Network Interfaces on an instance in the EC2 Web Console are different than the names that appear in the TNSR CLI. The interfaces in TNSR are named using the PCI bus/slot/function of the device. The names in the EC2 Web Console use the traditional Linux naming scheme and display as eth0, eth1, and so on.
In this example, it is straightforward to determine which interface in TNSR corresponds to an AWS Network Interface in the EC2 Web Console because there are only 2 interfaces and one of them will be present at boot time.
If this instance has more Network Interfaces than in the example, or if it
is unclear which interface in the TNSR CLI matches up with which Network
Interface in the EC2 Web Console, the two can be correlated by checking the
MAC addresses. The TNSR CLI command show interface
will display all of the
interfaces present and the output includes the MAC address of each. The MAC
address of each TNSR interface can be checked in the EC2 Web Console to find the
right Network Interface.
To find the MAC address of a Network Interface in the EC2 Web Console:
Navigate to https://console.aws.amazon.com/ec2/
Click Instances
Click the button next to the TNSR interface to select it
Look at the bottom of the page, under the Description tab to see Network Interfaces
The eth0 interface it the management interface and won’t appear in the TNSR CLI. Look at eth1, eth2, etc.
Click on the interface name to display information about the Network Interface
Click on the Interface ID to open the Network Interfaces page
Only the Network Interface matching the selected ID will be displayed.
Look at the bottom of the page, under the Details tab, to find the “MAC address” field.
Match this MAC address to one of the MAC addresses printed from the
show interface
output in the CLI