Device management

4.3.a i Console and VTY

General information on “Console and VTY”:

Console:

VTY:

“Console and VTY” CLI configuration commands:

## Entering the console line configuration
Router(config)# line con 0

## Entering the VTY line configuration
Router(config)# line vty <number>

## Configuring different console/VTY line parameters:
Router(config-line)# login authentication

## Configuring an inactivity timeout after which the session gets automatically disconnected
Router(config-line)# exec-timeout <seconds>

## Configuring the allowed input/output protocols (eg. only SSH, telnet, ...)
Router(config-line)# transport input <protocol>
Router(config-line)# transport output <protocol>

## Configuring inbound/outbound access control with ACLs
Router(config-line)# access-class [ACL-NAME] [in | out]

4.3.a ii SSH, SCP

General information on “SSH”:

General information on “SCP”:

“SSH, SCP” CLI configuration commands:

## Configuring SSH globally (basic configuration)
Router(config)# hostname <hostname>
Router(config)# ip domain-name <domain-name>
Router(config)# crypto key generate rsa [label <label>] [modulus <modulus>]
Router(config)# ip ssh version 2

## Configure VTY lines to only allow SSH connections
Router(config)# line vty <number>
Router(config-line)# transport input ssh

## Changing the SSH port for VTY lines
Router(config)# ip ssh port <port> rotary <group>

Router(config)# ip access-list extended [NAME]
Router(config-ext-nacl)# permit tcp [source] [target] eq <port>

Router(config)# line vty <number>
Router(config-line)# rotary <group>
Router(config-line)# access-class [ACL-NAME] in

## Disabling/Enabling SCP globally
Router(config)# [no] ip scp server enable

4.3.a iii RESTCONF, NETCONF

RESTCONF

REpresentational State Transfer Configuration Protocol

General information on “RESTCONF”:

“RESTCONF” CLI configuration commands:

## Enabling HTTPS web server
Router(config)# ip http secure-server

## Enabling RESTCONF
Router(config)# restconf

NETCONF

NETwork CONFiguration Protocol

General information on “NETCONF”:

“NETCONF” CLI configuration commands:

## Enabling NETCONF
Router(config)# netconf-yang

## Changing the NETCONF default port
Router(config)# netconf-yang ssh port <port>

“NETCONF” CLI show commands:

## Showing currently connected NETCONF sessions
Router# show netconf-yang sessions

## Showing available NETCONF datastores
Router# show netconf-yang datastore