分享
 
 
 

在SuSE8.0下如何实现自动拨号上网的方法

王朝other·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

看到YaST里面有DSL这一项,于是我就设置了,启动机器的时候看到有加载dsl0这一条,但是为何我不能自动联接呢?而且如果eth0设置为DHCP的话,每次检测网卡都要花一点时间,很不爽。于是我就将它设了一个IP,也就是192.168.1.1这样的。但我拨号的时候仍然不通,很奇怪。于是就在YaST的帮助里查找ADSL的帮助,经过一番摸索之后,终于能上网了。于是想写下来与大家分享,高手们别嘲笑小弟的潜薄,只是,我想多少会有人需要这个东西。

我的输入法还是靠大家才搞定的,否则也不能在这里写中文帖子了。

方法如下:

需要修改3个文件的内容,它们都在/etc/ppp目录下面,分别是:

(1) chap-secrets,

# Secrets for authentication using CHAP

# client server secret IP addresses

# OUTBOUND CONNECTIONS

# Here you should add your PPP Login and PPP password to connect to your

# provider via pap. The * means that the entry(login and passoword may be

# used for ANY host you connect to.

# Thus you do not have to worry about the foreign machine name. Just

# replace password with your password.

#hostname * password

# PREDIFINED CONNECTIONS

# These are user and password entries for publically accessible call-by-call

# Internet providers in Germany. If they confict with your config, remove them.

# READ_IN_CALLBYCALL_SECRETS

# INBOUND CONNECTIONS

#client hostname 192.168.1.1 (我的静态 IP 地址找个,你设的什么就是什么,不用抄我的。但是如果你的Local中有机器用了找个地址,那就不能用来这里了。)

your_account@xx.xx(你的帐户) * xxxxxxx(你的密码) 记住中间的 * 可不要给删除了。

pap-secrets 中的设置跟上面完全相同。我就省略了。

----------------------------------------------------------------------------------

(2)options 找个文件的设置非常重要。以下是全文,还有一小部分都是注解,我就不写上来了。

# /etc/ppp/options

#

# Not every option is listed here, see man pppd for more details.

# This file is read by the pppd,

# it is an error when it is not present.

#

# use the following command to see the active options:

#

# grep -v ^# /etc/ppp/options | grep -v ^$

#

# ------

# The name of this server. Often, the FQDN is used here.

#name

#===================================================================

user your_account@xxx.xx ( 注意前面的user,不要漏掉了,后门接着的就是你前面用的那个。)

#===================================================================

# Enforce the use of the hostname as the name of the local system for

# authentication purposes (overrides the name option).

#usehostname

# If no local IP address is given, pppd will use the first IP address

# that belongs to the local hostname. If "noipdefault" is given, this

# is disabled and the peer will have to supply an IP address.

#noipdefault

# With this option, pppd will accept the peer's idea of our local IP

# address, even if the local IP address was specified in an option.

#ipcp-accept-local

# With this option, pppd will accept the peer's idea of its (remote) IP

# address, even if the remote IP address was specified in an option.

#ipcp-accept-remote

# Run the executable or shell command specified after pppd has terminated

# the link. This script could, for example, issue commands to the modem

# to cause it to hang up if hardware modem control signals were not

# available.

# If mgetty is running, it will reset the modem anyway. So there is no need

# to do it here.

#disconnect "chat -- \d+++\d\c OK ath0 OK"

# Increase debugging level (same as -d). The debug output is written

# to syslog LOG_LOCAL2.

debug

# Enable debugging code in the kernel-level PPP driver. The argument n

# is a number which is the sum of the following values: 1 to enable

# general debug messages, 2 to request that the contents of received

# packets be printed, and 4 to request that the contents of transmitted

# packets be printed.

#kdebug n

# noauth means do not require the peer to authenticate itself, this must

# be set if you want to use pppd to connect to the internet. In this case

# *you* must authenicate yourself to the peer(internet provider), so do

# not disable this setting unless you are the dial-in server which where

# the peer has to autenticate to.

noauth

# Use hardware flow control (i.e. RTS/CTS) to control the flow of data

# on the serial port.

crtscts

# Specifies that pppd should use a UUCP-style lock on the serial device

# to ensure exclusive access to the device.

lock

# Use the modem control lines.(is default)

#modem (将它注释掉,系统默认是打开的)

# The opposite: local

#

# Description:

# Don't use the modem control lines. With this

# option, pppd will ignore the state of the CD (Car??

# rier Detect) signal from the modem and will not

# change the state of the DTR (Data Terminal Ready)

# signal.

#

# You need to disable modem and enable local if you want to connect

# to anoter system without using a modem:

local (加上这个)

# async character map -- 32-bit hex; each bit is a character

# that needs to be escaped for pppd to receive it. 0x00000001

# represents '\x01', and 0x80000000 represents '\x1f'.

# To allow pppd to work over a rlogin/telnet connection, ou should escape

# XON (^Q), XOFF (^S) and ^]: (The peer should use "escape ff".)

#asyncmap 200a0000

asyncmap 0

# needed for some ISDN Terminaladaters, namely ELSA, those seem to have

# problems with asyncmap negotiation, so you can turn off this procedure

# in case your ISDN box has trouble with it, by enabling this option.

# You have to disable the asyncmap option to be sure to have it

# active. If you use wvdial, set the ISDN parameter in /etc/wvdial.conf

# instead.

#default-asyncmap

# Set the MRU [Maximum Receive Unit] value to for negotiation. pppd

# will ask the peer to send packets of no more than bytes. The

# minimum MRU value is 128. The default MRU value is 1500. A value of

# 296 is recommended for slow links (40 bytes for TCP/IP header + 256

# bytes of data). The value 1492 is for DSL connections (PPP Default -

# PPPoE Header: 1500 - 8 = 1492)

mru 1492 (要加上找个)

# Set the MTU [Maximum Transmit Unit] value to . Unless the peer

# requests a smaller value via MRU negotiation, pppd will request that

# the kernel networking code send data packets of no more than n bytes

# through the PPP network interface. The value 1492 is for DSL connections

# (PPP Default - PPPoE Header: 1500 - 8 = 1492)

mtu 1492 (找个也要加上)

# Set the interface netmask to , a 32 bit netmask in "decimal dot"

# notation (e.g. 255.255.255.0).

#netmask 255.255.255.0

# Don't fork to become a background process (otherwise pppd will do so

# if a serial device is specified).

nodetach

# If this option is given, pppd will send an LCP echo-request frame to

# the peer every n seconds. Under Linux, the echo-request is sent when

# no packets have been received from the peer for n seconds. Normally

# the peer should respond to the echo-request by sending an echo-reply.

# This option can be used with the lcp-echo-failure option to detect

# that the peer is no longer connected.

lcp-echo-interval 30

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有