标签: cisco

以编程方式确定Cisco VPN客户端是否已连接

我正在使用基本的Cisco VPN客户端(我相信v.5).无论如何,如果连接了一个partciular配置文件(或任何配置文件),是否以编程方式确定?

我希望以某种方式从客户端获得状态.我不想尝试在VPN的另一端ping一些IP,看看我是否得到了响应.

vpn cisco

5
推荐指数
1
解决办法
7436
查看次数

使用g722编解码器解码PCM音频数据

我正在为VoIP音频开发一个呼叫记录器,音频在CISCO环境中使用g722编解码器进行编码.好吧,我从RTP帧中提取了数据,我已经解码了这个pcm数据如下:

unsigned int payloadSize = htons(udpHdr->len) - (CONSTANT::UDP_HDR_SIZE + CONSTANT::RTP_HDR_SIZE);
char * payload = (char*)rtpHdr + CONSTANT::RTP_HDR_SIZE;
  unsigned short m_payloadType = rtpHdr->pt;
//decode_state is initialize like :g722_decode_init(NULL, 64000, G722_SAMPLE_RATE_8000);
outBuffSize = g722_decode(decode_state, decompressed, (const uint8_t*)payload, payloadSize);
Run Code Online (Sandbox Code Playgroud)

我在一个文件中存储了这个解码数据(以及相同流量的所有帧,等于sscr),当试图听到音频时,我只听到噪音.

我认为这个问题是针对CISCO使用的压缩算法.

解码函数的行为是正确的.

有什么建议吗?

c++ audio voip cisco libpcap

5
推荐指数
0
解决办法
1851
查看次数

如何使用C#启用/禁用Cisco Catalyst 2960中的端口?

我刚毕业,刚刚在香港做了第一份程序员.如上所述,我需要使用C#来控制Cisco交换机上的端口.

我已经搜索和学习了很长时间,所以我掌握了SNMP和MIB的基本知识.我可以找到一些文章谈论如何管理cisco开关,但没有一个指定如何启用和禁用端口.此时我想我需要配置交换机以启用SNMP服务,然后我应该发送SNMP Set数据包来打开/关闭特定端口.这是对的吗?

任何人都有一些经验,喜欢和我分享?请留下一些建议.如果你以前读过一些有用的网站,请留下这里的网址,这样我也可以看看.

非常感谢你的关注.

cisco snmp

5
推荐指数
1
解决办法
2万
查看次数

应用程序中包含的 VPN 连接

Is it possible to have a program which establishes a VPN connection but the VPN is contained only within the application?

Example: An application establishes a VPN connection to retrieve the data from another server via VPN without having an effect on the machine's network connectivity - The machine remains on the network/internet as if there is no VPN connection established.

Ideally I'd like to do this in C#.

Also, I currently use a Cisco VPN client which has "Group …

.net c# vpn networking cisco

5
推荐指数
1
解决办法
1600
查看次数

使用Java连接VPN

有没有办法以编程方式连接和断开Forticlient中的VPN?

我看到,使用Cisco VPN Client,有一些选项,例如使用它们提供的API或从我的Java代码执行连接命令.关于这些连接到VPN的方式的观点和意见也是最受欢迎的.

我正在寻找这样的选项或任何其他可能的选项,使用Forticlient软件.

从这里的任何方向将是非常有帮助的.

我到目前为止的审判:

private static final String COMMAND = "C:/Program Files/Cisco/Cisco AnyConnect Secure Mobility Client/vpncli"; 

private ExpectJ exp = new ExpectJ(10); 

public void connectToVPNViaCLI(String server, String uname, String pwd) 
{ 
    try { 
          String command = COMMAND + " connect " + server; 
          Spawn sp = exp.spawn(command); 
          sp.expect("Username: "); 
          sp.send(uname + "\n"); 
          sp.expect("Password: "); 
          sp.send(pwd + "\n"); 
          sp.expect("accept? [y/n]: "); 
          sp.send("y" + "\n"); 
        } catch(Exception e) { 
          LOGGER.severe(e.getMessage()); 
        }
} 
Run Code Online (Sandbox Code Playgroud)

java vpn cisco

5
推荐指数
0
解决办法
6733
查看次数

通过 SSH 和 PowerShell 执行多个命令

我成功地通过 SSH 连接到 Cisco IE-2000-L 交换机。我使用了Renci SSH.NET库。

入门指南:http : //vwiki.co.uk/SSH_Client_(PowerShell)

我的工作代码是

# 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')
$SshClient.Connect()

# execute one command on Cisco switch
$SshCommand = $SshClient.RunCommand('show arp')

# show result
$SshCommand.Result 

# close SSH connection
$SshCommand.Dispose()
$SshClient.Disconnect()
$SshClient.Dispose()
Run Code Online (Sandbox Code Playgroud)

我的问题是

上面的代码只发送一个命令。但是我想在不关闭和重新打开会话的情况下连续执行几个命令。

如果我在第一个命令之后添加第二个命令

# execute one command on …
Run Code Online (Sandbox Code Playgroud)

windows ssh powershell cisco

5
推荐指数
0
解决办法
8689
查看次数

来自Ubuntu 14.04的Cisco SSH密钥交换失败(客户端DH密钥范围不匹配)

出于某种原因,我无法从Ubuntu 14.04计算机SSH到Cisco CSR1000v路由器.

我们的思科固件是;

Cisco IOS XE Software, Version 03.12.00.S - Standard Support Release
Cisco IOS Software, CSR1000V Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.4(2)S, RELEASE SOFTWARE (fc2)
Run Code Online (Sandbox Code Playgroud)

显示的服务器错误是;

%SSH-3-DH_RANGE_FAIL: Client DH key range mismatch with maximum configured DH key on server
Run Code Online (Sandbox Code Playgroud)

显示的客户端错误是;

$ ssh -v admin@172.16.3.253
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 172.16.3.253 [172.16.3.253] port 22.
debug1: Connection established.
debug1: identity file /home/admin/.ssh/id_rsa type 1
debug1: …
Run Code Online (Sandbox Code Playgroud)

ssh ubuntu networking router cisco

5
推荐指数
1
解决办法
1万
查看次数

如何打包Go程序以使其自给自足?

我有一个Go程序,我想在交换机上运行它.由于我无法在交换机上安装Go,我只是复制可执行文件并尝试运行.但是我收到以下错误.

runtime: panic before malloc heap initialized
fatal error: runtime: cannot reserve arena virtual address space

runtime stack:
runtime.throw(0x8149b8b)
        /usr/local/go/src/pkg/runtime/panic.c:520 +0x71
runtime.mallocinit()
        /usr/local/go/src/pkg/runtime/malloc.goc:552 +0xf2
runtime.schedinit()
        /usr/local/go/src/pkg/runtime/proc.c:150 +0x3a
_rt0_go()
        /usr/local/go/src/pkg/runtime/asm_386.s:95 +0xf6`
Run Code Online (Sandbox Code Playgroud)

如何将Go可执行文件与其所有依赖项打包在一起?

编辑1:这是ulimit -a转储.

core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 40960
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 …
Run Code Online (Sandbox Code Playgroud)

linux cisco go

5
推荐指数
1
解决办法
367
查看次数

尝试安装Numpy时出错

我目前在Cisco路由器上运行Yocto-distr(所以这是嵌入式Linux系统调用Guest-Os).我已经安装了python-2.7.3版本.我目前正在安装Numpy.但是,安装不成功,我不知道在错误描述中要查找什么.我该怎么办?

root@qemux86:/mnt/sdc1/numpy-1.8.1# python setup.py install
    Running from numpy source directory.
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
      warnings.warn(msg)
    non-existing path in 'numpy/distutils': 'site.cfg'
    /bin/sh: svnversion: command not found
    F2PY Version 2
    blas_opt_info:
    blas_mkl_info:
      libraries mkl,vml,guide not found in ['/usr/local/lib', '/usr/lib']
      NOT AVAILABLE

    openblas_info:
      libraries  not found in ['/usr/local/lib', '/usr/lib']
      NOT AVAILABLE

    atlas_blas_threads_info:
    Setting PTATLAS=ATLAS
      libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib']
      NOT AVAILABLE

    atlas_blas_info:
      libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib']
      NOT AVAILABLE

    /mnt/sdc1/numpy-1.8.1/numpy/distutils/system_info.py:1521: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories …
Run Code Online (Sandbox Code Playgroud)

python cisco numpy embedded-linux python-2.7

5
推荐指数
1
解决办法
9422
查看次数

通过 SSH Ansible 到 Cisco IOS,并显示“身份验证失败”消息

这是一个非常简单的 ansible 案例,这让我很困扰。

这是ansible.cfg的内容:

[defaults]
transport = paramiko
hostfile = ./hosts
host_key_checking = False
timeout = 5
Run Code Online (Sandbox Code Playgroud)

主机的内容,所有用户名为“cisco”,密码也为“cisco”

[routers]
R1
R2
R3
...
Run Code Online (Sandbox Code Playgroud)

主机变量文件(R1),与R2,R3,...类似,只是IP地址不同:

---
ansible_ssh_host: 10.10.10.1
ansible_ssh_user: cisco
ansible_ssh_pass: cisco
Run Code Online (Sandbox Code Playgroud)

我可以通过 linux 成功 SSH 到这些路由器,但是当我使用 ansible 时,它​​导致“身份验证失败”:

fatal: [R1] => {'msg': 'FAILED: Authentication failed.', 'failed': True}
fatal: [R2] => {'msg': 'FAILED: Authentication failed.', 'failed': True}
...
Run Code Online (Sandbox Code Playgroud)

我用一些单行ansible命令测试了连接性,即使我手动输入用户名和密码,仍然出现错误,例如:

> ansible routers -m raw
R1 | FAILED => FAILED: Authentication failed.
R2 | FAILED => FAILED: Authentication failed.    

> ansible routers …
Run Code Online (Sandbox Code Playgroud)

ssh cisco ansible

5
推荐指数
1
解决办法
7794
查看次数

标签 统计

cisco ×10

ssh ×3

vpn ×3

networking ×2

.net ×1

ansible ×1

audio ×1

c# ×1

c++ ×1

embedded-linux ×1

go ×1

java ×1

libpcap ×1

linux ×1

numpy ×1

powershell ×1

python ×1

python-2.7 ×1

router ×1

snmp ×1

ubuntu ×1

voip ×1

windows ×1