跳到主要内容

ethtousb 命令

使用 ethtousb 命令可显示并配置 Ethernet - Ethernet over USB 端口映射。

此命令允许您将外部以太网端口号映射到不同的 Ethernet-over-USB 端口号。

语法:
ethtousb [-options]
表 1. ethtousb 命令
选项描述
-enEthernet-over-USB 状态。enabled, disabled
可通过 usbeth 启用 Ethernet over USB 接口,使端口映射生效。
-m[x] port1:port2配置索引 x 的端口映射。

其中:

  • 端口索引号 x 在命令选项中指定为 1 到 10 之间的整数。
  • 端口对的 port1 是外部以太网端口号。
  • 端口对的 port2 是 Ethernet-over-USB 端口号。
-rm map_index删除指定索引的端口映射。

端口索引号 map_index 在命令选项中指定为 1 到 10 之间的整数。

不带任何选项的 ethtousb 命令用于显示端口映射索引。
示例:
system> ethtousb -en enabled
ok
system> ethtousb -m10 2001:2002
ok
system> ethtousb
ethtousb : On
===============
1: 0: 0
2: 0: 0
3: 0: 0
4: 0: 0
5: 0: 0
6: 0: 0
7: 0: 0
8: 0: 0
9: 0: 0
10: 2001: 2002