interface ethernet 1
ip address 13.94.1.1 255.255.255.0
!
router ospf 9000
network 130.93.0.0 0.0.255.255 area 0.0.0.0
redistribute rip metric 1 subnets
!
router rip
network 130.94.0.0
redistribute ospf 9000
default-metric 1
2. 对内部路由器、ABR和ASBR做基本OSPF配置的例子
下面的例子说明将四个区域ID分配给四个IP地址范围。在这个例子中,初始化OSPF路由选择进程109,定义四个OSPF区域:10.9.50.0,2,3和0。区域10.9.50.0,2和3屏蔽特定的地址范围,而区域0为其他所有网络激活OSPF。
router ospf 109
network 131.108.20.0 0.0.0.255 area 10.9.50.0
network 131.108.0.0 0.0.255.255 area 2
network 131.109.10.0 0.0.0.255 area 3
network 0.0.0.0 255.255.255.255 area 0
!
! Interface Ethernet0 is in area 10.9.50.0:
interface ethernet 0
!
! Interface Ethernet0 is in area 10.9.50.0:
interface ethernet 0
ip address 131.108.20.5 255.255.255.0
!
! Interface Ethernet 1 is in area 2:
interface ethernet 1
ip address 131.108.1.5 255.255.255.0
!
!Interface Ethernet2 is in area 2:
interface ethernet2
ip address 131.108.2.5 255.255.255.0
!
!Interface Ethernet3 is in area 3:
interface ethernet 3
ip address 131.109.10.5 255.255.255.0
!
!Interface Ethernet4 is in area 0:
interface ethernet 4
ip address 131.109.1.1 255.255.255.0
!
!Interface Ethernet5 is in area 0:
interface ethernet 5
ip address 10.1.0.1 255.255.0.0
继续评估每个network路由器配置命令,因此配置中这些命令的顺序是重要的。考虑第一个network area命令。区域ID 10.9.50.0设置给接口,子网131.108.20.0在此接口上定位。假定接口以太网0已匹配确认,接口以太网0连接到区域10.9.50.0。
接着评估第二个network area命令。对区域2,同样的进程运用到所有接口(除接口以太网0外)。假定接口以太网1已匹配确认,然后对此接口激活OSPF,以太网1连接到区域2。
对所有network area命令,继续将接口连接到OSPF区域过程。注意例子中最后一个network area命令是特殊情况。通过此命令,所有可用接口(未明确连接到其他区域)连接到区域0。
| 共8页: 上一页 [1] [2] [3] 4 [5] [6] [7] [8] 下一页 | ||
|