标签:exit ip route ddr oss interface inter comm sub hostname
R0配置参考
Router #conf t
Router(config)#hostname R0
R0(config)#interface FastEthernet0/0
R0(config-if)#ip address 200.1.1.1 255.255.255.0
R0(config-if)#no shutdown
R0(config-if)#exit
R0(config)#interface loopback 0
R0(config-if)#ip add 192.168.1.1 255.255.255.0
R0(config-if)#exit
配置OSPF路由
R0(config)#router ospf 1
R0(config-router)#network 192.168.1.0 0.0.0.255 area 0
R0(config-router)#network 200.1.1.0 0.0.0.255 area 1
R0(config-router)#end
R0#show ip route
C 192.168.1.0/24 is directly connected, Loopback0
C 200.1.1.0/24 is directly connected, FastEthernet0/0
O 200.1.2.0/24 [110/2] via 200.1.1.2, 00:00:14, FastEthernet0/0
查看路由没有区域2的路由条目
R0#show ip protocols 查看router-ID
Router ID 192.168.1.1
R0#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R0(config)#router ospf 1
R0(config-router)#area 1 virtual-link 172.16.1.1
R0(config-router)#end
R0#
R0#show ip route
172.16.0.0/32 is subnetted, 1 subnets
O IA 172.16.1.1 [110/3] via 200.1.1.2, 00:00:00, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Loopback0
C 200.1.1.0/24 is directly connected, FastEthernet0/0
O 200.1.2.0/24 [110/2] via 200.1.1.2, 00:03:13, FastEthernet0/0
R1配置参考
Router>
Router>en
Router#conf t
Router(config)#hostname R1
R1(config)#interface FastEthernet0/0
R1(config-if)#ip address 200.1.1.2 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface FastEthernet0/1
R1(config-if)#ip address 200.1.2.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-R1)#network 200.1.1.0 0.0.0.255 area 1
R1(config-R1)#network 200.1.2.0 0.0.0.255 area 1
R1(config-R1)#
R2配置参考
Router>enable
Router#configure terminal
Router(config)#hostname R2
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 200.1.2.2 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface loopback 0
Router(config-if)#ip add 172.16.1.1 255.255.255.0
Router(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#network 172.16.1.0 0.0.0.255 area 2
R2(config-router)#network 200.1.2.0 0.0.0.255 area 1
R2#show ip protocols 查看ROUTER-ID
Routing Protocol is "ospf 1"
Router ID 172.16.1.1
配置虚拟链路
R2#conf t
R2(config)#router ospf 1
R2(config-router)#area 1 virtual-link 192.168.1.1
标签:exit ip route ddr oss interface inter comm sub hostname
原文地址:http://blog.51cto.com/ronning/2322464