小猪发现为什么要填写小猪短租邀请码在哪里?

求教,在校园网内如何设置多台机器的 ip地址在同一网段内?_湖南大学吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:177,640贴子:
求教,在校园网内如何设置多台机器的 ip地址在同一网段内?收藏
想用vray做分布式渲染,有信科院的大神或者是建院,设计院的前辈试过么?
文档翻译,年终钜惠!注册就送268元体验金!
如果都是一个园区的,内网地址是一个网段里面的,如果是在教学楼或者院楼,ip地址会不一样,但是这些ip都是在一个内网里面的,可以直接访问
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或新手园地& & & 硬件问题Linux系统管理Linux网络问题Linux环境编程Linux桌面系统国产LinuxBSD& & & BSD文档中心AIX& & & 新手入门& & & AIX文档中心& & & 资源下载& & & Power高级应用& & & IBM存储AS400Solaris& & & Solaris文档中心HP-UX& & & HP文档中心SCO UNIX& & & SCO文档中心互操作专区IRIXTru64 UNIXMac OS X门户网站运维集群和高可用服务器应用监控和防护虚拟化技术架构设计行业应用和管理服务器及硬件技术& & & 服务器资源下载云计算& & & 云计算文档中心& & & 云计算业界& & & 云计算资源下载存储备份& & & 存储文档中心& & & 存储业界& & & 存储资源下载& & & Symantec技术交流区安全技术网络技术& & & 网络技术文档中心C/C++& & & GUI编程& & & Functional编程内核源码& & & 内核问题移动开发& & & 移动开发技术资料ShellPerlJava& & & Java文档中心PHP& & & php文档中心Python& & & Python文档中心RubyCPU与编译器嵌入式开发驱动开发Web开发VoIP开发技术MySQL& & & MySQL文档中心SybaseOraclePostgreSQLDB2Informix数据仓库与数据挖掘NoSQL技术IT业界新闻与评论IT职业生涯& & & 猎头招聘IT图书与评论& & & CU技术图书大系& & & Linux书友会二手交易下载共享Linux文档专区IT培训与认证& & & 培训交流& & & 认证培训清茶斋投资理财运动地带快乐数码摄影& & & 摄影器材& & & 摄影比赛专区IT爱车族旅游天下站务交流版主会议室博客SNS站务交流区CU活动专区& & & Power活动专区& & & 拍卖交流区频道交流区
稍有积蓄, 积分 217, 距离下一级还需 283 积分
论坛徽章:0
请问各位DX,,,一个域名可以解析到两个IP地址吗??
&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp
稍有积蓄, 积分 376, 距离下一级还需 124 积分
论坛徽章:0
一个域名可以解析到两个IP地址吗??
小富即安, 积分 4840, 距离下一级还需 160 积分
论坛徽章:0
俩公网IP吗?
DNS上咋处理?
不怕冲突吗》?
还是网络负载均衡?
白手起家, 积分 42, 距离下一级还需 158 积分
论坛徽章:0
添加两条不同的A记录就行了。
稍有积蓄, 积分 463, 距离下一级还需 37 积分
论坛徽章:0
或者DNS策略解析
丰衣足食, 积分 574, 距离下一级还需 426 积分
论坛徽章:0
原帖由 红雨 于
14:35 发表
或者DNS策略解析
此话怎讲?
家境小康, 积分 1248, 距离下一级还需 752 积分
论坛徽章:0
比如:BIND里面的view功能。
北京皓辰网域网络信息技术有限公司. 版权所有 京ICP证:060528号 北京市公安局海淀分局网监中心备案编号:
广播电视节目制作经营许可证(京) 字第1234号
中国互联网协会会员&&联系我们:
感谢所有关心和支持过ChinaUnix的朋友们
转载本站内容请注明原作者名及出处如何使用两台主机实现三个网段之间互通且三个网段均可联网 - 博客频道 - CSDN.NET
博客已迁至: http://jiya.io, 以后在这里写博文~
分类:〖林纳克斯〗
& & 版权声明:对于本博客所有原创文章,允许个人、教育和非商业目的使用,但务必保证文章的完整性且不作任何修改地以超链接形式注明原始作者、出处及本声明。
& & 博客地址:
& & 原始作者:季亚
step1:搭建网络拓扑
首先,图1是我们在实验室所搭建的网络拓扑结构,其中192.168.1.*为我们实验室的内网,210.28.164.11通往外网,我们所要实现的功能就是使A、B、C三网段网络互通,且三网段可以使用210.28.164.11这个IP连接到外网上网。
图1 网络拓扑
网络拓扑注解:上面两台主机是我们欲做路由器且装有多个网卡和LInux操作系统的PC机,其中Route1装有两个网卡,其中一个网卡(设备名eth1)的IP地址为192.168.1.250,另一个网卡(设备名eth0)的IP地址为192.168.2.254;而Route2装有三个网卡,其中一个网卡(设备名em1)是为了与外网相连的,它的IP地址为210.28.164.11,其余网卡(设备名为p1p1和p2p1)的IP地址分别为192.168.3.254和192.168.2.253。下面一层的设备是三个交换机,分别连接三个不同网段的内网,且我们使用三台主机号为5的机器进行测试三个网段之间的网络通畅情况。&
注意:在进行连线的时候注意如果是PC机和交换机相连需要直连线,如果两台PC机之间相连则需要使用交叉线!另外,比较新的网卡有只能识别功能,因此直连线和交叉线均可,相关知识读者可以参考鸟哥的Linux私房菜 服务器架设篇(第二版)中Page26-27页中的内容。
网络拓扑搭建好了,下面我们来进行相关网络配置,首先我们要确认两台机器都装有Linux系统,笔者所使用的两台机器安装的操作系统分别为红帽5.5(Route1)企业版和Fedora15(Route2).详细信息如下:
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:02 EDT
i686 i386 GNU/Linux
[root@localhost ~]# Route2:
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.40.6-0.fc15.i686.PAE #1 SMP Tue Oct 4 00:44:38 UTC
i686 i386 GNU/Linux
[root@localhost ~]#
另外,还要确保两台机器都装有iptables,可使用rpm命令检查iptables组件是否安装:
[root@localhost ~]# rpm -qa iptables
iptables-1.3.5-1.2.1
[root@localhost ~]# Route2:
[root@localhost ~]# rpm -qa iptables
iptables-1.4.10-2.fc15.i686
[root@localhost ~]#
如果机器中没有安装iptables,请通过Linux系统安装光盘/镜像文件或在网上搜索(http://rpm.pbone.net)下载获取安装iptables所需的软件包,并将该iptables安装软件拷贝至机器上进行安装。
step2:IP配置
根据图一中的拓扑结构依次配置两台主机的IP地址,如下所示:
+-------+ Devernet Configuration +--------+
eth1________________ |
eth1________________ |
| Use DHCP
| Static IP
192.168.1.250_______ |
255.255.255.0_______ |
| Default gateway IP ____________________ |
+--------+
| Cancel |
+--------+
+-----------------------------------------+
+-------+ Devernet Configuration +--------+
eth0________________ |
eth0________________ |
| Use DHCP
| Static IP
192.168.2.254_______ |
255.255.255.0_______ |
| Default gateway IP 192.168.2.253_______ |
+--------+
| Cancel |
+--------+
+-----------------------------------------+
请注意Route1中eth0的默认网关的设置,不然A、B两个网段将不能正常上网。
┌─────────────┤ 网络配置 ├─────────────┐
em1_________________ │
em1_________________ │
│ 使用 DHCP
│ 静态 IP
210.28.164.11_______ │
│ 子网掩码
255.255.255.0_______ │
│ 默认网关 IP
210.28.164.254______ │
│ 主 DNS 服务器
61.155.18.30________ │
│ 第二 DNS 服务器 208.67.222.222______ │
┌──────┐
┌──────┐
│ 确定 │
│ 取消 │
└──────┘
└──────┘
└──────────────────────────────────────┘
┌─────────────┤ 网络配置 ├─────────────┐
p1p1________________ │
p1p1________________ │
│ 使用 DHCP
│ 静态 IP
192.168.3.254_______ │
│ 子网掩码
255.255.255.0_______ │
│ 默认网关 IP
____________________ │
│ 主 DNS 服务器
61.155.18.30________ │
│ 第二 DNS 服务器 208.67.222.222______ │
┌──────┐
┌──────┐
│ 确定 │
│ 取消 │
└──────┘
└──────┘
└──────────────────────────────────────┘
┌─────────────┤ 网络配置 ├─────────────┐
p2p1________________ │
p2p1________________ │
│ 使用 DHCP
│ 静态 IP
192.168.2.253_______ │
│ 子网掩码
255.255.255.0_______ │
│ 默认网关 IP
____________________ │
│ 主 DNS 服务器
61.155.18.30________ │
│ 第二 DNS 服务器 208.67.222.222______ │
┌──────┐
┌──────┐
│ 确定 │
│ 取消 │
└──────┘
└──────┘
└──────────────────────────────────────┘备注:上面部分配置信息无意义,请注意使用的均是静态IP,不要勾选DHCP选项。
step3:重启网络
配置完成之后,请输入下面命令重启网络:
[root@localhost ~]# service network restart
正在关闭接口 eth0: [确定]
正在关闭接口 eth1: [确定]
关闭环回接口: [确定]
禁用 IPv4 包转送: net.ipv4.ip_forward = 0
弹出环回接口: [确定]
弹出界面 eth0: [确定]
弹出界面 eth1: [确定]
[root@localhost ~]#
[root@localhost ~]# service network restart
Restarting network (via systemctl):
[root@localhost ~]#
注意:请注意网络是否正常开启,如有问题,请查阅相关资料,解决后继续下面工作。
重启网络后可以查看系统中默认的路由信息:
[root@localhost ~]# route -n
Kernel IP routing table
Destination
Flags Metric Ref
192.168.2.0
255.255.255.0
192.168.1.0
255.255.255.0
169.254.0.0
255.255.0.0
[root@localhost ~]#
[root@localhost ~]# route -n
Kernel IP routing table
Destination
Flags Metric Ref
210.28.164.254
192.168.2.0
255.255.255.0
192.168.3.0
255.255.255.0
192.168.10.0
255.255.255.0
210.28.164.0
255.255.255.0
[root@localhost ~]# 从上面的路由表信息中可以知道,系统会自动根据网卡的IP地址信息给网卡添加默认路由信息,如在Route1中设备eth0的IP地址为192.168.2.254,系统会自动给它添加192.168.2.*网段的路由信息;在Route2中设备p2p1的IP地址为192.168.2.253,系统会自动给它添加192.168.2.*网段的路由信息。由以上信息可知由Route1可以通过192.168.2.253直接ping通Route2,但是不能通过192.168.3.254ping通Route2,因为没有到从192.168.2.*或者192.168.1.*到192.168.3.*的路由路径,反向也是如此。
step4:启动系统IP转发(这一步非常重要,其他操作都完成了,但是网络还是不通畅大多都是这个问题)
Linux系统缺省并没有打开IP转发功能,由于进出内网的数据都必须经过防火墙,所以必须启动防火墙的IP数据包转发功能。首先编辑/etc/sysctl.conf文件,并设置参数net.ipv4.ip_forward的值为1,操作命令如下所示:
[root@localhost ~]# vi /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
# For binary values, 0 is disabled, 1 is enabled.
See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
&/etc/sysctl.conf& 35L, 994C written
[root@localhost ~]# service network restart
正在关闭接口 eth0: [确定]
正在关闭接口 eth1: [确定]
关闭环回接口: [确定]
弹出环回接口: [确定]
弹出界面 eth0: [确定]
弹出界面 eth1: [确定]
[root@localhost ~]# 操作完成后,记得重新启动下网络,最后检查确认IP转发功能的状态,可以查看/proc文件系统中的/proc/sys/net/ipv4/ip_forward状态值,如果该值为0,说明当前系统禁止进行IP转发;如果是1,则说明系统的IP转发功能已经打开。操作命令如下所示:
[root@localhost ~]# cat /proc/sys/net/ipv4/ip_forward
[root@localhost ~]#
step5:添加路由信息
终于到了最最核心的部分了,其实就是一个命令的多次使用,以使IP能够路由。由于在第四步中我们知道系统已经为我们自动添加已有网卡所对应IP地址的IP网段的路由信息,因此无需添加本网段的路由信息了。即无需在Route1添加如下路由信息了:
[root@localhost ~]# route add -net 192.168.2.0/24 eth0
[root@localhost ~]# route add -net 192.168.3.0/24 eth0同样,在Route2也无需添加如下路由信息:
[root@localhost ~]# route add -net 192.168.1.0/24 p2p1
[root@localhost ~]# route add -net 192.168.2.0/24 p2p1
[root@localhost ~]# route add -net 192.168.3.0/24 p1p1即只需在路由表中添加非0.0.0.0网关的路由信息,添加命令操作如下。
Route1中的操作命令如下所示:
[root@localhost ~]# route add -net 192.168.3.0/24 gw 192.168.2.253 eth0
[root@localhost ~]# route add -net 192.168.2.0/24 gw 192.168.2.253 eth0
[root@localhost ~]#
下面是我在A网段中的一台IP地址为192.168.1.5,网关为192.168.1.250的PC机中的操作:
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有
Microsoft Corp.
C:\Documents and Settings\jiya&ping 192.168.1.250
Pinging 192.168.1.250 with 32 bytes of data:
Reply from 192.168.1.250: bytes=32 time&1ms TTL=64
Ping statistics for 192.168.1.250:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Documents and Settings\jiya&ping 192.168.3.254
Pinging 192.168.3.254 with 32 bytes of data:
Reply from 192.168.3.254: bytes=32 time&1ms TTL=63
Ping statistics for 192.168.3.254:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Documents and Settings\jiya&ping 192.168.3.5
Pinging 192.168.3.5 with 32 bytes of data:
Reply from 192.168.3.5: bytes=32 time&1ms TTL=62
Reply from 192.168.3.5: bytes=32 time&1ms TTL=62
Ping statistics for 192.168.3.5:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Documents and Settings\jiya&tracert 192.168.3.5
Tracing route to 192.168.3.5 over a maximum of 30 hops
192.168.1.250
192.168.2.253
192.168.3.5
Trace complete.
C:\Documents and Settings\jiya&
Route2中的操作命令如下所示:
[root@localhost ~]# route add -net 192.168.1.0/24 gw 192.168.2.254 p2p1
[root@localhost ~]# route add -net 192.168.2.0/24 gw 192.168.2.254 p2p1
[root@localhost ~]# 这样便可以实现由Route1通过192.168.3.254访问Route2了,操作命令如下所示:
[root@localhost ~]# ping 192.168.3.254
PING 192.168.3.254 (192.168.3.254) 56(84) bytes of data.
64 bytes from 192.168.3.254: icmp_seq=1 ttl=64 time=1.11 ms
64 bytes from 192.168.3.254: icmp_seq=2 ttl=64 time=0.127 ms
64 bytes from 192.168.3.254: icmp_seq=3 ttl=64 time=0.145 ms
64 bytes from 192.168.3.254: icmp_seq=4 ttl=64 time=0.144 ms
--- 192.168.3.254 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.127/0.381/1.111/0.421 ms
[root@localhost ~]#
Step6:IP伪装配置(为内网IP做端口映射)
如此,虽然我们这三个内网可以互通网络,但是我们还是不能在这A、B、C网段内上网,操作命令如下所示:
[root@localhost ~]# ping
ping: unknown host
[root@localhost ~]#
这是为什么呢?因为如果我们内网的IP发送数据到外网,但是我们的IP并不合法,一旦进入外网,IP信息会被过滤掉,自然不能上网了,如此,我们需要为内网的IP地址做个端口映射,即使A网段的IP使用192.168.2.254这个IP上网,而使B网段和C网段内的IP使用210.28.164.11这个IP上网,其实192.168.2.254也属于B网段,因此根本上是使A、B、C这三个网段可以使用210.28.164.11这个IP端口上网。
在Route1中,我们可以通过NAT防火墙进行IP地址伪装,操作命令如下所示:
[root@localhost ~]# iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE
[root@localhost ~]# service iptables save
将当前规则保存到 /etc/sysconfig/iptables:[确定]
[root@localhost ~]# service iptables restart
清除防火墙规则:[确定]
把 chains 设置为 ACCEPT 策略:nat filter [确定]
正在卸载 Iiptables 模块:[确定]
应用 iptables 防火墙规则:[确定]
载入额外 iptables 模块:ip_conntrack_netbios_ns [确定]
[root@localhost ~]#
类似的,在Route2中,我们也可以通过NAT防火墙进行IP地址伪装,操作命令如下所示:
[root@localhost ~]# iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o em1 -j MASQUERADE
[root@localhost ~]# iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -o em1 -j MASQUERADE
[root@localhost ~]# service iptables save
iptables:将防火墙规则保存到 /etc/sysconfig/iptables:[确定]
[root@localhost ~]# service iptables restart
Restarting iptables (via systemctl):
[root@localhost ~]#
这些步骤操作完成之后,我们就可以在客户端192.168.1.5、192.168.2.5和192.168.3.5三台机器上上网了,而且A、B、C这三个网段也可以互通了。
step7:测试
下面是在Route1(利用B网段中192.168.2.254这个IP上网,而B网段又利用210.28.164.11这个IP上网)中的操作:
[root@localhost ~]# ping
PING www. (119.75.218.45) 56(84) bytes of data.
64 bytes from 119.75.218.45: icmp_seq=1 ttl=49 time=26.0 ms
64 bytes from 119.75.218.45: icmp_seq=2 ttl=49 time=26.0 ms
64 bytes from 119.75.218.45: icmp_seq=3 ttl=49 time=26.2 ms
64 bytes from 119.75.218.45: icmp_seq=4 ttl=49 time=25.9 ms
64 bytes from 119.75.218.45: icmp_seq=5 ttl=49 time=26.0 ms
64 bytes from 119.75.218.45: icmp_seq=6 ttl=49 time=26.2 ms
64 bytes from 119.75.218.45: icmp_seq=7 ttl=49 time=26.0 ms
--- www. ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 5999ms
rtt min/avg/max/mdev = 25.966/26.084/26.228/0.214 ms
[root@localhost ~]# traceroute
traceroute to
(119.75.217.56), 30 hops max, 40 byte packets
192.168.2.253 (192.168.2.253)
(210.28.164.254)
172.18.32.254 (172.18.32.254)
10.29.0.201 (10.29.0.201)
202.119.128.229 (202.119.128.229)
202.119.128.2 (202.119.128.2)
zhz0.cernet.net (202.112.38.113)
202.112.53.25 (202.112.53.25)
202.112.62.57 (202.112.62.57)
202.112.62.242 (202.112.62.242)
202.112.6.54 (202.112.6.54)
26.034 ms !X * *
[root@localhost ~]# 由以上的信息可以知道Route1可以上网。
下面是我在A网段中的一台IP地址为192.168.1.5,网关为192.168.1.250的PC机中的操作:
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有
Microsoft Corp.
C:\Documents and Settings\jiya&ipconfig
Windows IP Configuration
Ethernet adapter VMware Network Adapter VMnet8:
Connection-specific DNS Suffix
IP Address. . . . . . . . . . . . : 192.168.11.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter VMware Network Adapter VMnet1:
Connection-specific DNS Suffix
IP Address. . . . . . . . . . . . : 192.168.110.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter 本地连接:
Connection-specific DNS Suffix
IP Address. . . . . . . . . . . . : 192.168.1.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.250
C:\Documents and Settings\jiya&ping
[125.39.127.22] with 32 bytes of data:
Reply from 125.39.127.22: bytes=32 time=134ms TTL=46
Reply from 125.39.127.22: bytes=32 time=139ms TTL=46
Reply from 125.39.127.22: bytes=32 time=137ms TTL=46
Ping statistics for 125.39.127.22:
Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 134ms, Maximum = 139ms, Average = 136ms
C:\Documents and Settings\jiya&tracert
Tracing route to
[125.39.127.22]
over a maximum of 30 hops:
192.168.1.250
192.168.2.253
210.28.164.254
172.18.32.254
10.29.0.201
Request timed out.
202.119.128.229
202.119.128.2
zhz0.cernet.net [202.112.38.113]
202.112.53.25
202.112.36.38
202.112.53.202
219.158.34.121
219.158.5.229
219.158.96.49
219.158.13.250
202.99.66.106
125.39.81.134
125.39.127.22
Trace complete.
C:\Documents and Settings\jiya&
由以上的信息可以知道A网段中的PC可以正常上网。
下面是我在B网段中的一台IP地址为192.168.2.5,网关为192.168.2.253的PC机中的操作:
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有
Microsoft Corp.
C:\Documents and Settings\Admin&ipconfig
Windows IP Configuration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix
IP Address. . . . . . . . . . . . : 192.168.2.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.2.253
C:\Documents and Settings\Admin&ping
Pinging www. [119.75.218.45] with 32 bytes of data:
Reply from 119.75.218.45: bytes=32 time=26ms TTL=49
Reply from 119.75.218.45: bytes=32 time=26ms TTL=49
Reply from 119.75.218.45: bytes=32 time=26ms TTL=49
Ping statistics for 119.75.218.45:
Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 26ms, Maximum = 26ms, Average = 26ms
C:\Documents and Settings\Admin&tracert
Tracing route to www. [119.75.218.45]
over a maximum of 30 hops:
192.168.2.253
210.28.164.254
172.18.32.254
10.29.0.201
Request timed out.
202.119.128.229
202.119.128.2
202.112.38.109
202.112.53.25
bj-11-p11-1.cernet.net [202.112.46.5]
cd1.cernet.net [202.112.53.74]
202.112.6.58
192.168.0.5
10.65.190.131
119.75.218.45
Trace complete.
C:\Documents and Settings\Admin&
下面是我在B网段中的一台IP地址为192.168.2.5,网关为192.168.2.254的PC机中的操作:
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有
Microsoft Corp.
C:\Documents and Settings\Admin&ipconfig
Windows IP Configuration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix
IP Address. . . . . . . . . . . . : 192.168.2.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.2.254
C:\Documents and Settings\Admin&ping
Pinging www. [119.75.218.45] with 32 bytes of data:
Reply from 119.75.218.45: bytes=32 time=26ms TTL=49
Reply from 119.75.218.45: bytes=32 time=26ms TTL=49
Reply from 119.75.218.45: bytes=32 time=26ms TTL=49
Ping statistics for 119.75.218.45:
Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 26ms, Maximum = 26ms, Average = 26ms
C:\Documents and Settings\Admin&tracert
Tracing route to www. [119.75.218.45]
over a maximum of 30 hops:
192.168.2.254
192.168.2.253
210.28.164.254
172.18.32.254
10.29.0.201
Request timed out.
202.119.128.229
202.119.128.2
202.112.38.109
Request timed out.
bj-11-p11-1.cernet.net [202.112.46.5]
Request timed out.
202.112.6.58
192.168.0.5
10.65.190.131
119.75.218.45
Trace complete.
C:\Documents and Settings\Admin&由以上的信息我们可以知道在B网段中,无论我们使用192.168.2.253做网关,还是用192.168.2.254做网关,这个网段内的PC机均可以正常上网。只是用192.168.2.254做网段的机器上网的话需要多一次路由。
下面是我在C网段中的一台IP地址为192.168.3.5,网关为192.168.3.254的PC机中的操作:
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有
Microsoft Corp.
C:\Documents and Settings\Admin&ipconfig
Windows IP Configuration
Ethernet adapter 本地连接:
Connection-specific DNS Suffix
IP Address. . . . . . . . . . . . : 192.168.3.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.3.254
C:\Documents and Settings\Admin&ping
Pinging www. [119.75.218.45] with 32 bytes of data:
Reply from 119.75.218.45: bytes=32 time=395ms TTL=49
Reply from 119.75.218.45: bytes=32 time=389ms TTL=49
Reply from 119.75.218.45: bytes=32 time=520ms TTL=49
Ping statistics for 119.75.218.45:
Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 389ms, Maximum = 520ms, Average = 434ms
C:\Documents and Settings\Admin&tracert
Tracing route to www. [119.75.218.45]
over a maximum of 30 hops:
192.168.3.254
210.28.164.254
172.18.32.254
10.29.0.201
Request timed out.
202.119.128.229
202.119.128.2
202.112.38.109
202.112.53.25
bj-11-p11-1.cernet.net [202.112.46.5]
cd1.cernet.net [202.112.53.74]
202.112.6.58
192.168.0.5
10.65.190.131
119.75.218.45
Trace complete.
C:\Documents and Settings\Admin&由以上的信息可以知道C网段中的PC可以正常上网。
至此,我们发现A、B、C这三个网段之间的机器可以互通网络,且可以通过指定网关上网。
下面是本人配置成功后的路由表信息,仅供参考:
[root@localhost ~]# route -n
Kernel IP routing table
Destination
Flags Metric Ref
192.168.3.0
192.168.2.253
255.255.255.0
192.168.3.0
255.255.255.0
192.168.2.0
192.168.2.253
255.255.255.0
192.168.2.0
255.255.255.0
192.168.1.0
255.255.255.0
169.254.0.0
255.255.0.0
192.168.2.253
[root@localhost ~]#
[root@localhost ~]# route -n
Kernel IP routing table
Destination
Flags Metric Ref
210.28.164.254
192.168.1.0
192.168.2.254
255.255.255.0
192.168.2.0
255.255.255.0
192.168.3.0
255.255.255.0
192.168.10.0
255.255.255.0
210.28.164.0
255.255.255.0
[root@localhost ~]# 【版权声明】
如有疑问请咨询本人:
如需转载本文请注明出处:
shuxiao9058
排名:第5971名
(3)(24)(7)(0)(7)(10)

我要回帖

更多关于 小猪发现 的文章

 

随机推荐