LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: javalover0218

rp-pppoe问题

[复制链接]
 楼主| 发表于 2005-6-20 21:47:59 | 显示全部楼层
[root@localhost tmp]# cd rp-pppoe-3.5
[root@localhost rp-pppoe-3.5]# ./go
Running ./configure...
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for ranlib... (cached) ranlib
checking how to run the C preprocessor... (cached) gcc -E
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... (cached) yes
checking for fcntl.h... (cached) yes
checking for sys/dlpi.h... (cached) no
checking for sys/ioctl.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for syslog.h... (cached) yes
checking for unistd.h... (cached) yes
checking for net/if_arp.h... (cached) yes
checking for netinet/if_ether.h... (cached) yes
checking for getopt.h... (cached) yes
checking for sys/uio.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for fcntl.h... (cached) yes
checking for net/bpf.h... (cached) yes
checking for netpacket/packet.h... (cached) yes
checking for net/ethernet.h... (cached) yes
checking for asm/types.h... (cached) yes
checking for linux/if_packet.h... (cached) yes
checking for linux/if_ether.h... (cached) yes
checking for linux/if_pppox.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for sys/cdefs.h... (cached) yes
checking for linux/if.h... (cached) yes
checking for net/if.h... (cached) yes
checking for net/if_dl.h... (cached) no
checking for net/if_ether.h... (cached) no
checking for net/if_types.h... (cached) no
checking for netinet/if_ether.h... (cached) yes
checking for net/if_types.h... (cached) no
checking for net/if_dl.h... (cached) no
checking for working const... (cached) yes
checking for pid_t... (cached) yes
checking whether time.h and sys/time.h may both be included... (cached) yes
checking whether struct tm is in sys/time.h or time.h... (cached) time.h
checking for echo... (cached) /bin/echo
checking for struct sockaddr_ll... yes
checking for N_HDLC line discipline... yes
checking for 8-bit clean memcmp... (cached) yes
checking whether setvbuf arguments are reversed... (cached) no
checking return type of signal handlers... (cached) void
checking for select... (cached) yes
checking for socket... (cached) yes
checking for strerror... (cached) yes
checking for strtol... (cached) yes
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking size of unsigned short... (cached) 2
checking size of unsigned int... (cached) 4
checking size of unsigned long... (cached) 4
checking for pppd... (cached) /usr/sbin/pppd
checking for setsid... (cached) /usr/bin/setsid
checking for id... (cached) /usr/bin/id
checking for Linux 2.4.X kernel-mode PPPoE support... no
checking packing order of bit fields... reversed
creating ./config.status
creating Makefile
creating libevent/Makefile
creating ../scripts/adsl-connect
creating ../scripts/adsl-start
creating ../scripts/adsl-stop
creating ../scripts/adsl-init
creating ../scripts/adsl-init-suse
creating ../scripts/adsl-init-turbolinux
creating ../scripts/adsl-setup
creating ../gui/Makefile
creating ../gui/tkpppoe
creating config.h
config.h is unchanged

On this platform, the following targets will be built:
        pppoe pppoe-server pppoe-sniff pppoe-relay

Type 'make' to compile the software.
Running make...

Type 'make install' as root to install the software.
Running make install...

Type 'make install' as root to install the software.
mkdir -p /usr/sbin
/usr/bin/install -c -m 755 -s pppoe /usr/sbin
/usr/bin/install -c -m 755 -s pppoe-server /usr/sbin
if test -x licensed-only/pppoe-server-control ; then /usr/bin/install -c -m 755
-s licensed-only/pppoe-server-control /usr/sbin; fi
if test -x pppoe-relay ; then /usr/bin/install -c -m 755 -s pppoe-relay /usr/sbi
n; fi
if test -x pppoe-sniff; then /usr/bin/install -c -m 755 -s pppoe-sniff /usr/sbin
; fi
/usr/bin/install -c -m 755 ../scripts/adsl-connect /usr/sbin
/usr/bin/install -c -m 755 ../scripts/adsl-start /usr/sbin
/usr/bin/install -c -m 755 ../scripts/adsl-status /usr/sbin
/usr/bin/install -c -m 755 ../scripts/adsl-stop /usr/sbin
/usr/bin/install -c -m 755 ../scripts/adsl-setup /usr/sbin
mkdir -p /usr/doc/rp-pppoe-3.5
/usr/bin/install -c -m 644 ../doc/CHANGES /usr/doc/rp-pppoe-3.5
/usr/bin/install -c -m 644 ../doc/KERNEL-MODE-PPPOE /usr/doc/rp-pppoe-3.5
/usr/bin/install -c -m 644 ../doc/HOW-TO-CONNECT /usr/doc/rp-pppoe-3.5
/usr/bin/install -c -m 644 ../doc/LICENSE /usr/doc/rp-pppoe-3.5
/usr/bin/install -c -m 644 ../README /usr/doc/rp-pppoe-3.5
/usr/bin/install -c -m 644 ../SERVPOET /usr/doc/rp-pppoe-3.5
/usr/bin/install -c -m 644 ../configs/pap-secrets /usr/doc/rp-pppoe-3.5
mkdir -p /usr/man/man8
for i in pppoe pppoe-server pppoe-sniff pppoe-relay ; do \
        if test -f ../man/$i.8 ; then \
                /usr/bin/install -c -m 644 ../man/$i.8 /usr/man/man8 || exit 1;
\
        fi; \
done
/usr/bin/install -c -m 644 ../man/adsl-start.8 /usr/man/man8
/usr/bin/install -c -m 644 ../man/adsl-stop.8 /usr/man/man8
/usr/bin/install -c -m 644 ../man/adsl-status.8 /usr/man/man8
/usr/bin/install -c -m 644 ../man/adsl-connect.8 /usr/man/man8
/usr/bin/install -c -m 644 ../man/adsl-setup.8 /usr/man/man8
mkdir -p /usr/man/man5
/usr/bin/install -c -m 644 ../man/pppoe.conf.5 /usr/man/man5
mkdir -p /etc/ppp
mkdir -p /etc/ppp/plugins
echo "# Directory created by rp-pppoe for kernel-mode plugin" > /etc/ppp/plugins
/README
NOT overwriting existing /etc/ppp/firewall-standalone
NOT overwriting existing /etc/ppp/firewall-masq
NOT overwriting existing /etc/ppp/pppoe-server-options
Looks like a Red Hat system; installing /etc/rc.d/init.d/adsl
# L2TP

Type 'adsl-setup' to configure the software.




Welcome to the Roaring Penguin ADSL client setup.  First, I will run
some checks on your system to make sure the PPPoE client is installed
properly...

Looks good!  Now, please enter some information:

USER NAME

>>> Enter your PPPoE user name (default bxxxnxnx@sympatico.ca): yfchen@cer

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 ethn, where 'n' is a number.
(default 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

DNS

Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide 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: 202.115.64.33
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: 202.115.64.34

PASSWORD

>>> Please enter your PPPoE password:
>>> Please re-enter your PPPoE password:

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

** Summary of what you entered **

Ethernet Interface: eth0
User name:          yfchen@cer
Activate-on-demand: No
Primary DNS:        202.115.64.33
Secondary DNS:      202.115.64.34
Firewalling:        NONE

>>> Accept these settings and adjust configuration files (y/n)? y
Adjusting /etc/ppp/pppoe.conf
Adjusting /etc/resolv.conf
Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets
  (But first backing it up to /etc/ppp/pap-secrets-bak)
  (But first backing it up to /etc/ppp/chap-secrets-bak)



Congratulations, it should be all set up!

Type 'adsl-start' to bring up your ADSL link and 'adsl-stop' to bring
it down.  Type 'adsl-status' to see the link status.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-20 21:49:47 | 显示全部楼层
[root@localhost rp-pppoe-3.5]# 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...
                                                                                
The following DSL config was found on your system:
                                                                                
  Device:      Name:
  ppp0         DSLppp0
                                                                                
Please enter the device if you want to configure the present DSL config
(default ppp0) or enter 'n' if you want to create a new one: ppp0
                                                                                
LOGIN NAME
                                                                                
Enter your Login Name (default root): root
                                                                                
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
                                                                                
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

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: 202.115.64.33
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: 202.115.64.34

PASSWORD

Please enter your Password:
Please re-enter your Password:

USERCTRL

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

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

Start this connection at boot time

Do you want to start this connection at boot time?
Please enter no or yes (default no):no

** Summary of what you entered **

Ethernet Interface: eth0
User name:          root
Activate-on-demand: No
Primary DNS:        202.115.64.33
Secondary DNS:      202.115.64.34
Firewalling:        NONE
User Control:       yes
Accept these settings and adjust configuration files (y/n)? y
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@localhost rp-pppoe-3.5]# DEBUG=1 adsl-start
*** Running in debug mode... please be patient...
*** If you want to use DEBUG, invoke adsl-start, not adsl-connect.
[root@localhost rp-pppoe-3.5]#  adsl-start
/sbin/adsl-start: line 215:  5054 Terminated              $CONNECT "$@" >/dev/nu
ll 2>&1
[root@localhost rp-pppoe-3.5]#
回复 支持 反对

使用道具 举报

发表于 2005-6-21 10:39:18 | 显示全部楼层
那,,log文件呢?
看看 /tmp/pppoe-debug-xxxx里边的文件。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-21 11:20:53 | 显示全部楼层
哦,等会再贴出log,今天的情况是
[root@localhost root]# ifup ppp0
/sbin/adsl-start: line 217:  4635 Terminated              $CONNECT "$@" >/dev/null 2>&1
[root@localhost root]# adsl-status
Note: You have enabled demand-connection; adsl-status may be inaccurate.
adsl-status: Link is down (can't read pppoe PID file /var/run/pppoe-adsl.pid.pppoe)
[root@localhost root]#route add ppp0
显示找不到设备ppp0
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-21 12:51:37 | 显示全部楼层
没有找到/tmp/pppoe-debug-xxxx里边的文件。但现在的情况似乎有些好转:
[root@localhost root]# adsl-status
Note: You have enabled demand-connection; adsl-status may be inaccurate.
adsl-status: Link is up and running on interface ppp0
ppp0      Link encapoint-to-Point Protocol
          inet addr:***.***.4.167  P-t-P:***.***.4.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:16 errors:26 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:654 (654.0 b)  TX bytes:30 (30.0 b)
能ping通DNS,但PING不通其它的IP
现在eth0和ppp0都是活跃状态,但就是打不开网页
不知哪个地方还有问题?恳请解决
回复 支持 反对

使用道具 举报

发表于 2005-6-21 13:39:12 | 显示全部楼层
其实到这一步你的adsl设置已经完全没有问题了,祝贺你!现在你要做的是打开dns,运行service named start试一下吧,漫漫浏览吧!如果还上不去就重新设置dns就好了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-21 16:38:02 | 显示全部楼层
运行service named start还是一样呀,唉,简直对Linux沮丧……
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-21 16:44:00 | 显示全部楼层
另外,就是运行[root@localhost root]#route add ppp0
还是显示找不到设备ppp0
回复 支持 反对

使用道具 举报

发表于 2005-6-21 23:18:20 | 显示全部楼层
ip addr
route -n
看看结果。

看看你的  /etc/resolv.conf。

理论上,你的ADSL是没问题了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-22 11:03:07 | 显示全部楼层
[root@localhost root]# ifup ppp0
[root@localhost root]# ip addr
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:e0:4c:**:**:8b brd ff:ff:ff:ff:ff:ff
    inet 10.11.0.183/20 brd 10.11.15.255 scope global eth0
3: ppp0: <OINTOPOINT,MULTICAST,NOARP,UP> mtu 1492 qdisc pfifo_fast qlen 3
    link/ppp
    inet ***.***.4.111 peer ***.***.4.1/32 scope global ppp0
[root@localhost root]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
***.***.4.1     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
10.11.0.0       0.0.0.0         255.255.240.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         10.11.0.1       0.0.0.0         UG    0      0        0 eth0
[root@localhost root]#
[root@localhost root]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:E0:4C:3A:77:8B
          inet addr:10.11.0.183  Bcast:10.11.15.255  Mask:255.255.240.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:316 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:26396 (25.7 Kb)  TX bytes:3300 (3.2 Kb)
          Interrupt:11 Base address:0x1000

lo        Link encapocal Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2266 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2266 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:154239 (150.6 Kb)  TX bytes:154239 (150.6 Kb)

ppp0      Link encapoint-to-Point Protocol
          inet addr:***.***.4.111  P-t-P:***.***.4.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:3 errors:28 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:54 (54.0 b)  TX bytes:54 (54.0 b)

[root@localhost root]#
[root@localhost root]# adsl-status
Note: You have enabled demand-connection; adsl-status may be inaccurate.
adsl-status: Link is up and running on interface ppp0
ppp0      Link encapoint-to-Point Protocol
          inet addr:***.***.4.111  P-t-P:***.***.4.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:3 errors:34 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:54 (54.0 b)  TX bytes:54 (54.0 b)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表