|
|
|
|
 ip aliases 問題 - hkj [ 2006-05-14 18:31 | 8,248 byte(s)]
 Re: ip aliases 問題 - skyone [ 2006-05-14 21:07 | 95 byte(s)]
 Re: ip aliases 問題 - hkj [ 2006-05-14 21:17 | 53 byte(s)]
|
|
|
|
[Original]
[Print]
[Top]
|
你好,
我有一部 RedHat 7 伺服器, 其 IP 為 202.85.1.120-141 (用 eth0, eth0:1, ... 為 ip alias), netmask 255.255.255.0, default gateway 是 202.85.1.1.
奇怪的是當我連上之後, 發現在 202.85.1.xxx 的電腦, 就能 ping 或使用 202.85.1.120-141 的服務, 而在外面 (不同 subnet) 的電腦, 就只可以連接到 202.85.1.120 (eth0) 的地址和服務, 而 202.85.1.121-141 (eth0:1, ...) 就連接不上.
1. 請問會有什麼原因導致這個情況呢?
2. 我可以用什麼指令檢查呢?
3. 我可以檢查那些設定檔來修復呢?
謝謝
Joe
以下是一些相關資料:
<pre>
[joe@computer joe]# /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.120 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:676900 errors:0 dropped:0 overruns:0 frame:0
TX packets:781339 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:5 Base address:0x3000
eth0:0 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.121 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:1 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.122 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:2 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.123 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:3 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.124 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:4 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.125 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:5 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.126 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:6 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.127 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:7 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.128 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:8 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.129 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:9 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.130 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:10 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.131 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:11 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.132 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:12 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.133 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:13 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.134 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:14 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.135 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:15 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.136 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:16 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.137 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:17 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.138 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:18 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.139 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:19 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.140 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
eth0:20 Link encap:Ethernet HWaddr 00:50:8B:E0:37:04
inet addr:202.85.1.141 Bcast:202.85.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:5 Base address:0x3000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:60109 errors:0 dropped:0 overruns:0 frame:0
TX packets:60109 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
[joe@computer joe]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
202.85.1.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
0.0.0.0 202.85.1.1 0.0.0.0 UG 40 0 0 eth0
[joe@computer joe]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
202.85.1.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 202.85.1.1 0.0.0.0 UG 0 0 0 eth0
</pre>
|
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
你试着加一条加关route的
route add -net 0.0.0.0 netmask 0.0.0.0 gw 202.85.1.1
|
|
|
----
轻舞飞扬?:)!那是我的手指!
|
|
[Original]
[Print]
[Top]
|
|
|