Viewing User Sessions on a Switch

In earlier versions of Netvisor, you could not view current user sessions using the CLI.  This can be very useful for security and troubleshooting. Netvisor now lists all currently logged-in users along with the IP they are connecting from and the login time when you execute the command, mgt-session-show.

CLI (network-admin@Leaf1)>mgmt-session-show

user user-string

Displays the user name.

cli-user cli-user-string 

Displays the name used to log into the switch.

pid pid-number

Displays the process ID.

terminal terminal-string

Displays the terminal.

from-ip ip-address

Displays the IP address for the user.

login-time date/time: yyyy-mm-ddTHH:mm:ss

Displays the time and date that the user logged into the switch.

remote-node remote-node-string

Displays the name of the remote node.

vnet vnet-string

Displays the VNET assigned to the user.

type cli|api|shell

Displays the type of login session.

CLI (network-admin@Leaf1)>mgmt-session-show

switch        user   cli-user      pid   terminal from-ip      login-time

------------- ----- ------------- ----- -------- ------------ --------------

Spine-ext-41  admin network-admin 13805 pts/3    10.60.1.216  11:20:52

Spine-ext-41  root  network-admin 8589  pts/2    10.14.20.109 11-15,17:16:17

Spine-ext-41        network-admin                             08:24:10

Spine-ext-41  root                19139 pts/1    10.14.22.54  11-15,11:01:08

 

type

------

cli   

cli   

api   

shell

Confirming Connectivity on the Network

After you have connected your switch, you may want to take the time to ensure that you have connectivity by pinging an external IP address, and pinging a domain to ensure that you can resolve a domain name.

To ping the external network from the switch, use the ping command:

CLI (network-admin@Leaf1)>ping 98.138.253.109 : 56 data bytes

PING 98.138.253.109 (98.138.253.109) 56(84) bytes of data.

64 bytes from 98.138.253.109: icmp_seq=1 ttl=47 time=51.8 ms

64 bytes from 98.138.253.109: icmp_seq=2 ttl=47 time=51.9 ms

64 bytes from 98.138.253.109: icmp_seq=3 ttl=47 time=53.6 ms

To ping a domain, use the ping command again:

CLI (network-admin@Leaf1)>ping yahoo.com

PING yahoo.com (98.138.253.109) 56(84) bytes of data.

64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_seq=1 ttl=47 time=52.2 ms

64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_seq=2 ttl=47 time=52.5 ms

64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_seq=3 ttl=47 time=51.9 ms

64 bytes from ir1.fp.vip.ne1.yahoo.com (98.138.253.109): icmp_seq=4 ttl=47 time=51.8 ms