centos自动拨号上网

来源:互联网 发布:office for mac 破解 编辑:程序博客网 时间:2024/05/18 03:02


1.首先安装

sudo yum install rp-pppoe  

2.运行配置

[test@localhost Shell]# pppoe-setupWelcome to the PPPoE client setup.  First, I will run some checks onyour system to make sure the PPPoE client is installed properly...LOGIN NAMEEnter your Login Name (default doodle): 123456   //通信运营商提供的帐号INTERFACEEnter the Ethernet interface connected to the PPPoE modemFor Solaris, this is likely to be something like /dev/hme0.For Linux, it will be ethX, where 'X' is a number.(default eth0): eth0      //使用的网卡o 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 secondsafter which the link should be dropped.  If you want the link tostay up permanently, enter 'no' (two letters, lower-case.)NOTE: Demand-activated links do not interact well with dynamic IPaddresses.  You may have some problems with demand-activated links.Enter the demand value (default no): no  //直接输入no就行DNSPlease 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 aredoing and not modify your DNS setup.Enter the DNS information here: server   //这里设置为动态获取ip,就输入server即可PASSWORDPlease enter your Password:              //输入密码Please re-enter your Password:           //确认密码USERCTRLPlease enter 'yes' (three letters, lower-case.) if you want to allownormal user to start or stop DSL connection (default yes): yes  //是否让普通用户使用,设置为yesFIREWALLINGPlease choose the firewall rules to use.  Note that these rules arevery basic.  You are strongly encouraged to use a more sophisticatedfirewall setup; however, these will provide basic security.  If youare running any servers on your machine, you must choose 'NONE' andset up firewalling yourself.  Otherwise, the firewall rules will denyaccess to all standard servers like Web, e-mail, ftp, etc.  If youare using SSH, the rules will block outgoing SSH connections whichallocate 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 workstation2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway                for a LANChoose a type of firewall (0-2): 0        //设置为不开防火墙Start this connection at boot timeDo you want to start this connection at boot time?Please enter no or yes (default no):yes   //是否为开机加载项** Summary of what you entered **Ethernet Interface: eth0User name:          123456Activate-on-demand: NoDNS addresses:      Supplied by ISP's serverFirewalling:        NONEUser Control:       yesAccept these settings and adjust configuration files (y/n)? y   //检查配置Adjusting /etc/sysconfig/network-scripts/ifcfg-ppp0Adjusting /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/pppoe-status /etc/sysconfig/network-scripts/ifcfg-ppp0'to see the link status.


3.开启/关闭/查看状态

$ pppoe-s  pppoe-server  pppoe-sniff   pppoe-status    pppoe-setup   pppoe-start   pppoe-stop    

可以使用上述的命令来控制



0 0
原创粉丝点击