㈠ linux下命令行如何配置藍牙撥號上網(linux高手進)
1,開啟手機藍牙
2,運行hcitool scan,找到自己的手機,記住藍牙地址
3,sdptool browser 並將輸出導入文件中。
4,找到sdptool輸出中的Service Name: Dial-up Networking
其中有Channel:記住這個數字,比如,我的是4.
5,編輯/etc/bluetooth/rfcomm.conf,填寫:
rfcomm0 {
bind yes;
device 藍牙地址;
channel 上面的rfcomm Channel;
comment "Phone Dun Connection";
}
6,重新啟動bluetooth服務,/etc/rc.d/init.d/bluetooth restart
###############配置kppp######################
7,配置kppp帳號
a,在主界面,點擊"配置"
b,在"帳戶"頁,點擊"新建",選擇"手工設置",會彈出一個對話框
c,在"撥號"頁,"連接名稱",隨便填寫,比如GPRS,然後點"添加",填入電話號碼"*99***1#"
d,點擊確定,完成配置。
8,配置"數據機"
a,切換到"數據機"頁,選擇"新建"
b,數據機名稱隨便填寫,比如Phone.
c,設備選擇為/dev/rfcomm0
d,確定
9,撥號,直接在主界面點擊"連接"即可。
###################配置wvdial##################
將以下內容寫入/etc/wvdial.conf
[Dialer gprs]
Modem = /dev/rfcomm0
Phone = *99***1#
Username = cmnet
Password = cmnet
然後,wvdial gprs即可。
他不會自動更新/etc/resolv.conf,可以把/var/run/ppp/resolv.conf拷貝到/etc
㈡ linux下如何實行ADSL撥號上網
1 首先,你必須安裝相應的ADSL撥號軟體。平常用的redhat發行版本中,帶有pppoe這個rpm包。
我們通過下面的命令實現:
[root@Server root]# rpm -qa|grep pppoe
rp-pppoe-3.4-7
這個命令的輸出來確定系統中是否已經安裝了pppoe這個包。rpm -qa是列出系統中已經安裝的包。通過管道|將這個命令的輸出,作為第二個命令的輸入。grep pppoe是列出包含有pppoe的行。如果返回為空,則說明沒有安裝。如果安裝了,會返回安裝了pppoe的版本號。如果你還沒有安裝的話,通過下面的命令安裝。
[root@Server root]# rpm -ivh redhat/ppp-2.4.1-7.i386.rpm
這樣,你就安裝好了撥號需要的軟體。
2 配置網卡
撥號需要將撥號的網卡設置為動態獲取ip。而動態獲取ip在機器啟動的時候,將會花費很長時間去獲取ip。所以,我們最好將網卡設置不啟動時不激活。(不建議這么做,如果是遠程登陸的話,就很麻煩)一般情況下我們都使用命令netconfig可以方面的配置網路相關信息。當然,也可以通過修改網卡的配置文件實現:
[root@Server root]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
3 配置撥號軟體
與ADSL相關的一共有四個命令adsl-connect ,adsl-setup,adsl-start,adsl-status,adsl-stop
通過下面這個命令,啟動ADSL設置:
[root@Server root]# adsl-setup
首先,你會看到歡迎信息。
Welcome to the ADSL client setup. First, I will run some checks on
your system to make sure the PPPoE client is installed properly...
然後要求我們輸入登陸名。
LOGIN NAME
Enter your Login Name (default root):
接著,要求我們選擇使用的網路介面。我們這時候,填入我們剛剛設置的那個網卡。對於大多數只有一個網卡的朋友而言,默認eth0就可以了。
INTERFACE
Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(default eth0):
接下來,詢問的是,adsl連接以後,是否持續保持連接。或者是自動的斷開,在指定的時間(以秒數計算)內。多數情況下,我們希望手動的打開關閉連接。所以這里選擇默認的no。
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
Enter the demand value (default no):
再下來,就是dns了。我發現很多時候,pppoe都不能夠正確獲取dns信息。我建議你輸入dns地址。這些信息在isp的網站上一般都有公布。
DNS
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
帳號密碼是必須,輸入兩次。密碼顯示風格和其他的地方一樣,不顯示在屏幕上。這個,我不知道改怎麼填寫。太高深的問題了。希望你將你的答案和我分享。:P。
PASSWORD
Please enter your Password:
Please re-enter your Password:
下面的設置,是表示是否允許普通用戶啟用/關閉 ADSL連接。默認是允許。
Please enter 'yes' (two letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes):
我們看下防火牆選項。這里提供的防火牆可以給你提供基本的安全保護。我不推薦你使用——你最好選擇「NONE」選項。無論是什麼樣的用戶使用,我都建議你使用額外的工具來配置防火牆規則(iptables目前看來是一個非常不錯的工具)。
FIREWALLING
Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.
The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway for a LAN
Choose a type of firewall (0-2):
是否在開機時,打開這個連接?
Do you want to start this connection at boot time?
所有的配置信息填寫完成之後,系統將給出一個報告,完整的顯示出你輸入的配置信息。如果,你確信你輸入的配置信息是正確的,輸入yes寫入配置文件。輸入no放棄配置。
Summary of what you entered
Ethernet Interface: eth0
User name: root
Activate-on-demand: No
DNS: Do not adjust
Firewalling: NONE
User Control: yes
Accept these settings and adjust configuration files (y/n)?
Please enter no or yes (default no):
Congratulations, it should be all set up!
Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0'
to bring it down.
Type '/sbin/ADSL-status /etc/sysconfig/network-scripts/ifcfg-ppp0'
to see the link status.
測試撥號
現在,我們需要測試下我們的撥號是否配置正確了。
輸入ADSL-start撥號。一般情況下,我會ping 我的ISP的主WWW伺服器。比如
ping 61.139.2.69(該地址是電信的DNS伺服器)
如果能ping通則說明沒有什麼問題
如果不怕麻煩,打開瀏覽器測試下,也可以。如果一切ok。那麼我們就可以結束我們的配置了。
當然,你關閉連接的話,使用命令adsl-stop就可以了。
來源:(http://blog.sina.com.cn/s/blog_4963a79901009mbe.html) - 如何在Linux下用ADSL撥號上網_下雨天看星星_新浪博客
故障排除
照上邊的操作步驟配置下來,一般是沒有什麼問題的。但是因為Linux沒有Windows那麼直觀,出現問題的話,排除故障是非常惱火的。
故障1:無法瀏覽網頁,但是可以ping通DNS伺服器地址,多半是在配置的時候DNS伺服器地址填錯了。建議檢查一下DNS伺服器是否正確。
故障2:用ifconfig查看鏈接,確實出現了三個鏈接,一個eth0,一個lo,一個ppp0,但是就是無法ping通外網,這種情況多出現在手動修改ifcfg-eth0文件,或者用netconfig命令的情況下。
我查看了一下我Windows下和Linux下的路由信息發現少了如下路由,
Network Destination Netmask Gateway Interface
0.0.0.0 0.0.0.0 192.168.0.77 192.168.0.77 1
注釋: 192.168.0.77 是我windows撥號取得的PPPOE客戶端地址,這條路由的意思是所有的數據包都從77這個埠出去,但是Linux下就沒有這條路由。
後來查了很多資料終於找到了問題所在,因為我的eth0網址信息是我手動修改的,所以就有GATEWAY這一項, 而且我發現路由都是從192.168.0.1這個埠出去的,而我PPP0E客戶端撥號獲得的地址是192.168.0.76,所以這肯定是不對的,怎麼解決呢?
將/etc/sysconfig/network文件中的GATEWAY一項用#號注釋掉,
將/etc/sysconfig/network-scipts/ifcfg-eth0文件中的GATEWAY也注釋掉,
重啟撥號
㈢ linux撥號上網怎麼設置
ADSL上網,Ubuntu下是可以的,雖然以前沒用過撥號上網,不過查了查也不是很麻煩。
打開終端配置上網:
zhancang@ubuntu:~$ sudo pppoeconf
開始配置上網,出來的是終端界面,因為是筆記本記得還有一個讓選擇網卡的,選擇有線貓的那個就行,之後輸入寬頻用戶名(好多人提示刪除username,看來有人被害過)和密碼。
聯網:
zhancang@ubuntu:~$ sudo pon dsl-provider
[sudo] password for zhancang: 此處輸入系統密碼,密碼不顯示
Plugin rp-pppoe.so loaded.
RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5
zhancang@ubuntu:~$
斷網:
zhancang@ubuntu:~$ sudo poff
查看日誌( 斷網下):
zhancang@ubuntu:~$ plog
Jan 15 15:34:53 ubuntu pppd[1879]: Terminating on signal 15
Jan 15 15:34:53 ubuntu pppd[1879]: Connect time 76.6 minutes.
Jan 15 15:34:53 ubuntu pppd[1879]: Sent 1524670 bytes, received 6141748 bytes.
Jan 15 15:34:53 ubuntu pppd[1879]: Connection terminated.
Jan 15 15:34:53 ubuntu pppd[1879]: Exit.
zhancang@ubuntu:~$
查看介面信息( 聯網下):
zhancang@ubuntu:~$ ifconfig ppp0
ppp0 Link encap:點對點協議
inet 地址:131.11.209.211 點對點:131.11.208.1(已改) 掩碼:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 躍點數:1
接收數據包:4 錯誤:0 丟棄:0 過載:0 幀數:0
發送數據包:4 錯誤:0 丟棄:0 過載:0 載波:0
碰撞:0 發送隊列長度:3
接收位元組:117 (117.0 B) 發送位元組:145 (145.0 B)
zhancang@ubuntu:~$
-------------藍色是終端裡面的連接方式,可以不看---------------------
圖形界面聯網方法:
點擊任務欄右上角聯網圖標,「編輯連接」選擇「DSL」,添加:
用戶名:你寬頻的用戶名
服務:這個隨便,貌似只是一個標記,我隨意填了一個
密碼:寬頻用戶對應的密碼
Ipv4設置:自動PPPoE
勾上自動連接,每次開機只需要點擊右上角的DSL ******(連接名稱自己改一個,我的為ADSL) 連接就可以了!
頻繁斷網問題解決:
檢查pppoe的配置文件(/etc/ppp/options),看到其中的兩條:
lcp-echo-failure 4
lcp-echo-interval 30
意思大概為30秒內聯接4次失敗就斷網,把4改成20試了試。我索性改成了30,這樣之後就沒出現過斷網事件!
㈣ Linux 系統怎麼用電信寬頻撥號上網
(1)安裝的前提條件
<1>確保安裝了網卡並工作正常
使用命令
#ifconfig eth0
查看網卡狀態
<2>在系統中不要設置默認路由(網關),讓ADSL撥號後自動獲得
如果已經設置了默認路由,使用以下方法刪除:
在文件 /etc/sysconfig/network/ifconfig-eth0 中刪除 GATEWAY= 這一行,然後以root執行:
# service network restart
<3>已經安裝了pppd軟體包
如果存在文件 /usr/sbin/pppd,則說明已經安裝了pppd; 如果未安裝,下載安裝這個軟體包。
(2)安裝PPPOE客戶端軟體
Linux下的PPPOE客戶端軟體比較多,而且大多使用GNU License,我們推薦使用rp-pppoe
這個軟體包。從http://www.roaringpenguin.com/procts/pppoe這個網站上,不僅可以下載
各發布包下的rp-pppoe的二進制軟體包,而且可以下載源代碼軟體包。
我們使用centos下的yum安裝方法,來安裝rp-pppoe軟體包
#yum install rp-pppoe
(3)配置PPPOE客戶端軟體
<1>配置文件
安裝完軟體包後,必須配置PPPOE的配置文件/etc/ppp/pppoe.conf,從而讓ADSL撥號時使用配置文件中的用戶名、密碼等參數。
<2>命令配置
# adsl-setup ← 建立ADSL連接
Welcome to the ADSL client setup. First, I will run some checks on
your system to make sure the PPPoE client is installed properly...
LOGIN NAME
Enter your Login Name (default root): ← 填入ADSL連接的用戶名
INTERFACE
Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(default eth0): ← 指定網路接入設備,一塊網卡的情況下,一般為默認eth0
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
Enter the demand value (default no): ← 直接按回車,接受默認設置
DNS
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
Enter the DNS information here: ← 如果知道DNS伺服器的信息在此填入。不知道的情況按回車跳過
PASSWORD
Please enter your Password: ← 輸入ADSL的連接密碼
Please re-enter your Password: ← 再次確認輸入ADSL的連接密碼
USERCTRL
Please enter 'yes' (two letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes): no ← 填入no,不允許一般用戶控制PPPoE的連接
FIREWALLING
Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.
The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
Choose a type of firewall (0-2): 0 ← 輸入0,不在這里使用防火牆
Start this connection at boot time
Do you want to start this connection at boot time?
Please enter no or yes (default no): yes ← 填入yes,在系統啟動時自動連接ADSL
** Summary of what you entered **
Ethernet Interface: eth0
User name: [email protected]
Activate-on-demand: No
DNS: Do not adjust
Firewalling: NONE
User Control: no
Accept these settings and adjust configuration files (y/n)? y ← 配置信息確認無誤後,鍵入y同意設置
Adjusting /etc/sysconfig/network-scripts/ifcfg-ppp0
Adjusting /etc/ppp/chap-secrets and /etc/ppp/pap-secrets
(But first backing it up to /etc/ppp/chap-secrets.bak)
(But first backing it up to /etc/ppp/pap-secrets.bak)
?
Congratulations, it should be all set up!
Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0'
to bring it down.
Type '/sbin/adsl-status /etc/sysconfig/network-scripts/ifcfg-ppp0'
to see the link status.
(4)啟動PPPOE客戶端軟體
# adsl-start ← 啟動ADSL連接
# ← 稍等片刻後若啟動成功後出現提示符(無任何提示或Connected意味著連接成功)
如果不成功,請檢查網線、ADSL MODEM等物理設備,並查看 /var/log/messages中的信息
/usr/sbin/adsl-stop 關閉和ISP的連接
/usr/sbin/adsl-status 查看當前連接的狀態
如果想在Linux系統啟動時自動啟動ADSL連接,輸入以下命令
#chkconfig --add adsl
將在當前的運行級下加入ADSL的自啟動腳本
(5)測試
當連接成功後,使用命令 #ifconfig -a 在輸出中應該含有關於 ppp0 的一堆信息,其中還綁定了 IP 地址,說明已經從撥號中獲 得了IP地址。使用命令 #netstat -nr 查看路由表信息,這時的默認路由應該是上面獲得的IP地址。 如果沒有默認路由,我們可以手動增加: #route add default gw 上面獲得的IP地址使用命令#nslookup www.sina.com.cn 如果解析出新浪的IP,說明已經從撥號中正確獲得了DNS伺服器最後,使用命令ping某個域名或IP,如果有響應,表示你已經大功告成了。
㈤ linux系統下怎樣進行撥號上網
輸入:sudo pppoeconf
pppoeconf 會先偵測你哪一張網路卡連接到ISP。他會列出所有偵測到的網路介面並詢問你他是否已找到所有網路介面:
如果沒有找到網路介面或你計算機際實的網路介面比他找到的還要多,你最好檢查有否載入適當的核心模組(Kernel mole)。如果正確,請按『是』(Yes)。
如果你以前曾經執行 pppoeconf,可能會遺留一些舊配置。pppoeconf 會問你要不要復蓋舊配置。
請輸入用戶名稱。然後當然是問你登入密碼:
請輸入密碼。
接著會問你使否使用網路商提供的域名伺服器(DNS Server):
請按『是』(Yes) 。
跟著問是否要把 MSS 限制不大於1452位元組。
請按『是』(Yes) 。
現在 PPPoE 的基本設定已搞好了。但 pppoeconf 仍會問你每次啟動計算機時是否需要自動連接 Internet:
請按『是』(Yes) 。
最好問你現在是否需要立刻連接 Internet:
請按『是』(Yes) 。
一切都搞定了,現在你可以在網上暢遊了。
啟動連線 (pon dsl-provider)
完成後,你隨時可以打以下指令連接上網:
pon dsl-provider
中斷連線 (poff)
亦可以打以下指令中斷連線:
poff
sudo pppoeconf 設置完後
要手工撥號上網,打開終端,輸入命令:sudo pon dsl-provider
打開/etc/ppp/peers/dsl-provider後,手工加了一行password ****的記錄後,下次就自動連接了。
手工斷線的命令:sudo poff
查看連接情況的命令:plog 和 ifconfig ppp0
㈥ linux系統下如何用201撥號上網
得需要個內貓,把內貓裝到電腦上,安裝好驅動.插上電話線就可以了接下來是軟體.你代開網上鄰居,查看網路鏈接,建一個新的鏈接,下一步,選擇鏈接到因特爾,在下一步,手動設置我的鏈接,下一步,用撥號調解器鏈接,在下一步,ISP不用添,下一步,電話號碼添201,然後一直下一步,完成就好了.接下來是最重要的,打開撥號鏈接,在電話號碼一欄里填上:201,,(卡號)#,(密碼)#,16900#這里的",,"不能少因為","在電話里不被翻譯,相當於卡了下
.然後撥號,等待鏈接就OK了!