OSPF小实验

OSPF小实验_第1张图片


OSPF小实验_第2张图片

通过以下思路实现R1 ping 通 R5

R5(config-if)#router ospf 110

R5(config-router)#router-id 5.5.5.5

R5(config-router)#network 202.106.45.0 0.0.0.255 area 2

R5(config-router)#network 5.5.5.5 0.0.0.0 area 2

R2#show ip ospf neighbor(查看ospf的状态)

Neighbor ID    Pri  State          Dead Time  Address        Interface

1.1.1.1          1  FULL/BDR        00:00:37    202.106.12.1    FastEthernet0/0

R6上配置rip协议命令如下:

R6(config)#router rip

R6(config-router)#no auto-summary(关闭自动汇总)

R6(config-router)#network 11.0.0.0

R6(config-router)#network 11.11.11.0

R1上还需要运行RIP协议

R1(config)#router rip

R1(config-router)#ver 2

R1(config-router)#no auto-summary

R1(config-router)#network  11.0.0.0

R1#show ip route rip(查看rip协议)

11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

R      11.11.11.11/32 [120/1] via 11.0.0.1, 00:00:12, FastEthernet0/0

R1上一个属于ospf域,一个属于rip域,将R1上的rip域引入ospf域,R2和R5还需要学R6上的rip

将R1上的rip引入ospf域

R1(config-router)#redistribute rip ?

metric      Metric for redistributed routes

metric-type  OSPF/IS-IS exterior metric type for redistributed routes

route-map    Route map reference

subnets (子网)     Consider subnets for redistribution into OSPF

tag          Set tag for routes redistributed into OSPF

R1(config-router)#redistribute rip subnets(引入子网)

R2#show ip route

O E2    11.11.11.11/32 [110/20] via 202.106.12.1, 00:00:18, FastEthernet0/0

R1#show ip ospf database ?(6种LSA如下)

adv-router        Advertising Router link states

asbr-summary      ASBR summary link states

database-summary  Summary of database

external          External link states

network          Network link states

nssa-external    NSSA External link states

opaque-area      Opaque Area link states

opaque-as        Opaque AS link states

opaque-link      Opaque Link-Local link states

router            Router link states

self-originate    Self-originated link states

summary          Network summary link states

|                Output modifiers

你可能感兴趣的:(OSPF小实验)