1、 华为 HCNP-BGP 路由反射器-1.基本配置-system-view Huaweisysname AR1AR1interface GigabitEthernet0/0/0AR1-GigabitEthernet0/0/0ip address 12.1.1.1 24AR1interface LoopBack 0AR1-LoopBack0ip address 1.1.1.1 24system-view Huaweisysname AR2AR2interface GigabitEthernet0/0/0AR2-GigabitEthernet0/0/0ip addres 12.1.1.2 24AR
2、2interface GigabitEthernet0/0/1AR2-GigabitEthernet0/0/1ip address 23.1.1.2 24AR2interface GigabitEthernet0/0/2AR2-GigabitEthernet0/0/2ip address 24.1.1.2 24AR2interface GigabitEthernet0/0/3AR2-GigabitEthernet0/0/3ip address 25.1.1.2 24AR2interface LoopBack 0AR2-LoopBack0ip address 2.2.2.2 24AR2-Loop
3、Back0ospf network-type broadcast system-view Huaweisysname AR3AR3interface GigabitEthernet0/0/0AR3-GigabitEthernet0/0/0ip address 23.1.1.3 24AR3interface LoopBack 0AR3-LoopBack0ip address 3.3.3.3 24AR3-LoopBack0ospf network-type broadcast system-view Huaweisysname AR4AR4interface GigabitEthernet0/0/
4、0AR4-GigabitEthernet0/0/0ip address 24.1.1.4 24AR4interface LoopBack 0AR4-LoopBack0ip address 4.4.4.4 24AR4-LoopBack0ospf network-type broadcastsystem-view Huaweisysname AR5AR5interface GigabitEthernet0/0/0AR5-GigabitEthernet0/0/0ip address 25.1.1.5 24AR5interface LoopBack 0AR5-LoopBack0ip address 5
5、.5.5.5 24AR5-LoopBack0ospf network-type broadcast -2.配置 IGP 协议-AR2ospf 1 router-id 2.2.2.2AR2-ospf-1area 0AR2-ospf-1-area-0.0.0.0network 23.1.1.0 0.0.0.255AR2-ospf-1-area-0.0.0.0network 24.1.1.0 0.0.0.255AR2-ospf-1-area-0.0.0.0network 25.1.1.0 0.0.0.255AR2-ospf-1-area-0.0.0.0network 2.2.2.0 0.0.0.25
6、5AR3ospf 1 router-id 3.3.3.3AR3-ospf-1area 0AR3-ospf-1-area-0.0.0.0network 23.1.1.0 0.0.0.255AR3-ospf-1-area-0.0.0.0network 3.3.3.0 0.0.0.255AR4ospf 1 router-id 4.4.4.4AR4-ospf-1area 0AR4-ospf-1-area-0.0.0.0network 24.1.1.0 0.0.0.255AR4-ospf-1-area-0.0.0.0network 4.4.4.0 0.0.0.255AR5ospf 1 router-id
7、 5.5.5.5AR5-ospf-1area 0AR5-ospf-1-area-0.0.0.0network 25.1.1.0 0.0.0.255AR5-ospf-1-area-0.0.0.0network 5.5.5.0 0.0.0.255-3.配置 BGP 对等体-AR1bgp 100 AR1-bgprouter-id 1.1.1.1AR1-bgppeer 12.1.1.2 as-number 64512AR2bgp 64512 AR2-bgprouter-id 2.2.2.2AR2-bgppeer 12.1.1.1 as-number 100-4.配置路由反射器-AR2bgp 64512
8、AR2-bgpgroup IBGP internal AR2-bgppeer 3.3.3.3 group IBGPAR2-bgppeer 5.5.5.5 group IBGPAR2-bgppeer IBGP connect-interface LoopBack 0 AR2-bgppeer IBGP reflect-client AR2-bgppeer IBGP next-hop-local AR2-bgppeer 4.4.4.4 as-number 64512AR2-bgppeer 4.4.4.4 connect-interface LoopBack 0AR2-bgppeer 4.4.4.4
9、next-hop-localAR3bgp 64512AR3-bgprouter-id 3.3.3.3AR3-bgppeer 2.2.2.2 as-number 64512AR3-bgppeer 2.2.2.2 connect-interface LoopBack 0AR4-bgprouter-id 4.4.4.4AR4-bgppeer 2.2.2.2 as-number 64512AR4-bgppeer 2.2.2.2 connect-interface LoopBack 0AR5bgp 64512AR5-bgprouter-id 5.5.5.5AR5-bgppeer 2.2.2.2 as-n
10、umber 64512AR5-bgppeer 2.2.2.2 connect-interface LoopBack 0-查看 BGP 邻居关系-AR2display bgp peer Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv3.3.3.3 4 64512 2 3 0 00:00:12 Established 04.4.4.4 4 64512 2 3 0 00:00:10 Established 05.5.5.5 4 64512 2 2 0 00:00:13 Established 012.1.1.1 4 100 8 8 0 00:
11、06:47 Established 0AR2display bgp peer verbose BGP Peer is 3.3.3.3, remote AS 64512 Type: IBGP linkBGP version 4, Remote router ID 3.3.3.3Update-group ID: 2 BGP current state: Established, Up for 00h01m25s BGP current event: KATimerExpiredBGP last state: OpenConfirmBGP Peer Up count: 1Received total
12、 routes: 0Received active routes total: 0Advertised total routes: 0Port: Local - 179 Remote - 49586Configured: Connect-retry Time: 32 secConfigured: Active Hold Time: 180 sec Keepalive Time:60 secReceived : Active Hold Time: 180 secNegotiated: Active Hold Time: 180 sec Keepalive Time:60 secPeer opti
13、onal capabilities:Peer supports bgp multi-protocol extensionPeer supports bgp route refresh capabilityPeer supports bgp 4-byte-as capabilityAddress family IPv4 Unicast: advertised and receivedReceived: Total 3 messagesUpdate messages 0 Open messages 1 KeepAlive messages 2 Notification messages 0 Ref
14、resh messages 0Sent: Total 4 messagesUpdate messages 0 Open messages 2 KeepAlive messages 2 Notification messages 0 Refresh messages 0Authentication type configured: NoneLast keepalive received: 2015-04-03 09:54:02-08:00Minimum route advertisement interval is 15 secondsOptional capabilities:Route re
15、fresh capability has been enabled4-byte-as capability has been enabledNexthop self has been configuredIts route-reflector-clientConnect-interface has been configuredPeer Preferred Value: 0Routing policy configured:No routing policy is configured-5.观察路由反射器路由信息传递-AR4interface LoopBack 104AR4-LoopBack1
16、04ip address 104.1.1.1 24AR4bgp 64512AR4-bgpnetwork 104.1.1.0 24-检查 AR2 BGP 数据库信息-AR2display bgp routing-table Total Number of Routes: 1Network NextHop MED LocPrf PrefVal Path/Ogn*i 104.1.1.0/24 4.4.4.4 0 100 0 iAR3display bgp routing-table Total Number of Routes: 1Network NextHop MED LocPrf PrefVal
17、 Path/Ogn*i 104.1.1.0/24 4.4.4.4 0 100 0 i-路由反射器第一条原则:从非客户端 IBGP 对等体学到的路由,发布给此反射器的所有客户端-AR3interface loo AR3interface LoopBack 103AR3-LoopBack103ip address 103.1.1.1 24AR3bgp 64512AR3-bgpnetwork 103.1.1.0 24-检查 AR4,AR5 BGP 路由数据库-AR4display bgp routing-table Total Number of Routes: 2Network NextHop M
18、ED LocPrf PrefVal Path/Ogn*i 103.1.1.0/24 3.3.3.3 0 100 0 i* 104.1.1.0/24 0.0.0.0 0 0 iAR5display bgp routing-table Total Number of Routes: 2Network NextHop MED LocPrf PrefVal Path/Ogn*i 103.1.1.0/24 3.3.3.3 0 100 0 i*i 104.1.1.0/24 4.4.4.4 0 100 0 i-第二条原则:从客户机学到的路由,发布给此反射器的所有客户机和非客户机-AR1interface L
19、oopBack 101AR1-LoopBack101ip address 101.1.1.1 24AR1bgp 100AR1-bgpnetwork 101.1.1.0 24AR4display bgp routing-tableNetwork NextHop MED LocPrf PrefVal Path/Ogn*i 101.1.1.0/24 2.2.2.2 0 100 0 100i*i 103.1.1.0/24 3.3.3.3 0 100 0 i* 104.1.1.0/24 0.0.0.0 0 0 iAR5display bgp routing-tableNetwork NextHop ME
20、D LocPrf PrefVal Path/Ogn*i 101.1.1.0/24 2.2.2.2 0 100 0 100i*i 103.1.1.0/24 3.3.3.3 0 100 0 i*i 104.1.1.0/24 4.4.4.4 0 100 0 i-第三条原则:从 EBGP 对灯体学习到的路由, 发送给所有的客户端和非客户端-6.检查反射器反射的路由信息属性-AR5interface LoopBack 105AR5-LoopBack105ip address 105.1.1.1 24AR5bgp 64512AR5-bgpnetwork 105.1.1.0 24AR3display bgp
21、 routing-table 105.1.1.0BGP local router ID : 3.3.3.3Local AS number : 64512Paths: 1 available, 1 best, 1 selectBGP routing table entry information of 105.1.1.0/24:From: 2.2.2.2 (2.2.2.2)Route Duration: 01h13m34s Relay IP Nexthop: 23.1.1.2Relay IP Out-Interface: GigabitEthernet0/0/0Original nexthop: 5.5.5.5Qos information : 0x0AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, best, select, active, pre 255, IGP cost 2Originator: 5.5.5.5Cluster list: 2.2.2.2Not advertised to any peer yet