Linux查看网关、子网掩码、IP、广播地址

Linux查看网关、子网掩码、IP、广播地址

[root@glnode04 vm01-CentOS-5.5]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=10.10.111.4     IP地址
NETMASK=255.255.0.0    子网掩码
GATEWAY=10.10.11.254   网关
TYPE=Ethernet
USERCTL=no
IPV6INIT=yes
PEERDNS=yes

[root@glnode04 vm01-CentOS-5.5]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1D:7D:48:38:7A 
          inet addr:10.10.111.4  Bcast:10.10.255.255  Mask:255.255.0.0   网卡eth0的IP、广播地址、子网掩码
          inet6 addr: fe80::21d:7dff:fe48:387a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:106320 errors:0 dropped:0 overruns:0 frame:0
          TX packets:86190 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:35816363 (34.1 MiB)  TX bytes:118782254 (113.2 MiB)

你可能感兴趣的:(Linux,linux,up)