hcip第十天

 

1.搭建拓扑

2.IP配置

R1 
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 10.0.12.1 24
[r1-GigabitEthernet0/0/0]int loop 0
[r1-LoopBack0] ip add 1.1.1.1 24

R2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 10.0.12.2 24
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 172.16.23.2 24
[r2-GigabitEthernet0/0/1]int g0/0/2
[r2-GigabitEthernet0/0/2]ip add 172.16.25.2 24
[r2-GigabitEthernet0/0/2]int loop 0
[r2-LoopBack0] ip add 172.16.0.2 24
[r2-LoopBack0]int loop 1
[r2-LoopBack1]ip add 172.16.2.1

R3

 R4

R5

R6

R7 

R8 

3.ospf

[R2]ospf 2
[R2-ospf-2]area 0
[R2-ospf-2-area 0]nework 172.16.0.0 0.0.255.255 

4. 把AS2的用户网段更改为BROADCAST

[R2] intface loopback 1
[R2-LoopBack1]ospf network-type broadcast

5.建立bgp邻居关系 
[R1]bgp 1
[R1-bgp]peer 10.0.12.2 as-number 2 

[R2]bgp 64512
[R2-bgp]confederation id 2
[R2-bgp]confederation peer-as 64513
[R2-bgp]peer 10.0.12.1 as-number 1 
[R2-bgp]peer 172.16.0.3 as-number 64512 
[R2-bgp]peer 172.16.0.3 connect-interface LoopBack0
[R2-bgp]peer 172.16.0.3 next-hop-local
[R2-bgp]peer 172.16.0.5 as-number 64513 
[R2-bgp]peer 172.16.0.5 ebgp-max-hop 2 
[R2-bgp]peer 172.16.0.5 connect-interface LoopBack0


[R3]bgp 64512
[R3-bgp]confederation id 2
[R3-bgp]peer 172.16.0.2 as-number 64512 
[R3-bgp]peer 172.16.0.2 connect-interface LoopBack0
[R3-bgp]peer 172.16.0.4 as-number 64512 
[R3-bgp]peer 172.16.0.4 connect-interface LoopBack0
[R3-bgp]peer 172.16.0.2 next-hop-local 
[R3-bgp]peer 172.16.0.4 next-hop-local 


[R4]bgp 64512
[R4-bgp]confederation id 2
[R4-bgp]confederation peer-as 64513
[R4-bgp]peer 172.16.0.3 as-number 64512 
[R4-bgp]peer 172.16.0.3 connect-interface LoopBack0
[R4-bgp]peer 172.16.0.7 as-number 64513 
[R4-bgp]peer 172.16.0.7 ebgp-max-hop 2 
[R4-bgp]peer 172.16.0.7 connect-interface LoopBack0
[R4-bgp]peer 172.16.0.3 next-hop-local


[R5]bgp 64513
[R5-bgp]confederation id 2
[R5-bgp]confederation peer-as 64512
[R5-bgp]peer 172.16.0.2 as-number 64512 
[R5-bgp]peer 172.16.0.2 ebgp-max-hop 2 
[R5-bgp]peer 172.16.0.2 connect-interface LoopBack0
[R5-bgp]peer 172.16.0.6 as-number 64513 
[R5-bgp]peer 172.16.0.6 connect-interface LoopBack0 
[R5-bgp]peer 172.16.0.6 next-hop-local 


[R6]bgp 64513
[R6-bgp]confederation id 2
[R6-bgp]peer 172.16.0.5 as-number 64513 
[R6-bgp]peer 172.16.0.5 connect-interface LoopBack0
[R6-bgp]peer 172.16.0.7 as-number 64513 
[R6-bgp]peer 172.16.0.7 connect-interface LoopBack0
[R6-bgp]peer 172.16.0.5 next-hop-local 
[R6-bgp]peer 172.16.0.7 next-hop-local 


[R7]bgp 64513
[R7-bgp]confederation id 2
[R7-bgp]confederation peer-as 64512
[R7-bgp]peer 10.0.78.8 as-number 3 
[R7-bgp]peer 172.16.0.4 as-number 64512 
[R7-bgp]peer 172.16.0.4 ebgp-max-hop 2 
[R7-bgp]peer 172.16.0.4 connect-interface LoopBack0
[R7-bgp]peer 172.16.0.6 as-number 64513 
[R7-bgp]peer 172.16.0.6 connect-interface LoopBack0
[R7-bgp]peer 172.16.0.6 next-hop-local 
 

[R8]bgp 3
[R8-bgp]peer 10.0.78.7 as-number 2

 6.建立反射器和宣告:


 


[R1]
network 1.1.1.0 255.255.255.0
 
[R8]
network 2.2.2.0 255.255.255.0 
 
[R2]
import-route ospf 1
[R7]
import-route ospf 1 

 实验结果

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值