联通(GE6/4) ---ospf--- (GE2/0/4)电信
联通侧路由器与电信侧路由器建立OSPF,现场希望联通侧路由器能学习到电信侧通过ospf发布的默认路由
联通和电信已经是ospf 邻居
电信:
===============display ospf peer===============
OSPF Process 10 with Router ID 10.10.10.2
Neighbor Brief Information
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
10.10.10.10 10.16.126.29 1 34 Full/DR GE2/0/1
10.10.10.1 10.16.126.242 1 34 Full/BDR GE2/0/4
联通:
===============display ospf peer===============
OSPF Process 10 with Router ID 10.10.10.1
Neighbor Brief Information
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
10.10.10.3 10.16.113.202 1 30 Full/BDR GE6/3
10.10.10.2 10.16.126.241 1 38 Full/DR GE6/4
电信:
ospf 10 router-id 10.10.10.2
default-route-advertise cost 10 type 2//发布默认路由
area 0.0.0.0
network 10.10.10.2 0.0.0.0
network 10.16.126.28 0.0.0.3
network 10.16.126.240 0.0.0.3
电信路由表:
===============display ip routing-table===============
Destinations : 136 Routes : 136
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 60 0 218.76.54.193 GE2/0/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
联通没有电信通过ospf 下发的默认路由,只有静态配置的路由表
===============display ip routing-table===============
Destinations : 123 Routes : 123
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 254 0 110.53.163.193 GE0/2
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.1/32 O_INTRA 10 3 10.16.126.241 GE6/4
10.0.13.66/32 Static 60 0 10.16.126.29 GE6/4
10.0.13.67/32 Static 60 0 10.16.126.29 GE6/4
10.1.67.17/32 Static 60 0 10.16.112.2 GE6/4
10.1.67.18/32 Static 60 0 10.16.112.2 GE6/4
联通路由器上收集display ospf lsdb
<bj_csxwr1>dis ospf lsdb
OSPF Process 10 with Router ID 10.10.10.1
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 100.1.1.1 100.1.1.1 385 144 8000A374 0
Router 20.1.1.1 20.1.1.1 34 108 8000A5D1 0
Router 1.1.1.1 1.1.1.1 1667 132 8001065F 0
Router 10.10.10.10 10.10.10.10 1576 120 80010765 0
Router 10.10.10.3 10.10.10.3 78 84 80003201 0
Router 10.10.10.2 10.10.10.2 1574 60 80003200 0
Router 10.10.10.1 10.10.10.1 92 60 800031EA 0
Network 10.16.126.241 10.10.10.2 946 32 800031B7 0
Network 10.16.113.201 10.10.10.1 80 32 800000F7 0
Network 10.16.126.29 10.10.10.10 1568 32 80000078 0
Network 10.16.126.21 10.10.10.10 152 32 80000889 0
AS External Database
Type LinkState ID AdvRouter Age Len Sequence Metric
External 0.0.0.0 10.10.10.1 88 36 800004ED 1000
External 0.0.0.0 10.10.10.2 1044 36 80000002 10 //有电信发给联通的0.0.0.0
当路由器产生并发布了一个描述缺省路由的Type-5 LSA时,默认情况下路由器不再计算来自其他路由器的缺省路由,需要指定参数permit-calculate-other,则路由器仍然会计算来自于其他路由器的缺省路由,现场在联通侧也有配置发布默认路由。
ospf 10 router-id 10.10.10.1
default-route-advertise permit-calculate-other cost 1000 type 2
area 0.0.0.0
network 10.10.10.1 0.0.0.0
network 10.16.113.200 0.0.0.3
network 10.16.126.240 0.0.0.3
[H3C]dis ip routing-table
Destinations : 14 Routes : 14
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 O_ASE2 150 10 10.16.126.241 GE0/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作