日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

CentOS7下宽带连接

發(fā)布時間:2023/12/20 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 CentOS7下宽带连接 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

背景

辦了個寬帶,沒有路由器。需要電腦撥號上網(wǎng)。windows下挺簡單,三步搞定。但是Linux有點(diǎn)傻眼。使用的Centos沒有adsl工具,只能自行安裝。切到Linux下沒網(wǎng),所以先在windows下載好軟件包,放到可訪問的目錄下。

下載

點(diǎn)擊下載Re-PPPoE下載
或者命令下載

#wget https://www.roaringpenguin.com/files/download/rp-pppoe-3.12.tar.gz

前提是得有個網(wǎng),沒網(wǎng)自行解決

安裝

查看README

QUICKSTART ----------If you're lucky, the "quickstart" method will work. After unpacking the archive, become root and type:./goThis should configure, compile and install the software and set up your DSL connection. You'll have to answer a few questions along the way.If you want the GUI wrapper, type:./go-guiIf ./go and ./go-gui didn't work, read the rest of this README.Compiling ---------Compile and install pppd if you don't already have it. Then:1) Unpack:$ tar xzvf rp-pppoe-xxx.tar.gz2) Change to source directory:$ cd src3) Configure:$ ./configure4) Compile:$ make4) Install (this step must be done as root)# make install5) Now read doc/HOW-TO-CONNECT--

自行安裝,如果遇到依賴得軟件,自行下載安裝。總之,把它裝上就行了。

配置

# pppoe-setup

配置具體內(nèi)容
1. Enter your PPPoE user name : ISP提供的賬戶,給你是啥就是啥:比如:dianxian123
2. Enter the Ethernet interface :使用ifconfig命令,第一個就是,注意不要默認(rèn)eth0,尤其筆記本。依據(jù)ifconfig命令結(jié)果填寫,比如enp9s0
3. Enter the demand value:若長時間連線,連線會被自動中斷,no
4. Enter the DNS information here:ISP得DNS地址。上網(wǎng)搜一個。DNS查詢: http://www.ip.cn/dns.html,找個本省得,或者公共得。填寫IP
5. Enter the secondary DNS server address here:備份的DNS地址
6. Please enter your PPPoE password:賬號的密碼
7. Please re-enter your PPPoE password:確認(rèn)輸入密碼
8. Choose a type of firewall:選擇防火墻:關(guān)了吧。0
9. Accept these settings and adjust configuration files:確認(rèn)輸入的配置信息是否正確,y
客戶端配置完成

操作

# pppoe-start # pppoe-status # pppoe-stop

連不上?

確認(rèn)下DSL配置文件NOBOTE是否為YES

# cd /etc/sysconfig/network-scripts/ # vim ifcfg-Wired-ConnetXXX

已連接就是上不了網(wǎng)

要放大召了,TMD用手機(jī)百度搜了半天沒有個毛結(jié)果,翻過倒過去,結(jié)果條目雖多,其實(shí)沒有幾篇文章,原創(chuàng)只有幾篇。相互抄襲,而且對我都不可用。
在快要放棄的時候想起來,打通以太網(wǎng)連接和pppoe的連接是否還需要路由呢?

# ifconfig

看到ppp0的信息

ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1480inet 192.168.84.174 netmask 255.255.255.255 destination 10.10.10.10ppp txqueuelen 3 (Point-to-Point Protocol)RX packets 48531 bytes 46033448 (43.9 MiB)RX errors 0 dropped 0 overruns 0 frame 0TX packets 45044 bytes 5083861 (4.8 MiB)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

重點(diǎn)看inet 192.168.84.174。為以太網(wǎng)卡添加一個路由到此ip

# route add default gw 192.168.84.174

哈哈哈,ping通了。大功告成。終于可以使用Linux愉快的上網(wǎng)了!!!離windows又遠(yuǎn)了一步。

PS:其實(shí)在windows一切都挺好的,但是當(dāng)做機(jī)器學(xué)習(xí)使用一些python包時,玩windows感覺不爽。比如不兼容,dos終端命令不習(xí)慣。

總結(jié)

以上是生活随笔為你收集整理的CentOS7下宽带连接的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。