我正在使用基本的Cisco VPN客户端(我相信v.5).无论如何,如果连接了一个partciular配置文件(或任何配置文件),是否以编程方式确定?
我希望以某种方式从客户端获得状态.我不想尝试在VPN的另一端ping一些IP,看看我是否得到了响应.
我正在为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#来控制Cisco交换机上的端口.
我已经搜索和学习了很长时间,所以我掌握了SNMP和MIB的基本知识.我可以找到一些文章谈论如何管理cisco开关,但没有一个指定如何启用和禁用端口.此时我想我需要配置交换机以启用SNMP服务,然后我应该发送SNMP Set数据包来打开/关闭特定端口.这是对的吗?
任何人都有一些经验,喜欢和我分享?请留下一些建议.如果你以前读过一些有用的网站,请留下这里的网址,这样我也可以看看.
非常感谢你的关注.
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 …
有没有办法以编程方式连接和断开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) 我成功地通过 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) 出于某种原因,我无法从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) 我有一个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) 我目前在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) 这是一个非常简单的 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)