Accessing the Console Port

This chapter discusses how to access the console on Cisco IOS XRv 9000 router.

Console Mapping

Cisco IOS XRv 9000 Router boots when the VM is powered on. Depending on the installation image used (with or without VGA), you can monitor the installation process on the VM console or on the console on the virtual serial port.

This table describes the console mapping if the installation image type with VGA is used:

Table 1. Console Mapping for Image Type with VGA

VM Device

Maps to

VM Console

XR Console

First Serial Port

XR Auxiliary

Second Serial Port

Admin Console

Third Serial Port

Admin Auxiliary

Fourth Serial Port

Unused

This table describes the console mapping if the installation image type without VGA is used:

Table 2. Console Mapping for Image Type without VGA

VM Device

Maps to

VM Console

Unused

First Serial Port

XR Console

Second Serial Port

XR Auxiliary

Third Serial Port

Admin Console

Fourth Serial Port

Admin Auxiliary

Access the Cisco IOS XRv 9000 Router Through the VM Console

By default, the XR console is mapped to first serial port. However, under the following circumstances, XR console is mapped to VM console:

  • If you are running the VM under the ESXi hypervisor or OpenStack platform and using a VGA image type

  • If you are using VGA image for Cisco IOS XRv 9000 Router deployment

The VGA console is accessed at the Console Tab in the vSphere Client. On ESXi, VGA console is console which opens by itself once the installation is complete. You don’t need any specific procedure to connect to VM console

After loading the vga image, you can login to VM console. VM console offers the benefit of direct login. However, while using VM console, you might find that copying is a little difficult on a VM console. Also navigation is restricted to a level. Serial console has better copying options and navigation control.

Cisco IOS XRv 9000 Router boots when the VM is powered on. Depending on the installation image used (with or without VGA), you can monitor the installation process on the VM console or on the console on the virtual serial port.

The installation procedure remains same with or without VM console.

See VMware or OpenStack documentation on how to access the VM console through the appropriate GUI interface.

Access the Cisco IOS XRv 9000 Router Through the Virtual Serial Port

By default, Cisco IOS XRv 9000 Router is accessed using the VM console. You can configure the VM to use the virtual serial port as the console port for Cisco IOS XRv 9000 Router. See the following sections to configure the virtual serial port on your hypervisor.

Following are the default console settings:

  • Baud rate 115200 bps

  • no Parity

  • 2 Stop bits and

  • 8 Data bits


Note


These steps should have been performed during installation of Cisco IOS XRv 9000 Router.


Configuring Serial Console Access in VMware ESXi

This procedure explains how to configure the serial console access in VMware ESXi using VMware vSphere. For more information, refer to the VMware vSphere documentation.

Procedure


Step 1

Power-down the VM.

Step 2

Select the VM and configure the virtual serial port settings:

  1. Choose Edit Settings > Add

  2. Choose Device Type > Serial port and click Next.

  3. Choose Select Port Type, select Connect via Network and then click Next.

Step 3

Choose the Select Network Backing and then do the following:

  • Select Server (VM listens for connection)

  • Enter the Port URI using the following syntax: telnet://esxi-host-ipaddress:portnumber

    where portnumber is the port number for the virtual serial port.

  • Under I/O mode, select Yield CPU on poll.

  • Click Next.

Step 4

Power-on the VM.

When the VM is powered on, access the virtual serial port console. If you are unable to access the virtual serial port, then perform step 5.

Step 5

Configure the security settings for the virtual serial port.

  • Select the ESXi host for the virtual serial port.

  • Click the Configuration tab and then click Security Profile.

  • In the Firewall section, click Properties, and then select the VM serial port connected over Network value.


What to do next

You can now access the Cisco IOS XR console using the Telnet port URI: telnet esxi-host-ip-address <portnumber>

When you configure the virtual serial port, Cisco IOS XRv 9000 Router is no longer accessible from the VMware ESXi console.

Configuring the Serial Console Access in KVM using Virsh

The serial console access configuration for KVM environment is explained in the sample Virsh XML file available along with the installation images downloaded from Cisco.com. However, you must edit the serial port numbers in the XML source configuration.

This procedure explains how to edit the serial port number for four serial ports and telnet to the serial port to obtain access to the serial console.

Procedure


Step 1

Assign service values to each serial ports. You must pick unused ports while assigning the service values to each port.

The first serial port (port 0) is assigned 11768 as the port number.

<!-- Use virsh qemu-monitor-command IOS-XRv-9000_vpe_rwelnode10_virsh - -hmp "info chardev" to view or create serial ports -->
    <serial type='tcp'>
       <source mode="bind" host="127.0.0.10" service="11768"/>
       <protocol type="telnet"/>
       <target port="0"/>
    </serial>
    
The second serial port (port 1) is assigned 12251 as the port number.

    <serial type='tcp'>
       <source mode="bind" host="127.0.0.10" service="12251"/>
       <protocol type="telnet"/>
       <target port="1"/>
    </serial>
    
The third serial port (port 2) is assigned 17161 as the port number.

    <serial type='tcp'>
       <source mode="bind" host="127.0.0.10" service="17161"/>
       <protocol type="telnet"/>
       <target port="2"/>
    </serial>
    
The fourth serial port (port 3) is assigned 16998 as the port number.

    <serial type='tcp'>
       <source mode="bind" host="127.0.0.10" service="16998"/>
       <protocol type="telnet"/>
       <target port="3"/>
    </serial>

Step 2

To obtain the serial console access, telnet to the port, use the telnet localhost <portnumber> command.

This example shows how to access second serial port that has port number 12251:

telnet localhost 12251

Step 3

If the Virsh console is desired, uncomment the console section and comment out the last serial port.

Here is an example:

<!-- <console type='pty'> -->
<!--  <target type='serial' port='0'/> -->
<!-- </console> -->

Configuring the Serial Console Access in KVM using QEMU

Access to Cisco IOS XRv 9000 Router using KVM-QEMU command line can be obtained with telnet.

Procedure


The sample command line creates 4 serial ports that can be connected through telnet


-serial telnet:127.0.1.10:10621,nowait,server \
-serial telnet:127.0.1.10:14713,nowait,server \
-serial telnet:127.0.1.10:18090,nowait,server \
-serial telnet:127.0.1.10:17181,nowait,server \

In order to access one of the ports, use the telnet localhost <port-number> command.

For example, in order to access the first port shown in the sample CLI above:
telnet localhost 10621

Access the XR Console from the System Admin Console

In cases where there is an inband connectivity problem and you are able to log in only to the System Admin console, you can use the following method to access the XR console.

Procedure


Step 1

Login to the System Admin console as the root user.

Step 2

show vm location 0/RP0

Example:

The following example shows the command output with all the Virtual Machines (VM) displayed.
sysadmin-vm:0_RP0# show vm location 0/RP0 
Location: 0/RP0
Id                Status        IP Address       HB Sent/Recv
-------------------------------------------------------------
sysadmin          running       192.0.0.1        NA/NA
default-sdr       running       192.0.0.4        6304304/6304304
default-sdr       running       192.0.0.6        315193/315193

Step 3

run ssh ip address .

Example:

The following example shows the connection to the first default-sdr :
sysadmin-vm:0_RP0# run ssh 192.0.0.4 
Last login: Fri Apr  6 20:53:47 2018 from 192.0.0.1
[xr-vm_node0_RP0_CPU0:~]$

Step 4

exec

Example:

The following example shows accessing the XR console with XR login credentials:
[xr-vm_node0_RP0_CPU0:~]$exec 
User Access Verification

Username: iox

Password: 

RP/0/RP0/CPU0:router#

Create User Profiles and Assign Privileges

To provide controlled access to the XR and System Admin configurations on the router, user profiles are created with assigned privileges. The privileges are specified using command rules and data rules. The authentication, authorization, and accounting (aaa) commands are used for the creation of users, groups, command rules, and data rules. The aaa commands are also used for changing the disaster-recovery password.

For more information on creating user profiles and assign privileges, see the System Setup and Software Installation Guide for Cisco ASR 9000 Series Routers, chapter Create User Profiles and Assign Privileges.