1.创建环回、配置地址过程略
2.R4以外RIP配置略,R4:
rip 100
undo summary
version 2
network 4.0.0.0
network 14.0.0.0
network 45.0.0.0
network 34.0.0.0
import-route rip 200
#
rip 200
undo summary
version 1
network 46.0.0.0
import-route rip 100
3.用acl抓取R1环回,在R3通向R4的接口上调用,R3:
acl number 2000
rule 5 permit source 1.1.1.1 0
rule 10 permit source 172.16.0.0 0.0.3.0
#
interface GigabitEthernet0/0/1
rip metricin 2000 10
4.对172.16.{1-3}.0/24网段汇总,结果为172.16.0.0/22,R1:
interface GigabitEthernet0/0/0
rip summary-address 172.16.0.0 255.255.252.0
#
interface GigabitEthernet0/0/1
rip summary-address 172.16.0.0 255.255.252.0
5.在每个路由器的每个接口上配置RIP认证
#
interface GigabitEthernet0/0/0
ip address 12.0.0.1 255.255.255.252
rip authentication-mode simple cipher %$%$hOxq7W9ko7U)]7G3r[SY*b"p%$%$
rip summary-address 172.16.0.0 255.255.252.0
#
interface GigabitEthernet0/0/1
ip address 14.0.0.1 255.255.255.252
rip authentication-mode simple cipher %$%$v)tLM`P%T6x*9K3;8|x-*bBR%$%$
rip summary-address 172.16.0.0 255.255.252.0
#
加密方式除simple外还可以使用 md5 和 hmac-sha256 加密,cipher是将密码以加密形式保存在配置文件中
6.在R5上发布缺省路由,R5:
rip 100
default-route originate
7.R2上配置nat server,将R1看作外网,在R2通向R1的接口上配置,R2:
interface GigabitEthernet0/0/0
nat server protocol tcp global 2.2.2.3 telnet inside 7.7.7.7 telnet
//不能使用已知地址,故使用2.2.2.3,使用已知接口: Error: The address conflicts with interface or ARP IP.
因为R2到R7和R7到R2的路径会经过R1,因此需要干涉路由选路
R2:
acl number 2001
rule 5 permit source 7.0.0.0 0
#
interface GigabitEthernet0/0/0
rip metricin 2001 10
R4:
acl number 2002
rule 5 permit source 12.0.0.0 0
#
interface GigabitEthernet0/0/0
rip metricin 2002 10
由于R1并没有到2.2.2.3的路由且缺省路由走的是R1-R4这条路,故需要配置一条缺省路由,来使R1访问到2.2.2.3,R1:
ip route-static 0.0.0.0 0.0.0.0 12.0.0.2
给R7的telnet服务配置密码(可选),R7:
user-interface vty 0 4
authentication-mode aaa
#
aaa
local-user anqi password cipher %$%$ZdSZD)}23(a(\y*p=@q@+04S%$%$
local-user anqi service-type telnet
8.让R6和R7学不到R1环回路由,在R6通向R4的接口上过滤rip路由,R6:
acl number 2000
rule 5 deny source 1.0.0.0 0
rule 10 deny source 172.16.0.0 0.0.3.0
rule 15 permit
#
rip 200
filter-policy 2000 import GigabitEthernet0/0/0
9.此时R6和R7没有R1的环回路由,且RIPv2发布的缺省路由R6和R7并不能收到,因此并不能称为全网可达,手动配置静态缺省路由
R6:
ip route-