天天看點

一看就會...

拓撲圖:

一看就會...

1. 配置路由器的接口位址和 loopback 接口位址

R4:由器接口位址、loopback 接口位址:

R4(config)#INterface FAstEthernet 1/0

R4(config-if)#IP ADdress 192.168.40.1 255.255.255.0

R4(config-if)#NO SHUtdow

R4(config)#interface loopback 1

R4(config-if)#ip address 192.168.1.1 255.255.255.0

R4(config)#INterface LOopback 0

R4(config-if)#IP ADdress 4.4.4.4 255.255.255.0 piz

批注:路由器接口位址、loopback 接口位址:

R3 路由器接口位址、loopback 接口位址:

R3(config)#interface fastEthernet 1/0

R3(config-if)#ip address 192.168.40.2 255.255.255.0

R3(config-if)#no shutdown

R3(config)#interface fastEthernet 0/0

R3(config-if)#ip address 192.168.30.1 255.255.255.0

R3(config-if)#no shutdown

R3(config)#interface loopback 0

R3(config-if)#ip address 3.3.3.3 255.255.255.0

R3(config)#INterface LOopback 1

R3(config-if)#IP ADdress 192.168.2.1 255.255.255.0

批注:R3 路由器接口位址、loopback 接口位址

R2 路由器接口位址、loopback 接口位址:

R2(config)#INterface FAstEthernet 0/0

R2(config-if)#IP ADdress 192.168.30.2 255.255.255.0

R2(config-if)#NO SHUtdown

R2(config)#INterface FAstEthernet 1/0

R2(config-if)#IP ADdress 192.168.10.1 255.255.255.0

R2(config-if)#NO SHUtdown

R2(config)#INterface LOopback 0

R2(config-if)#IP ADdress 2.2.2.2 255.255.255.0

R2(config)#interface loopback 1

R2(config-if)#ip address 192.168.3.1 255.255.255.0

批注:R2 路由器接口位址、loopback 接口位址

R1 路由器接口位址、loopback 接口位址:

R1(config)#interface fastEthernet 1/0

R1(config-if)#ip address 192.168.10.2 255.255.255.0

R1(config-if)#no shutdown

R1(config)#interface fastEthernet 0/0

R1(config-if)#ip address 192.168.20.1 255.255.255.0

R1(config-if)#no shutdown

R1(config)#interface loopback 0

R1(config-if)#ip address 1.1.1.1 255.255.255.0

R1(config)#interface loopback 1

R1(config-if)#ip address 192.168.4.1 255.255.255.0

批注:R1 路由器接口位址、loopback 接口位址

R5 路由器接口位址、loopback 接口位址:

R5(config)#interface fastEthernet 0/0

R5(config-if)#ip address 192.168.20.2 255.255.255.0

R5(config-if)#no shutdown

R5(config)#interface fastEthernet 1/0

R5(config-if)#ip address 192.168.50.1 255.255.255.0

R5(config-if)#no shutdown

R5(config)#interface loopback 0

R5(config-if)#ip address 5.5.5.5 255.255.255.0

R5(config)#interface loopback 1

R5(config-if)#ip address 192.168.5.1 255.255.255.0

批注:R5 路由器接口位址、loopback 接口位址

R6 路由器接口位址、loopback 接口位址:

R6(config)#interface fastEthernet 1/0

R6(config-if)#ip address 192.168.50.2 255.255.255.0

R6(config-if)#no shutdown

R6(config)#interface loopback 0

R6(config-if)#ip address 192.168.8.1 255.255.255.0

R6(config)#interface loopback 1

R6(config-if)#ip address 192.168.9.1 255.255.255.0

R6(config)#interface loopback 2

R6(config-if)#ip address 192.168.10.1 255.255.255.0

R6(config)#interface LOopback 3

R6(config-if)#IP ADdress 192.168.11.1 255.255.255.0

批注:R6 路由器接口位址、loopback 接口位址

2.配置 ospf 協定,實作網絡互通

(1)R4(config)#router ospf 1

R4(config-router)#router-id 4.4.4.4

R4(config-router)#network 4.4.4.4 0.0.0.0 area 3

R4(config-router)#network 192.168.1.1 0.0.0.255 area 3

R4(config-router)#network 192.168.40.0 0.0.0.255 area 3

(2)R3(config)#router ospf 1

R3(config-router)#router-id 3.3.3.3

R3(config-router)#network 3.3.3.3 0.0.0.0 area 2

R3(config-router)#network 192.168.2.1 0.0.0.255 area 2

R3(config-router)#network 192.168.40.0 0.0.0.255 area 3

R3(config-router)#network 192.168.0.0 0.0.0.255 area 3

R3(config-router)#network 192.168.30.0 0.0.0.255 area 2

(3)R2(config)#router ospf 1

R2(config-router)#router-id 2.2.2.2

R2(config-router)#network 2.2.2.2 0.0.0.0 area 0

R2(config-router)#network 192.168.3.1 0.0.0.255 area 0

R2(config-router)#network 192.168.30.0 0.0.0.255 area 2

R2(config-router)#network 192.168.10.0 0.0.0.255 area 2

R2(config-router)#network 192.168.10.0 0.0.0.255 area 0

(4)R1(config)#router ospf 1

R1(config-router)#router-id 1.1.1.1

R1(config-router)#network 1.1.1.1 0.0.0.0 area 1

R1(config-router)#network 192.168.4.1 0.0.0.255 area 1

R1(config-router)#network 192.168.10.1 0.0.0.255 area 0

R1(config-router)#network 192.168…1 0.0.0.255 area 0

R1(config-router)#network 192.168.20.1 0.0.0.255 area 1

(5)R5(config)#router ospf 1

R5(config-router)#router-id 5.5.5.5

R5(config-router)#network 5.5.5.5 0.0.0.255 area 1 R

5(config-router)#network 192.168.5.1 0.0.0.255 area 1

R5(config-router)#network 192.168.20.0 0.0.0.255 area 1

(6)實作全網互通:

一看就會...

3. 配置虛鍊路,實作與 r4 互通

(1)R2(config)#router ospf 1

R2(config-router)#area 1 virtual-link 3.3.3.3

R3(config)#router ospf 1

R3(config-router)#area 1 virtual-link 2.2.2.2

批注: 虛拟鍊路互指

(2)實作與 r4 互通:

一看就會...

4. 配置靜态路由,實作 r5 和 r6 互通

一看就會...

5. 配置靜态路由重釋出,實作 r6 與全網互通

配置靜态重釋出:

R5(config)#router ospf 1 R

5(config-router)#redistribute static subnets