ensp实验

本文档详细记录了多个路由器的配置,包括接口IP地址、OSPF配置、ACL规则、MGRE隧道、NAT转换、静态路由及默认路由设置。其中,OSPF用于区域间的路由通信,MGRE用于建立中心与分站点的连接,NAT用于公网与私网的地址转换,静态路由确保数据包正确转发,而ACL则用于控制内部网络流量。同时,部分路由器还配置了RIP协议进行路由重发布。
摘要由CSDN通过智能技术生成

 sys 
sys r1
//配置路由器接口IP地址
int g0/0/0
ip add 172.16.34.1 29
int lo0
ip add 172.16.35.1 24
//配置OSPF
ospf 1 router-id 1.1.1.1
area 1
net 172.16.34.0 0.0.255.255
net 172.16.35.0 0.0.255.255
authentication-mode md5 1 cipher 123456
stub

^O^:
sys 
sys r2
//配置接口IP地址
int g0/0/0
ip add 172.16.34.2 29
int lo0
ip add 172.16.36.1 24
//配置OSPF
ospf 1 router-id 2.2.2.2
area 1
net 172.16.34.0 0.0.255.255
net 172.16.36.0 0.0.255.255
authentication-mode md5 1 cipher 123456
stub
 

^O^:
sys 
sys r3
//acl抓取内网流量
acl 2000
rule permit source 172.16.32.0 0.0.63.255
//配置接口ip地址
int g0/0/0
ip add 172.16.34.3 29
int lo0
ip add 172.16.37.1 24
int s4/0/0
ip add 34.0.0.2 24
nat outbound 2000
//静态缺省路由
ip route-s 0.0.0.0 0 34.0.0.1
//配置MGRE中心站点信息
int t0/0/0
ip add 172.16.1.1 29
ospf network-type broadcast
ospf dr-priority 2
tunnel-protocol gre p2mp
source 34.0.0.2
nhrp network-id 100
int t0/0/0
nhrp entry multicast dynamic

//配置OSPF
ospf 1 router-id 3.3.3.3
area 0
net 172.16.1.1 0.0.0.7
authentication-mode md5 0 cipher 123456
area 1
net 172.16.34.0 0.0.255.255
net 172.16.37.0 0.0.255.255
authentication-mode md5 1 cipher 123456
stub no-summary
//OSPF汇总
abr-summary 172.16.32.0 255.255.224.0
 

^O^:
sys 
sys ISP
//配置接口ip地址
int s4/0/0
ip add 34.0.0.1 24
int s3/0/0
ip add 54.0.0.1 24
int s4/0/1
ip add 64.0.0.1 24
int g0/0/0
ip add 74.0.0.1 24
int lo0
ip add 1.1.1.1 24
 

^O^:
sys 
sys r5
//acl抓取内网流量
acl 2000
rule permit source 172.16.3.0 0.0.0.255
//配置接口ip地址
int s4/0/0
ip add 54.0.0.2 24
nat outbound 2000
int lo0
ip add 172.16.3.1 24
//静态缺省路由
ip route-s 0.0.0.0 0 54.0.0.1
//配置MGRE分站点,向R3注册
int t0/0/0
ip add 172.16.1.2 29
ospf network-type broadcast
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.2 register

//配置OSPF
ospf 1 router-id 5.5.5.5
area 0
net 172.16.3.1 0.0.255.255
net 172.16.1.2 0.0.0.7
authentication-mode md5 0 cipher 123456

^O^:
sys 
sys R6
//acl抓取内网流量
acl 2000
rule permit source 172.16.64.0 0.0.63.255
//配置接口ip地址
int s4/0/0
ip add 64.0.0.2 24
nat outbound 2000
int g0/0/0
ip add 172.16.66.1 29
int lo0
ip add 172.16.4.1 24
//配置MGRE分站点,向R3注册
int t0/0/0
ip add 172.16.1.3 29
ospf network-type broadcast
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.2 register
//静态缺省路由
ip route-s 0.0.0.0 0 64.0.0.1
//配置OSPF
ospf 1 router-id 6.6.6.6
area 0
net 172.16.4.1 0.0.255.255
net 172.16.1.3 0.0.0.7
authentication-mode md5 0 cipher 123456
area 2
net 172.16.66.1 0.0.0.7
authentication-mode md5 2 cipher 123456
//OSPF汇总
abr-summary 172.16.64.0 255.255.224.0
nssa no-summary
 

^O^:
sys
sys R7
//acl抓取内网流量
acl 2000
rule permit source 172.16.96.0 0.0.63.255
//配置接口ip地址
int g0/0/0
ip add 74.0.0.2 24
nat outbound 2000
int g0/0/1
ip add 172.16.96.1 29
int lo0
ip add 172.16.5.1 24
//配置MGRE分站点,向R3注册
int t0/0/0
ip add 172.16.1.4 29
ospf network-type broadcast
tunnel-protocol gre p2mp
source g0/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.2 register
//静态缺省路由
ip route-s 0.0.0.0 0 74.0.0.1
//配置OSPF
ospf 1 router-id 7.7.7.7
area 0
net 172.16.5.1 0.0.255.255
net 172.16.1.4 0.0.0.7
authentication-mode md5 0 cipher 123456
area 3
net 172.16.96.1 0.0.0.7
authentication-mode md5 3 cipher 123456
nssa 
//OSPF汇总
abr-summary 172.16.96.0 255.255.224.0

^O^:
sys
sys R8
//配置接口ip地址
int g0/0/0
ip add 172.16.96.2 29
int g0/0/1
ip add 172.16.96.9 29
int lo0
ip add 172.16.97.1 24
//配置OSPF
ospf 1 router-id 8.8.8.8
area 3
net 172.16.96.2 0.0.0.7
net 172.16.96.9 0.0.0.7
net 172.16.97.1 0.0.255.255
authentication-mode md5 3 cipher 123456
nssa
 

^O^:
sys
sys R9
//配置接口ip地址
int g0/0/0
ip add 172.16.96.10 29
int g0/0/1
ip add 172.16.130.1 29
int lo0
ip add 172.16.131.1 24
//配置OSPF
ospf 1 router-id 9.9.9.9
area 3
net 172.16.96.10 0.0.0.7
authentication-mode md5 3 cipher 123456
asbr-summary 172.16.128.0 255.255.224.0
nssa no-summary
ospf 2 router-id 9.9.9.9
area 4
net 172.16.131.0 0.0.255.255
net 172.16.130.1 0.0.0.7
authentication-mode md5 4 cipher 123456
default-route-advertise always 
//重发布
ospf 1
area 3
import-route ospf 2
 


sys
sys R10
//配置接口ip地址
int g0/0/0
ip add 172.16.130.2 29
int lo0
ip add 172.16.132.1 24
//配置OSPF
ospf 1 router-id 10.10.10.10
area 4
net 172.16.130.2 0.0.0.7
net 172.16.132.1 0.0.255.255
authentication-mode md5 4 cipher 123456
 

^O^:
sys
sys R11
//配置接口ip地址
int g0/0/0
ip add 172.16.66.2 29
int g0/0/1
ip add 172.16.66.9 29
int lo0
ip add 172.16.67.1 24
//配置OSPF
ospf 1 router-id 11.11.11.11
area 2
net 172.16.66.9 0.0.0.7
net 172.16.66.2 0.0.0.7
net 172.16.67.1 0.0.255.255
authentication-mode md5 2 cipher 123456
nssa
 


sys
sys R12
//acl抓取内网流量
acl 2000
rule permit source 172.16.160.0 0.0.64.255
//配置接口ip地址
int g0/0/0
ip add 172.16.66.10 29
nat outbound 2000
int lo0
ip add 172.16.160.1 20
int lo1
ip add 172.16.176.1 20
//静态缺省
ip route-s 0.0.0.0 0 172.16.66.9
//配置OSPF
ospf 1 router-id 12.12.12.12
area 2
net 172.16.66.10 0.0.0.7
authentication-mode md5 2 cipher 123456
nssa no-summary
asbr-summary 172.16.160.0 255.255.224.0
//配置RIP
rip 1
v 2
network 172.16.0.0
//重发布
ospf 1
area 2
import-route rip 1
 


sys 
sys r2
//配置接口IP地址
int g0/0/0
ip add 172.16.34.2 29
int lo0
ip add 172.16.36.1 24
//配置OSPF
ospf 1 router-id 2.2.2.2
area 1
net 172.16.34.0 0.0.255.255
net 172.16.36.0 0.0.255.255
authentication-mode md5 1 cipher 123456
stub
 


sys 
sys r3
//acl抓取内网流量
acl 2000
rule permit source 172.16.32.0 0.0.63.255
//配置接口ip地址
int g0/0/0
ip add 172.16.34.3 29
int lo0
ip add 172.16.37.1 24
int s4/0/0
ip add 34.0.0.2 24
nat outbound 2000
//静态缺省路由
ip route-s 0.0.0.0 0 34.0.0.1
//配置MGRE中心站点信息
int t0/0/0
ip add 172.16.1.1 29
ospf network-type broadcast
ospf dr-priority 2
tunnel-protocol gre p2mp
source 34.0.0.2
nhrp network-id 100
int t0/0/0
nhrp entry multicast dynamic

//配置OSPF
ospf 1 router-id 3.3.3.3
area 0
net 172.16.1.1 0.0.0.7
authentication-mode md5 0 cipher 123456
area 1
net 172.16.34.0 0.0.255.255
net 172.16.37.0 0.0.255.255
authentication-mode md5 1 cipher 123456
stub no-summary
//OSPF汇总
abr-summary 172.16.32.0 255.255.224.0
 


sys 
sys ISP
//配置接口ip地址
int s4/0/0
ip add 34.0.0.1 24
int s3/0/0
ip add 54.0.0.1 24
int s4/0/1
ip add 64.0.0.1 24
int g0/0/0
ip add 74.0.0.1 24
int lo0
ip add 1.1.1.1 24
 


sys 
sys r5
//acl抓取内网流量
acl 2000
rule permit source 172.16.3.0 0.0.0.255
//配置接口ip地址
int s4/0/0
ip add 54.0.0.2 24
nat outbound 2000
int lo0
ip add 172.16.3.1 24
//静态缺省路由
ip route-s 0.0.0.0 0 54.0.0.1
//配置MGRE分站点,向R3注册
int t0/0/0
ip add 172.16.1.2 29
ospf network-type broadcast
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.2 register

//配置OSPF
ospf 1 router-id 5.5.5.5
area 0
net 172.16.3.1 0.0.255.255
net 172.16.1.2 0.0.0.7
authentication-mode md5 0 cipher 123456


sys 
sys R6
//acl抓取内网流量
acl 2000
rule permit source 172.16.64.0 0.0.63.255
//配置接口ip地址
int s4/0/0
ip add 64.0.0.2 24
nat outbound 2000
int g0/0/0
ip add 172.16.66.1 29
int lo0
ip add 172.16.4.1 24
//配置MGRE分站点,向R3注册
int t0/0/0
ip add 172.16.1.3 29
ospf network-type broadcast
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.2 register
//静态缺省路由
ip route-s 0.0.0.0 0 64.0.0.1
//配置OSPF
ospf 1 router-id 6.6.6.6
area 0
net 172.16.4.1 0.0.255.255
net 172.16.1.3 0.0.0.7
authentication-mode md5 0 cipher 123456
area 2
net 172.16.66.1 0.0.0.7
authentication-mode md5 2 cipher 123456
//OSPF汇总
abr-summary 172.16.64.0 255.255.224.0
nssa no-summary
 


sys
sys R7
//acl抓取内网流量
acl 2000
rule permit source 172.16.96.0 0.0.63.255
//配置接口ip地址
int g0/0/0
ip add 74.0.0.2 24
nat outbound 2000
int g0/0/1
ip add 172.16.96.1 29
int lo0
ip add 172.16.5.1 24
//配置MGRE分站点,向R3注册
int t0/0/0
ip add 172.16.1.4 29
ospf network-type broadcast
tunnel-protocol gre p2mp
source g0/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.2 register
//静态缺省路由
ip route-s 0.0.0.0 0 74.0.0.1
//配置OSPF
ospf 1 router-id 7.7.7.7
area 0
net 172.16.5.1 0.0.255.255
net 172.16.1.4 0.0.0.7
authentication-mode md5 0 cipher 123456
area 3
net 172.16.96.1 0.0.0.7
authentication-mode md5 3 cipher 123456
nssa 
//OSPF汇总
abr-summary 172.16.96.0 255.255.224.0


sys
sys R8
//配置接口ip地址
int g0/0/0
ip add 172.16.96.2 29
int g0/0/1
ip add 172.16.96.9 29
int lo0
ip add 172.16.97.1 24
//配置OSPF
ospf 1 router-id 8.8.8.8
area 3
net 172.16.96.2 0.0.0.7
net 172.16.96.9 0.0.0.7
net 172.16.97.1 0.0.255.255
authentication-mode md5 3 cipher 123456
nssa
 


sys
sys R9
//配置接口ip地址
int g0/0/0
ip add 172.16.96.10 29
int g0/0/1
ip add 172.16.130.1 29
int lo0
ip add 172.16.131.1 24
//配置OSPF
ospf 1 router-id 9.9.9.9
area 3
net 172.16.96.10 0.0.0.7
authentication-mode md5 3 cipher 123456
asbr-summary 172.16.128.0 255.255.224.0
nssa no-summary
ospf 2 router-id 9.9.9.9
area 4
net 172.16.131.0 0.0.255.255
net 172.16.130.1 0.0.0.7
authentication-mode md5 4 cipher 123456
default-route-advertise always 
//重发布
ospf 1
area 3
import-route ospf 2
 


sys
sys R10
//配置接口ip地址
int g0/0/0
ip add 172.16.130.2 29
int lo0
ip add 172.16.132.1 24
//配置OSPF
ospf 1 router-id 10.10.10.10
area 4
net 172.16.130.2 0.0.0.7
net 172.16.132.1 0.0.255.255
authentication-mode md5 4 cipher 123456
 


sys
sys R11
//配置接口ip地址
int g0/0/0
ip add 172.16.66.2 29
int g0/0/1
ip add 172.16.66.9 29
int lo0
ip add 172.16.67.1 24
//配置OSPF
ospf 1 router-id 11.11.11.11
area 2
net 172.16.66.9 0.0.0.7
net 172.16.66.2 0.0.0.7
net 172.16.67.1 0.0.255.255
authentication-mode md5 2 cipher 123456
nssa
 


sys
sys R12
//acl抓取内网流量
acl 2000
rule permit source 172.16.160.0 0.0.64.255
//配置接口ip地址
int g0/0/0
ip add 172.16.66.10 29
nat outbound 2000
int lo0
ip add 172.16.160.1 20
int lo1
ip add 172.16.176.1 20
//静态缺省
ip route-s 0.0.0.0 0 172.16.66.9
//配置OSPF
ospf 1 router-id 12.12.12.12
area 2
net 172.16.66.10 0.0.0.7
authentication-mode md5 2 cipher 123456
nssa no-summary
asbr-summary 172.16.160.0 255.255.224.0
//配置RIP
rip 1
v 2
network 172.16.0.0
//重发布
ospf 1
area 2
import-route rip 1
 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

她说戴了就不算给

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值