新建Packet Tracer拓扑图

1PC与交换机间用直连线连接;PC与路由、路由与路由之间用交叉线连接。

2)在三层上划分2Vlan,运行RIPV2协议;R2运行OSPF协议。

5)在路由器R1上左侧配置RIPV2路由协议;右侧配置OSPF协议。

6)在R1路由进程中引入外部路由,进行路由重分布。

7)将PC1PC2主机默认网关分别设置为与直接网络设备接口IP地址。

8)验证PC1PC2主机之间可以互相通信;

实验设备

Router_1841 2台;Switch_3560 1台;直通线;交叉线

 

PC0

IP: 192.168.1.2

Submask: 255.255.255.0

Gageway: 192.168.1.1

PC1

IP: 192.168.4.2

Submask: 255.255.255.0

Gageway: 192.168.4.1

Switch0

en

conf t

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

ping 192.168.4.2 (Replay form 192.168.4.2: byes=32 time=125ms TTL=125)