• AIX 5L网卡管理与配置


    Piner写过一篇文章介绍AIX中网卡的管理和配置,这里想补充一些相关的信息。本文中所有试验都基于AIX 5.3。

    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 0×000000000000 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等命令入口

    本文网址:http://www.ningoo.net/html/2007/aix_5l_network_interface.html

  • 相关阅读:
    python找出数组中第二大的数
    【高并发解决方案】5、如何设计一个秒杀系统
    如何找出单链表中的倒数第k个元素
    二叉树的前序,中序,后序遍历
    剑指Offer题解(Python版)
    python之gunicorn的配置
    python3实现字符串的全排列的方法(无重复字符)
    python实现斐波那契数列
    每天一个linux命令(56):netstat命令
    每天一个linux命令(55):traceroute命令
  • 原文地址:https://www.cnblogs.com/sopost/p/2190096.html
Copyright © 2020-2023  润新知