OSPF外部路由
1.配置A公司的ospf
[R1-ospf-1]dis this
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.12.1 0.0.0.0
area 0.0.0.1
network 10.1.14.1 0.0.0.0
[R4-ospf-1]dis this
ospf 1 router-id 4.4.4.4
area 0.0.0.1
network 4.4.4.4 0.0.0.0
network 10.1.14.4 0.0.0.0
[R2-ospf-1]dis this
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 10.1.12.2 0.0.0.0
2.在边界设备R2上配置静态
[R2]ip route-static 3.3.3.3 32 10.1.23.3
[R2]dis ip routing-table
3.3.3.3/32 Static 60 0 RD 10.1.23.3 GigabitEtherne0/0/1
3.在R2设备上引入静态
[R2]ospf 1
[R2-ospf-1]import-route static
4.查看LSDB的信息
[R2]dis ospf lsdb
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 3.3.3.3 2.2.2.2 134 36 80000001 1
[R1]dis ospf lsdb
Sum-Asbr 2.2.2.2 1.1.1.1 181 28 80000001 1
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 3.3.3.3 2.2.2.2 182 36 80000001 1
5.在B公司边界设备配置静态
[R3]ip route-static 1.1.1.1 32 10.1.23.2
[R3]ip route-static 4.4.4.4 32 10.1.23.2
6.ping测试 ping -a