hcip第十一次作业

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 1.连接好线路,配置接口,环回ip

配置ospf R2 R3 R4 R5 R6 R7

[R3]ospf 1
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255

[R3-LoopBack1]ospf network-type broadcast

[R1]bgp 1

[R1-bgp]router-id 1.1.1.1

[R1-bgp]peer 12.1.1.2 as-number 2

[R1-bgp]peer 15.1.1.5 as-number 2

[R1]ip ip-prefix as permit 172.16.2.0 24

[R1]route-policy as permit node 10
[R1-route-policy]if-match ip-prefix as
[R1-route-policy]apply as-path 222 additive
[R1]route-policy as permit node 20
[R1]bgp1
[R1-bgp]peer 12.1.1.2 route-policy as import
 

配置mpls

[R2]mpls lsr-id 172.16.0.2

[R2]mpls

[R2-mpls]mpls ldp

[R2]int g0/0/1

[R2-GigabitEthernet0/0/1]mpls

[R2-GigabitEthernet0/0/1]mpls ldp
[R2-GigabitEthernet0/0/2]mpls

[R2-GigabitEthernet0/0/2]mpls ldp

配置bgp

[R2]bgp 2
[R2-bgp]router-id 172.16.0.2
[R2-bgp]peer 12.1.1.1 as-number 1
[R2-bgp]peer 172.16.0.5 as-number 2
[R2-bgp]peer 172.16.0.5 connect-interface LoopBack 0
[R2-bgp]peer 172.16.0.5 next-hop-local
[R2-bgp]peer 172.16.0.7 as-number 2
[R2-bgp]peer 172.16.0.7 connect-interface LoopBack 0
[R2-bgp]peer 172.16.0.7 next-hop-local

宣告bgp


[R2-bgp]network 172.16.0.0 21

[R2-bgp]network 172.16.2.0 24

[R2-bgp]network 172.16.3.0 24

[R2-bgp]network 172.16.4.0 24

[R2]ip route-static 172.16.0.0 21 NULL 0

其余路由同上述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值