s_warmwind 发表于 2006-11-5 12:11:51

debian使用路由上网问题

之前我一直使用ppp来上网,后来打算使用路由来上网了。所以对/etc/network/interfaces进行了修改。修改后的文件内容如下:
RS:/etc/network# more interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

#the LAN configure
auto eth0
iface eth0 inet static
address 1.1.1.66
netmask 255.255.255.0
gateway 1.1.1.1




#ppp\uffff\uffff\uffff
#iface dsl-provider inet ppp
#    provider dsl-provider

# please do not modify the following line
   pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf

这样设置以后路由可以登陆,但是还是不能上网。
RS:/etc/network# ping www.163.com
ping: unknown host www.163.com
原来在windows下设置时有个DNS设置,这里是不是也要设置一下阿??请问在哪里设置?0?

注:我的路由地址是1.1.1.1,这个路由连到另外一个路由上192.168.1.1,现在我可以登陆两个路由。也可以对任何一个进行设置。但是不能上网。使用ppp可以上。
RS:/etc/network# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=64 time=0.429 ms

--- 1.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.429/0.429/0.429/0.000 ms
RS:/etc/network# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=63 time=0.933 ms

--- 192.168.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.933/0.933/0.933/0.000 ms
RS:/etc/network#

eth0的信息如下:
RS:/etc/network# ifconfig eth0
eth0      Link encap:EthernetHWaddr 00:11:5B:59:6A:7C
          inet addr:1.1.1.66Bcast:1.255.255.255Mask:255.255.255.0
          inet6 addr: fe80::211:5bff:fe59:6a7c/64 Scope:Link
          UP BROADCAST RUNNING MULTICASTMTU:1500Metric:1
          RX packets:1679 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1549 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:627049 (612.3 KiB)TX bytes:188938 (184.5 KiB)
          Interrupt:193 Base address:0xec00

望大侠指教....

tingxx 发表于 2006-11-6 13:55:54

如果ip可以行,而域名不行,则是域名解析的问题.请将你的域名解释服务器地址加到/etc/resolv.conf里面

s_warmwind 发表于 2006-11-11 13:19:01

多谢大侠。。

哈工大??原来是师兄,以后还有很多问题要请教。。
页: [1]
查看完整版本: debian使用路由上网问题