Cisco静态路由和OSPF结合小实验

简介: Cisco静态路由和OSPF结合小实验

01


拓扑

640.png02

配置过程:

R1:
interface Loopback0
 ip address 192.168.100.1 255.255.255.0
interface Ethernet0/0
 ip address 192.168.127.99 255.255.255.248
exit
ip route 0.0.0.0 0.0.0.0 192.168.127.100
SW1:
interface Ethernet0/1
interface Ethernet0/1
 no switchport
 ip address 192.168.127.157 255.255.255.252
interface Ethernet0/2
 no switchport
 ip address 192.168.127.100 255.255.255.248
exit
ip route 0.0.0.0 0.0.0.0 192.168.127.99
ip route 192.168.22.0 255.255.255.0 192.168.127.158
ip route 192.168.36.0 255.255.255.0 192.168.127.158
R2:
interface Ethernet0/0
 ip address 192.168.127.213 255.255.255.252
interface Ethernet0/1
 ip address 192.168.127.158 255.255.255.252
interface Ethernet0/2
 ip address 192.168.127.145 255.255.255.252
router ospf 100
 redistribute static subnets
 default-information originate
 network 192.168.127.144 0.0.0.3 area 0
 network 192.168.127.156 0.0.0.3 area 0
 network 192.168.127.212 0.0.0.3 area 0
ip route 0.0.0.0 0.0.0.0 192.168.127.157
R3:
interface Ethernet0/0
 ip address 192.168.127.146 255.255.255.252
 no shut
interface Ethernet0/1
 ip address 192.168.22.1 255.255.255.0
 no shut
interface Ethernet0/2
 ip address 192.168.127.189 255.255.255.252
 exit
router ospf 100
 network 192.168.22.0 0.0.0.255 area 0
 network 192.168.127.144 0.0.0.3 area 0
 network 192.168.127.188 0.0.0.3 area 0
R4:
interface Ethernet0/0
 ip address 192.168.127.214 255.255.255.252
 no shut
interface Ethernet0/1
 ip address 192.168.36.1 255.255.255.0
 no shut
interface Ethernet0/2
 ip address 192.168.127.190 255.255.255.252
router ospf 100
 network 192.168.36.0 0.0.0.255 area 0
 network 192.168.127.188 0.0.0.3 area 0
 network 192.168.127.212 0.0.0.3 area 0
SW2 :
vlan 22
interface Ethernet0/0
 switchport access vlan 22
 switchport mode access
interface Vlan22
 ip address 192.168.22.2 255.255.255.0
ip route 0.0.0.0 0.0.0.0 192.168.22.1
SW3:
vlan 36
interface Ethernet0/0
 switchport access vlan 36
 switchport mode access
interface Vlan36
 ip address 192.168.36.2 255.255.255.0
ip route 0.0.0.0 0.0.0.0 192.168.36.1

03

测试结果:

查看各设备路由表

640.png

640.png


640.png


640.png

640.png

然后在ping测试:

640.png

640.png

640.png

640.png


至此实验完成

相关文章
|
1月前
|
网络协议 网络虚拟化 网络架构
【网络实验】/主机/路由器/交换机/网关/路由协议/RIP+OSPF/DHCP(上)
【网络实验】/主机/路由器/交换机/网关/路由协议/RIP+OSPF/DHCP(上)
60 1
|
1月前
|
网络协议 数据安全/隐私保护 网络虚拟化
【网络实验】/主机/路由器/交换机/网关/路由协议/RIP+OSPF/DHCP(下)
【网络实验】/主机/路由器/交换机/网关/路由协议/RIP+OSPF/DHCP(下)
53 0
|
5月前
|
网络协议 算法 数据库
|
安全 网络安全 网络架构
Cisco—静态路由小实验
Cisco—静态路由小实验
134 0
Cisco—静态路由小实验
|
网络协议 网络架构
OSPF路由协议基础(OSPF基本配置)
OSPF路由协议基础(OSPF基本配置)
614 0
OSPF路由协议基础(OSPF基本配置)
|
网络协议 网络架构
在NBMA网络中配置OSPF
在NBMA网络中配置OSPF
363 0
在NBMA网络中配置OSPF
|
网络协议 网络架构
|
网络协议 网络虚拟化