分类:
2008-07-31 15:31:30
Type: P51
-bash-3.00# uname -a
AIX p51a3 1 6 00C02EC24C00
-bash-3.00# lsslot -c phb
PHB Name Description Device(s)
PHB 2 Logical PCI Host Bridge pci0
U788C.001.AAC1135-P1-T1 pci3 ent0 ent1
U788C.001.AAC1135-P1-T3 pci4 usbhc0 usbhc1
U788C.001.AAC1135-P1-T12 pci5 ide0
U788C.001.AAC1135-P1-T10 pci6 sisscsia0
U788C.001.AAC1135-P1-C14-C1 pci7 ent2 ent3
PHB 3 Logical PCI Host Bridge pci1 ent4 ent5
PHB 4 Logical PCI Host Bridge pci2 fcs0 fcs1
-bash-3.00# uname -a
AIX p51a3 1 6 00C02EC24C00
很奇怪的两点:
正像上面输出的一样,en0,en1在一个网卡上,en2,en3在一个网卡上,en4,en5在一个网卡上,
1) en0和en2,en4接有网线,并接通(网卡灯亮)
尝试给en1加载IP
#chdev -l en1 -a netaddr=’10.200.59.239’ -a netmask=’255.255.248.0’
en1 changed
#chdev -l en1 -a netaddr=’10.200.59.238’ -a netmask=’255.255.248.0’
en1 changed
-bash-3.00# ifconfig -a
en0: flags=5e080863,c0
inet 10.200.59.233 netmask 0xfffff800 broadcast 10.200.63.255
tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
en1: flags=5e080862,c0
inet 10.200.59.239 netmask 0xffffff00 broadcast 10.200.59.255
en2: flags=5e080862,c0
inet 10.200.59.238 netmask 0xffffff00 broadcast 10.200.59.255
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
奇怪的事发生了:
从别的主机上ping
root@lxsfrac04 # ping 10.200.59.239
10.200.59.239 is alive
root@lxsfrac04 # ping 10.200.59.238
no answer from 10.200.59.238
即未接网线的en2(10.200.59.239)可以ping 通,但en3(10.200.59.238)不通。
将en1和en2 up后
-bash-3.00# ifconfig en1 up
-bash-3.00# ifconfig en2 up
-bash-3.00# ifconfig -a
en0: flags=5e080863,c0
inet 10.200.59.233 netmask 0xfffff800 broadcast 10.200.63.255
tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
en1: flags=5e080863,c0
inet 10.200.59.239 netmask 0xffffff00 broadcast 10.200.59.255
en2: flags=5e080863,c0
inet 10.200.59.238 netmask 0xffffff00 broadcast 10.200.59.255
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
从外机ping的结果依旧如此。
root@lxsfrac04 # ping 10.200.59.238
^C
root@lxsfrac04 # ping 10.200.59.239
10.200.59.239 is alive
更奇怪的是en1和en2是处于stop状态
root@p51a3 # lsdev -Cc if
en0 Available 03-08 Standard Ethernet Network Interface
en1 Stopped 03-09 Standard Ethernet Network Interface
en2 Stopped 07-08 Standard Ethernet Network Interface
en3 Defined 07-09 Standard Ethernet Network Interface
en4 Defined 01-08 Standard Ethernet Network Interface
en5 Defined 01-09 Standard Ethernet Network Interface
et0 Defined 03-08 IEEE 802.3 Ethernet Network Interface
et1 Defined 03-09 IEEE 802.3 Ethernet Network Interface
et2 Defined 07-08 IEEE 802.3 Ethernet Network Interface
et3 Defined 07-09 IEEE 802.3 Ethernet Network Interface
et4 Defined 01-08 IEEE 802.3 Ethernet Network Interface
et5 Defined 01-09 IEEE 802.3 Ethernet Network Interface
lo0 Available Loopback Network Interface
2) 取消IP地址,为啥从ifconfig 来看总是不成功
#chdev -l en1 -a netaddr=” -a netmask=”
-bash-3.00# chdev -l en1 -a netaddr='' -a netmask=''
en1 changed
-bash-3.00# ifconfig -a
en0: flags=5e080863,c0
inet 10.200.59.233 netmask 0xfffff800 broadcast 10.200.63.255
tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
en1: flags=5e080862,c0
inet 10.200.59.239 netmask 0xffffff00 broadcast 10.200.59.255
en2: flags=5e080863,c0
inet 10.200.59.238 netmask 0xffffff00 broadcast 10.200.59.255
en3: flags=5e080863,c0
en4: flags=5e080863,c0
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
3)用ifconfig 可以随意up网卡吗?
------------------------------------------------------------------------------------------------------------------------------------------------------------
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.
---------------------------------------------------------------------------------------------------------------------------------------------------------
而我在aix 6.1上可以随便up起任何网卡
-bash-3.00# ifconfig en3 up
-bash-3.00# ifconfig en4 up
-bash-3.00# ifconfig -a
en0: flags=5e080863,c0
inet 10.200.59.233 netmask 0xfffff800 broadcast 10.200.63.255
tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
en1: flags=5e080863,c0
inet 10.200.59.239 netmask 0xffffff00 broadcast 10.200.59.255
en2: flags=5e080863,c0
inet 10.200.59.238 netmask 0xffffff00 broadcast 10.200.59.255
en3: flags=5e080863,c0
en4: flags=5e080863,c0
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