免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: haide1014
打印 上一主题 下一主题

关于不同网段组网 [复制链接]

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
61 [报告]
发表于 2010-08-28 15:10 |只看该作者
LINUX上的。

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
62 [报告]
发表于 2010-08-28 15:11 |只看该作者
arp -a

论坛徽章:
0
63 [报告]
发表于 2010-08-28 15:25 |只看该作者
本帖最后由 haide1014 于 2010-08-28 15:26 编辑
  1. [root@CentOS ~]# ifconfig -a
  2. eth0      Link encap:Ethernet  HWaddr 00:40:CA:79:72:7A  
  3.           inet addr:192.168.2.10  Bcast:192.168.2.255  Mask:255.255.255.0
  4.           inet6 addr: fe80::240:caff:fe79:727a/64 Scope:Link
  5.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  6.           RX packets:26512 errors:0 dropped:0 overruns:0 frame:0
  7.           TX packets:127 errors:0 dropped:0 overruns:0 carrier:0
  8.           collisions:0 txqueuelen:1000
  9.           RX bytes:1948901 (1.8 MiB)  TX bytes:17841 (17.4 KiB)
  10.           Interrupt:193 Base address:0x8000

  11. eth1      Link encap:Ethernet  HWaddr 00:1D:0F:13:5D:1A  
  12.           inet addr:192.168.7.7  Bcast:192.168.7.255  Mask:255.255.255.0
  13.           inet6 addr: fe80::21d:fff:fe13:5d1a/64 Scope:Link
  14.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  15.           RX packets:195 errors:0 dropped:0 overruns:0 frame:0
  16.           TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
  17.           collisions:0 txqueuelen:1000
  18.           RX bytes:17311 (16.9 KiB)  TX bytes:9362 (9.1 KiB)
  19.           Interrupt:169 Base address:0xa000

  20. lo        Link encap:Local Loopback  
  21.           inet addr:127.0.0.1  Mask:255.0.0.0
  22.           inet6 addr: ::1/128 Scope:Host
  23.           UP LOOPBACK RUNNING  MTU:16436  Metric:1
  24.           RX packets:1464 errors:0 dropped:0 overruns:0 frame:0
  25.           TX packets:1464 errors:0 dropped:0 overruns:0 carrier:0
  26.           collisions:0 txqueuelen:0
  27.           RX bytes:2345236 (2.2 MiB)  TX bytes:2345236 (2.2 MiB)

  28. sit0      Link encap:IPv6-in-IPv4  
  29.           NOARP  MTU:1480  Metric:1
  30.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  31.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  32.           collisions:0 txqueuelen:0
  33.           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
复制代码

  1. [root@CentOS ~]# arp -a
  2. ? (192.168.2.1) at 00:23:CD:8D:D9:49 [ether] on eth0
  3. ? (192.168.2.204) at 00:26:B9:19:F6:B7 [ether] on eth0
  4. ? (192.168.2.2) at 00:26:99:72:EC:7B [ether] on eth0
  5. ? (192.168.2.186) at 00:15:C5:71:79:12 [ether] on eth0
  6. ? (192.168.2.233) at 6C:F0:49:B0:7D:EA [ether] on eth0
  7. ? (192.168.7.186) at 00:11:5B:16:9E:85 [ether] on eth1
复制代码
  1. [root@CentOS ~]# netstat -nr
  2. Kernel IP routing table
  3. Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
  4. 192.168.7.0      0.0.0.0         255.255.255.0   U         0 0          0 eth1
  5. 192.168.7.0      0.0.0.0         255.255.255.0   U         0 0          0 eth1
  6. 192.168.2.0      0.0.0.0         255.255.255.0   U         0 0          0 eth0
  7. 192.168.2.0      0.0.0.0         255.255.255.0   U         0 0          0 eth0
  8. 169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
  9. 0.0.0.0         192.168.2.1      0.0.0.0         UG        0 0          0 eth0
复制代码
192.168.2.1 为网段B路由器的接口IP

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
64 [报告]
发表于 2010-08-28 15:27 |只看该作者
现在试试。

ping 192.168.2.1 应该是通的。

然后用192.168.7.0 段的ping 192.168.2.1 试试。

论坛徽章:
0
65 [报告]
发表于 2010-08-28 15:31 |只看该作者
不通,我看配置也没错啊。就是不通,郁闷啊

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
66 [报告]
发表于 2010-08-28 15:32 |只看该作者
是吗?
linux 机器ping 192.168.2.1 也不通吗?

192.168.2.x 段的其他机器呢?

LINUX的iptables-save

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
67 [报告]
发表于 2010-08-28 15:36 |只看该作者
LINUX机器:

ping 192.168.2.1
ping -I 192.168.7.7 192.168.2.1

结果和66楼一起给我。

论坛徽章:
0
68 [报告]
发表于 2010-08-28 15:41 |只看该作者
回复 67# ssffzz1


    在linux机器上都可以ping通192.168.7.7 192.168.2.1

另外,linux机器上iptable是关闭的。会不会是这个原因

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
69 [报告]
发表于 2010-08-28 15:42 |只看该作者
ping 192.168.2.1
ping -I 192.168.7.7 192.168.2.1

直接给我结果。

论坛徽章:
0
70 [报告]
发表于 2010-08-28 15:42 |只看该作者
在linux上可以ping通任何网段机器,但是在C网段,也就是7端的机器,无法ping
通B端的机器,
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP