cisco

Execute multiple commands via SSH and PowerShell

扶醉桌前 提交于 2019-12-19 08:54:26
问题 I successfully managed to connect to a Cisco IE-2000-L switch via SSH. I used the Renci SSH.NET library. Starting guide: http://vwiki.co.uk/SSH_Client_(PowerShell) My working code is # Load SSH library (for .NET 4.0 and PowerShell 3) $DllPath = "D:\temp\Renci.SshNet.dll" [void][reflection.assembly]::LoadFrom( (Resolve-Path $DllPath) ) # Connect to switch (Cisco IE2000-L) with IP, port, username, password $SshClient = New-Object Renci.SshNet.SshClient('172.20.91.30', 22, 'admin', 'mypassword')

Programatially determine if Cisco VPN Client is connected

断了今生、忘了曾经 提交于 2019-12-18 17:00:47
问题 I am working with the basic Cisco VPN client (v.5 I believe). Is there anyway to determine programatically if a partciular profile (or any profile for that matter) is connected? I'm looking to somehow get a status from the client itself. I don't want to have to try to ping some IP on the other end of the VPN to see if I get a response. 回答1: There is an API for Cisco VPN (vpnapi.dll). 回答2: Below a vbs script to check the connection status: bIsVPNConnected = False Set objWMIService = GetObject(

Connect CISCO Anyconnect VPN via bash

瘦欲@ 提交于 2019-12-18 12:29:14
问题 As title says, trying to connect vpn via bash. The following script seemed closest to the answer I'm looking for: #!/bin/bash /opt/cisco/anyconnect/bin/vpn -s << EOF connect https://your.cisco.vpn.hostname/vpn_name here_goes_your_username here_goes_your_passwordy EOF When I run this the vpn starts but then exits without an error and without connecting. This seems to be caused by the -s. If I remove this parameter the VPN will start but none of the commands (ie connect vpn, username, password)

Expect script problems

寵の児 提交于 2019-12-13 18:55:14
问题 I am new to expect and i was using a logic to automate diconnecting telnet session where user is logged in and leave other lines as it is: for {set i 0} {$i ==4} {incr i} { send "clear line vty $i\r" "confirm]" {send "\r"} "% Not allowed" {send "quit\r"; exit} } it disconnects all the lines now i use "show user" command but it's hard for me to write a script around it, the output is not friendly enough for me.so i wrote IF statements in this for loop but it was not good and not even deserving

Columns in the data does not match the number of columns in the range (The data has 12 but the range has 11)

醉酒当歌 提交于 2019-12-13 04:26:18
问题 I am building a function that should take the elements of an XML response and store each iteration of an element in it's own row in a spreadsheet until all the elements have been accounted for. This works, until there are more than 500 accounts to be returned (please see here for API info). Then, I recieve The number of columns in the data does not match the number of columns in the range. The data has 12 but the range has 11. Please see my code below thank you for your time and assistance.

Why am I getting request method GET not supported?

巧了我就是萌 提交于 2019-12-12 21:22:36
问题 I am using PostMan as a REST client to test this API method Cisco ACL Analysis API. specifically POST /acl/trace or getAClTracksStd (first go to Policy Analysis) Here is my PostMan HTTP test call Does anyone who is familiar with PostMan understand why I am getting this "Request method 'GET' is not supported" error from the server? I am making a POST HTTP request, not GET.(Selected from Drop down menu) It make more sense for me to get a input invalid parameter error or something. Just to show

Capturing VPN usage statistics

冷暖自知 提交于 2019-12-12 16:17:46
问题 We're monitoring usage statistics of a network interface using NetworkInterface.GetIPv4Statistics() in .NET 2.0. This isn't reporting correct statistics for connections over which VPN traffic is being tunneled. Instead - in the case of the Cisco VPN client - the usage is just attributed to a new network interface that just looks like an Ethernet connection. Windows itself (Vista, at least) adds the VPN statistics to the actual physical interface correctly, so viewing the 'Status' dialog for

Telnet to cisco switch using php

前提是你 提交于 2019-12-12 09:01:55
问题 I need to telnet to cisco switch using php and execute show interface status command and get results. I tried some php classes I found on internet but none of them could connect to device. So I tried to write the script myself, but I have the same problem, I cant connect to device. The host sends me banner message and then new line with username: . I send my username with \r\n , wait some time and tries to read data, but it looks to me like host is just ignoring my new line characters. This

cisco ioxclient docker package command error: An address incompatible with the requested protocol was used

被刻印的时光 ゝ 提交于 2019-12-12 06:56:08
问题 I was trying to create a Cisco IoX package from a docker image following the tutorial here. when I ran the command ioxclient docker package -a leonardab/iox-test:latest . , I got the following error: Could not retrieve requested Docker image. Error occurred : dial unix /var/run/docker.sock: socket: An address incompatible with the requested protocol was used. OS: Windows 10 Pro, Docker: 18.09.0 回答1: The problem is in the protocol used by IoX to access the docker daemon. The default protocol

SNMP OID to map MAC addresses to ip addresses?

放肆的年华 提交于 2019-12-12 03:52:28
问题 I have written some C# code that I am using to run an file "snmpwalker.exe" that is returning details about so cisco switches when I pass in the correct community string ip address and vlan information with an OID. I have been able to get enough information to be able to map the MAC addresses to the switch's ports but I want to also find out the ip addresses. Does anyone know what the OID for snmp would be to get back a list with mac addresses and ip addresses on a cisco switch? I haven't