R1and theR2There are two wires connected, usingBGP,R1There are two sets of routes,192.168.1.0/24and the192.168.2.0/24, when the two wires are in a state, the two groups of routed traffic are distributed across two lines, and when any one of them is broken, only192.168.1.0/24traffic.
650) this.width=650; "title=" Bgp.png "alt=" wkiom1t5lvyrikjlaabrkb2aogq286.jpg "src=" http://s3.51cto.com/wyfs02/M01 /5a/32/wkiom1t5lvyrikjlaabrkb2aogq286.jpg "/>
Method 1
"R1 Configuration"
Interface Loopback0
IP Address 1.1.1.1 255.255.255.255
!
Interface Loopback1
IP address 192.168.1.1 255.255.255.0
!
Interface Loopback2
IP address 192.168.2.1 255.255.255.0
!
Interface fastethernet0/0
IP address 10.2.12.1 255.255.255.0
Duplex Auto
Speed auto
!
Interface fastethernet1/0
IP address 10.1.12.1 255.255.255.0
Duplex Auto
Speed auto
!
Router BGP 1
No BGP default Ipv4-unicast
BGP log-neighbor-changes
Neighbor 2.2.2.2 Remote-as 2
Neighbor 2.2.2.2 Ebgp-multihop 2
Neighbor 2.2.2.2 Update-source Loopback0
Neighbor 2.2.2.2 Timers 1 3
Neighbor 10.1.12.2 Remote-as 2
Neighbor 10.1.12.2 Timers 1 3
Neighbor 10.2.12.2 Remote-as 2
Neighbor 10.2.12.2 Timers 1 3
Maximum-paths 2
!
Address-family IPv4
Neighbor 2.2.2.2 Activate
Neighbor 10.1.12.2 Activate
Neighbor 10.2.12.2 Activate
Maximum-paths 2
No auto-summary
No synchronization
Network 192.168.1.0
Network 192.168.2.0
Exit-address-family
!
No IP HTTP Server
No IP http secure-server
IP route 2.2.2.2 255.255.255.255 fastethernet0/0 10.2.12.2
IP route 2.2.2.2 255.255.255.255 fastethernet1/0 10.1.12.2
!
"R2 Configuration"
!
IP SLA Monitor 1
Type echo protocol Ipicmpecho 10.2.12.1 Source-interface fastethernet0/0
IP SLA Monitor Schedule 1 Start-time now
IP SLA Monitor 2
Type echo protocol Ipicmpecho 10.1.12.1 Source-interface fastethernet1/0
IP SLA Monitor Schedule 2 Start-time now
!
!
Track 1 RTR 1 reachability
!
Track 2 RTR 2 reachability
!
Track 3 List Boolean and
Object 1
Object 2
!
!
Interface Loopback0
IP address 2.2.2.2 255.255.255.255
!
Interface fastethernet0/0
IP address 10.2.12.2 255.255.255.0
Duplex Auto
Speed auto
!
Interface fastethernet1/0
IP address 10.1.12.2 255.255.255.0
Duplex Auto
Speed auto
!
Router BGP 2
No BGP default Ipv4-unicast
BGP log-neighbor-changes
Neighbor 1.1.1.1 Remote-as 1
Neighbor 1.1.1.1 Ebgp-multihop 2
Neighbor 1.1.1.1 Update-source Loopback0
Neighbor 1.1.1.1 Timers 1 3
Neighbor 10.1.12.1 Remote-as 1
Neighbor 10.1.12.1 Timers 1 3
Neighbor 10.2.12.1 Remote-as 1
Neighbor 10.2.12.1 Timers 1 3
Maximum-paths 2
!
Address-family IPv4
Neighbor 1.1.1.1 Activate
Neighbor 1.1.1.1 Distribute-list 1 in
Neighbor 10.1.12.1 Activate
Neighbor 10.1.12.1 Distribute-list 2 in
Neighbor 10.2.12.1 Activate
Neighbor 10.2.12.1 Distribute-list 2 in
Maximum-paths 2
No auto-summary
No synchronization
Exit-address-family
!
No IP HTTP Server
No IP http secure-server
IP Route 1.1.1.1 255.255.255.255 10.2.12.1 Track 3
IP Route 1.1.1.1 255.255.255.255 10.1.12.1 Track 3
!
!
!
Access-list 1 Permit 192.168.2.0 0.0.0.255
Access-list 2 Permit 192.168.1.0 0.0.0.255
Method 2
R2 Modify the scheme for the Business party
IP SLA Monitor 1
Type echo protocol Ipicmpecho 10.2.12.1 Source-interface fastethernet0/0
IP SLA Monitor Schedule 1 Start-time now
IP SLA Monitor 2
Type echo protocol Ipicmpecho 10.1.12.1 Source-interface fastethernet1/0
IP SLA Monitor Schedule 2 Start-time now
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
Track 1 RTR 1 reachability
!
Track 2 RTR 2 reachability
!
Track 3 List Boolean and
Object 1
Object 2
!
!
!
!
!
Interface Loopback0
IP address 2.2.2.2 255.255.255.255
!
Interface Loopback1
IP address 192.168.1.1 255.255.255.0
!
Interface Loopback2
IP address 192.168.2.1 255.255.255.0
!
Interface fastethernet0/0
IP address 10.2.12.2 255.255.255.0
Duplex Auto
Speed auto
!
Interface fastethernet1/0
IP address 10.1.12.2 255.255.255.0
Duplex Auto
Speed auto
!
Router BGP 2
No BGP default Ipv4-unicast
BGP log-neighbor-changes
Neighbor 1.1.1.1 Remote-as 1
Neighbor 1.1.1.1 Ebgp-multihop 2
Neighbor 1.1.1.1 Update-source Loopback0
Neighbor 1.1.1.1 Timers 1 3
Neighbor 10.1.12.1 Remote-as 1
Neighbor 10.1.12.1 Timers 1 3
Neighbor 10.2.12.1 Remote-as 1
Neighbor 10.2.12.1 Timers 1 3
Maximum-paths 2
!
Address-family IPv4
Neighbor 1.1.1.1 Activate
Neighbor 1.1.1.1 Distribute-list 1Out
Neighbor 10.1.12.1 Activate
Neighbor 10.1.12.1 Distribute-list 2Out
Neighbor 10.2.12.1 Activate
Neighbor 10.2.12.1 Distribute-list 2Out
Maximum-paths 2
No auto-summary
No synchronization
Network 192.168.1.0
Network 192.168.2.0
Exit-address-family
!
No IP HTTP Server
No IP http secure-server
IP Route 1.1.1.1 255.255.255.255 10.2.12.1 Track 3
IP Route 1.1.1.1 255.255.255.255 10.1.12.1 Track 3
!
!
!
Access-list 1 Permit 192.168.2.0 0.0.0.255
Access-list 2 Permit 192.168.1.0 0.0.0.255
R1 down one of the interfaces
R2 Tips
r2#
*mar 1 02:34:50.951:%bgp-5-adjchange:neighbor 10.1.12.1 down BGP Notification sent
r2#
*mar 1 02:34:50.955:%bgp-3-notification:sent to neighbor 10.1.12.1 4/0 (hold time expired) 0 bytes
r2#
r2#
r2#
r2#
r2#
*mar 1 02:35:00.387:%tracking-5-state:2 RTR 2 reachability up->down
*mar 1 02:35:00.555:%tracking-5-state:3 list Boolean and Up->down
r2#
*mar 1 02:35:02.939:%bgp-3-notification:received from Neighbor 1.1.1.1 4/0 (hold time expired) 0 bytes
r2#
*mar 1 02:35:02.947:%bgp-5-adjchange:neighbor 1.1.1.1 down BGP Notification received
routing table for R1
R1#sh IP ro b
B 192.168.1.0/24 [20/0] via 10.2.12.2, 00:03:24
Method 3
Use Advertise-map to resolve, but some iOS are not supported.
(R1) Config:
Router BGP 1
No synchronization
BGP log-neighbor-changes
Network 192.168.1.0
Network 192.168.2.0
Redistribute Connected Route-map Redis_conn (The purpose is to get two external lines into the BGP routing table, to facilitate the subsequent advertise-map to detect the existence of these two routes to determine whether to publish a secondary network segment)
Neighbor 12.1.1.2 Remote-as 2
Neighbor 12.1.1.2 Update-source serial1/0
Neighbor 12.1.1.2 Advertise-map dist_out2 exist-map line2 (if the outside line 2 is normal, the route of the outside Line 2 is redistributed into the BGPL routing table, the secondary route is advertised, if 2 is normal, and can be from the s1/0 "first-line port "The notification to the neighbor route, indicating that 1 is also normal, that is normal." If the 2 line is disconnected, the port will down,route-map Redis_conn, it will not be distributed into the BGP routing table line2 This road, will not announce the secondary route, but also a bit similar to the method of cross-building neighbors, the following is the same.
Neighbor 12.1.2.2 Remote-as 2
Neighbor 12.1.2.2 Update-source SERIAL1/1
Neighbor 12.1.2.2 Advertise-map dist_out2 exist-map line1
No auto-summary
!
IP prefix-list dist_out2 seq 5 Permit 192.168.2.0/24
!
IP prefix-list line1 seq 5 permit 12.1.1.0/30 (outside line)
!
IP prefix-list line2 seq 5 permit 12.1.2.0/30 (external line two routes)
!
Route-map Redis_conn Permit 10
Match Interface serial1/0 SERIAL1/1
Route-map Dist_out2 Permit 10
Match IP address prefix-list dist_out2
!
Route-map Line2 Permit 10
Match IP address prefix-list line2
!
Route-map line1 Permit 10
Match IP address prefix-list line1
!
ISP (R2) Config: (ISP configuration is very simple, basically do nothing, actually, the user has what needs, preferably in the CE above, PE on the requirements to meet the situation, as far as possible to streamline the configuration, save resources)
Router BGP 2
No synchronization
BGP log-neighbor-changes
Neighbor 12.1.1.1 Remote-as 1
Neighbor 12.1.1.1 Update-source serial1/0
Neighbor 12.1.2.1 Remote-as 1
Neighbor 12.1.2.1 Update-source SERIAL1/1
No Auto-summar
This article from "Genius without that 1% is absolutely impossible" blog, please be sure to keep this source http://xushen.blog.51cto.com/1673219/1617890
The real-combat scheme design of BGP real-combat strategy routing distribution requirement for two routers