快轉到主要內容

How to use PPPoE to connect network on Ubuntu?

·353 字
Computer-Science Ubuntu PPPoE
目錄

在 Ubuntu 用 PPPoE 連線中華電信固定 IP。


Install 「pppoeconf」
#

1# update package first
2apt-get update -y
1apt-get install pppoeconf -y

Configure it
#

記得先插上家裡的數據機後,輸入以下指令:

1pppoeconf # maybe need "sudo"

正在查找可以使用的網卡
正在查找可以使用的網卡

可能會顯示偵測不到可以使用的網卡…

偵測不到可以使用的網卡
偵測不到可以使用的網卡

那就手動指定它(前提是你知道是哪張網卡並確定有連上數據機):

1pppoeconf eth0

接著就是問答時間。
基本上沒有特別需求的話就是除了輸入帳號及密碼外,其他都是一路回答「YES」就可以了。

P.S.
中華電信的帳號通常會是「帳號@hinet.net」,如果是固定 IP 則是「帳號@ip.hinet.net」。

設定檔沒意外會存在「/etc/ppp/peers/dsl-provider

如果連接成功,應該可以看到網卡(通常叫做ppp0):

1$ ifconfig
2
3lo: ................
4eth0: ................
5ppp0: ................
6wlan0: ................

手動連接及斷開
#

手動連接

1pon dsl-provider

手動斷開

1poff dsl-provider
2# 或者斷開全部
3poff -a
Alpaca
作者
Alpaca
No one can stop my feet.

相關文章

Raspberry Pi 4 (Ubuntu) configure auto connect to wifi
·142 字
Computer-Science Raspberry PI Wi-Fi Ubuntu

How to make ubuntu auto connect to wifi in raspberry pi 4?

Linux + Win 雙系統卻不見 Grub 開機選單?
·1691 字
Computer-Science Windows Ubuntu Grub

安裝了 Linux + Windows 的雙系統,但卻不見開機選單?放心,很多人跟你一樣。

Ubuntu 18 如何顯示電量百分比?
·308 字
Computer-Science Ubuntu Gnome
Build a FTP Server with 「vsftpd」
·343 字
Computer-Science FTP

How to build the FTP Server quicly with 「vsftpd」?

Simply setting up a Proxy Server with SSH
·344 字
Computer-Science SSH

Did you know that SSH can make your host as a proxy server?

How to use GnuPG to sign files and messages?
·1769 字
Computer-Science Cryptography PGP

用 GnuPG 簽署、驗證、加密、解密 你的檔案及訊息。