7 9 月, 2021
背景
Telnet是常用的远程设备远程登录协议,通过如SecureCRT,Item2等终端软件,可以很容易的登录各种支持Telnet协议的设备,但有时候根据不同的终端设备,会需要一些特殊的设置,这就涉及Telnet协商,此篇文章就是整理下Telnet的几种模式及之间的区别,也包含如何更改这些模式的操作方法;
问题
我们可以通过一个问题来展开讨论,如下环境:
PC---(SSH)---CentOS---(Telnet)---KVM(vNE40E)
我们发现登录vNE40E后无法退格,连续回车会有断行,如下所示:
[root@beihe-terminal-server ~]# CR1
Trying 172.16.211.165...
Connected to 172.16.211.165.
Escape character is '^]'.
<HUAWEI>
<HUAWEI>
<HUAWEI>
<HUAWEI>dis ver^H^H^H^H <<< 4个退格键
通过“Crtl + ]”退出当前session,然后通过“status”来查看当前Telnet连接的模式,可以看到是 “obsolete linemode”, 过时的Line mode??:
<HUAWEI>^]
telnet> status
Connected to 172.16.211.165.
Operating in obsolete linemode
Local character echo
Escape character is '^]'.
那么需要怎么做才能修复此问题呢?
完整阅读
18 8 月, 2021
背景
之前总结过一些Trex的内容,如下所示,这篇文章主要介绍如何在GUI中的高级模式中创建报文,并变更特定项目,如原/目IP地址,TCP/UDP 原/目端口等,以及如何修复可变TCP/UDP端口号带来的Checksum不正确的问题;另外最后还会使用另一种方法来调用流量模型;
Limited
- 报文统计数据不能导出到Excel或CVS;
- IPv6包头不能通过Field Engine改变,但API支持;
- 如果想打IPv6的报文,需要在网络设备上绑定nd和mac的mapping关系;
Topology
拓扑同上一篇文章:
Trex-Server1 (100.0.0.1)------ (100.0.0.2)Router1 ---- network ----- Router2(100.1.1.2) ------ (100.1.1.1)Trex-Server2
Trex配置文件生成
Trex里有一个程序,可以自动生成配置文件,如下所示,Platform部分是设置内核分配的(如果不设置,默认只有一个core,性能有限),启动时指明需要几个内核,那么系统就会自动按照配置进行分配,如“./t-rex-64 -i -c 27”
完整阅读
16 8 月, 2021
详细内容可以查阅:TRex Advance stateful support
在之前的文章中,介绍过Trex Stateless Mode的简单使用方法,在这里介绍下ASTF模式是如何工作的,并且如何统计信息的;另外在这个例子中,主要是通过变更PCAP报文中的原和目的地址,并以Server/Client方式发送流量并统计;
Topology
Trex-Server1 (100.0.0.1)------ (100.0.0.2)Router1 ---- network ----- Router2(100.1.1.2) ------ (100.1.1.1)Trex-Server2
完整阅读
5 4 月, 2021
安装KVM组件
此步骤略,具体信息可以自行查阅
通过Virsh管理KVM
[root@host] $ virsh list
Id Name State
----------------------------------------------------
[root@host] $ virsh list --all
Id Name State
----------------------------------------------------
- centos-test shut off
[root@host] $
[root@host] $ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.b8599f1ef79e no eth2
virbr0 8000.5254004de69f yes virbr0-nic
[root@host] $
[root@host] $ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 172.16.211.1 0.0.0.0 UG 0 0 0 br0
169.254.0.0 0.0.0.0 255.255.0.0 U 1007 0 0 br0
172.16.211.0 0.0.0.0 255.255.255.0 U 0 0 0 br0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
完整阅读
9 8 月, 2020
In the article, only show as follow (because easy to show how to work):
Protocol: UDP; Port: 5234
Encoding: KV-GPB
For more detailed information, you can reference my colleague’s GitHub, which includes more examples, e.g GRPC.
AlexFengCisco / Telemetry_Receiver
GRPC Update Info:
If use GRPC not TCP/UDP, that will have standard function, you will not need to write “DECODE_FN_MAP…”, function will auto generate, direct to use. Simple list steps:
- Get GRPC protobuf (e.g “mdt_grpc_dialout”) from cisco / bigmuddy-network-telemetry-proto
- Install/use compile tools, suggest install python virtual env, you can reference 在MacOS中部署Python虚拟开发环境
(telemetry-protocol) [root@telemetry telemetry-protocol]# python -V
Python 3.6.8
(telemetry-protocol) [root@telemetry telemetry-protocol]# easy_install pip
(telemetry-protocol) [root@telemetry telemetry-protocol]# pip install grpcio
(telemetry-protocol) [root@telemetry telemetry-protocol]# pip install protobuf
(telemetry-protocol) [root@telemetry telemetry-protocol]# pip install grpcio_tools
(telemetry-protocol) [root@telemetry telemetry-protocol]# python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. cisco_grpc_dialout.proto
(telemetry-protocol) [root@telemetry telemetry-protocol]# ls -l|grep cisco
-rw-r--r--. 1 root root 2695 Aug 10 16:16 cisco_grpc_dialout_pb2_grpc.py #generated
-rw-r--r--. 1 root root 3805 Aug 10 16:16 cisco_grpc_dialout_pb2.py #generated
-rw-r--r--. 1 root root 485 Aug 10 16:15 cisco_grpc_dialout.proto #proto file
Follow all file if you need grpc protocol:
[root@telemetry grpc-dailout]# ls -l
total 36
-rw-r--r--. 1 root root 2695 Aug 10 16:16 cisco_grpc_dialout_pb2_grpc.py #Contains the server Stub class and the client Stub class, as well as the service RPC interface to be implemented.
-rw-r--r--. 1 root root 3805 Aug 10 16:16 cisco_grpc_dialout_pb2.py #message serialization classes
-rw-r--r--. 1 root root 484 Aug 10 15:36 mdt_grpc_dialout.proto
-rw-r--r--. 1 root root 3722 Aug 10 16:11 service_grpc_dialout_no_tls.py #service python
-rw-r--r--. 1 root root 19220 Aug 10 15:58 telemetry_pb2.py #decode gpb-kv messages, generate as below
grpc-dailout.zip
Install Protobuf of python version
完整阅读