[問題] 網路連不出去問題 (兩張網卡)

看板Linux作者 (真相)時間13年前 (2011/05/06 11:16), 編輯推噓1(108)
留言9則, 4人參與, 最新討論串1/4 (看更多)
我的系統是 Linux, eth0是內網, eth1是外網. 我用 ping的方式, dns server, 目的ip都是通的 [root@localhost ~]# ping 168.95.192.1 PING 168.95.192.1 (168.95.192.1) 56(84) bytes of data. 64 bytes from 168.95.192.1: icmp_seq=1 ttl=248 time=37.7 ms 64 bytes from 168.95.192.1: icmp_seq=2 ttl=248 time=37.4 ms [root@localhost ~]# ping 64.233.183.104 (www.google.com.tw) PING 64.233.183.104 (64.233.183.104) 56(84) bytes of data. 64 bytes from 64.233.183.104: icmp_seq=1 ttl=53 time=39.8 ms 64 bytes from 64.233.183.104: icmp_seq=2 ttl=53 time=39.5 ms 不過我直接ping www.google.com.tw就是沒有反應..... 我想應該是轉譯的問題... 但是系統的設定看似乎都是對的, routing table也沒什麼問題... 哪位大大幫忙診斷一下~~XD [root@localhost ~]# cat /etc/resolv.conf ; generated by /sbin/dhclient-script nameserver 168.95.1.1 nameserver 168.95.92.1 [root@localhost ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1 eth0 Link encap:Ethernet HWaddr BC:AE:C5:4E:96:71 inet addr:192.168.26.1 Bcast:192.168.255.255 Mask:255.255.0.0 eth1(外網) Link encap:Ethernet HWaddr BC:AE:C5:4E:96:8A inet addr:192.168.1.112 Bcast:192.168.1.255 Mask:255.255.255.0 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.251.76.100

05/06 11:21, , 1F
「nslookup www.google.com.tw」的結果貼上來?
05/06 11:21, 1F

05/06 13:04, , 2F
換DNS看看,我比較喜歡用8.8.8.8
05/06 13:04, 2F

05/06 13:27, , 3F
我猜防火牆把 UDP 53 的封包擋掉了。
05/06 13:27, 3F

05/06 14:16, , 4F
8888用了也是依樣,所以應該不是nameserver的問題
05/06 14:16, 4F

05/06 14:27, , 5F
咦?! 192.168.0.0 的 mask 是 155.155.0.0 似乎跟 .1.0
05/06 14:27, 5F

05/06 14:27, , 6F
的網段有部份重疊了。
05/06 14:27, 6F

05/06 14:28, , 7F
更正! 是 255.255.0.0
05/06 14:28, 7F

05/06 14:47, , 8F
重疊有辦法設定優先序嗎?
05/06 14:47, 8F

05/06 14:52, , 9F
我開始也以為是網段重疊問題,但是ping nameserver又可以
05/06 14:52, 9F
文章代碼(AID): #1DmsWcJe (Linux)
討論串 (同標題文章)
文章代碼(AID): #1DmsWcJe (Linux)