歡迎您光臨本站 註冊首頁

懸賞100圓求解Linux下不能上網的問題!

←手機掃碼閱讀     火星人 @ 2014-03-23 , reply:0

引自:http://www.linuxdiyf.com/bbs/vie ... 2341&extra=page%3D1


請大家一起幫幫忙!!在此先謝謝個位!

Linux下不能 上網的問題!


大家好!!
我是一個初學LINUX的小菜。
我安裝的LINUX不能上網不知道那位高手能指點一下。
小弟不勝感激!
事先申明我已看過網上很多有關的資料,可就是未能決絕問題。
首先看一下我的配置:雙網卡(SiS 900-Based PCI Fast Ethernet Adapter和Realtek RTL8139 Family PCI Fast Ethernet NIC )
Mode是華為技術有限公司出品的數據機
型號是SmartAXMT800
(上面還有互聯星空字樣。)
設備名稱為WAN微型埠(PPPOE)

主域伺服器 61.235.70.98
從域伺服器 211.98.4.1


Linux下的相關信息:

** Summary of what you entered **

Ethernet Interface: eth1
User name: root
Activate-on-demand: No
Primary DNS: 222.39.47.50
Secondary DNS: 222.39.47.51
Firewalling: STANDALONE
User Control: yes
Accept these settings and adjust configuration files (y/n)?

[[email protected] ~]# adsl-start

sbin/adsl-start: line 215: 23526 Terminated $CONNECT "[email protected]" >/dev/null 2>&1

[[email protected] ~]# adsl-status
adsl-status: Link is down (can't read pppoe PID file /var/run/pppoe-adsl.pid.pppoe)


netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost.localdomain:50000 localhost.localdomain:32768 ESTABLISHED
tcp 0 0 localhost.localdomain:32768 localhost.localdomain:50000 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
unix 8 [ ] DGRAM 2348 /dev/log
unix 3 [ ] STREAM CONNECTED 233305 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 233304
unix 3 [ ] STREAM CONNECTED 233299 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 233298
unix 3 [ ] STREAM CONNECTED 233297 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 233296
unix 3 [ ] STREAM CONNECTED 232428 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 232427
unix 3 [ ] STREAM CONNECTED 231710 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 231709
unix 3 [ ] STREAM CONNECTED 231708 /tmp/ksocket-root/konquerorM903xb.slave-socket
unix 3 [ ] STREAM CONNECTED 231707
unix 27 [ ] STREAM CONNECTED 231704 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 231703
unix 3 [ ] STREAM CONNECTED 229100 /tmp/ksocket-root/klauncherczy0vb.slave-socket
unix 3 [ ] STREAM CONNECTED 229099
unix 3 [ ] STREAM CONNECTED 227377 /tmp/ksocket-root/konquerorqQVf4b.slave-socket
unix 3 [ ] STREAM CONNECTED 227376
unix 3 [ ] STREAM CONNECTED 227184 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 227183
unix 3 [ ] STREAM CONNECTED 227182 /tmp/ksocket-root/kdesktopH7TfZb.slave-socket
unix 3 [ ] STREAM CONNECTED 227181
unix 3 [ ] STREAM CONNECTED 227180 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 227179
unix 5 [ ] STREAM CONNECTED 227172 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 227171
unix 3 [ ] STREAM CONNECTED 208727 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 208726
unix 3 [ ] STREAM CONNECTED 208725 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 208724
unix 3 [ ] STREAM CONNECTED 208723 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 208722
unix 2 [ ] STREAM CONNECTED 208714 /tmp/ksocket-root/kdeinit__0
unix 3 [ ] STREAM CONNECTED 174416 /tmp/ksocket-root/konquerorosiNYa.slave-socket
unix 3 [ ] STREAM CONNECTED 174414
unix 2 [ ] DGRAM 128551
unix 3 [ ] STREAM CONNECTED 110922 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 110921
unix 3 [ ] STREAM CONNECTED 110916 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 110915
unix 3 [ ] STREAM CONNECTED 110914 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 110913
unix 5 [ ] STREAM CONNECTED 110891 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 110890
unix 357 [ ] STREAM CONNECTED 110889 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 110888
unix 3 [ ] STREAM CONNECTED 110661 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 110660
unix 3 [ ] STREAM CONNECTED 110655 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 110654
unix 3 [ ] STREAM CONNECTED 110653 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 110652
unix 3 [ ] STREAM CONNECTED 46743 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 46742
unix 3 [ ] STREAM CONNECTED 46696 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 46695
unix 3 [ ] STREAM CONNECTED 46691 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 46690
unix 3 [ ] STREAM CONNECTED 46689 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 46688
unix 3 [ ] STREAM CONNECTED 24281 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 24280
unix 3 [ ] STREAM CONNECTED 24279 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 24278
unix 5 [ ] STREAM CONNECTED 24263 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 24262
unix 355 [ ] STREAM CONNECTED 24261 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 24260
unix 3 [ ] STREAM CONNECTED 12943 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 12942
unix 3 [ ] STREAM CONNECTED 12937 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 12936
unix 3 [ ] STREAM CONNECTED 12935 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 12934
unix 2 [ ] STREAM CONNECTED 12930 /tmp/ksocket-root/kdeinit__0
unix 3 [ ] STREAM CONNECTED 12889 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 12888
unix 3 [ ] STREAM CONNECTED 12885 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 12884
unix 3 [ ] STREAM CONNECTED 12883 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 12882
unix 3 [ ] STREAM CONNECTED 9643 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9642
unix 3 [ ] STREAM CONNECTED 9526 /tmp/scim-panel-socket-:0-root
unix 3 [ ] STREAM CONNECTED 9525
unix 3 [ ] STREAM CONNECTED 9524 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9523
unix 3 [ ] STREAM CONNECTED 9506 /tmp/scim-socket-frontend-root
unix 3 [ ] STREAM CONNECTED 9505
unix 3 [ ] STREAM CONNECTED 9504 /tmp/scim-socket-frontend-root
unix 3 [ ] STREAM CONNECTED 9503
unix 3 [ ] STREAM CONNECTED 9355 /tmp/scim-helper-manager-socket-root
unix 3 [ ] STREAM CONNECTED 9354
unix 3 [ ] STREAM CONNECTED 9323 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 9322
unix 3 [ ] STREAM CONNECTED 9317 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 9316
unix 3 [ ] STREAM CONNECTED 9299 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9298
unix 3 [ ] STREAM CONNECTED 9273 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 9272
unix 3 [ ] STREAM CONNECTED 9267 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 9266
unix 3 [ ] STREAM CONNECTED 9263 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9261
unix 3 [ ] STREAM CONNECTED 9255 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 9254
unix 3 [ ] STREAM CONNECTED 9237 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9236
unix 3 [ ] STREAM CONNECTED 9233 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9232
unix 3 [ ] STREAM CONNECTED 9231 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 9230
unix 3 [ ] STREAM CONNECTED 9226 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 9225
unix 3 [ ] STREAM CONNECTED 9217 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 9216
unix 3 [ ] STREAM CONNECTED 9208 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 9207
unix 3 [ ] STREAM CONNECTED 9200 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 9199
unix 3 [ ] STREAM CONNECTED 9198 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9197
unix 3 [ ] STREAM CONNECTED 9196 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 9195
unix 3 [ ] STREAM CONNECTED 9191 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9190
unix 3 [ ] STREAM CONNECTED 9188 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 9187
unix 3 [ ] STREAM CONNECTED 9179 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 9178
unix 3 [ ] STREAM CONNECTED 9177 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9176
unix 3 [ ] STREAM CONNECTED 9173 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 9172
unix 3 [ ] STREAM CONNECTED 9099 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 9098
unix 3 [ ] STREAM CONNECTED 9097 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9096
unix 3 [ ] STREAM CONNECTED 9095 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 9094
unix 3 [ ] STREAM CONNECTED 9087 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 9086
unix 3 [ ] STREAM CONNECTED 9085 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 9084
unix 3 [ ] STREAM CONNECTED 9077 /tmp/.ICE-unix/6458
unix 3 [ ] STREAM CONNECTED 9076
unix 3 [ ] STREAM CONNECTED 9075 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9074
unix 3 [ ] STREAM CONNECTED 9069 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 9068
unix 3 [ ] STREAM CONNECTED 9065 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9064
unix 3 [ ] STREAM CONNECTED 9058 /tmp/ksocket-root/kdeinit__0
unix 3 [ ] STREAM CONNECTED 9057
unix 3 [ ] STREAM CONNECTED 9054 /tmp/mcop-root/localhost_localdomain-1927-469abe66
unix 3 [ ] STREAM CONNECTED 9053
unix 3 [ ] STREAM CONNECTED 9038 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 9037
unix 3 [ ] STREAM CONNECTED 9036 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 9035
unix 3 [ ] STREAM CONNECTED 8942 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 8941
unix 3 [ ] STREAM CONNECTED 8920 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 8919
unix 3 [ ] STREAM CONNECTED 8918 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 8917
unix 3 [ ] STREAM CONNECTED 8906 /tmp/.ICE-unix/dcop6429-1184546404
unix 3 [ ] STREAM CONNECTED 8905
unix 3 [ ] STREAM CONNECTED 8899
unix 3 [ ] STREAM CONNECTED 8898
unix 4 [ ] STREAM CONNECTED 8677 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 8654
unix 2 [ ] DGRAM 8638
unix 2 [ ] DGRAM 3789
unix 2 [ ] DGRAM 3704
unix 2 [ ] DGRAM 3345
unix 2 [ ] DGRAM 2356

特別是(在/var/run下找不到PPPoe-adsl.pin.pppoe)
在控制面板的中的軟貓監測中顯示沒有安裝驅動,點添加后卻出現沒有監測到Mode,是否繼續添加的提示框。

最後,說明一下我裝的是紅旗Linux桌面版5.0

望高手解答!!!!


這是我在Linux下的ping反饋:
[[email protected] ~]# ping 220.194.60.88
PING 220.194.60.88 (220.194.60.88) 56(84) bytes of data.
From 122.198.21.81 icmp_seq=0 Destination Host Unreachable
From 122.198.21.81 icmp_seq=1 Destination Host Unreachable
From 122.198.21.81 icmp_seq=2 Destination Host Unreachable
From 122.198.21.81 icmp_seq=4 Destination Host Unreachable

adsl-status的反饋:

adsl-status: Link is up and running on interface ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:122.198.21.127 P-t-P:24.24.24.24

Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:815 (815.0 b) TX bytes:527 (527.0 b)

service network restart的反饋:
[[email protected] ~]# service network restart
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth1: [ OK ]
Bringing up interface ppp0: /sbin/adsl-start: line 215: 19613

Terminated $CONNECT "[email protected]" >/dev/null 2>&1
[FAILED]
Bringing up interface ppp1: [ OK ]

我用過代理——沒用。


我的郵箱:[email protected] 你的郵件。
在問題沒解決前24小時期待您的解答〉MyQQNumber:804537769







問題已得到解決!
方法:(附件引自:http://zhoulifa.bokee.com/6073915.html含圖)

目前大家用到的上網方法無非如下幾種:電話撥號、ADSL、區域網共享上網。

下面分別說明在Linux下各種上網方法
1、電話撥號網路設置
1)打開一個命令終端,運行配置命令wvdialconf,此命令將設置撥號上網的各參數,保存在文件/etc/wvdial.conf里,文件內容如下:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Baud = 115200
New PPPD = yes
Modem = /dev/modem
ISDN = 0
; Phone =
; Password =
; Username =

2)手動編輯此文件,比如用vi命令,vi /etc/wvdial.conf
把此文件的最後幾行前面的註釋符號去掉,後面的值改成電話撥號的幾個參數(這三個參數可以打電信的客戶號碼問),如下:
Phone = 撥號上網的電話號碼
Password = 上網的用戶名
Username = 上網的密碼

至此,電話撥號上網已經設置完成
3)運行命令來開始撥號,命令如下:
pon wvdial
連接成功后就可以開心上網了。

2、ADSL上網設置
運行一個ADSL配置命令pppoeconf。
按照界面提示一步步設置即可
程序將自動檢測系統可用的網卡,如下圖:



一般應該只出現eth0, eth1之類的,因為我裝了VMware虛擬機,所以有vmnet1、vmnet8之類的虛擬網卡出現 。

當然這裡要選「是」以便繼續設置。

系統自動檢測ADSL設備。

允許程序設置一些默認參數,當然你也可以選擇「否」,按照你自己的特殊參數來設置。但目前國內的ADSL可能沒什麼差別,所以選默認值足夠了。

這裡輸入ADSL的帳號。

這裡輸入ADSL帳號對應的密碼。下面的都選「是」應該可以了。


如果你只是偶爾用一下ADSL上網,那麼這裡可以選擇「否」,如果每次都是用ADSL上網並且不限時上網(即包月上網那種),就選擇「是」將會開機自動啟動ADSL網路。

這裡說明了以後手工啟動ADSL網路的方法,看到了沒?輸入命令pon dsl-provider即可啟動上網,poff就可以斷開網路連接了。

配置完成後在/etc/ppp/目錄下生成ppp相關的文件,當然/etc/ppp/peers/dsl-provider文件里記錄了所有參數,你可以自己修改。
同時在/etc/init.d目錄里也生成 了幾個文件:
/etc/init.d/pppd-dns
/etc/init.d/ppp
/etc/init.d/pppstatus-clean
/etc/init.d/pppstatus
所以你也可以用/etc/init.d/ppp start命令來啟動網路。和pon dsl-provider一樣。
網路啟動了就可以開心上網了。
/************關於本文檔********************************************
*filename: Linux下上網方法總結
*purpose: 說明了Linux下幾種上網方法的設置:電話撥號、ADSL、區域網共享上網
*wrote by: zhoulifa([email protected]) 周立發(http://zhoulifa.bokee.com)
Linux愛好者 Linux知識傳播者 SOHO族 開發者 最擅長C語言
*date time:2007-01-28 18:02
*Note: 任何人可以任意複製代碼並運用這些文檔,當然包括你的商業用途
* 但請遵循GPL
*Thanks to: Google.com
*Hope:希望越來越多的人貢獻自己的力量,為科學技術發展出力
* 科技站在巨人的肩膀上進步更快!感謝有開源前輩的貢獻!
*********************************************************************/

3、區域網共享上網設置
一般來說區域網里一定有一個作為路由的設備連接著互聯網,其它區域網電腦只要設置好IP地址、網關、子網掩碼和DNS就可以上風了。

最簡單的方法就是設置網卡為DHCP動態獲取方式,設置方法如下:
如果是Debian/Ubuntu系統,則修改/etc/network/interfaces文件,把裡面關於eth0(這是第一塊網卡,相應地,eth1代表第二塊網卡)的改成如下即可:
auto eth0
iface eth0 inet dhcp
如果是Red Hat等其它的,好象是要修改/etc/sysconfig/network-scripts/ifcfg-eth0文件(太久不用這個版本了,所以記不太清楚),修改內容如下:
DEVICE=eth0
)O ^ a f s `0BOOTPROTO=dhcp
*l T,s M4M }#w7T0onBOOT=yes loshy博客資訊 g D,K*A B-Z5l8R,j&b Q D \
另一種方法就是按照管理員的要求,每台電腦分配一個固定的IP地址,同樣是要修改上面提到的文件,比如/etc/network/interfaces,文件里關於eth0的內容要改成下面的:
auto eth0
iface eth0 inet static
address 192.168.100.30
gateway 192.168.100.1
netmask 255.255.255.0
/etc/sysconfig/network-scripts/ifcfg-eth0要修改成如下方式:
DEVICE=eth0
)O ^ a f s `0BOOTPROTO=none
*l T,s M4M }#w7T0onBOOT=yes loshy博客資訊 g D,K*A B-Z5l8R,j&b Q D \
IPADDR=192.168.100.30
3i(W*b A I#[0NETMASK=255.255.255.0loshy博客資訊 V @3V/V%~8l J/n _
GATEWAY=192.168.100.1


所有配置方法都有相關圖形界面可以用的,比如下圖:

但我是寫程序的,所以比較喜歡用命令去配置或者自己動手修改配置文件。因為系統所有東西除非是寫在操作系統里,否則都是在文件里,由操作系統來讀取並執行的。

比較適合紅旗Linux的線索:http://www.softhouse.com.cn/html ... 09254700006501.html

[ 本帖最後由 nohome 於 2007-7-16 18:10 編輯 ]

[火星人 ] 懸賞100圓求解Linux下不能上網的問題!已經有579次圍觀

http://coctec.com/docs/linux/show-post-122926.html