全站文章页内部300*250广告位
# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1A:64:44:AC:34
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
eth1 Link encap:Ethernet HWaddr 00:1A:64:44:AC:35
inet addr:9.114.70.151 Bcast:9.114.70.255 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12337126 errors:0 dropped:0 overruns:0 frame:0
TX packets:6250179 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17295472097 (16.1 GiB) TX bytes:673204981 (642.0 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:20168 errors:0 dropped:0 overruns:0 frame:0
TX packets:20168 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1989243 (1.8 MiB) TX bytes:1989243 (1.8 MiB)
清单 4 为命令在 AIX 6.1 上的运行结果,其显示两个以太网络接口,均配置了 IP 地址并启用。AIX 5.3 上的输出格式与之一样。
清单 4. 在 AIX 6.1 系统上查看网络接口状态
# ifconfig – a
en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,
CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>
inet 9.114.124.9 netmask 0xffffff00 broadcast 9.114.124.255
tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
en1: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,
CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>
inet 192.168.124.9 netmask 0xffffff00 broadcast 192.168.124.255
tcp_sendspace 262144 tcp_recvspace 131072 rfc1323 1
lo0: flags=e08084b<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT>
inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
inet6 ::1/0
tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
查看网络接口连接属性
网络接口连接属性包括连接模式、连接速度、链路状态、协商方式等。
Linux 上用于查询及设置以太网卡参数的一个常用命令是 ethtool,它可以获取网卡的各种详细的诊断信息,包括连接模式(全双工 / 半双工)、连接速度(10M/100M/1000M 等)、是否支持自动协商等、链路状态、驱动版本、总线位置等等。ethtool 的查询以及配置功能需要相应网卡设备驱动的支持,从本质上说,ethtool 的功能是调用驱动提供的 ethtool 接口,来实现用户所要求的操作。基本上,Linux 2.4 以上内核的网卡驱动均支持这个命令。但根据具体驱动的不同,显示的信息可能大同小异。
清单 5. 在 RHEL5.3 系统上查看网络适配器连接属性
# ethtool eth1
Settings for eth1:
Supported ports: [ FIBRE ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Current message level: 0x000000cc (204)
Link detected: yes
上一页 [1] [2] [3] 下一页
责任编辑:小草