当前位置:文档之家› 路由单区域OSPF协议的配置方法

路由单区域OSPF协议的配置方法

将路由器连接起来如下图:

接下来是为路由器添加模块(注意要关电添加):

下面配置路由器A的接口IP:

Router#

Router#config

Configuring from terminal, memory, or network [terminal]?

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

Router(config)#in

Router(config)#interface se

Router(config)#interface serial 1/1

Router(config-if)#ip ad

Router(config-if)#ip address 192.168.1.1 255.255.255.0

Router(config-if)#co

Router(config-if)#cl

Router(config-if)#clock ?

rate Configure serial interface clock speed

Router(config-if)#clock ra

Router(config-if)#clock rate 64000

Router(config-if)#no sh

Router(config-if)#no shutdown

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

Router(config-if)#

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

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

00:14:54: %OSPF-5-ADJCHG: Process 2, Nbr 10.10.11.1 on Serial1/1 from LOADING to FULL, Loading Done

Router(config-if)#

下面配置路由器B的接口IP:

Router#config

Configuring from terminal, memory, or network [terminal]?

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

Router(config)#in

Router(config)#interface se 1/0

Router(config-if)#ip ad

Router(config-if)#ip address 192.168.1.2 255.255.255.0

Router(config-if)#no sh

Router(config-if)#no shutdown

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

Router(config-if)#

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

01:07:29: %OSPF-5-ADJCHG: Process 2, Nbr 10.10.10.1 on Serial1/0 from LOADING to FULL, Loading Done

Router(config-if)#

接下来进行路由器A环回接口的配置:

Router>en

Router#config

Configuring from terminal, memory, or network [terminal]?

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

Router(config)#in

Router(config)#interface lo

Router(config)#interface loopback ?

<0-2147483647> Loopback interface number

Router(config)#interface loopback 0

%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

Router(config-if)#ip ad

Router(config-if)#ip address 10.10.10.1 255.255.255.0

Router(config-if)#

下一步进行路由器B环回接口的配置:

Router>en

Router#config

Configuring from terminal, memory, or network [terminal]?

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

Router(config)#in lo 0

%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

相关主题