利用 Linux 命令实现 PPPoE 拨号上网 (linux pppoe拨号 命令)

Linux是一款功能强大的操作系统,其命令行工具的使用可以帮助用户更好地掌握系统的运行情况和维护相关功能。PPPoE拨号上网是一种常见的网络连接方式,本文将介绍如何利用Linux命令实现PPPoE拨号上网。

之一步:安装PPP插件

在开始PPPoE拨号之前,我们需要为Linux系统安装PPP插件。PPP插件是一种通信协议,主要用于在两个网络节点之间实现数据包的传输。它可以将网络流量分包传输,具有压缩数据、错误检测、流量控制等多种功能。在命令行中输入以下命令来安装PPP插件:

“`bash

sudo apt-get install ppp

“`

输入密码并等待插件安装完成后,我们可以开始设置PPPoE拨号。

第二步:设置PPPoE拨号

在Linux中,我们可以通过pppoeconf命令来快速配置PPPoE拨号。执行以下命令启动pppoeconf:

“`bash

sudo pppoeconf

“`

接着,系统会提示我们输入拨号用户名和密码。在输入完成后,系统会自动检测网络连接并配置PPPoE拨号。此时,我们可以通过以下命令来检查网络连接情况:

“`bash

ifconfig -a

“`

如果显示了拨号网卡ppp0,并且该网卡状态为UP,则说明我们已成功使用PPPoE拨号连接网络。

第三步:断开PPPoE拨号

在我们退出系统之前,我们需要先断开PPPoE拨号连接。执行以下命令来断开连接:

“`bash

sudo poff

“`

该命令会自动关闭所建立的PPPoE拨号连接。如果您需要重新连接网络,只需要执行plog命令即可。

Linux的命令行工具帮助我们实现了PPPoE拨号上网,并且能够更好地掌握网络连接情况和维护相关功能。通过学习和掌握这些命令行工具,我们可以更好地使用Linux系统,提高我们的工作效率和安全性。

相关问题拓展阅读:

关于Linux下使用PPPOE上网问题

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):如果一张网卡就设置写上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键。

你现在是仅仅答凳是设置,对吧?设置好了之后,那些参数应该给设备读取的,然后设备才可以正常工作。设置好烂举桐之后,请使用一下命令重启你的网络设备,这样子才读入新的配置信息。饥坦

#/etc/init.d/network restart

或者:

$sudo /etc/init.d/network restart

linux 怎么设置拨号连接“

学学其说明

linux上网设置祥贺经典二法

1、一种是linux共享局域网内的windows主机上网

如果你的网卡linux能够识别的话在安装的时候会有网卡配置过程。从列表中选择网络设备,一般为eth0,点击“编辑”,在打开的“编辑接口”对话框中,用户可以通过DHCP来配置网络,这样也可以,不过我更喜欢定制一个静态IP,所以去掉“使用DHCP进行配置”前面的选项,然后在下面输入你要定制的IP地址和子网掩码,确定后,在下面的网关和主要DNS里输入当前局域网上做为主闭瞎机的计算机的IP地址。这样装完以后就搞定。

如果你是装完后再安装的网卡的话,那可以在“系统设置”里选择“网络”轿宴空,如果你的网卡安装成功的话会在下面的列表里看到你的网卡,同样设置DNS(和上面一样),然后再回到列表里,选中你的网卡,点上面的编辑,选中“当计算机启动时激活设备”,然后选择下面的“静态设置的IP地址”,在下面输入和上面同样的设置。再重新启动就可以了。

2、另外一种就是用你的linux通过ADSL上网了

在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):(选择网络设备)

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:

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的规则)

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)?(确认一下是否接受设置)

以上的设置在“系统设置”里 的“网络”里选择新建,建立一个xDSL连接,也可以实现。设置完成了以后在网络里激活连接。

上面的ADSL连接就试过一次,由于我们是局域网,所以一直用的是共享上网,如果有什么错误不要骂我,还请指教!!

现在的adsl modem都自带有虚拟拨号功能。

线缆连接好后,把网关设成192.168.1.1(这个根据modem不同可能有所出入)

然后打开浏览器和携。输入192.168.1.1进入衡正后,就咐棚悔可以设置了。

如果有此功能,一般说明书上都有说明的。

我的modem就从来不用拨号。电源一开就自动连上了。

你看一下说明书就应该知道了。

1、打开终端配置裤吵谈上网:

zhancang@ubuntu:~$ sudo pppoeconf

开始配置上网碰败,出来的是终端界面,选择方式之后输入宽带用户名和密码。

2、联网:

zhancang@ubuntu:~$ sudo pon dsl-provider

password for zhancang: 此处输入系统密码,密码不显示胡碰

Plugin rp-pppoe.so loaded.

RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5

zhancang@ubuntu:~$

3、断网:

关于linux pppoe拨号 命令的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。


数据运维技术 » 利用 Linux 命令实现 PPPoE 拨号上网 (linux pppoe拨号 命令)