跳至主要内容

ethtousb 指令

使用 ethtousb 指令可顯示和配置乙太網路至 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