新聞中心
Linux是一款功能強大的操作系統(tǒng),其命令行工具的使用可以幫助用戶更好地掌握系統(tǒng)的運行情況和維護相關功能。PPPoE撥號上網(wǎng)是一種常見的網(wǎng)絡連接方式,本文將介紹如何利用Linux命令實現(xiàn)PPPoE撥號上網(wǎng)。

之一步:安裝PPP插件
在開始PPPoE撥號之前,我們需要為Linux系統(tǒng)安裝PPP插件。PPP插件是一種通信協(xié)議,主要用于在兩個網(wǎng)絡節(jié)點之間實現(xiàn)數(shù)據(jù)包的傳輸。它可以將網(wǎng)絡流量分包傳輸,具有壓縮數(shù)據(jù)、錯誤檢測、流量控制等多種功能。在命令行中輸入以下命令來安裝PPP插件:
“`bash
sudo apt-get install ppp
“`
輸入密碼并等待插件安裝完成后,我們可以開始設置PPPoE撥號。
第二步:設置PPPoE撥號
在Linux中,我們可以通過pppoeconf命令來快速配置PPPoE撥號。執(zhí)行以下命令啟動pppoeconf:
“`bash
sudo pppoeconf
“`
接著,系統(tǒng)會提示我們輸入撥號用戶名和密碼。在輸入完成后,系統(tǒng)會自動檢測網(wǎng)絡連接并配置PPPoE撥號。此時,我們可以通過以下命令來檢查網(wǎng)絡連接情況:
“`bash
ifconfig -a
“`
如果顯示了撥號網(wǎng)卡ppp0,并且該網(wǎng)卡狀態(tài)為UP,則說明我們已成功使用PPPoE撥號連接網(wǎng)絡。
第三步:斷開PPPoE撥號
在我們退出系統(tǒng)之前,我們需要先斷開PPPoE撥號連接。執(zhí)行以下命令來斷開連接:
“`bash
sudo poff
“`
該命令會自動關閉所建立的PPPoE撥號連接。如果您需要重新連接網(wǎng)絡,只需要執(zhí)行plog命令即可。
Linux的命令行工具幫助我們實現(xiàn)了PPPoE撥號上網(wǎng),并且能夠更好地掌握網(wǎng)絡連接情況和維護相關功能。通過學習和掌握這些命令行工具,我們可以更好地使用Linux系統(tǒng),提高我們的工作效率和安全性。
相關問題拓展閱讀:
- 關于Linux下使用PPPOE上網(wǎng)問題
- linux 怎么設置撥號連接“
關于Linux下使用PPPOE上網(wǎng)問題
timeout 是連接念棗陪超時的意思,可能是設置錯誤吧。
3。配置
然后再來設置ADSL。這一處,我們要用命令。
pppoe-setup
Welcome to the Roaring Penguin ADSL client setup. First, I will run
some checks on your system to make sure the PPPoE client is installed
properly…
Looks good! Now, please enter some information:
USER NAME
>>> Enter your PPPoE user name (default XXX): 在這里輸入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 ethn, where ‘n’ is a number.
(default eth0):如果一張網(wǎng)卡就設置寫上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):直接回車,或者輸入no
DNS
Please enter the IP address of your ISP’s primary DNS server.
If your ISP claims that ‘the server will provide 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:
輸入server,然后巖春回車(小寫字母)
—
本文出處
,如需轉載請注明!
點擊
免費下載大量的linux學習資料,軟件!
—
PASSWORD
>>> Please enter your PPPoE password:輸入密碼
>>> Please re-enter your PPPoE password:再輸入一次
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 STRONG
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(不需要防火墻)
Ethernet Interface: eth0
User name: XXX
Activate-on-demand: No
DNS: Do not adjust
Firewalling: MASQUERADE
>>> Accept these settings and adjust configuration files (y/n)?
弄完后,就按一個y鍵。
你現(xiàn)在是僅僅答凳是設置,對吧?設置好了之后,那些參數(shù)應該給設備讀取的,然后設備才可以正常工作。設置好爛舉桐之后,請使用一下命令重啟你的網(wǎng)絡設備,這樣子才讀入新的配置信息。饑坦
#/etc/init.d/network restart
或者:
$sudo /etc/init.d/network restart
linux 怎么設置撥號連接“
學學其說明
linux上網(wǎng)設置祥賀經(jīng)典二法
1、一種是linux共享局域網(wǎng)內(nèi)的windows主機上網(wǎng)
如果你的網(wǎng)卡linux能夠識別的話在安裝的時候會有網(wǎng)卡配置過程。從列表中選擇網(wǎng)絡設備,一般為eth0,點擊“編輯”,在打開的“編輯接口”對話框中,用戶可以通過DHCP來配置網(wǎng)絡,這樣也可以,不過我更喜歡定制一個靜態(tài)IP,所以去掉“使用DHCP進行配置”前面的選項,然后在下面輸入你要定制的IP地址和子網(wǎng)掩碼,確定后,在下面的網(wǎng)關和主要DNS里輸入當前局域網(wǎng)上做為主閉瞎機的計算機的IP地址。這樣裝完以后就搞定。
如果你是裝完后再安裝的網(wǎng)卡的話,那可以在“系統(tǒng)設置”里選擇“網(wǎng)絡”轎宴空,如果你的網(wǎng)卡安裝成功的話會在下面的列表里看到你的網(wǎng)卡,同樣設置DNS(和上面一樣),然后再回到列表里,選中你的網(wǎng)卡,點上面的編輯,選中“當計算機啟動時激活設備”,然后選擇下面的“靜態(tài)設置的IP地址”,在下面輸入和上面同樣的設置。再重新啟動就可以了。
2、另外一種就是用你的linux通過ADSL上網(wǎng)了
在linux下就集成著一個ADSL撥號軟件,打開終端,在里面輸入#adsl-setup,然后進行設置:
LOGIN NAME
Enter your Login Name (default root):(輸入你的用戶名)
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):(選擇網(wǎng)絡設備)
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):(選擇是按需撥號,還是持續(xù)連接)
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:
Please re-enter your Password:
USERCTRL
Please enter ‘yes’ (two letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes):(是否允許普通用戶啟動、關閉)
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 STRONG
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):(選擇firewall的規(guī)則)
Start this connection at boot time
Do you want to start this connection at boot time?
Please enter no or yes (default no):(選擇是否隨機啟動)
** Summary of what you entered **
Ethernet Interface:
User name:
Activate-on-demand:
DNS addresses:
Firewalling:
User Control:
Accept these settings and adjust configuration files (y/n)?(確認一下是否接受設置)
以上的設置在“系統(tǒng)設置”里 的“網(wǎng)絡”里選擇新建,建立一個xDSL連接,也可以實現(xiàn)。設置完成了以后在網(wǎng)絡里激活連接。
上面的ADSL連接就試過一次,由于我們是局域網(wǎng),所以一直用的是共享上網(wǎng),如果有什么錯誤不要罵我,還請指教!!
現(xiàn)在的adsl modem都自帶有虛擬撥號功能。
線纜連接好后,把網(wǎng)關設成192.168.1.1(這個根據(jù)modem不同可能有所出入)
然后打開瀏覽器和攜。輸入192.168.1.1進入衡正后,就咐棚悔可以設置了。
如果有此功能,一般說明書上都有說明的。
我的modem就從來不用撥號。電源一開就自動連上了。
你看一下說明書就應該知道了。
1、打開終端配置褲吵談上網(wǎng):
zhancang@ubuntu:~$ sudo pppoeconf
開始配置上網(wǎng)碰敗,出來的是終端界面,選擇方式之后輸入寬帶用戶名和密碼。
2、聯(lián)網(wǎng):
zhancang@ubuntu:~$ sudo pon dsl-provider
password for zhancang: 此處輸入系統(tǒng)密碼,密碼不顯示胡碰
Plugin rp-pppoe.so loaded.
RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5
zhancang@ubuntu:~$
3、斷網(wǎng):
關于linux pppoe撥號 命令的介紹到此就結束了,不知道你從中找到你需要的信息了嗎 ?如果你還想了解更多這方面的信息,記得收藏關注本站。
香港服務器選創(chuàng)新互聯(lián),2H2G首月10元開通。
創(chuàng)新互聯(lián)(www.cdcxhl.com)互聯(lián)網(wǎng)服務提供商,擁有超過10年的服務器租用、服務器托管、云服務器、虛擬主機、網(wǎng)站系統(tǒng)開發(fā)經(jīng)驗。專業(yè)提供云主機、虛擬主機、域名注冊、VPS主機、云服務器、香港云服務器、免備案服務器等。
當前題目:利用Linux命令實現(xiàn)PPPoE撥號上網(wǎng)(linuxpppoe撥號命令)
文章鏈接:http://fisionsoft.com.cn/article/dpcpiip.html


咨詢
建站咨詢
