本文介绍了两个不同的子网有相同的网关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想给我的Windows服务器n linux服务器的静态ip但是当我这样做的时候我的默认网关显示linux中的目标主机无法访问我在linux上ping它告诉我现在该怎么办?



我的Windows服务器设置是

ipv4地址192.168.1.68

ipv4子网255.255.255.0

ipv4默认网关192.168.1.1



和我的linux服务器设置是

eth0链接封装:以太网HWaddr 00:0C:29:6B :E9:8A

inet addr:192.168.178.128 Bcast:192.168.178.255 Mask:255.255.255.0

inet6 addr:fe80 :: 20c:29ff:fe6b:e98a / 64范围:链接

UP广播运行多播MTU:1500公制:1

RX包:44949错误:0丢弃:0超支:0帧:0

TX包:34250错误:0丢弃:0超支:0运营商:0

冲突:0 txqueuelen:1000

RX字节:30998896(29.5 MiB) TX字节: 1860368(1.7 MiB)



lo链接封装:本地环回

inet addr:127.0.0.1掩码:255.0.0.0

inet6 addr ::: 1/128范围:主机

UP LOOPBACK RUNNING MTU:16436公制:1

RX包:231错误:0掉落:0超支:0帧:0

TX包:231错误:0丢弃:0超支:0运营商:0

冲突:0 txqueuelen:0

RX字节:23426(22.8 KiB)TX字节:23426(22.8 KiB)

i want to give static ip of both my windows server n linux server but when i do this then my default gateway shows Destination Host Unreachable in linux when i ping it in linux tell me what can i do now?

my windows server settings are
ipv4 address 192.168.1.68
ipv4 subnet 255.255.255.0
ipv4 default gateway 192.168.1.1

and my linux server settings are
eth0 Link encap:Ethernet HWaddr 00:0C:29:6B:E9:8A
inet addr:192.168.178.128 Bcast:192.168.178.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe6b:e98a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44949 errors:0 dropped:0 overruns:0 frame:0
TX packets:34250 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:30998896 (29.5 MiB) TX bytes:1860368 (1.7 MiB)

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:231 errors:0 dropped:0 overruns:0 frame:0
TX packets:231 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:23426 (22.8 KiB) TX bytes:23426 (22.8 KiB)

推荐答案


                                    +-------- +
                               +----+ Windows | 192.168.1.68
+----------+    +--------+     |    +---------+
|  Gateway +----+ switch +-----+
+----------+    |        +-----+
 192.168.1.1    +--------+     |   +----------+
                               +---+  Linux   | 192.168.1.128
                                   +----------+



如果ping Linux服务器从windows可以看到它吗?

反过来?

来自windows机器还可以吗?

你确定Linux服务器IP吗?地址实际上是192.168.1.128?

我正在使用解空间来使图形可读。


If you ping the Linux server from windows can you see it?
And the reverse?
From windows machine is all ok?
Are you sure that the Linux server IP address is effectively 192.168.1.128 ?
I'm using solution space to make graph readable.


这篇关于两个不同的子网有相同的网关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 18:32