如何配置Modem通过PPP拨号连接到互联网?
解决方法:

按照以下步骤设置通过modem拨号连接到互联网:

1. 安装了modem以后,以root身份执行wvdialconf命令来扫描modem,以及初始化字符串,最大速率以及其他配置信息:

  # wvdialconf /etc/wvdial.conf

2. 编辑最新创建的/etc/wvdial.conf,添加一个新的部分,命名为[Dialer myispname],将myispname替换为本地服务提供商名字,添加ISP的modem号码,用户名,密码。这三部分变量会自动在Defaults部分定义,但是被注释掉。如果要添加更多帐号信息,应该按照这样的方式去定义。为了避免这个问题,请不要使用非数字的ISP名字,还要注意您本机的[Dialer Defaults]内容可能跟下面的示例不一致。不要按照下面的内容修改本地的[Dialer Defaults]。

     [Dialer Defaults]
     Modem = /dev/ttyS0
     Baud = 115200
     Init1 = ATZ
     Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0
     [Dialer myispname]
     Phone = 555-1212
     Username = myusername
     Password = mypassword

3. 创建/etc/sysconfig/network-scripts/ifcfg-ppp0,按照下面的示例:

     DEVICE=ppp0		#Device name
     USERCTL=yes		#Allow any user to activate/deactive the interface?
     PEERDNS=yes		#Get DNS servers from ISP?
     TYPE=Modem		#What type of device?
     BOOTPROTO=dialup	#What boot protocol?
     ONBOOT=no		#Start the interface on boot?
     NAME=myispname		#Name of the connection
     LINESPEED=115200	#Max speed of the interface
     MODEMPORT=/dev/ttyS0	#Modem port (set to the value from wvdial.conf)
     IDLETIMEOUT=600		#Idle time before hangup
     DEMAND=no		#Dial on demand?
     DEFROUTE=yes		#Is this interface the default route?
     PERSIST=no		#Redial if connection lost?
     WVDIALSECT=myispname	#Section in wvdial.conf to read for settings
     MODEMNAME=Modem0	#Name of modem

替换"555-1212"、"myispname"、"myusername"和"mypassword"为适合你的情况,在"myispname"部分不要用非数字字母。然后从下面的命令连接ISP:

     $ ifup ppp0

modem就会呼叫ISP,如果希望中断连接,用下面命令:

     $ ifdown ppp0

如果希望设置多个modem,多个拨号号码,多个帐号,请查询man wvdialconff, wvdial.conf and wvdial。