2010年11月16日 星期二

[電腦] Linux下查看HBA卡WWN

1. 在RedHat環境已測試正常可用。
>systool -av -c fc_host
可以看到每個Port的詳細資訊。

2. Debian或Ubuntu的環境,我在主機建置好後再測試。

2010年11月12日 星期五

[電腦] Debian網卡順序

        網路卡順序如何調整?在Debian(Ubuntu亦同)環境之下,當你更換了網路卡或是增添了新卡,或者是有On board的網卡跟另外再接的網卡,有順序調換的需求(如eth0與eth1要對調),可以使用以下方法來完成。
   
>vi /etc/udev/rules.d/70-persistent-net.rules
# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.

# PCI device 0x14e4:0x16fd (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:d4:3d:ff:cc", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x4222 (iwl3945)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:02:be:92:0e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
/etc/udev/rules.d/70-persistent-net.rules (END)

1. 當只有一張網卡,在抽換網卡後,網路介面跳至eth1以上,欲使用回eth0的方法:
我們可以將eth0的MAC Address的部份拿掉,使得新網卡在系統檢查MAC Address時,不會因為MAC Address不相符而新建eth1。

# PCI device 0x14e4:0x16fd (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*, ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"



2. 當有兩張以上的網卡,我們就可以指定哪一張網卡要使用哪個介面的代號。只要指定更動NAME="ethx"的選項即可。