Skip to content

Line

Line configuration manages device access control for both console (CON) and virtual terminal (VTY) connections, defining authentication methods, timeout values, transport protocols, and access restrictions. Console lines provide direct physical access to devices while VTY lines enable remote access via protocols such as SSH and Telnet, with configurable access control lists to restrict connections by source IP address or network range. Line configuration also controls session parameters including privilege levels, password authentication, exec timeouts, and logging settings to ensure secure and manageable device access.

Diagram
NameTypeConstraintMandatoryDefault Value
lineClass[line]No

NameTypeConstraintMandatoryDefault Value
consolesList[consoles]No
vtysList[vtys]No
auxesList[auxes]No

consoles (iosxe.devices.configuration.line)

Section titled “consoles (iosxe.devices.configuration.line)”
NameTypeConstraintMandatoryDefault Value
numberIntegermin: 0, max: 17Yes
exec_timeout_minutesIntegermin: 0, max: 35791No
exec_timeout_secondsIntegermin: 0, max: 2147483No
login_localBooleantrue, falseNo
login_authenticationStringNo
privilege_levelIntegermin: 0, max: 15No
stopbitsChoice1, 1.5, 2No
password_levelIntegermin: 0, max: 255No
password_typeChoice0, 6, 7No
passwordStringNo
session_timeoutIntegermin: 0, max: 2147483647No
monitorBooleantrue, falseNo
escape_characterStringNo
logging_synchronousBooleantrue, falseNo
transport_outputListChoice[all, acercon, lat, mop, nasi, none, pad, rlogin, ssh, telnet, udptn]No

NameTypeConstraintMandatoryDefault Value
number_fromIntegermin: 0, max: 1869Yes
number_toIntegermin: 1, max: 1869No
access_classesList[access_classes]No
exec_timeout_minutesIntegermin: 0, max: 35791No
exec_timeout_secondsIntegermin: 0, max: 2147483No
password_levelIntegermin: 0, max: 255No
password_typeChoice0, 6, 7No
passwordStringNo
login_authenticationStringNo
transport_preferred_protocolChoiceacercon, lat, mop, nasi, none, pad, rlogin, ssh, telnet, udptnNo
authorization_execStringNo
authorization_exec_defaultBooleantrue, falseNo
transport_input_allBooleantrue, falseNo
transport_input_noneBooleantrue, falseNo
transport_inputListStringNo
session_timeoutIntegermin: 0, max: 2147483647No
monitorBooleantrue, falseNo
escape_characterStringNo
logging_synchronousBooleantrue, falseNo
transport_outputListChoice[all, acercon, lat, mop, nasi, none, pad, rlogin, ssh, telnet, udptn]No

NameTypeConstraintMandatoryDefault Value
numberIntegermin: 0, max: 17Yes
exec_timeout_minutesIntegermin: 0, max: 35791No
exec_timeout_secondsIntegermin: 0, max: 2147483No
monitorBooleantrue, falseNo
stopbitsChoice1, 1.5, 2No
password_levelIntegermin: 0, max: 255No
password_typeChoice0, 6, 7No
passwordStringNo
escape_characterStringNo
logging_synchronousBooleantrue, falseNo
transport_outputListChoice[none]No

access_classes (iosxe.devices.configuration.line.vtys)

Section titled “access_classes (iosxe.devices.configuration.line.vtys)”
NameTypeConstraintMandatoryDefault Value
directionChoicein, outYes
access_listStringNo
vrf_alsoBooleantrue, falseNo

Comprehensive Line Configuration with Specific Transport Protocols

Section titled “Comprehensive Line Configuration with Specific Transport Protocols”

This example shows VTY lines with specific transport input protocols (SSH and Telnet), along with authentication and session settings.

line vty 0 4
exec-timeout 30 0
password 7 encryptedPassword123
authorization exec default
logging synchronous
transport input ssh
transport output ssh
!
line vty 5 15
exec-timeout 10 0
logging synchronous
transport input ssh telnet
transport output all
iosxe:
devices:
- name: Device1
configuration:
line:
consoles:
- number: 0
exec_timeout_minutes: 0
exec_timeout_seconds: 45
login_local: true
privilege_level: 15
stopbits: '1'
password_level: 100
password_type: '0'
password: testpasswd
session_timeout: 3600
monitor: true
escape_character: BREAK
logging_synchronous: true
transport_output:
- ssh
- telnet
vtys:
- number_from: 0
number_to: 4
access_classes:
- direction: in
access_list: MGMT-ACCESS
vrf_also: true
exec_timeout_minutes: 30
exec_timeout_seconds: 0
password_type: '7'
password: encryptedPassword123
login_authentication: default
authorization_exec: default
authorization_exec_default: true
transport_preferred_protocol: ssh
transport_input:
- ssh
session_timeout: 1800
monitor: false
escape_character: '^^'
logging_synchronous: true
transport_output:
- ssh
- number_from: 5
number_to: 15
exec_timeout_minutes: 10
exec_timeout_seconds: 0
logging_synchronous: true
transport_input:
- ssh
- telnet
transport_output:
- all
auxes:
- number: 0
exec_timeout_minutes: 15
exec_timeout_seconds: 0
monitor: false
password_level: 7
password_type: '7'
password: 0822455D0A16
escape_character: BREAK
logging_synchronous: false
transport_output:
- none

VTY Lines with All Transport Protocols Enabled

Section titled “VTY Lines with All Transport Protocols Enabled”

This example shows VTY lines with all transport protocols enabled using transport_input_all: true, which allows all available transport protocols for incoming connections.

line vty 16 25
exec-timeout 5 0
transport input all
iosxe:
devices:
- name: Device1
configuration:
line:
vtys:
- number_from: 16
number_to: 25
exec_timeout_minutes: 5
exec_timeout_seconds: 0
transport_input_all: true

This example shows VTY lines with transport input completely disabled using transport_input_none: true, which prevents all incoming connections.

line vty 26 30
exec-timeout 5 0
transport input none
transport output none
iosxe:
devices:
- name: Device1
configuration:
line:
vtys:
- number_from: 26
number_to: 30
exec_timeout_minutes: 5
exec_timeout_seconds: 0
transport_input_none: true
transport_output:
- none

Line configuration manages device access control for both console (CON) and virtual terminal (VTY) connections, defining authentication methods, timeout values, transport protocols, and access restrictions. Console lines provide direct physical access to devices while VTY lines enable remote access via protocols such as SSH and Telnet, with configurable access control lists to restrict connections by source IP address or network range. Line configuration also controls session parameters including privilege levels, password authentication, exec timeouts, and logging settings to ensure secure and manageable device access.

Diagram
NameTypeConstraintMandatoryDefault Value
lineClass[line]No

NameTypeConstraintMandatoryDefault Value
consolesList[consoles]No
vtysList[vtys]No
auxesList[auxes]No

consoles (iosxe.devices.configuration.line)

Section titled “consoles (iosxe.devices.configuration.line)”
NameTypeConstraintMandatoryDefault Value
numberIntegermin: 0, max: 17Yes
exec_timeout_minutesIntegermin: 0, max: 35791No
exec_timeout_secondsIntegermin: 0, max: 2147483No
login_localBooleantrue, falseNo
login_authenticationStringNo
privilege_levelIntegermin: 0, max: 15No
stopbitsChoice1, 1.5, 2No
password_levelIntegermin: 0, max: 255No
password_typeChoice0, 6, 7No
passwordStringNo
session_timeoutIntegermin: 0, max: 2147483647No
monitorBooleantrue, falseNo
escape_characterStringNo
logging_synchronousBooleantrue, falseNo
transport_outputListChoice[all, acercon, lat, mop, nasi, none, pad, rlogin, ssh, telnet, udptn]No

NameTypeConstraintMandatoryDefault Value
number_fromIntegermin: 0, max: 1869Yes
number_toIntegermin: 1, max: 1869No
access_classesList[access_classes]No
exec_timeout_minutesIntegermin: 0, max: 35791No
exec_timeout_secondsIntegermin: 0, max: 2147483No
password_levelIntegermin: 0, max: 255No
password_typeChoice0, 6, 7No
passwordStringNo
login_authenticationStringNo
transport_preferred_protocolChoiceacercon, lat, mop, nasi, none, pad, rlogin, ssh, telnet, udptnNo
authorization_execStringNo
authorization_exec_defaultBooleantrue, falseNo
transport_input_allBooleantrue, falseNo
transport_input_noneBooleantrue, falseNo
transport_inputListStringNo
session_timeoutIntegermin: 0, max: 2147483647No
monitorBooleantrue, falseNo
escape_characterStringNo
logging_synchronousBooleantrue, falseNo
transport_outputListChoice[all, acercon, lat, mop, nasi, none, pad, rlogin, ssh, telnet, udptn]No

NameTypeConstraintMandatoryDefault Value
numberIntegermin: 0, max: 17Yes
exec_timeout_minutesIntegermin: 0, max: 35791No
exec_timeout_secondsIntegermin: 0, max: 2147483No
monitorBooleantrue, falseNo
escape_characterStringNo
logging_synchronousBooleantrue, falseNo
transport_outputListChoice[none]No

access_classes (iosxe.devices.configuration.line.vtys)

Section titled “access_classes (iosxe.devices.configuration.line.vtys)”
NameTypeConstraintMandatoryDefault Value
directionChoicein, outYes
access_listStringNo
vrf_alsoBooleantrue, falseNo

iosxe:
devices:
- name: Device1
configuration:
line:
consoles:
- number: 0
exec_timeout_minutes: 0
exec_timeout_seconds: 45
login_local: true
privilege_level: 15
stopbits: '1'
password_level: 100
password_type: '0'
password: testpasswd
session_timeout: 3600
monitor: true
escape_character: BREAK
logging_synchronous: true
transport_output:
- ssh
- telnet
vtys:
- number_from: 0
number_to: 4
access_classes:
- direction: in
access_list: MGMT-ACCESS
vrf_also: true
exec_timeout_minutes: 30
exec_timeout_seconds: 0
password_type: '7'
password: encryptedPassword123
login_authentication: default
transport_preferred_protocol: ssh
transport_input:
- ssh
session_timeout: 1800
monitor: false
escape_character: '^^'
logging_synchronous: true
transport_output:
- ssh
- number_from: 5
number_to: 15
exec_timeout_minutes: 10
exec_timeout_seconds: 0
transport_input_all: false
transport_input:
- ssh
- telnet
transport_output:
- all
auxes:
- number: 0
exec_timeout_minutes: 15
exec_timeout_seconds: 0
monitor: false
escape_character: BREAK
logging_synchronous: false
transport_output:
- none