当前位置:文档之家› 使用OSPF协议组建简单局域网络实验

使用OSPF协议组建简单局域网络实验

实验四:使用OSPF协议组建简单局域网络实验

R0

R0>en

R0#conf t

R0(config)#int g0/0

R0(config-if)#ip add 192.168.1.3 255.255.255.0

R0(config-if)#no sh

%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up R0(config)#int s0/3/0

R0(config-if)#ip add 12.12.12.1 255.255.255.0

R0(config-if)#no sh

%LINK-5-CHANGED: Interface Serial0/3/0, changed state to down

R0(config-if)#int s0/3/1

R0(config-if)#ip add 13.13.13.1 255.255.255.0

R0(config-if)#no sh

%LINK-5-CHANGED: Interface Serial0/3/1, changed state to down

R0(config-if)#router os 1

R0(config-router)#router-id 1.1.1.1

R0(config-router)#net 192.168.1.0 0.0.0.255 a 0

R0(config-router)#net 12.12.12.0 0.0.0.255 a 0

R0(config-router)#net 13.13.13.0 0.0.0.255 a 0

R0(config-router)#end

R0#

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

%LINK-5-CHANGED: Interface Serial0/3/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/3/1, changed state to up

01:39:58: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/3/1 from LOADING to FULL, Loading Done

%LINK-5-CHANGED: Interface Serial0/3/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/3/0, changed state to up

01:41:36: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial0/3/0 from LOADING to FULL, Loading Done

R1 在show run下的结果

interface GigabitEthernet0/0

ip address 192.168.3.3 255.255.255.0

interface GigabitEthernet0/1

no ip address

interface Serial0/3/0

ip address 12.12.12.2 255.255.255.0

interface Serial0/3/1

ip address 23.23.23.3 255.255.255.0

router ospf 1

router-id 2.2.2.2

network 23.23.23.0 0.0.0.255 area 0

network 12.12.12.0 0.0.0.255 area 0

network 192.168.3.0 0.0.0.255 area 0

R2

Router>en

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int g0/0

Router(config-if)#ip add 192.168.2.3 255.255.255.0

Router(config-if)#no sh

%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

Router(config-if)#int s0/3/0

Router(config-if)#ip add 23.23.23.2 255.255.255.0

Router(config-if)#no sh

%LINK-5-CHANGED: Interface Serial0/3/0, changed state to down Router(config-if)#int s0/3/1

Router(config-if)#ip add 13.13.13.3 255.255.255.0

Router(config-if)#no sh

%LINK-5-CHANGED: Interface Serial0/3/1, changed state to up Router(config-if)#router os 1

Router(config-router)#router-id 2.2.2.2

Router(config-router)#int s0/3/1

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/3/1, changed state to up

Router(config-if)#end

%SYS-5-CONFIG_I: Configured from console by console

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z. Router(config)#router os 1

Router(config-router)#router-id 3.3.3.3

Router(config-router)#net 13.13.13.0 0.0.0.255 a 0

相关主题