锐捷路由小型综合实验

2023-12-28 22:20:53

一、实验拓扑


二、实验目的


1、熟练掌握ospf的配置

2、熟练掌握RIP的配置

3、熟练掌握静态路由的配置

4、熟练掌握各种路由协议之间的引入

5、熟练掌握telnet和ssh的配置

三、实验配置


R1

//配置telent

username admin password admin@123
enable password admin@123
enable service telnet-server
line vty 0 4
login local
exit

//配置互联ip地址
int gi0/2
no sw
ip add 23.1.1.1 255.255.255.0
exit

配置RIP

route rip? ? ? ? ? ? ? ? ?//进入RIP
version 2? ? ? ? ? ? ? ? //指定版本为RIPV2
no auto-summary? //关闭自动汇总
network 23.1.1.1? ?//宣告与R2的互联网段
exit
?

R2

username admin password admin@123
enable password admin@123
enable service telnet-server
line vty 0 4
login local
exit

//配置loopback 0 管理地址
int loopback 0
ip add 1.1.1.1 255.255.255.255
exit

//配置互联ip地址
int gi0/2
no sw
ip add 23.1.1.2 255.255.255.0

int gi0/0
no sw
ip add 172.16.1.1 255.255.255.252


int gi0/1
no sw
ip add 172.16.1.5 255.255.255.252

exit

//配置OSPF

route ospf? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //进入ospf,默认进程为1
router-id 1.1.1.1? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //指定router-id为1.1.1.1
network 1.1.1.1 0.0.0.0 area 0? ? ? ? ? //宣告loopback 0 地址
network 172.16.1.1 0.0.0.3 area 0? ? //宣告与SW1互联地址
network 172.16.1.5 0.0.0.3 area 0? ? //宣告与SW2互联地址
network 23.1.1.2 0.0.0.255 area 0? ? //宣告与R1互联地址
redistribute rip metric-type 1 subnets? //重发布RIP路由进入ospf类型为1
exit


route rip??
version 2
no auto-summary
network 23.1.1.2
redistribute ospf 1? ? ? ? ? ? ? ? ? ? ? ? ? ? //重发布ospf进程1进入RIP中
exit

SW1


username admin password admin@123
enable password admin@123
enable service ssh-server?
no enable service telnet-server?
crypto key generate rsa?
line vty 0 4
login local
transport input ssh
exit

int loopback 0
ip add 2.2.2.2 255.255.255.255
exit

int gi0/2
sw mo tr?
sw tr al vl re 1-4094? ? ? ? ? ? ? ? ? ? ? ? ? //拒绝全部vlan通过
sw tr al vl add 10,100? ? ? ? ? ? ? ? ? ? ? ? //允许vlan10,100通过

vlan ?range 10,100
exit

int gi0/1
no sw
ip add 172.16.1.2 255.255.255.252

int vlan 100
ip add 192.168.100.126 255.255.255.192

int vlan 10
ip add 192.168.10.62 255.255.255.192

exit


route ospf
router-id 2.2.2.2?
network 2.2.2.2 0.0.0.0 area 0
network 172.16.1.2 0.0.0.3 area 0
network 192.168.10.62 0.0.0.63 area 0
network 192.168.100.126 0.0.0.63 area 0
network 192.168.100.65 0.0.0.63 area 0
redistribute static metric-type 1 subnets? ? ? ? ? ?//配置重发布静态路由进入ospf中
exit

ip route 0.0.0.0 0.0.0.0 192.168.100.65? ?
?

SW2


username admin password admin@123
enable password admin@123
enable service ssh-server?
no enable service telnet-server?
crypto key generate rsa?
line vty 0 4
login local
transport input ssh
exit


int loopback 0
ip add 3.3.3.3 255.255.255.255
exit

int gi0/2
sw mo tr
sw tr al vl re 1-4094
sw tr al vl add 20,200

?vlan ?range 20,200
exit

int gi0/1
no sw
ip ad?? ?172.16.1.6 255.255.255.252

int vlan 200
ip add 192.168.200.254 255.255.255.192

int vlan 20
ip add 192.168.20.190 255.255.255.192
exit


route ospf
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 0
network 172.16.1.6 0.0.0.3 area 0
network 192.168.20.190 0.0.0.63 area 0
network 192.168.200.254 0.0.0.63 area 0
network 192.168.200.193 0.0.0.63 area 0
redistribute static metric-type 1 subnets
exit

ip route 0.0.0.0 0.0.0.0 192.168.200.193
?

SW3

username admin password admin@123
enable password admin@123
enable service telnet-server
line vty 0 4
login local
exit


vlan range 10,100
exit

int vlan 100
ip add 192.168.100.65 255.255.255.192
exit

int gi0/2
sw mo tr
sw tr al vl re 1-4094
sw tr al vl add 10,100

int gi 0/1
sw mo ac? ? ? ? ? ? ? ? ? ? ? //允许vlan10通过
sw ac vl 10

exit

ip route 0.0.0.0 0.0.0.0 192.168.100.126

SW4

username admin password admin@123
enable password admin@123
enable service telnet-server
line vty 0 4
login local
exit

vlan range 20,200

int vlan 200
ip add 192.168.200.193 255.255.255.192


int gi 0/2
sw mo tr?
sw tr al vl re 1-4094
sw tr al vl add 20,200

int gi 0/1
sw mo ac
sw ac vl 20

exit

ip route 0.0.0.0 0.0.0.0 192.168.200.254

四、验证


1、在R1上查看RIP路由

2、在R2上查看ospf路由

3、在SW1上查看ospf路由

4、在SW2上查看ospf路由

5、在PC7上分别ping网关和R1

6、在PC8上分别ping网关和R1

7、telent

文章来源:https://blog.csdn.net/m0_74862906/article/details/135276918
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。