BGP反射器实验(H3C)
一、实验拓扑二、实验步骤R2network 10.0.1.16与不networkR3network 10.0.1.20 与不network
R1>sysSystem View: return to User View with Ctrl+Z.bgp65002peer 4.4.4.4 as-num 65002peer 4.4.4.4 next-hop-local peer 4.4.4.4 connpeer 4.4.4.4 connect-interface lopeer 4.4.4.4 connect-interface LoopBack0group rr internalpeer rr netpeer rr next-hop-local peer rr reflect-clientpeer rr conpeer rr connect-interface lo0peer 2.2.2.2 group rrpeer 3.3.3.3 group rr%Aug 29 16:20:17:63 2012 R1 RM/3/RMLOG:BGP.: 2.2.2.2 State is changed from OPENCONFIRM to ESTABLISHED.
%Aug 29 16:21:30:313 2012 R1 RM/3/RMLOG:BGP.: 3.3.3.3 State is changed from OPENCONFIRM to ESTABLISHED.
%Aug 29 16:23:25:828 2012 R1 RM/3/RMLOG:BGP.: 4.4.4.4 State is changed from OPENCONFIRM to ESTABLISHED.
reref reflector cluster-id mm ^% Wrong parameter found at '^' position.reflector cluster-id ? INTEGER<1-4294967295>Configure cluster-id as a decimal valueX.X.X.X Configure cluster-id in IPV4 address format
reflector cluster-id 1
bgp 65002peer 1.1.1.1 as-num 65002peer 1.1.1.1 next-hop-local peer 1.1.1.1 connect-int lo0group nn internalgroup nn next-hop-local%Aug 29 16:22:48:172 2012 R4 RM/3/RMLOG:BGP.: 1.1.1.1 State is changed from OPENCONFIRM to ESTABLISHED.
^% Too many parameters found at '^' position.group nn next-hop-local ^% Too many parameters found at '^' position.peer rr next-hop-local No such peer-group peer nn next-hop-local peer nn reflect-clientpeer nn connect-int lo0peer 2.2.2.2 group nnpeer 3.3.3.3 group nn%Aug 29 16:24:55:172 2012 R4 RM/3/RMLOG:BGP.: 2.2.2.2 State is changed from OPENCONFIRM to ESTABLISHED.
%Aug 29 16:25:04:172 2012 R4 RM/3/RMLOG:BGP.: 3.3.3.3 State is changed from OPENCONFIRM to ESTABLISHED.
refle cluster-id 1
bgp 65002peer 1.1.1.1 as-num 65002peer 1.1.1.1 connect-int lo0peer 4.4.4.4 as-num 65002peer 4.4.4.4 conn%Aug 29 16:19:42:906 2012 R2 RM/3/RMLOG:BGP.: 1.1.1.1 State is changed from OPENCONFIRM to ESTABLISHED.ect-int lo0
bgp 65002peer 1.1.1.1 as-num 65002peer 1.1.1.1 connect-int lo0peer 4.4.4.4 as-num 65002peer 4.4.4.%Aug 29 16:21:31:110 2012 R3 RM/3/RMLOG:BGP.: 1.1.1.1 State is changed from OPENCONFIRM to ESTABLISHED.4 connect-int lo0
bgp 65002peer 10.0.1.18 as-num 65001
bgp 65002peer 10.0.1.22 as-num 65003
bgp 65001peer 10.0.1.17 as-num 65002net 5.5.5.5 32net 10.10.5.1 32net 10.0.1.16 30
bgp 65003peer 10.0.1.21 as-num 65002net 6.6.6.6 32net 10.10.6.1 32net 10.0.1.20 30
ip rout 10.10.0.0 16 null0(下一跳是自己)bgp 65002net 10.10.0.0 16(配了R2,R3需要配吗)
<R5>dis ip routRouting Tables: Public Destinations : 9 Routes : 9
Destination/Mask ProtoPreCost NextHop Interface
5.5.5.5/32 Direct 0 0 127.0.0.1 InLoop06.6.6.6/32 BGP 2550 10.0.1.17 Eth0/1/010.0.1.16/30 Direct 0 0 10.0.1.18 Eth0/1/010.0.1.18/32 Direct 0 0 127.0.0.1 InLoop010.10.0.0/16 BGP 2550 10.0.1.17 Eth0/1/010.10.5.1/32 Direct 0 0 127.0.0.1 InLoop010.10.6.1/32 BGP 2550 10.0.1.17 Eth0/1/0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
<R6>dis ip routRouting Tables: Public Destinations : 9 Routes : 9
Destination/Mask ProtoPreCost NextHop Interface
5.5.5.5/32 BGP 2550 10.0.1.21 Eth0/1/16.6.6.6/32 Direct 0 0 127.0.0.1 InLoop010.0.1.20/30 Direct 0 0 10.0.1.22 Eth0/1/110.0.1.22/32 Direct 0 0 127.0.0.1 InLoop010.10.0.0/16 BGP 2550 10.0.1.21 Eth0/1/110.10.5.1/32 BGP 2550 10.0.1.21 Eth0/1/110.10.6.1/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
dis ip routRouting Tables: Public Destinations : 20 Routes : 20
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 OSPF 10 10 10.0.1.5 Eth0/1/02.2.2.2/32 Direct 0 0 127.0.0.1 InLoop03.3.3.3/32 OSPF 10 30 10.0.1.5 Eth0/1/04.4.4.4/32 OSPF 10 20 10.0.1.5 Eth0/1/05.5.5.5/32 BGP 2550 10.0.1.18 Eth0/1/26.6.6.6/32 BGP 2550 10.0.1.22 Eth0/1/010.0.1.0/30 OSPF 10 20 10.0.1.5 Eth0/1/010.0.1.4/30 Direct 0 0 10.0.1.6 Eth0/1/010.0.1.6/32 Direct 0 0 127.0.0.1 InLoop010.0.1.8/30 OSPF 10 30 10.0.1.5 Eth0/1/010.0.1.16/30 Direct 0 0 10.0.1.17 Eth0/1/210.0.1.17/32 Direct 0 0 127.0.0.1 InLoop010.0.1.20/30 OSPF 10 40 10.0.1.5 Eth0/1/010.10.0.0/16 Static 60 0 0.0.0.0 NULL010.10.1.1/32 OSPF 10 10 10.0.1.5 Eth0/1/010.10.2.1/32 OSPF 10 20 10.0.1.5 Eth0/1/010.10.5.1/32 BGP 2550 10.0.1.18 Eth0/1/210.10.6.1/32 BGP 2550 10.0.1.22 Eth0/1/0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
前提:R3上没有使用静态注入的方式发布AS65002业务网段(Loop1)的聚合路由trace -a 6.6.6.6 10.10.1.1traceroute to 10.10.1.1(10.10.1.1) 30 hops max,40 bytes packet, press CTRL_C to break110.0.1.21 15 ms 20 ms 10 ms210.0.1.9 30 ms 20 ms 10 ms310.10.1.1 40 ms 10 ms 20 ms
分析路由表<R6>dis ip routRouting Tables: Public Destinations : 9 Routes : 9
Destination/Mask ProtoPreCost NextHop Interface
5.5.5.5/32 BGP 2550 10.0.1.21 Eth0/1/16.6.6.6/32 Direct 0 0 127.0.0.1 InLoop010.0.1.20/30 Direct 0 0 10.0.1.22 Eth0/1/110.0.1.22/32 Direct 0 0 127.0.0.1 InLoop010.10.0.0/16 BGP 2550 10.0.1.21 Eth0/1/110.10.5.1/32 BGP 2550 10.0.1.21 Eth0/1/110.10.6.1/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
<R3>dis ip routRouting Tables: Public Destinations : 20 Routes : 20
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 OSPF 10 20 10.0.1.9 Eth0/1/32.2.2.2/32 OSPF 10 30 10.0.1.9 Eth0/1/3 (递归到1.9转发)3.3.3.3/32 Direct 0 0 127.0.0.1 InLoop04.4.4.4/32 OSPF 10 10 10.0.1.9 Eth0/1/35.5.5.5/32 BGP 2550 10.0.1.18 Eth0/1/36.6.6.6/32 BGP 2550 10.0.1.22 Eth0/1/110.0.1.0/30 OSPF 10 20 10.0.1.9 Eth0/1/310.0.1.4/30 OSPF 10 30 10.0.1.9 Eth0/1/310.0.1.8/30 Direct 0 0 10.0.1.10 Eth0/1/310.0.1.10/32 Direct 0 0 127.0.0.1 InLoop010.0.1.16/30 OSPF 10 40 10.0.1.9 Eth0/1/310.0.1.20/30 Direct 0 0 10.0.1.21 Eth0/1/110.0.1.21/32 Direct 0 0 127.0.0.1 InLoop010.10.0.0/16 BGP 2550 2.2.2.2 Eth0/1/310.10.1.1/32 OSPF 10 20 10.0.1.9 Eth0/1/310.10.2.1/32 OSPF 10 10 10.0.1.9 Eth0/1/310.10.5.1/32 BGP 2550 10.0.1.18 Eth0/1/310.10.6.1/32 BGP 2550 10.0.1.22 Eth0/1/1127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
<R4>dis ip routRouting Tables: Public Destinations : 20 Routes : 20
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 OSPF 10 10 10.0.1.1 Eth0/1/02.2.2.2/32 OSPF 10 20 10.0.1.1 Eth0/1/03.3.3.3/32 OSPF 10 10 10.0.1.10 Eth0/1/14.4.4.4/32 Direct 0 0 127.0.0.1 InLoop05.5.5.5/32 BGP 2550 10.0.1.18 Eth0/1/06.6.6.6/32 BGP 2550 10.0.1.22 Eth0/1/110.0.1.0/30 Direct 0 0 10.0.1.2 Eth0/1/010.0.1.2/32 Direct 0 0 127.0.0.1 InLoop010.0.1.4/30 OSPF 10 20 10.0.1.1 Eth0/1/010.0.1.8/30 Direct 0 0 10.0.1.9 Eth0/1/110.0.1.9/32 Direct 0 0 127.0.0.1 InLoop010.0.1.16/30 OSPF 10 30 10.0.1.1 Eth0/1/010.0.1.20/30 OSPF 10 20 10.0.1.10 Eth0/1/110.10.0.0/16 BGP 2550 2.2.2.2 Eth0/1/010.10.1.1/32 OSPF 10 10 10.0.1.1 Eth0/1/010.10.2.1/32 Direct 0 0 127.0.0.1 InLoop010.10.5.1/32 BGP 2550 10.0.1.18 Eth0/1/010.10.6.1/32 BGP 2550 10.0.1.22 Eth0/1/1127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
<R1>dis ip routRouting Tables: Public Destinations : 20 Routes : 20
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 Direct 0 0 127.0.0.1 InLoop02.2.2.2/32 OSPF 10 10 10.0.1.6 Eth0/1/03.3.3.3/32 OSPF 10 20 10.0.1.2 Eth0/1/24.4.4.4/32 OSPF 10 10 10.0.1.2 Eth0/1/25.5.5.5/32 BGP 2550 10.0.1.18 Eth0/1/06.6.6.6/32 BGP 2550 10.0.1.22 Eth0/1/210.0.1.0/30 Direct 0 0 10.0.1.1 Eth0/1/210.0.1.1/32 Direct 0 0 127.0.0.1 InLoop010.0.1.4/30 Direct 0 0 10.0.1.5 Eth0/1/010.0.1.5/32 Direct 0 0 127.0.0.1 InLoop010.0.1.8/30 OSPF 10 20 10.0.1.2 Eth0/1/210.0.1.16/30 OSPF 10 20 10.0.1.6 Eth0/1/010.0.1.20/30 OSPF 10 30 10.0.1.2 Eth0/1/210.10.0.0/16 BGP 2550 2.2.2.2 Eth0/1/010.10.1.1/32 Direct 0 0 127.0.0.1 InLoop0(到达目的)10.10.2.1/32 OSPF 10 10 10.0.1.2 Eth0/1/210.10.5.1/32 BGP 2550 10.0.1.18 Eth0/1/010.10.6.1/32 BGP 2550 10.0.1.22 Eth0/1/2127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
R3上使用了静态注入的方式发布AS65002业务网段(Loop1)的聚合路由
trace -a 6.6.6.6 10.10.1.1traceroute to 10.10.1.1(10.10.1.1) 30 hops max,40 bytes packet, press CTRL_C to break110.0.1.21 10 ms 20 ms <1 ms210.0.1.9 10 ms <1 ms 20 ms310.10.1.1 10 ms 20 ms <1 ms
区别: R3上路由不同dis ip routRouting Tables: Public Destinations : 20 Routes : 20
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 OSPF 10 20 10.0.1.9 Eth0/1/32.2.2.2/32 OSPF 10 30 10.0.1.9 Eth0/1/33.3.3.3/32 Direct 0 0 127.0.0.1 InLoop04.4.4.4/32 OSPF 10 10 10.0.1.9 Eth0/1/35.5.5.5/32 BGP 2550 10.0.1.18 Eth0/1/36.6.6.6/32 BGP 2550 10.0.1.22 Eth0/1/110.0.1.0/30 OSPF 10 20 10.0.1.9 Eth0/1/310.0.1.4/30 OSPF 10 30 10.0.1.9 Eth0/1/310.0.1.8/30 Direct 0 0 10.0.1.10 Eth0/1/310.0.1.10/32 Direct 0 0 127.0.0.1 InLoop010.0.1.16/30 OSPF 10 40 10.0.1.9 Eth0/1/310.0.1.20/30 Direct 0 0 10.0.1.21 Eth0/1/110.0.1.21/32 Direct 0 0 127.0.0.1 InLoop010.10.0.0/16 Static 60 0 0.0.0.0 NULL010.10.1.1/32 OSPF 10 20 10.0.1.9 Eth0/1/310.10.2.1/32 OSPF 10 10 10.0.1.9 Eth0/1/310.10.5.1/32 BGP 2550 10.0.1.18 Eth0/1/310.10.6.1/32 BGP 2550 10.0.1.22 Eth0/1/1127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
另外:<R1>dis ip routRouting Tables: Public Destinations : 20 Routes : 20
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 Direct 0 0 127.0.0.1 InLoop02.2.2.2/32 OSPF 10 10 10.0.1.6 Eth0/1/03.3.3.3/32 OSPF 10 20 10.0.1.2 Eth0/1/24.4.4.4/32 OSPF 10 10 10.0.1.2 Eth0/1/25.5.5.5/32 BGP 2550 10.0.1.18 Eth0/1/06.6.6.6/32 BGP 2550 10.0.1.22 Eth0/1/210.0.1.0/30 Direct 0 0 10.0.1.1 Eth0/1/210.0.1.1/32 Direct 0 0 127.0.0.1 InLoop010.0.1.4/30 Direct 0 0 10.0.1.5 Eth0/1/010.0.1.5/32 Direct 0 0 127.0.0.1 InLoop010.0.1.8/30 OSPF 10 20 10.0.1.2 Eth0/1/210.0.1.16/30 OSPF 10 20 10.0.1.6 Eth0/1/010.0.1.20/30 OSPF 10 30 10.0.1.2 Eth0/1/210.10.0.0/16 BGP 2550 2.2.2.2 Eth0/1/010.10.1.1/32 Direct 0 0 127.0.0.1 InLoop010.10.2.1/32 OSPF 10 10 10.0.1.2 Eth0/1/210.10.5.1/32 BGP 2550 10.0.1.18 Eth0/1/010.10.6.1/32 BGP 2550 10.0.1.22 Eth0/1/2127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
<R4>dis ip routRouting Tables: Public Destinations : 20 Routes : 20
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 OSPF 10 10 10.0.1.1 Eth0/1/02.2.2.2/32 OSPF 10 20 10.0.1.1 Eth0/1/03.3.3.3/32 OSPF 10 10 10.0.1.10 Eth0/1/14.4.4.4/32 Direct 0 0 127.0.0.1 InLoop05.5.5.5/32 BGP 2550 10.0.1.18 Eth0/1/06.6.6.6/32 BGP 2550 10.0.1.22 Eth0/1/110.0.1.0/30 Direct 0 0 10.0.1.2 Eth0/1/010.0.1.2/32 Direct 0 0 127.0.0.1 InLoop010.0.1.4/30 OSPF 10 20 10.0.1.1 Eth0/1/010.0.1.8/30 Direct 0 0 10.0.1.9 Eth0/1/110.0.1.9/32 Direct 0 0 127.0.0.1 InLoop010.0.1.16/30 OSPF 10 30 10.0.1.1 Eth0/1/010.0.1.20/30 OSPF 10 20 10.0.1.10 Eth0/1/110.10.0.0/16 BGP 2550 3.3.3.3 Eth0/1/110.10.1.1/32 OSPF 10 10 10.0.1.1 Eth0/1/010.10.2.1/32 Direct 0 0 127.0.0.1 InLoop010.10.5.1/32 BGP 2550 10.0.1.18 Eth0/1/010.10.6.1/32 BGP 2550 10.0.1.22 Eth0/1/1127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
根据开销选择的?
bgp 65002undo net 10.10.0.0 16qui
<R4>dis ip routRouting Tables: Public Destinations : 20 Routes : 20
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 OSPF 10 10 10.0.1.1 Eth0/1/02.2.2.2/32 OSPF 10 20 10.0.1.1 Eth0/1/03.3.3.3/32 OSPF 10 10 10.0.1.10 Eth0/1/14.4.4.4/32 Direct 0 0 127.0.0.1 InLoop05.5.5.5/32 BGP 2550 10.0.1.18 Eth0/1/06.6.6.6/32 BGP 2550 10.0.1.22 Eth0/1/110.0.1.0/30 Direct 0 0 10.0.1.2 Eth0/1/010.0.1.2/32 Direct 0 0 127.0.0.1 InLoop010.0.1.4/30 OSPF 10 20 10.0.1.1 Eth0/1/010.0.1.8/30 Direct 0 0 10.0.1.9 Eth0/1/110.0.1.9/32 Direct 0 0 127.0.0.1 InLoop010.0.1.16/30 OSPF 10 30 10.0.1.1 Eth0/1/010.0.1.20/30 OSPF 10 20 10.0.1.10 Eth0/1/110.10.0.0/16 BGP 2550 2.2.2.2 Eth0/1/010.10.1.1/32 OSPF 10 10 10.0.1.1 Eth0/1/010.10.2.1/32 Direct 0 0 127.0.0.1 InLoop010.10.5.1/32 BGP 2550 10.0.1.18 Eth0/1/010.10.6.1/32 BGP 2550 10.0.1.22 Eth0/1/1127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
为什么开销是0?一个区域里! 你的丑和你的脸没有关系。。。。。。 过来看看的 路过,支持一下啦 不在课堂上沉睡,就在酒桌上埋醉。 此地禁止大小便,违者没收工具。 做爱做的事,交配交的人。
页:
[1]