12月 27th, 2022
问题
在使用NE40e后,SSH Session中通过“上”、”下”回滚长命令总会遇到显示问题,必须多按几个回车才能刷掉显示乱的屏幕,如下所示:
此问题困扰我很长时间了,一直没仔细研究过,这次趁着有些时间想彻底把这个问题解决下。下面是整个ssh的过程:
SCRT ----- 1st 跳板机 ----- 2nd 跳板机 ----- NE40E
解决
通过对比发现只有当通过脚本登录NE40E时才会有此问题,如果直接SSH登录NE40E就不会有问题,那么问题跟脚本相关么?
完整阅读
9月 6th, 2022
Background
实验环境打算用trex打流,然后用下面环境测试cable,但物理server配置好路由后,发现只能收路由,不转发流量,我们确认已经开启了ipv4转发的指令,路由也是正常的,但就是不work,所以我在EVE NG的环境上搭了一个类似的环境,确认下是否是trex本身的问题;
# sysctl -a |grep net.ipv4.conf.all.forwarding
net.ipv4.conf.all.forwarding = 1
对于trex内容,请看我之前的相关文章:http://www.zhaocs.info/tag/trex ;
完整阅读
9月 7th, 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 '^]'.
那么需要怎么做才能修复此问题呢?
完整阅读
8月 9th, 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
完整阅读
7月 30th, 2020
The Linux come from by my compiled kernel that supports uSID, please check my last blog: Compile SRv6 uSID and VPP on ubuntu 20.04
Before doing SRv6 lab, please double confirm enable the function by following cmd:
sysctl -w net.ipv6.conf.all.forwarding=1
sysctl -w net.ipv4.conf.all.forwarding=1
sysctl -w net.ipv6.conf.all.seg6_enabled=1
Check by following cmd:
root@vm1:/home/cisco# sysctl -a |grep net.ipv6.conf.all.forwarding
net.ipv6.conf.all.forwarding = 1
Above cmd will disappear after reboot, you can permanently write to “/etc/sysctl.conf”.
Btw, how to config srv6 and usid, reference follows:
SRv6 uSID Linux Iproute2
SRv6 – Linux Kernel Implementation
Topology
完整阅读