华为BGP-ISIS实验(模拟市干、省干、国干)
实验拓扑:如图模拟市干省干国干设备(冗余链路配置差不多,已省略)在AS65001内部运行IS-IS协议。
实验需求:1.运行BGP协议,使R4可以学习到AR1上的业务网段,两边的业务网段可以互通
2.使用路由反射器,使AR5可以学习到AR1上的网段(R1与R5不建邻居)。
实验步骤:
[*]进行基本配置
AR1
sy
int l0
ip add 1.1.1.1 32
int g0/0/0
ip add 12.0.0.1 24
AR2
sy
Enter system view, return user view with Ctrl+Z.
int l0
ip add 2.2.2.2 32
int g0/0/1
ip add 12.0.0.2 24
int g0/0/2
ip add 23.0.0.2 24
AR3
sy
int l0
ip add 3.3.3.3 32
int g0/0/1
ip add 23.0.0.3 24
int g0/0/0
ip add 34.0.0.3 24
AR4
sy
int l0
ip add 4.4.4.4 32
int g0/0/1
ip add 34.0.0.4 24
AR5
sy
int l0
ip add 5.5.5.5 32
int g0/0/0
ip add 25.0.0.5 24
2.在AS65001内部运行ISIS协议
AR1
isis 1
net 49.0001.0001.0001.0001.00
int l0
isis enable 1
int g0/0/0
isis enable 1
AR2
isis 1
network-entity 49.0001.0002.0002.0002.00.
int l0
isis enable 1
int g0/0/1
isis enable 1
int g0/0/2
isis enable 1
int g0/0/0
isis enable 1
AR3
isis 1
network-entity 49.0002.0003.0003.00
int l0
isis enable 1
int g0/0/1
isis enable 1
AR5
isis 1
net 49.0001.0005.0005.0005.00
int l0
isis enable 1
int g0/0/0
isis enable 1
3.运行bgp协议,建立邻居关系
AR1
bgp 65001
peer 2.2.2.2 as-number 65001 //指定AR2为自己邻居
peer 2.2.2.2 connect-interface l0 //用自己环回口建立连接
peer 3.3.3.3 as-number 65001
peer 3.3.3.3 connect-interface l0
AR2
bgp 65001
peer 1.1.1.1 as-number 65001
peer 1.1.1.1 connect-interface l0
peer 5.5.5.5 as-number 65001
peer 5.5.5.5 connect-interface l0
peer 3.3.3.3 as-number 65001
peer 3.3.3.3 connect-interface l0
AR5
bgp 65001
peer 2.2.2.2 as-number 65001
peer 2.2.2.2 connect-interface l0
peer 3.3.3.3 as-number 65001
peer 3.3.3.3 connect-interface l0
AR3
bgp 65001
peer 1.1.1.1 as-number 65001
peer 1.1.1.1 connect-interface l0
peer 2.2.2.2 as-number 65001
peer 2.2.2.2 connect-interface l0
peer 5.5.5.5 as-number 65001
peer 5.5.5.5 connect-interface l0
注意:AR3与AR4建邻居时,如果以环回口建连接,默认ebgp ttl为1不可达,需要修改ebgp-max-hop值
peer 4.4.4.4 as-number 65002
peer 4.4.4.4 connect-interface l0
peer 4.4.4.4 ebgp-max-hop 2 //ttl改为2,就可达了
AR4
bgp 65002
peer 3.3.3.3 as-number 65001
peer 3.3.3.3 connect-interface l0
peer 3.3.3.3 ebgp-max-hop 2
此时邻居已经建立完毕,但是注意,在AR3上要将自己AS内部的路由器的下一跳(next-hop)指定为自己,否则路由不可达
peer 1.1.1.1 next-hop-local
peer 2.2.2.2 next-hop-local
peer 5.5.5.5 next-hop-local
现在假设AR1为BARS/SR,上面有一业务网段11.1.1.1/24,查看国干设备AR4是否能学习到?
AR1
int l10
ip add 11.1.1.1 24
q
bgp 65001
network 11.1.1.1 24 //宣告网段
在AR4上面查看
dis bgp routing-table
BGP Local router ID is 4.4.4.4
Status codes: * - valid, > - best, d - damped,
h - history,i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 11.1.1.0/24 3.3.3.3 0 65001i
已经学习到了,并且是best,因此AR4会将此路由放入路由表
同理,在AR4上也有一个网段44.4.4.4/24,查看AR1能否学习?
AR4
int l10
ip add 44.4.4.4 24
q
bgp 65002
network 44.4.4.4 24
在AR1是查看
dis bgp routing-table
BGP Local router ID is 1.1.1.1
Status codes: * - valid, > - best, d - damped,
h - history,i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 2
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 11.1.1.0/24 0.0.0.0 0 0 i
*>i44.4.4.0/24 3.3.3.3 0 100 0 65002i
也学习到,同样也是最优路由,放入路由表
这时候,用AR1 ping 44.4.4.4 能否通?
ping 44.4.4.4
PING 44.4.4.4: 56data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
--- 44.4.4.4 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
不通,为什么?因为AR1默认用的是出接口g0/0/0去ping,而AR4学习不到AR1 g0/0/0的网段,所以不通。
如果AR1使用业务网段11.1.1.1/24去ping,能通吗?
ping -a 11.1.1.1 44.4.4.4
PING 44.4.4.4: 56data bytes, press CTRL_C to break
Reply from 44.4.4.4: bytes=56 Sequence=1 ttl=253 time=300 ms
Reply from 44.4.4.4: bytes=56 Sequence=2 ttl=253 time=40 ms
Reply from 44.4.4.4: bytes=56 Sequence=3 ttl=253 time=50 ms
Reply from 44.4.4.4: bytes=56 Sequence=4 ttl=253 time=40 ms
Reply from 44.4.4.4: bytes=56 Sequence=5 ttl=253 time=40 ms
是可以的,因为11.1.1.1/24的网段AR4学到了。
4.路由反射器
这时候,BRAS/SR AR5学习不到AR1上的业务网段11.1.1.1/24(AR1与AR5不是邻居)
dis bgp routing-table
BGP Local router ID is 5.5.5.5
Status codes: * - valid, > - best, d - damped,
h - history,i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 1
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i44.4.4.0/24 3.3.3.3 0 100 0 65002i
因为受到水平分割原则限制,从IBGP邻居学习到的路由不能发送给另一个IBGP邻居,这时候可以在AR2上做路由反射器
AR2
bgp 65001
peer 1.1.1.1 reflect-client //指定AR1为自己的client
peer 5.5.5.5 reflect-client //指定AR5为自己的client
在AR5上在查看一下
dis bgp routing-table
BGP Local router ID is 5.5.5.5
Status codes: * - valid, > - best, d - damped,
h - history,i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total Number of Routes: 2
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i11.1.1.0/24 1.1.1.1 0 100 0 i
*>i44.4.4.0/24 3.3.3.3 0 100 0 65002i
学到了,同理,AR5上的业务网段也可以被AR1所学到,实验完毕。
页:
[1]