BGP实验

实验要求:

1. AS1存在两个环回,一个地址为192.168.1.0 /24该地址不能在任何协议中宣告AS3存在两个环回,一个地址为192.168.2.0 /24;该地址不能在任何协议中宣告;最终要求这两个环回可以相互通讯;AS1的另一个环回为10.1.1.0/24,AS3的另一个环回为10.1.2.0/24
2.整个AS2的IP地址为176.16.0.0 请合理分配
3.AS间的骨干链路IP地址随意定制
4.使用BGP协议让整个网络所有设备的环回可以互相访问
5.减少条目数量,避免环路出现

ip配置

根据上图和做出的IP规划配置IP地址,完成后并通过ping来测试互通性

R1

R2

R3

R4

R5

R6

R7

R8

AS2上配置OSPF

R2:

R3:

R4:

R5:

R6:

建立BGP邻居

R1:

R2:

[r2]bgp 64512
[r2-bgp]router-id 2.2.2.2
[r2-bgp]confederation id 2   
[r2-bgp]confederation peer-as 64513   
[r2-bgp]peer 12.1.1.1 as-number 1
[r2-bgp]peer 172.16.3.1 as-path-filter 64512
[r2-bgp]peer 172.16.3.1 as-number 64512
[r2-bgp]peer 172.16.3.1 connect-interface lo0
[r2-bgp]peer 172.16.5.1 as-number 64513

[r2-bgp]peer 172.16.5.1 ebgp-max-hop 2

[r2-bgp]peer 172.16.5.1 connect-interface LoopBack0

R3:

R4:

R5:

R6:

R7:

R8:

BGP 建邻完成后,可以使用<R2>dis bgp peer 查看建邻结果

宣告路由

R1:

[r1]bgp 1

[r1-bgp]network 10.1.1.0 255.255.255.0

R2:

[r2]bgp 64512

[r2-bgp]peer 172.16.3.1 next-hop-local

[r2-bgp]peer 172.16.5.1 next-hop-local

R3:

[r3]bgp 64512

[r3-bgp]peer 172.16.2.1 reflect-client

R6:

[r6]bgp 64513

[r6-bgp]peer 172.16.5.1 reflect-client

R7:

[r7]bgp 64513

[r7-bgp]peer 172.16.4.1 next-hop-local

[r7-bgp]peer 172.16.6.1 next-hop-local

R8:

[r8]bgp 3

[r8-bgp]network 10.1.2.0 255.255.255.0

AS1与AS3配置GRE 与 静态

R1:

interface Tunnel0/0/0

ip address 10.1.3.1 255.255.255.0

tunnel-protocol gre

source 10.1.1.1

destination 10.1.2.1

q

ip route-static 192.168.2.0 24 10.1.3.2

R8:

interface Tunnel0/0/0

ip address 10.1.3.2 255.255.255.0

tunnel-protocol gre

source 10.1.2.1

destination 10.1.1.1

q

ip route-static 192.168.1.0 24 Tunnel 0/0/0

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值