当前位置:网站首页>BGP联邦实验

BGP联邦实验

2022-08-11 05:21:00 朵拉爱学习

实验目标:

 

实验内容:

配置接口、环回

 

 

 

 

 

 

 

 

 

AS2配置OSPF

[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255

[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255

[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255
[r7]ospf 1 router-id 7.7.7.7 
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255

AS1区域及AS2边缘配置BGP

[r1]bgp 1
[r1-bgp]router-id 1.1.1.1
[r1-bgp]peer 12.1.1.2 as-number 2

[r2]bgp 64512
[r2-bgp]peer 12.1.1.1 as-number 1

设置BGP,划分AS2区域

  • R2\R3\R4为一个区域
[r2]bgp 64512
[r2-bgp]router-id 172.16.112.1
[r2-bgp]confederation id 2
[r2-bgp]confederation peer-as 64513
[r2-bgp]peer 172.16.128.1 as-number 64512
[r2-bgp]peer 172.16.128.1 connect-interface l0
[r2-bgp]peer 172.16.160.1 as-number 64513
[r2-bgp]peer 172.16.160.1 ebgp-max-hop 2
[r2-bgp]peer 172.16.160.1 connect-interface l0
[r3]bgp 64512
[r3-bgp]router-id 172.16.128.1
[r3-bgp]confederation id 2
[r3-bgp]peer 172.16.112.1 as-number 64512
[r3-bgp]peer 172.16.112.1 connect-interface l0	
[r3-bgp]peer 172.16.144.1 as-number 64512
[r3-bgp]peer 172.16.144.1 connect-interface l0
[r4]bgp 64512
[r4-bgp]router-id 172.16.144.1
[r4-bgp]confederation id 2
[r4-bgp]confederation peer-as 64513
[r4-bgp]peer 172.16.128.1 as-number 64512
[r4-bgp]peer 172.16.128.1 connect-interface  l0
[r4-bgp]peer 172.16.192.1 as-number 64513
[r4-bgp]peer 172.16.192.1 ebgp-max-hop 2
[r4-bgp]peer 172.16.192.1 connect-interface l0
  • R4\R5\R6为一个区域
[r5]bgp 64513
[r5-bgp]router-id 172.16.160.1
[r5-bgp]confederation id 2	
[r5-bgp]confederation peer-as 64512	
[r5-bgp]peer 172.16.112.1 as-number 64512
[r5-bgp]peer 172.16.112.1 ebgp-max-hop 2
[r5-bgp]peer 172.16.112.1 connect-interface l0
[r5-bgp]peer 172.16.176.1 as-number 64513	
[r5-bgp]peer 172.16.176.1 connect-interface l0
[R6]bgp 64513
[R6-bgp]router-id 172.16.176.1
[R6-bgp]confederation id 2
[R6-bgp]peer 172.16.160.1 as-number 64513
[R6-bgp]peer 172.16.160.1 con	
[R6-bgp]peer 172.16.160.1 connect-interface l0
[R6-bgp]peer 172.16.192.1 as-number 64513
[R6-bgp]peer 172.16.192.1 con	
[R6-bgp]peer 172.16.192.1 connect-interface l0

[R7]bgp 64513
[R7-bgp]router-id 172.16.192.1
[R7-bgp]
[R7-bgp]confederation id 2
[R7-bgp]con	
[R7-bgp]confederation peer-as 64512
[R7-bgp]peer 172.16.144.1 as-number 64512
[R7-bgp]peer 172.16.144.1 ebg	
[R7-bgp]peer 172.16.144.1 ebgp-max-hop 2
[R7-bgp]peer 172.16.144.1 con	
[R7-bgp]peer 172.16.144.1 connect-interface l0
[R7-bgp]peer 172.16.176.1 as-number 64513
[R7-bgp]peer 172.16.176.1 con	
[R7-bgp]peer 172.16.176.1 connect-interface l0

[r8]bgp 3
[r8-bgp]router-id 8.8.8.8
[r8-bgp]peer 172.16.192.1 as-number 2
[r8-bgp]peer 172.16.192.1 connect-interface l0
[r8-bgp]peer 172.16.192.1 ebgp-max-hop 255

R1、R8配置TUNNEL

[R1]inter t0/0/0
[R1-Tunnel0/0/0]ip add 192.168.3.1 255.255.255.255
[R1-Tunnel0/0/0]tun	
[R1-Tunnel0/0/0]tunnel-protocol gre
[R1-Tunnel0/0/0]source 10.1.1.1
[R1-Tunnel0/0/0]de	
[R1-Tunnel0/0/0]dest	
[R1-Tunnel0/0/0]destination 10.1.2.1
[R1-Tunnel0/0/0]ospf ne	
[R1-Tunnel0/0/0]ospf network-type br	
[R1-Tunnel0/0/0]ospf network-type broadcast
[R1-Tunnel0/0/0]ip route-static 0.0.0.0 0 t0/0/0

[R8]inter t0/0/0
[R8-Tunnel0/0/0]ip add 192.168.3.2 255.255.255.255
[R8-Tunnel0/0/0]tu	
[R8-Tunnel0/0/0]tunnel-protocol gre
[R8-Tunnel0/0/0]source 10.1.2.1
[R8-Tunnel0/0/0]dest	
[R8-Tunnel0/0/0]destination 10.1.1.1
[R8-Tunnel0/0/0]ospf ne	
[R8-Tunnel0/0/0]ospf network-type br	
[R8-Tunnel0/0/0]ospf network-type broadcast 
[R8-Tunnel0/0/0]ip route-static 0.0.0.0 0 t0/0/0

配置RR反射器,设置客户端

原网站

版权声明
本文为[朵拉爱学习]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_31088019/article/details/122640266