1.查看物理网卡信息
lsdev -Cc adapter
ent0 Defined 03-00 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
ent1 Defined 03-01 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
ent2 Defined 03-02 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
ent3 Defined 03-03 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
ent4 Defined 05-00 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
ent5 Defined 05-01 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
ent6 Defined 05-02 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
ent7 Defined 05-03 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
ent8 Defined 0B-00 4-Port 10/100/1000 Base-TX PCI-Express Adapter (14106803)
ent9 Defined 0B-01 4-Port 10/100/1000 Base-TX PCI-Express Adapter (14106803)
ent10 Defined 0C-00 4-Port 10/100/1000 Base-TX PCI-Express Adapter (14106803)
ent11 Defined 0C-01 4-Port 10/100/1000 Base-TX PCI-Express Adapter (14106803)
ent12 Available 0E-00 4-Port 10/100/1000 Base-TX PCI-Express Adapter (14106803)
ent13 Available 0E-01 4-Port 10/100/1000 Base-TX PCI-Express Adapter (14106803)
ent14 Available 0F-00 4-Port 10/100/1000 Base-TX PCI-Express Adapter (14106803)
ent15 Available 0F-01 4-Port 10/100/1000 Base-TX PCI-Express Adapter (14106803)
fcs0 Available 04-00 4Gb FC PCI Express Adapter (df1000fe)
fcs1 Available 04-01 4Gb FC PCI Express Adapter (df1000fe)
fcs2 Available 06-00 PCI Express 4Gb FC Adapter (77103224)
fcs3 Available 06-01 PCI Express 4Gb FC Adapter (77103224)
sissas0 Available 00-00 PCIe x4 Planar 3Gb SAS Adapter
sissas1 Defined 02-00 PCIe x4 Internal 3Gb SAS Adapter
usbhc0 Available 09-08 USB Host Controller (33103500)
usbhc1 Available 09-09 USB Host Controller (33103500)
usbhc2 Available 09-0a USB Enhanced Host Controller (3310e000)
vsa0 Available LPAR Virtual Serial Adapte
2.查看逻辑接口
lsdev -Cc if
en12 Available 0E-00 Standard Ethernet Network Interface
en13 Defined 0E-01 Standard Ethernet Network Interface
en14 Defined 0F-00 Standard Ethernet Network Interface
en15 Defined 0F-01 Standard Ethernet Network Interface
et12 Defined 0E-00 IEEE 802.3 Ethernet Network Interface
et13 Defined 0E-01 IEEE 802.3 Ethernet Network Interface
et14 Defined 0F-00 IEEE 802.3 Ethernet Network Interface
et15 Defined 0F-01 IEEE 802.3 Ethernet Network Interface
lo0 Available Loopback Network Interface
这里显示en和et可以看见各自封装的协议不同,配置网络时,选择标准的网络协议,配置en en0是Ethernet II protocal interface et0是802.3 protocal interface 如果配置et逻辑接口,丢包率为50%!系统会认为两张不同的网卡,配置了同一个IP地址!
3.查看网卡和网口的物理位置
lscfg -vpl ent12
ent12 U78AA.001.WZSKYC2-P1-C3-T1 4-Port 10/100/1000 Base-TX PCI-Express Adapter (14106803)
4-P NIC-TX PCI-E:
EC Level....................D77176
Part Number.................00E0838
Manufacture ID..............YL1026
FRU Number..................00E0838
Network Address.............3440B5F36341
ROM Level.(alterable).......CL0180
Hardware Location Code......U78AA.001.WZSKYC2-P1-C3-T1
PLATFORM SPECIFIC
Name: ethernet Node: ethernet@0 Device Type: network Physical Location: U78AA.001.WZSKYC2-P1-C3-T1
4.配置en12接口网络
利用smit工具配置网络
smit tcpip
Move cursor to desired item and press Enter.
选择 Minimum Configuration & Startup
Further Configuration
Use DHCP for TCPIP Configuration & Startup
IPV6 Configuration
Quality of Service Configuration & Startup
Configure IP Security (IPv4)
Configure IP Security (IPv6)
选择要配置的网络en12
配置IP地址、掩码以及网关
输入完成后,按Enter
至此,IP地址已配置完成,esc+0退出smit 利用ifconfig -a 查看配置是否生效
ifconfig -a
en12: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>
inet 192.168.2.100 netmask 0xffffff00 broadcast 192.168.2.255
tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
inet6 ::1%1/0
tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
查看路由信息
netstat -rn
Routing tables
Destination Gateway Flags Refs Use If Exp Groups
Route Tree for Protocol Family 2 (Internet):
default 192.168.2.254 UG 2 120 en12 - -
127/8 127.0.0.1 U 3 12964 lo0 - -
192.168.2.0 192.168.2.100 UHSb 0 0 en12 - - =>
192.168.2/24 192.168.2.100 U 1 0 en12 - -
192.168.2.100 127.0.0.1 UGHS 1 56 lo0 - -
192.168.2.255 192.168.2.100 UHSb 2 72 en12 - -
Route Tree for Protocol Family 24 (Internet v6):
::1%1 ::1%1 UH 1 931 lo0 - -
关闭防火墙
测试网络连通性
ping 192.168.2.254
PING 192.168.2.254: (192.168.2.254): 56 data bytes
64 bytes from 192.168.2.254: icmp_seq=0 ttl=255 time=0 ms
64 bytes from 192.168.2.254: icmp_seq=1 ttl=255 time=0 ms
64 bytes from 192.168.2.254: icmp_seq=2 ttl=255 time=0 ms
64 bytes from 192.168.2.254: icmp_seq=3 ttl=255 time=0 ms
^C
--- 192.168.2.254 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms
命令临时配置网络
命令永久配置网络
chdev -l en14 -a netaddr=192.168.3.100 -a netmask=255.255.255.0 -a state=up