ospf配置

发布于 18 天前  24 次阅读


R2#configure te
R2(config)#in lo 0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#exit
R2(config)#int f0/0
R2(config-if)#ip add 192.168.1.2 255.255.255.0
R2(config-if)#exit
R2(config)#int f0/1
R2(config-if)#ip add 192.168.2.1 255.255.255.0
R2(config-if)#sho ip in br
R2#configure te
R2(config)#int f0/0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#in f0/1
R2(config-if)#no shutdown
R2(config-if)#end
设置IP地址
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router os 100
R2(config-router)#router-id 2.2.2.2
R2(config-router)#network 2.2.2.2 255.255.255.255 a 0
R2(config-router)#network 192.168.1.0 255.255.255.0 a 0
R2(config-router)#network 192.168.2.0 255.255.255.0 a 1
R2(config-router)#end
ospf开启
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/DR 00:00:32 192.168.1.1
FastEthernet0/0
3.3.3.3 1 FULL/DR 00:00:33 192.168.2.2
FastEthernet0/1
R2(config)#int f0/0
R2(config-if)#ip ospf priority 2 改变接口优先级
R2(config-if)#exit
R2#clear ip ospf process
Reset ALL OSPF processes? [no]: yes

备战CCIE