实验目的:用ospf协议实现pc4能访问pc5。
R1配置如下:
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 10.0.0.2 255.255.255.0
#
interface GigabitEthernet0/1
port link-mode route
combo enable copper
ip address 20.0.0.1 255.255.255.0
router id 1.1.1.1
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.0.0.0 0.0.0.255
network 20.0.0.0 0.0.0.255
R2配置如下:
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 30.0.0.2 255.255.255.0
#
interface GigabitEthernet0/1
port link-mode route
combo enable copper
ip address 20.0.0.2 255.255.255.0
#
router id 2.2.2.2
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 20.0.0.0 0.0.0.255
area 0.0.0.1
network 30.0.0.0 0.0.0.255
R3配置如下:
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
interface GigabitEthernet0/0
port link-mode route
combo enable copper
ip address 10.1.0.2 255.255.255.0
#
interface GigabitEthernet0/1
port link-mode route
combo enable copper
ip address 30.0.0.1 255.255.255.0
#
router id 3.3.3.3
#
ospf 1
area 0.0.0.1
network 3.3.3.3 0.0.0.0
network 10.1.0.0 0.0.0.255
network 30.0.0.0 0.0.0.255
测试如下:
注意:PC配置的时候一定要配网关。



