不配置回指路由 多网段网络如何互联?

网络 路由交换
不配置回指路由,就实现多网段网络互联,这有相当的实际需求。本文主要给大家详细的介绍了几种情况,相信看过此文会对你有所帮助。

本文主要给大家详细的介绍了对于几种回路路由的情况,给大家详细的解答了如何进行配置,并且给出了配置命令,相信此文对你有所帮助。

不配置回指路由,就实现多网段网络互联,这有相当的实际需求。特别针对以下几种情况:
1、随着网络的复杂化,本来局域网是一个网段。后来因需要划分了多个网段,但是由于机器较多逐个修改IP地址和网关比较麻烦的情况。
2、出口的路由器为傻瓜产品无法自己添加静态路由,以及仅能对本地直连网段做NAT。
3、懒人,连路由都懒的配的懒人或配不好的新学。

拓扑结构:
1、 PC1在VLAN 10中,IP地址是192.168.10.0/24
2、 PC2在VLAN20中,IP地址是192.168.20.0/24
3、 路由器在VLAN30中,IP地址是192.168.30.0/24
4、 中间的交换机为三层交换或者是路由器(不需要VLAN)。

 配置关键点:
1、 三层交换机的VLAN10 VLAN20 VLAN30虚接口要起PROXY-ARP协议(CISCO默认是开启的此处采用的是CISCO设备,因此配置中体现不出来)。相关配置如下:
!
interface FastEthernet3/0
switchport access vlan 10
!
interface FastEthernet3/1
switchport access vlan 20
!
interface FastEthernet3/2
switchport access vlan 30
!
interface Vlan10
ip address 192.168.10.1 255.255.255.0
!
interface Vlan20
ip address 192.168.20.1 255.255.255.0
!
interface Vlan30
ip address 192.168.30.1 255.255.255.0
2、 下面PC机的网关可以设置为自身也可以设置为VLAN虚接口的网关。
3、 出口路由器的内网IP地址掩码要变小(只要能够包含内网的相关网段即可),此处为了方便选用了16bit,IP地址是192.168.30.2/16,无需添加任何静态路由。相关配置如下:
interface FastEthernet2/0
ip address 192.168.30.2 255.255.0.0
duplex auto
speed auto

R3# show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

C? ? 192.168.0.0/16 is directly connected, FastEthernet2/0
R3#

四、 测试结果如下:
R3#ping 192.168.10.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/72/120 ms
R3#ping 192.168.20.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.20.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/76/116 ms

 

责任编辑:chenqingxiang 来源: itmop
相关推荐

2015-03-13 15:50:39

静态路由网段协议

2009-12-14 09:26:05

配置静态路由

2009-12-17 13:53:31

Route路由功能

2019-09-09 09:29:27

互联网程序员职业

2009-12-23 16:32:04

静态路由配置

2009-11-17 11:33:07

路由器配置

2009-11-19 11:15:39

思科路由器配置

2009-09-23 10:20:00

2009-04-08 10:35:00

静态路由配置

2013-05-30 08:49:37

网络路由路由修复路由

2009-04-14 09:48:00

cisco路由器配置

2010-07-30 17:07:37

路由器配置

2019-09-10 13:58:57

动态路由路由器网络

2011-04-15 10:49:16

2011-04-15 10:50:23

2011-04-15 10:09:23

2011-04-15 10:37:24

2017-05-12 15:23:25

路由器网络交换机

2009-07-10 10:13:30

2009-11-19 17:18:30

静态路由动态路由
点赞
收藏

51CTO技术栈公众号