LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1554|回复: 4

redhat ADSL拨号安装好了。能连接DNS就是不能上网是怎么会事呢?

[复制链接]
发表于 2007-12-28 00:38:58 | 显示全部楼层 |阅读模式
这是我用命令拨号的过程帮我看看我错在那里了呢 ?谢谢高手指点。

win@localhost win]$ su -

Password:

[root@localhost root]# 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...

                                                                                

                                                                                

LOGIN NAME

                                                                                

Enter your Login Name (default root): ya2631977

                                                                                

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: 61.139.2.69

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.98.96.68



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): y



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):y



** Summary of what you entered **



Ethernet Interface: eth0

User name:          ya2631977

Activate-on-demand: No

Primary DNS:        61.139.2.69

Secondary DNS:      202.98.96.68

Firewalling:        NONE

User Control:       y

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 root]# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 000:F8:3C:C9:8B

          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:775 errors:0 dropped:0 overruns:0 frame:0

          TX packets:280 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:100

          RX bytes:47822 (46.7 Kb)  TX bytes:19557 (19.0 Kb)

          Interrupt:9



lo        Link encapocal Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:5109 errors:0 dropped:0 overruns:0 frame:0

          TX packets:5109 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:347160 (339.0 Kb)  TX bytes:347160 (339.0 Kb)



[root@localhost root]# /sbin/ifup pppo

/sbin/ifup: 没有发现 pppo 配置。

用法:ifup <device name>

[root@localhost root]# ifup pppo

/sbin/ifup: 没有发现 pppo 配置。

用法:ifup <device name>

[root@localhost root]# /usr/sbin/ifup pppo

-bash: /usr/sbin/ifup: 没有那个文件或目录

[root@localhost root]# adsl -status

-bash: adsl: command not found

[root@localhost root]# netstat -nr
 楼主| 发表于 2007-12-31 00:04:22 | 显示全部楼层
这是我重新拨号的状态。有那个是高手帮我看看。
[root@localhost root]# /usr/sbin/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:61.157.222.174  P-t-P:218.88.220.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:1044 (1.0 Kb)  TX bytes:54 (54.0 b)

[root@localhost root]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 000:F8:3C:C9:8B
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1538 errors:0 dropped:0 overruns:0 frame:0
          TX packets:535 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:102180 (99.7 Kb)  TX bytes:43778 (42.7 Kb)
          Interrupt:9 Base address:0x5000

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

ppp0      Link encapoint-to-Point Protocol
          inet addr:61.157.222.174  P-t-P:218.88.220.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:19 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:1176 (1.1 Kb)  TX bytes:54 (54.0 b)
[root@localhost root]# /sbin/ifup ppp0

[root@localhost root]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 000:F8:3C:C9:8B
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2071 errors:0 dropped:0 overruns:0 frame:0
          TX packets:574 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:134464 (131.3 Kb)  TX bytes:46667 (45.5 Kb)
          Interrupt:9 Base address:0x5000

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

[root@localhost root]# /sbin/ifup ppp0
[root@localhost root]# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 000:F8:3C:C9:8B
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2103 errors:0 dropped:0 overruns:0 frame:0
          TX packets:606 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:136654 (133.4 Kb)  TX bytes:49045 (47.8 Kb)
          Interrupt:9 Base address:0x5000

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

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

[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:61.188.168.230  P-t-P:218.88.220.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:146 (146.0 b)  TX bytes:54 (54.0 b)

[root@localhost root]# netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
218.88.220.1    0.0.0.0         255.255.255.255 UH        0 0          0 ppp0
192.168.1.0     0.0.0.0         255.255.255.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.0192.168.1.1     0.0.0.0         UG        0 0          0 eth0


[root@localhost root]# dig www.163.com

; <<>> DiG 9.2.1 <<>> www.163.com
;; global options:  printcmd
;; connection timed out; no servers could be reached
[root@localhost root]#

我们这里的DNS和XDSL里的是一样的。这样拨号对了吗?怎么还连不起网络呢?
我前面改过1次网卡连起过一次。现在就没办法了。我只有1张网卡。。急啊。再一次急啊。
回复 支持 反对

使用道具 举报

发表于 2007-12-31 11:30:08 | 显示全部楼层
这是由于ROUTER的问题造成的,解决的办法如下:
http://www.linuxsir.cn/bbs/showthread.php?t=196183
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-12-31 23:08:08 | 显示全部楼层
谢谢你的回复。我去试试。~~太感谢了。
回复 支持 反对

使用道具 举报

发表于 2008-1-1 17:44:40 | 显示全部楼层

网关设置改下试试

请把网卡上配置的网关去掉!也就是说,不要缺省网关,由PPPOE去自动猎取!
不知对你有没有帮助!
回复 支持 反对

使用道具 举报

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

本版积分规则

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