7.05.2015

vconfig

兩個半月前,在工作上遇到VLAN的功能,剛好不小心知道了在Linux下有一個vconfig的指令,就把它先註記了下來!!

NAME
  vconfig - VLAN (802.1q) configuration program.

SYNOPSIS
  vconfig [lots of long options]

DESCRIPTION
  vconfig程式允許你在一個已經啟動VLAN功能的Linux核心上去建立和移除VLAN的設備。所謂的VLAN設備,是在實體的區域網路上呈現虛擬區域網路的乙太網路設備。
  The vconfig program allows you to create and remove VLAN-devices on a VLAN enabled kernel. VLAN-devices are virtual ethernet devices which represents the virtual LANs on the physical LAN.

OPTIONS
  add [interface-name][vlan-id]
    在[interface-name]上建立一個VLAN設備。VLAN設備將依據協定設定的名稱結果來命名。
    Creates a VLAN-device on [interface-name]. The resulting VLAN-device will be called according to the nameing convention set.

  rem [vlan-device]
    移除VLAN設備的名稱。
    Removes the named VLAN-device.

  set_flag [vlan-device] 0 | 1
    設成1的時後,乙太網路表頭重新排序的功能被打開。轉儲存的設備將顯示為沒有VLAN功能的一般乙太網路設備。然而,當設成0的時後 (預設值),乙太網路表頭不會重新排序,這將導致轉儲存的設備的封包會加上VLAN標籤。通常預設值是沒問題的,但遇到一些封包過濾程式可能會有問題。
    When 1, Ethernet header reorders are turned on. Dumping the device will appear as a common Ethernet device without VLANs. When 0 (default) however, Ethernet headers are not reordered, which results in VLAN tagged packets when dumping the device. Usually the default gives no problems, but some packet filtering programs might have problems with it.

  set_egress_map [vlan-device][skb-priority] [vlan-qos]
    這個旗標是指,往外送的封包要帶有一個特別的Skb-Priority,而這個Skb-Priority是帶有特別的VLAN-QoS的VLAN優先等級。預設的VLAN優先等級是0。
    This flags that outbound packets with a particular skb-priority should be tagged with the particular VLAN priority VLAN-QoS. The default VLAN priority is 0.

  set_ingress_map [vlan-device][skb-priority][vlan-qos]
    這個旗標是指,往內送的封包要帶有一個特別VLAN-QoS優先等級,而這個VLAN-QoS等級應該被排列在特別的Skb-priority。預設的Skb-Priority值是0。
    This flags that inbound packets with the particular VLAN priority VLAN-QoS should be queued with a particular skb-priority. The default skb-priority is 0.

  set_name_type VLAN_PLUS_VID | VLAN_PLUS_VID_NO_PAD | DEV_PLUS_VID | DEV_PLUS_VID_NO_PAD
    建立VLAN設備名稱的方法。使用不帶參數的vconfig指令來看看不一樣的格式。
    Sets the way VLAN-device names are created. Use vconfig without arguments to see the different formats.

  NOTES VLAN will use Broadcom’s NICE interface when the network device supports it. This is necessary, since usually the hardware of these devices already removes the vlan tag from the ethernet packet. The set_flag option on vlan-devices created on such a physical network device will be ignored. Dumping the network-device will show only untagged (non-vlan) traffic, and dumping the vlan-devices will only show traffic intended for that vlan, without the tags.

FILES
  / proc / net / vlan / config
  / proc / net / vlan / [vlan-device]

SEE ALSO
  ip(8), ifconfig(8)

AUTHORS
  This manual page was written by Ard van Breemen <ard@kwaak.net>
  The vlan patch is written by Ben Greear <greearb@candelatech.com>

沒有留言:

張貼留言