歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> 在SuSE8.0下如何實現自動撥號上網的方法

在SuSE8.0下如何實現自動撥號上網的方法

日期:2017/2/27 9:29:16   编辑:更多Linux
  看到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中有機器用了找個地址,那就不能用來這裡了。)  [email protected](你的帳戶) * 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 [email protected] ( 注意前面的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




Copyright © Linux教程網 All Rights Reserved