LAB1 - 2.1

section 2 layer 3 technology

2.1 OSPF in AS 12345 Refer to “Diagram 2:Main Topology”

Configure OSPFv2 area 0 in ACME Headquarters ( AS12345 ) according to the following requirements:

●Configure the OSPF process ID to 12345 and set the router-id to interface Lo0 on all seven routers.

● The interface Lo0 at each router must be seen as an internal ospf prefix by all other routers.

● Ensure that OSPF is not running on any interface that is facing another AS .Use any method to accomplish this requirement.

● SW1 and SW2must no participate in routing at all.

● R1 must see the following OSPF routes in its routing table :

根据要求创建一个ospf 进程号为12345,路由id用loopback 0口来做

每台路由的loopback 0可以通过内部ospf的方式看到(宣告lo0口)

确保OSPF时不要把连接其他AS的接口宣告进ospf

SW1,SW2 不参与OSPF

在R1 SHOW OSPF的时候应该能看到下图效果
LAB1 - 2.1_第1张图片

注意:

在每台路由器进行设置前请先确保直连路由通常,检查方法,ping直连接口

实验开始

第一部:确认直连路由状态

R1(config)#do ping 123.10.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
R1(config)#do ping 123.10.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R1(config)#do ping 123.10.1.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.6, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/4/5 ms
R1(config)#do ping 123.10.1.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 123.10.1.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/5 ms

ok,线路正常,如果出现ping不通的情况,检查端口是否没有被启用,或ip地址是否配置正确

第二步,配置ospf

R1#show ip inter brief 
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                unassigned      YES TFTP   administratively down down    
Ethernet0/1                123.10.1.5      YES TFTP   up                    up      
Ethernet0/2                123.10.1.2      YES TFTP   up                    up      
Ethernet0/3                unassigned      YES TFTP   administratively down down    
Ethernet1/0                unassigned      YES TFTP   administratively down down    
Ethernet1/1                unassigned      YES TFTP   administratively down down    
Ethernet1/2                unassigned      YES TFTP   administratively down down    
Ethernet1/3                unassigned      YES TFTP   administratively down down    
Ethernet2/0                unassigned      YES TFTP   administratively down down    
Ethernet2/1                unassigned      YES TFTP   administratively down down    
Ethernet2/2                unassigned      YES TFTP   administratively down down    
Ethernet2/3                unassigned      YES TFTP   administratively down down    
Ethernet3/0                unassigned      YES TFTP   administratively down down    
Ethernet3/1                unassigned      YES TFTP   administratively down down    
Ethernet3/2                unassigned      YES TFTP   administratively down down    
Ethernet3/3                unassigned      YES TFTP   administratively down down    
Loopback0                  123.1.1.1       YES TFTP   up                    up 

R1(config)#router ospf 12345    
R1(config-router)#router-id 123.1.1.1
R1(config-router)#network 123.1.1.1 0.0.0.0 area 0
R1(config-router)#network 123.10.1.2 0.0.0.0 area 0
R1(config-router)#network 123.10.1.5 0.0.0.0 area 0
R1(config-router)#end    

其他路由器也参考以上设置,先查看端口配置情况以及lo0的配置,然后创建ospf并进行宣告

第三步,检查

R1#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route

- - replicated route, % - next hop override

Gateway of last resort is not set

​```
  123.0.0.0/8 is variably subnetted, 17 subnets, 2 masks
​```

O        123.2.2.2/32 [110/21] via 123.10.1.1, 00:09:53, Ethernet0/2
O        123.3.3.3/32 [110/21] via 123.10.1.6, 00:00:52, Ethernet0/1
O        123.4.4.4/32 [110/11] via 123.10.1.1, 00:10:22, Ethernet0/2
O        123.5.5.5/32 [110/11] via 123.10.1.6, 00:00:36, Ethernet0/1
O        123.6.6.6/32 [110/21] via 123.10.1.1, 00:07:30, Ethernet0/2
O        123.7.7.7/32 [110/21] via 123.10.1.6, 00:00:52, Ethernet0/1
O        123.10.1.8/30 [110/30] via 123.10.1.6, 00:00:52, Ethernet0/1
                       [110/30] via 123.10.1.1, 00:09:53, Ethernet0/2
O        123.10.1.12/30 [110/20] via 123.10.1.6, 00:00:52, Ethernet0/1
O        123.10.1.16/30 [110/20] via 123.10.1.1, 00:10:03, Ethernet0/2
O        123.10.1.20/30 [110/20] via 123.10.1.1, 00:09:53, Ethernet0/2
O        123.10.1.24/30 [110/30] via 123.10.1.6, 00:00:52, Ethernet0/1
                        [110/30] via 123.10.1.1, 00:07:08, Ethernet0/2
O        123.10.1.28/30 [110/20] via 123.10.1.6, 00:00:52, Ethernet0/1


你可能感兴趣的:(训练中的网工)