02-22-2019 01:24 AM
Morning All!
I have a Cisco 2811 running as a console server and im struggling to build an option to clear one of the lines if for some reason someone was left it connected.
The IP Host's are configured like this:
ip host cable_2 2067 10.161.79.53
ip host cable_3 2068 10.161.79.53
ip host cable_4 2069 10.161.79.53
ip host cable_5 2070 10.161.79.53
ip host cable_6 2071 10.161.79.53
ip host cable_7 2072 10.161.79.53
ip host cable_8 2073 10.161.79.53
ip host cable_9 2074 10.161.79.53
ip host cable_10 2075 10.161.79.53
ip host cable_11 2076 10.161.79.53
ip host cable_12 2077 10.161.79.53
ip host cable_13 2078 10.161.79.53
ip host cable_14 2079 10.161.79.53
ip host cable_15 2080 10.161.79.53
ip host cable_16 2081 10.161.79.53
And i then have the many commands like this:
menu MGMT command cl1 disconnect cable_1
menu MGMT command cl2 disconnect cable_2
menu MGMT command cl3 disconnect cable_3
menu MGMT command cl4 disconnect cable_4
menu MGMT command cl5 disconnect cable_5
menu MGMT command cl6 disconnect cable_6
menu MGMT command cl7 disconnect cable_7
menu MGMT command cl8 disconnect
menu MGMT command cl9 disconnect cable_9
menu MGMT command cl10 disconnect cable_10
menu MGMT command cl11 disconnect cable_11
menu MGMT command cl12 disconnect cable_12
menu MGMT command cl13 disconnect cable_13
menu MGMT command cl14 disconnect cable_14
menu MGMT command cl15 disconnect cable_15
menu MGMT command cl16 disconnect cable_16
What is the correct way of doing this as it does not recognise the connection number when attempting to use it:
Please make a selection : cl2
?Invalid connection name
Any help would be much appreciated!
I've trawled documents but can't find anything!
Cheers
02-23-2019 12:31 AM
i am not 100% sure if this works on console, but try 'who' and 'clear line xyz'
02-25-2019 12:42 AM
Hi Dennis,
Thanks but unfortunately the console menu doesn't seem to like the command clear line vty x
Config added:
menu MGMT command term0 clear line vty 0
Output when testing term0:
Please make a selection : term0
Menu "MGMT" has invalid command "clear line vty 0"
clear line vty 0
^
% Invalid input detected at '^' marker.
Any other ideas?
Sounds like I just need a method of clearing vty lines from within the menu somehow
Thanks
03-01-2019 02:08 AM
Morning All!
Has anyone got any other ideas on this one?
Thanks!
03-01-2019 05:03 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide