[红帽企业Linux.6.4.服务器版].rhel-server-6.4-x86_64-dvd(ED2000.COM)
Redhat系统下载地址:链接:http://pan.baidu.com/s/1gdYff0n 密码:4mtt
eth0: ethernet的简写,一般用于以太网接口。
wifi0:wifi是无线局域网,因此wifi0一般指无线网络接口。
ath0: Atheros的简写,一般指Atheros芯片所包含的无线网络接口。
lo: local的简写,一般指本地环回接口。
查看网卡所有网卡信息
命令如下:
[root@Chris ~]# ifconfig -a
显示如下:
[root@Chris ~]# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:0C:29:01:EF:49 inet addr:192.168.80.100 Bcast:192.168.80.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe01:ef49/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:76 errors:0 dropped:0 overruns:0 frame:0 TX packets:56 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:7615 (7.4 KiB) TX bytes:6492 (6.3 KiB) 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:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
一:临时关闭网卡:
命令如下:
sudo ifconfig eth0 down
二:临时启用网卡:
命令如下:
sudo ifconfig eth0 up
一:启用网卡
命令如下:
sudoifconfig eth0 up
二:临时配置eth0网卡IP地址
命令如下:
ifconfig eth0 192.168.1.10 broadcast192.168.1.255 netmask 255.255.255.0
IP配置:192.168.1.10
广播地址配置(broadcast):192.168.1.255
子网掩码配置(netmask):255.255.255.0
三:临时添加网关
命令如下:
route add default gw 192.168.1.1
一:eth0网卡配置多个IP地址
命令如下:
ifconfig eth0:1 192.168.80.201
ifconfig eth0:2 192.168.80.202
显示如下:
[root@Chris ~]# ifconfig eth0:1 eth0:1 Link encap:Ethernet HWaddr 00:0C:29:01:EF:49 inet addr:192.168.80.201 Bcast:192.168.80.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 [root@Chris ~]# ifconfig eth0:2 eth0:2 Link encap:Ethernet HWaddr 00:0C:29:01:EF:49 inet addr:192.168.80.202 Bcast:192.168.80.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
1.4永久修改IP地址
本文出自 “Chris” 博客,请务必保留此出处http://liwenxuan.blog.51cto.com/7992676/1725622
原文:http://liwenxuan.blog.51cto.com/7992676/1725622