虚拟化容器,大数据,DBA,中间件,监控。

centos 设置pppoe拨号

07 11月
作者:admin|分类:系统运维
centos 设置pppoe拨号


[root@centos /]# whereis adsl-setup   查看adsl-setup的安装位置
adsl-setup: /sbin/adsl-setup /usr/sbin/adsl-setup /usr/share/man/man8/adsl-setup.8.gz
[root@centos /]# cd sbin   切换到adsl-setup的目录
[root@centos sbin]# ls adsl- 显示adsl-相关的命令,看这些单词应该知道意思,如果你连这都看不懂,那你不用往下看了。
adsl-connect adsl-setup    adsl-start    adsl-status   adsl-stop
[root@centos sbin]# 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): wndlxm002

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
要求我们选择使用的网络接口。我们这时候,填入我们刚刚设置的那个网卡。对于大多数只有一个网卡的朋友而言,默认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
接下来,询问的是,adsl连接以后,是否持续保持连接。或者是自动的断开,在指定的时间(以秒数计算)内。多数情况下,我们希望手动的打开关闭连接。所以这里选择默认的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: 61.134.1.5
Please enter the IP address of your ISP's secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
Enter the secondary DNS server address here: 218.30.19.40

再下来,就是dns了。我发现很多时候,pppoe都不能够正确获取dns信息。我建议你输入dns地址。

PASSWORD
Please enter your Password:
Please re-enter your Password:
帐号密码是必须,输入两次。密码显示风格和其他的地方一样,不显示在屏幕上。

USERCTRL

Please enter 'yes' (three letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes): yes

是否允许普通用户启用/关闭 ADSL连接。默认是允许。

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
防火墙选项。这里提供的防火墙可以给你提供基本的安全保护。我不推荐你使用——你最好选择“NONE”选项。无论是什么样的用户使用,我都建议你使用额外的工具来配置防火墙规则。

Start this connection at boot time

Do you want to start this connection at boot time?
Please enter no or yes (default no):yes
是否在开机时,打开这个连接?

** Summary of what you entered **

Ethernet Interface: eth0
User name:          wndlxm002
Activate-on-demand: No
Primary DNS:        61.134.1.5
Secondary DNS:      218.30.19.40
Firewalling:        NONE
User Control:       yes
Accept these settings and adjust configuration files (y/n)? y

所有的配置信息填写完成之后,系统将给出一个报告,完整的显示出你输入的配置信息。如果,你确信你输入的配置信息是正确的,输入yes写入配置文件。输入no放弃配置。


Adjusting /etc/sysconfig/network-scripts/ifcfg-ppp0
Adjusting /etc/resolv.conf
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.

[root@centos sbin]# adsl-status 设置完成后我们看看adsl状态
adsl-status: Link is down (can't read pppoe PID file /var/run/pppoe-adsl.pid.pppoe)

[root@centos sbin]# adsl-start 开始adsl
[root@centos sbin]# ifconfig   显示ip信息
eth0      Link encap:Ethernet HWaddr 00:0C:29:B5:F2:92
          inet addr:192.168.11.108 Bcast:192.168.11.255 Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:feb5:f292/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:2565 errors:0 dropped:0 overruns:0 frame:0
          TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:226865 (221.5 KiB) TX bytes:16026 (15.6 KiB)
          Interrupt:67 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:1161 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1161 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1975492 (1.8 MiB) TX bytes:1975492 (1.8 MiB)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:10.10.2.115 P-t-P:10.10.4.230 Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1480 Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:54 (54.0 b) TX bytes:40 (40.0 b)



浏览3141 评论0
返回
目录
返回
首页
mysql中如何查看某个数据库或表占用的磁盘空间 PC 上的 LVM 灾难修复