RIP实验总结之二RipV2的手动汇总
原创
©著作权归作者所有:来自51CTO博客作者恒逸的原创作品,请联系作者获取转载授权,否则将追究法律责任
1. 开启环回口:
R1(config)#int lo1
R1(config-if)#ip add 1.1.2 .1 255.255.255.0
R1(config-if)#int lo2
R1(config-if)#ip add 1.1.3 .1 255.255.255.0
R1(config-if)#int lo3
R1(config-if)# ip ad 1.1.4 .1 255.255.255.0
R3(config)#int lo0
R3(config-if)#ip add 192.168.0.1 255.255.255.0
R3(config-if)#int lo1
R3(config-if)#ip add 192.168.1.1 255.255.255.0
R3(config-if)#int lo2
R3(config-if)# ip add 192.168.2.1 255.255.255.0
R3(config-if)#int lo3
R3(config-if)#ip add 192.168.3.1 255.255.255.0
2. 将环回口地址加入到Rip进程,使用版本2,并关闭自动汇总。下面的命令只是使用版本2 和关闭自动汇总:
R1(config-if)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R2上show ip route
R2#sh ip route
R 1.1.1 .0 [120/1] via 10.1.1 .1, 00:00:14, FastEthernet0/0
R 1.1.2 .0 [120/1] via 10.1.1 .1, 00:00:14, FastEthernet0/0
R 1.1.3 .0 [120/1] via 10.1.1 .1, 00:00:14, FastEthernet0/0
R 1.1.4 .0 [120/1] via 10.1.1 .1, 00:00:14, FastEthernet0/0
C 2.2.2 .0 is directly connected, Loopback0
C 10.1.1 .0 is directly connected, FastEthernet0/0
R 192.168.0.0/24 [120/1] via 10.1.1 .3, 00:00:15, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 10.1.1 .3, 00:00:13, FastEthernet0/0
R 192.168.2.0/24 [120/1] via 10.1.1 .3, 00:00:08, FastEthernet0/0
R 192.168.3.0/24 [120/1] via 10.1.1 .3, 00:00:04, FastEthernet0/0
3. 在R1的fa0/0上使用手动汇总,将地址汇总为1.1.0 .0/16
R1(config)#int fastEthernet 0/0
R1(config-if)#ip summary-address rip 1.1.0 .0 255.255.0.0
在R3上将地址汇总为192.168.0.0/16:
R3(config)#int fastEthernet 0/0
R3(config-if)#ip summary-address rip 192.168.0.0 255.255.0.0
Summary mask must be greater or equal to major net
掩码错误,必须大于或等于主网地址。R1是A类地址,主网掩码为8,所以能配置。RipV2不支持CIDR,但它可传递CIDR,所以我们可以使用一个汇总后的地址,将它指向NULL0口(EIGRP、OSPF后的汇总地址都是指向NULL0的),并将它重分布到RIP中,然后将原地址从rip进程中删除:
R3(config)#ip route 192.168.0.0 255.255.0.0 null 0
R3(config)#router rip
R3(config-router)#redistribute static metric 2
R3(config-router)#no net 192.168.0.1
R3(config-router)#no net 192.168.1.1
R3(config-router)#no net 192.168.2.1
R3(config-router)#no net 192.168.3.1
在R2上查看汇总后的路由:
R2#sh ip route
R 1.1.0 .0 [120/1] via 10.1.1 .1, 00:00:11, FastEthernet0/0
C 2.2.2 .0 is directly connected, Loopback0
C 10.1.1 .0 is directly connected, FastEthernet0/0
R 192.168.0.0/16 [120/1] via 10.1.1 .3, 00:00:18, FastEthernet0/0
指向NULL0的作用:R3对收到网段为192.168.*.0的路由时进行匹配,假如无匹配项,则将之发到NULL0口,即丢弃。
注意在rip中使用路由重分布时,默认为无穷大,所以必须指明metric值。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
kubectl总结
kubectl总结
kubectl k8s kubernetes -
RIP实验总结
&n
职场 实验 RIP 休闲 -
ccna实验RIP
附件为,我学习CCNA实验手册中的RIP 路由配置手册及命令
RIP CCNA 休闲 实验手册 路由配置 -
RIP基本实验职场 rip 休闲