- 論壇徽章:
- 0
|
我有一個(gè)集群,其中一個(gè)節(jié)點(diǎn)有雙網(wǎng)卡,我想用一個(gè)節(jié)點(diǎn)作為內(nèi)網(wǎng)節(jié)點(diǎn),另一個(gè)作為訪問(wèn)外網(wǎng)地址,開(kāi)始設(shè)置了ip后,內(nèi)網(wǎng)沒(méi)有問(wèn)題。
[root@note1 ~]# ifconfig
em1 Link encap:Ethernet HWaddr C8:1F:66:BF:F2:50
inet addr:10.10.1.1 Bcast:10.10.255.255 Mask:255.255.0.0
inet6 addr: fe80::ca1f:66ff:febf:f250/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11189 errors:0 dropped:0 overruns:0 frame:0
TX packets:5153 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:986198 (963.0 KiB) TX bytes:459499 (448.7 KiB)
Interrupt:16
em2 Link encap:Ethernet HWaddr C8:1F:66:BF:F2:51
inet addr:10.24.1.1 Bcast:10.24.1.255 Mask:255.255.255.0
inet6 addr: fe80::ca1f:66ff:febf:f251/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1337 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:114048 (111.3 KiB) TX bytes:748 (748.0 b)
Interrupt:17
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:256 errors:0 dropped:0 overruns:0 frame:0
TX packets:256 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:24154 (23.5 KiB) TX bytes:24154 (23.5 KiB)
但是,外網(wǎng)就無(wú)法連接了。
我按照http://linux.chinaunix.net/techd ... 07/02/1014693.shtml,重新設(shè)置了路由,結(jié)果也不成,報(bào)
[root@note1 ~]# ping 10.24.172.142
PING 10.24.172.142 (10.24.172.142) 56(84) bytes of data.
From 10.10.1.1 icmp_seq=2 Destination Host Unreachable
From 10.10.1.1 icmp_seq=3 Destination Host Unreachable
From 10.10.1.1 icmp_seq=4 Destination Host Unreachable
From 10.10.1.1 icmp_seq=6 Destination Host Unreachable
From 10.10.1.1 icmp_seq=7 Destination Host Unreachable
From 10.10.1.1 icmp_seq=8 Destination Host Unreachable
From 10.10.1.1 icmp_seq=10 Destination Host Unreachable
From 10.10.1.1 icmp_seq=11 Destination Host Unreachable
From 10.10.1.1 icmp_seq=12 Destination Host Unreachable
From 10.10.1.1 icmp_seq=14 Destination Host Unreachable
From 10.10.1.1 icmp_seq=15 Destination Host Unreachable
From 10.10.1.1 icmp_seq=16 Destination Host Unreachable
From 10.10.1.1 icmp_seq=18 Destination Host Unreachable
From 10.10.1.1 icmp_seq=19 Destination Host Unreachable
但是,外網(wǎng)的網(wǎng)關(guān)是通的,
[root@note1 ~]# ping 10.24.1.250
PING 10.24.1.250 (10.24.1.250) 56(84) bytes of data.
64 bytes from 10.24.1.250: icmp_seq=1 ttl=255 time=0.617 ms
64 bytes from 10.24.1.250: icmp_seq=2 ttl=255 time=0.645 ms
64 bytes from 10.24.1.250: icmp_seq=3 ttl=255 time=0.653 ms
64 bytes from 10.24.1.250: icmp_seq=4 ttl=255 time=0.626 ms
64 bytes from 10.24.1.250: icmp_seq=5 ttl=255 time=0.616 ms
64 bytes from 10.24.1.250: icmp_seq=6 ttl=255 time=0.606 ms
64 bytes from 10.24.1.250: icmp_seq=7 ttl=255 time=0.583 ms
路由設(shè)置如下:
[root@note1 ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.24.1.0 * 255.255.255.0 U 1 0 0 em2
10.10.1.0 * 255.255.255.0 U 0 0 0 em1
10.10.0.0 * 255.255.0.0 U 0 0 0 em1
link-local * 255.255.0.0 U 1002 0 0 em1
default note1 0.0.0.0 UG 0 0 0 em1
請(qǐng)大家?guī)兔纯矗以趺茨軌騪ing通10.24.172.142, 另外,我down了em1后,是可以,覺(jué)得還是兩個(gè)網(wǎng)卡是沖突,還有,我打開(kāi)了/proc/sys/network/ipv4/ip_forward,值是1 |
|