Tip
This is the documentation for the 19.05 version. Looking for the documentation of the latest version? Have a look here.
Configure Interfaces¶
With the configuration data in hand, it is now possible to configure TNSR interfaces for basic IP level connectivity.
From within the TNSR CLI (Entering the TNSR CLI), enter configuration mode and setup the interfaces using this example as a guide:
tnsr# configure terminal
tnsr(config)# interface GigabitEthernet0/14/1
tnsr(config-interface)# description WAN
tnsr(config-interface)# ip address 203.0.113.2/24
tnsr(config-interface)# ipv6 address 2001:db8:0:2::2/64
tnsr(config-interface)# enable
tnsr(config-interface)# exit
tnsr(config)# interface GigabitEthernet0/14/2
tnsr(config-interface)# description LAN
tnsr(config-interface)# ip address 10.2.0.1/24
tnsr(config-interface)# ipv6 address 2001:db8:1::1/64
tnsr(config-interface)# enable
tnsr(config-interface)# exit
tnsr(config)# exit
tnsr#
In this sample session, both interfaces were configured with an appropriate description for reference purposes, an IP address/subnet mask, and then placed into an enabled state.
If other hosts are present and active on the connected interfaces, it will now be possible to ping to/from TNSR to these networks.
Tip
After making changes, don’t forget to save them to ensure they persist
for the next startup by issuing the configuration copy running startup
command from with in config
mode. See Saving the Configuration for more
information.
Interface Command¶
The interface
command can configure existing interfaces and create new
interfaces.
Configure an existing interface:
tnsr(config)# interface <name>
tnsr(config-interface)#
This command enters config-interface
mode
Note
The maximum interface name length is 63 characters.
Create a new interface:
tnsr(config)# interface <type> <options>
The mode entered by this command depends upon the type of interface it creates. For more information on interface types and how to configure them, see Types of Interfaces.
Print a list of available interfaces and types:
tnsr(config)# interface ?
Interface Configuration Options¶
The following commands are available when configuring an interface
(config-interface
mode):
- access-list (input|output) acl <acl-name>
Access Control Lists which apply to packets on this interface in the given direction (Standard ACLs).
- access-list macip <macip-name>
MACIP Access Control Lists which apply to packets on this interface (MACIP ACLs).
- bond <id>
Set this interface as a part of the given bonding group (Bonding Interfaces).
- bridge domain <id>
Set this interface as a member of the given bridge domain (Bridge Interfaces).
- description
Set the interface description.
- dhcp client [ipv4]
Configures this interface to obtain its IPv4 address using Dynamic Host Configuration Protocol.
- dhcp client ipv4 hostname <host-name>
Sets the hostname sent with DHCP client requests.
- disable
Disable interface administratively.
- enable
Enable interface administratively.
- ip address <ip-address>
Sets the IPv4 address for this interface.
- ip nat (inside|outside)
Configures this interface to be an inside or outside NAT interface (Network Address Translation)
- ip route-table <route-table-name>
Configures a specific IPv4 route table to be used for traffic exiting this interface.
- ipv6 address <ip6-address>
Sets the IPv6 address for this interface.
- ipv6 route-table <route-table-name>
Configures a specific IPv6 route table to be used for traffic exiting this interface.
- lldp
LLDP options for this interface (Link Layer Discovery Protocol).
- mac-address
Configures an alternative MAC address for this interface.
- map
MAP-E/T options for this interface (MAP (Mapping of Address and Port)).
- mtu <size>
Sets the interface L2 Maximum Transmission Unit (MTU) size, in bytes.
- vlan tag-rewrite disable
Disable tag rewriting for this interface
- vlan tag-rewrite pop-1
Remove one level of VLAN tags from packets on this interface.
- vlan tag-rewrite pop-2
Remove two level of VLAN tags from packets on this interface.
- vlan tag-rewrite push-1 (dot1ad|dot1q) <tag 1>
Add a new layer of VLAN tagging to frames on this interface using the provided VLAN tag.
- vlan tag-rewrite push-2 (dot1ad|dot1q) <tag 1> <tag 2>
Add two new layers of VLAN tagging to frames on this interface using the provided VLAN tags.
- vlan tag-rewrite translate-1-1 (dot1ad|dot1q) <tag 1>
Replace one layer of VLAN tags with the a different VLAN ID.
- vlan tag-rewrite translate-1-2 (dot1ad|dot1q) <tag 1> <tag 2>
Replace one layer of VLAN tags with two layers of tagging using the provided VLAN IDs.
- vlan tag-rewrite translate-2-1 (dot1ad|dot1q) <tag 1>
Replace two layers of VLAN tags with one layer of tagging using the provided VLAN ID.
- vlan tag-rewrite translate-2-2 (dot1ad|dot1q) <tag 1> <tag 2>
Replace two layers of VLAN tags with two different layers of tagging using the provided VLAN IDs.
DHCP Client Example¶
The previous example was for a static IP address deployment.
To configure a TNSR interface to obtain its IP address via DHCP as a client, follow this example instead:
tnsr# configure terminal
tnsr(config)# interface GigabitEthernet3/0/0
tnsr(config-interface)# dhcp client ipv4
tnsr(config-interface)# enable
tnsr(config-interface)# exit
tnsr(config)# exit