Files
Obsidian/红黑隔离测试.md
2025-08-23 15:15:57 +08:00

81 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

将AP的ip设置为1.1
``` bash
ifconfig eth0 192.168.1.1 up
ip route add default via 192.168.1.3 dev eth0
```
开启红黑隔离
``` bash
echo -e "AT+GMAC=12,1\r" > /dev/ttyS4
```
关闭红黑隔离
``` bash
echo -e "AT+GMAC=12,0\r" > /dev/ttyS4
```
开启cp网卡
``` bash
echo -e "at+gmac=1,2\r" > /dev/ttyS4
```
设置ap地址
``` bash
echo -e "AT+GMAC=11,154,42,22,189,195,194\r" > /dev/ttyS4 #原AP
```
``` bash
echo -e "AT+GMAC=11,122,90,221,216,73,170\r" > /dev/ttyS4 #新AP
```
``` bash
echo -e "AT+GMAC=11,108,31,247,37,159,211\r" > /dev/ttyS4 #pc
```
cp灌包
``` bash
echo -e "at+gmac=2\r" > /dev/ttyS4
```
查看CP收包数
``` bash
echo -e "AT+GMAC=6\r" > /dev/ttyS4
```
关闭回环
``` bash
echo -e "at+gmac=13,0\r" > /dev/ttyS4
```
AP开启rbnetCP开启回环后执行
``` bash
ethtool -K eth0 rx-checksum off
ethtool -K eth1 rx-checksum off
```
AP收灌包
``` bash
iperf-2.0.5 -s -u -i 1
```
AP设置CP的静态ARP
``` bash
arp -s 192.168.1.3 04:05:06:07:08:09
```
AP向CP灌包
``` bash
iperf -c 192.168.1.3 -u -b 100m -i 1 -t 30
```
``` bash
echo -e "AT+CTRL0=0\r" > /dev/ttyS4
```
AQ指令
``` bash
AQ+CKST?\r\n
```
``` bash
echo -e "AT+XWLOCKSAT=19,1,1,1696664,0" > /dev/ttyS4
```
``` bash
echo -e "at+cfun=1" > /dev/ttyS4
```
AQ+MAC=02:03:03:03:03:02
AQ+CFGIP=1,192.168.1.1\r\n
iperf-2.0.5 -c 192.168.1.3 -p 5001 -i 1 -t 10
iperf-2.0.5 -c 192.168.1.3 -u -b 100m -i 1 -t 10