AIX 5L網路卡管理與配置

cccgw發表於2008-07-09

by ningoo

[@more@]

AIX中檢視系統中的網路卡裝置

#lsdev -Cc adapter | grep ent
ent0 Available 00-08 10/100/1000 Base-TX PCI-X Adapter (14106902)
ent1 Available 07-08 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
ent2 Available 07-09 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
ent3 Available 0B-08 10/100/1000 Base-TX PCI-X Adapter (14106902)
ent4 Available EtherChannel / IEEE 802.3ad Link Aggregation

從上面可以看出,系統中共有四塊網路卡(ent0~ent3,而ent4是由多塊網路卡繫結出來的虛擬網路卡EtherChannel,關於網路卡繫結,請參考piner的另一篇文章

那麼,四塊網路卡具體是插在哪個插槽上的呢?

#lsslot -c pci | grep ent
U787B.001.DNW6FCB-P1-C2 PCI-X capable, 64 bit, 133MHz slot ent3
U787B.001.DNW6FCB-P1-C3 PCI-X capable, 64 bit, 266MHz slot ent0

上述命令顯示的是插在PCI插槽上的兩塊網路卡,都是在第一個PCI籠子中,分別在第二個和第三個插槽。另外兩塊則是主機板上內建的網路卡,不是插在PCI槽上的。

#lscfg -v | grep ent
Model Implementation: Multiple Processor, PCI bus
ent1 U787B.001.DNW6FCB-P1-T9 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
ent2 U787B.001.DNW6FCB-P1-T10 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
ent3 U787B.001.DNW6FCB-P1-C2-T1 10/100/1000 Base-TX PCI-X Adapter (14106902)
ent0 U787B.001.DNW6FCB-P1-C3-T1 10/100/1000 Base-TX PCI-X Adapter (14106902)

AIX中,一個網路卡在系統中實際上可以看到兩個裝置介面,en開頭的是Ethernet II標準的,et開頭的是IEEE 802.3標準的。乙太網的幀有兩種標準:Ethernet II(或者叫Standard Ethernet)和IEEE802.3,兩者主要是標誌幀的上層協議的方式不一樣,Ethernet II使用了一個TYPE值表示,而IEEE802.3則使用一個資料LENGTH表示。一般來說,Ethernnet II更常用。

#lsdev -Cc if
en0 Defined 00-08 Standard Ethernet Network Interface
en1 Defined 07-08 Standard Ethernet Network Interface
en2 Defined 07-09 Standard Ethernet Network Interface
en3 Defined 0B-08 Standard Ethernet Network Interface
en4 Available Standard Ethernet Network Interface
et0 Defined 00-08 IEEE 802.3 Ethernet Network Interface
et1 Defined 07-08 IEEE 802.3 Ethernet Network Interface
et2 Defined 07-09 IEEE 802.3 Ethernet Network Interface
et3 Defined 0B-08 IEEE 802.3 Ethernet Network Interface
et4 Defined IEEE 802.3 Ethernet Network Interface
lo0 Available Loopback Network Interface

其中lo0表示本地迴環介面,也就是127.0.0.1

檢視某塊網路卡的具體屬性

#lsattr -El ent1
alt_addr 0x000000000000 Alternate ethernet address True
busintr 273 Bus interrupt level False
busmem 0xf8120000 Bus memory address False
chksum_offload yes Enable hardware transmit and receive checksum True
compat_mode no Gigabit Backward compatability True
copy_bytes 2048 Copy packet if this many or less bytes True
delay_open no Enable delay of open until link state is known True
failback yes Enable auto failback to primary True
failback_delay 15 Failback to primary delay timer True
failover disable Enable failover mode True
flow_ctrl yes Enable Transmit and Receive Flow Control True
intr_priority 3 Interrupt priority False
intr_rate 10000 Max rate of interrupts generated by adapter True
jumbo_frames no Transmit jumbo frames True
large_send yes Enable hardware TX TCP resegmentation True
media_speed Auto_Negotiation Media speed True
rom_mem 0xf80c0000 ROM memory address False
rx_hog 1000 Max rcv buffers processed per rcv interrupt True
rxbuf_pool_sz 2048 Rcv buffer pool, make 2X rxdesc_que_sz True
rxdesc_que_sz 1024 Rcv descriptor queue size True
slih_hog 10 Max Interrupt events processed per interrupt True
tx_que_sz 8192 Software transmit queue size True
txdesc_que_sz 512 TX descriptor queue size True
use_alt_addr no Enable alternate ethernet address True

檢視某個網路卡裝置介面的屬性

#lsattr -El en0
alias4 IPv4 Alias including Subnet Mask True
alias6 IPv6 Alias including Prefix Length True
arp on Address Resolution Protocol (ARP) True
authority Authorized Users True
broadcast Broadcast Address True
mtu 1500 Maximum IP Packet Size for This Device True
netaddr Internet Address True
netaddr6 IPv6 Internet Address True
netmask Subnet Mask True
prefixlen Prefix Length for IPv6 Internet Address True
remmtu 576 Maximum IP Packet Size for REMOTE Networks True
rfc1323 Enable/Disable TCP RFC 1323 Window Scaling True
security none Security Level True
state down Current Interface Status True
tcp_mssdflt Set TCP Maximum Segment Size True
tcp_nodelay Enable/Disable TCP_NODELAY Option True
tcp_recvspace Set Socket Buffer Space for Receiving True
tcp_sendspace Set Socket Buffer Space for Sending True
#lsattr -El et0
alias4 IPv4 Alias including Subnet Mask True
alias6 IPv6 Alias including Prefix Length True
arp on Address Resolution Protocol (ARP) True
authority Authorized Users True
broadcast Broadcast Address True
mtu 1492 Maximum IP Packet Size for This Device True
netaddr Internet Address True
netaddr6 IPv6 Internet Address True
netmask Subnet Mask True
prefixlen Prefix Length for IPv6 Internet Address True
remmtu 576 Maximum IP Packet Size for REMOTE Networks True
rfc1323 Enable/Disable TCP RFC 1323 Window Scaling True
security none Security Level True
state down Current Interface Status True
tcp_mssdflt Set TCP Maximum Segment Size True
tcp_nodelay Enable/Disable TCP_NODELAY Option True
tcp_recvspace Set Socket Buffer Space for Receiving True
tcp_sendspace Set Socket Buffer Space for Sending True

修改介面屬性,比如設定IP和子網掩碼

#chdev -l en1 -a netaddr='192.168.1.1' -a netmask='255.255.255.0'

而ifconfig只能檢視和修改網線已經連線好的網路卡資訊

#ifconfig -a
en4: flags=5e080863,c0
inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
tcp_sendspace 131072 tcp_recvspace 65536
lo0: flags=e08084b
inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
inet6 ::1/0
tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

如果使用ifconfig操作沒有連線網路的網路卡則會報錯

#ifconfig en1 up
0821-510 ifconfig: error calling entry point for /usr/lib/drivers/if_en: The specified device does not exist.

smit操作網路卡相關命令

  • smit mkinet新增新的網路卡介面
  • smit chinet配置網路卡介面
  • smit tcpip配置tcpip網路
  • smit mktcpip配置IP地址
  • smit chgenet配置網路卡裝置
  • smit rminet刪除網路卡介面
  • smit etherchannel配置網路卡繫結
  • smit inet配置網路卡介面,包括mkinet,chinet,rminet等命令入口

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/668365/viewspace-1007006/,如需轉載,請註明出處,否則將追究法律責任。

相關文章