exit int fa 0/1 switchport access vlan 1 exit vlan 2 exit int fa 0/10 switchport access vlan 2 exit int vlan 1 ip address 192.168.1.1 255.255.255.0 no shutdown exit int vlan 2 ip address 192.168.2.1 225.255.255.0 no shutdown end show int vlan 1 conf t router rip network 192.168.1.0 network 192.168.2.0 version 2 Router0 en conf t host R1 inf fa 0/0 ip address 192.168.2.2 255.255.255.0 no shutdown int fa 0/1 ip address 192.168.3.1 255.255.255.0 no shutdown exit router rip network 192.168.2.0 version 2 router ospf 1 network 192.168.3.0 0.0.0.255 area 0 Route1 en conf t host R2 int fa 0/1 ip address 192.168.3.2 255.255.255.0 no shutdown int fa 0/0 ip address 192.168.4.1 255.255.255.0 no shutdown exit router ospf 1 network 192.168.3.0 0.0.0.255 area 0 network 192.168.4.0 0.0.0.255 area 0 end show ip route Router0 end show ip route show run show ip route ping 192.168.1.2 (success) ping 192.168.4.2 (success) PC0 ping 192.168.4.2 (Replay form 192.168.1.1: Destination host unreachable) Switch_3560 show ip rout (只有两条直连路由) Router0 conf t router rip redistribute ospf 1 exit router ospf 1 redistribute rip subnets end Router1 show ip route PC0 (1)PC与交换机间用直连线连接;PC与路由、路由与路由之间用交叉线连接。 (2)在三层上划分2个Vlan,运行RIPV2协议;R2运行OSPF协议。 (5)在路由器R1上左侧配置RIPV2路由协议;右侧配置OSPF协议。 (6)在R1路由进程中引入外部路由,进行路由重分布。 (7)将PC1、PC2主机默认网关分别设置为与直接网络设备接口IP地址。 (8)验证PC1、PC2主机之间可以互相通信; 实验结果: PC1pingPC2可以通 实验过程中出现的问题及解决方法: 1. ping不通,再在交换机上面加默认路由 2. 本例在Packet Tracer 5.2上能正常运行,在Packet Tracer 5.3上Switch0不能学习到192.168.3.0、192.168.4.0的路由信息,需要给Switch0指定静态路由:ip route 0.0.0.0 0.0.0.0 192.168.2.2
相关推荐: