【Linux】Linux網路配置基礎2 system-config-network配置網路卡訪問外網

海星星hktk發表於2016-01-18
Linux網路配置基礎2
system-config-network配置網路卡訪問外網

OS:Red Hat Enterprise Linux 6.4

當前電腦無線網路卡使用DHCP自動獲取,可以訪問網際網路(外網)





1 禁用NetworkManager

[root@rhel64 ~]# service NetworkManager status
[root@rhel64 ~]# chkconfig --list NetworkManager


如果沒有禁用 使用一下命令關閉、禁用
[root@rhel64 ~]# service NetworkManager stop
[root@rhel64 ~]# chkconfig NetworkManager off


2 正常關閉作業系統

[root@rhel64 ~]# init 0

[root@rhel64 ~]# shutdown -h now


3 啟動網路卡2 橋接無線網路卡



4 啟動虛擬機器 檢視網路卡資訊

[root@rhel64 ~]# ifconfig


[root@rhel64 ~]# ifconfig -a


[root@rhel64 ~]# ls /etc/sysconfig/network-scripts/ifcfg-eth*

當前linux能夠識別到網路卡存在eth1 ,使用ifconfig -a可以檢視
但沒有具體配置檔案。
使用ifconfig eth1 up 啟用eth1後,ifconfig可以檢視,但無ip資訊。
[root@rhel64 ~]# ifconfig eth1 up
[root@rhel64 ~]# ifconfig




5 使用system-config-network 配置網路卡
5.1 設定當前會話字元編碼為UTF-8


[root@rhel64 ~]# system-config-network




5.2 檢視eth0配置




5.3 增加裝置配置eth1 配ip













5.4 重啟network服務

[root@rhel64 ~]# service network restart





5.5 檢視ip及配置檔案變化
[root@rhel64 ~]# ifconfig



[root@rhel64 ~]# cat /etc/sysconfig/network

全域性配置檔案中GATEWAY一項被刪除

[root@rhel64 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1



[root@rhel64 ~]# cat /etc/resolv.conf


[root@rhel64 ~]# route -n
[root@rhel64 ~]# ip route




5.6 網路訪問測試
win7  cmd執行 ping命令 測試   能夠ping通eth1地址


linux ping 外網訪問測試  能夠ping通
[root@rhel64 ~]# ping www.baidu.com -c4



6 使用瀏覽器訪問外網



6.1 設定中文拼音輸入法
ctrl + 空格  切換輸入法
shift   切換中英文










6.2 flash-plugin外掛
檢視網路視訊缺少外掛 可以yum安裝flash-plugin
[root@rhel64 ~]# yum install flash*





呂星昊
2016.1.18

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29475508/viewspace-1978204/,如需轉載,請註明出處,否則將追究法律責任。

相關文章