Learn Cisco: BGP

Post Top Ad

Showing posts with label BGP. Show all posts
Showing posts with label BGP. Show all posts

Lab 142 - BGP Timers

May 21, 2011
Prerequisites: CCNP level skills.

Note!
Configuration from Lab 140.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
The BGP policy stipulates that the R5's timer to send BGP advertisements should be set to 10 seconds (default: iBGP=5 seconds, eBGP=30 seconds). Also BGP peer loss should be detected in 15 seconds (default=180 seconds). Also improve the BGP scanner operation by decreasing the default value of 60 seconds to 20 seconds.

Solution

Task 1
The BGP policy stipulates that the R5's timer to send BGP advertisements should be set to 10 seconds (default: iBGP=5 seconds, eBGP=30 seconds). Also BGP peer loss should be detected in 15 seconds (default=180 seconds). Also improve the BGP scanner operation by decreasing the default value of 60 seconds to 20 seconds.

R5 Configuration:
!
router bgp 50
 no synchronization
 bgp router-id 172.16.105.5
 bgp log-neighbor-changes
 bgp scan-time 20
 network 172.16.105.0 mask 255.255.255.0
 timers bgp 5 15
 neighbor 10.1.35.3 remote-as 100
 neighbor 10.1.35.3 advertisement-interval 10
 no auto-summary
!

Note!
Hello timer is set to 5 seconds following the rule 3 x keepalive = holdtime.

BGP Processes:
  • BGP Open - responsible for BGP session establishment.
  • BGP I/O - handles queuing and processing updates and keepalive packets.
  • BGP Scanner - responsible for conditional route advertisements, route dampening, import and export of routes into VRF (MPLS), and confirms the reachability to the NEXT_HOP (the last one is handled now by BGP next-hop tracking).
  • BGP Router - calculates the best path, establishes peers, sends and receives routes and interacts with RIB.
Source:
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00809d16f0.shtml#understandbgp
Read More

Lab 141 - BGP Next-Hop Address Tracking

May 21, 2011
Prerequisites: CCNP level skills.

Note!
Configuration from Lab 140.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
Configure R3 in such a way that the interval between full table walks is 10 seconds (not 5 which is default).

Solution

Task 1
Configure R3 in such a way that the interval between full table walks is 10 seconds (not 5 which is default).


R3 Configuration:
!
R3#show run | s router bgp
router bgp 100
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 bgp nexthop trigger delay 10
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.35.5 remote-as 50
 neighbor 172.16.101.1 remote-as 100
 neighbor 172.16.101.1 update-source Loopback0
 neighbor 172.16.102.2 remote-as 100
 neighbor 172.16.102.2 update-source Loopback0
 neighbor 172.16.104.4 remote-as 100
 neighbor 172.16.104.4 update-source Loopback0
 no auto-summary
!


Note!
The BGP Support for Next-Hop Address Tracking feature is enabled by default when a supporting Cisco IOS software image is installed. BGP next-hop address tracking is event driven. BGP prefixes are automatically tracked as peering sessions are established. Next-hop changes are rapidly reported to the BGP routing process as they are updated in the RIB. This optimization improves overall BGP convergence by reducing the response time to next-hop changes for routes installed in the RIB. When a bestpath calculation is run in between BGP scanner cycles, only next-hop changes are tracked and processed.


Source:
http://www.cisco.com/en/US/docs/ios/12_3t/12_3t14/feature/guide/gt_bnht.html
Read More

Lab 140 - BGP Fast Fallover

May 19, 2011
Prerequisites: CCNP level skills.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
Configure full mesh BGP peering according to the topology diagram (pic. 1). Make sure that all BGP sessions in AS 100 can survive a single link loss. If IGP protocol must used, OSPF should be configured. Advertise Loopbacks into BGP.

Task 2
Configure R3 in such a way so the response time of BGP to adjacency changes is improved. Use a method of detecting the loss of the peer that is not based on the interface state but is event driven such as a loss of the path to the IGP address used for peering.

Solution

Task 1
Configure full mesh BGP peering according to the topology diagram (pic. 1). Make sure that all BGP sessions in AS 100 can survive a single link loss. If IGP protocol must be used, OSPF should be configured. Advertise Loopbacks into BGP.

R1 Configuration:
!
router ospf 1
 router-id 172.16.101.1
 log-adjacency-changes
 network 10.1.13.1 0.0.0.0 area 0
 network 10.1.14.1 0.0.0.0 area 0
 network 172.16.101.1 0.0.0.0 area 0
!
router bgp 100
 no synchronization
 bgp router-id 172.16.101.1
 bgp log-neighbor-changes
 network 172.16.101.0 mask 255.255.255.0
 neighbor 172.16.102.2 remote-as 100
 neighbor 172.16.102.2 update-source Loopback0
 neighbor 172.16.103.3 remote-as 100
 neighbor 172.16.103.3 update-source Loopback0
 neighbor 172.16.104.4 remote-as 100
 neighbor 172.16.104.4 update-source Loopback0
 no auto-summary
!

R2 Configuration:
!
router ospf 1
 router-id 172.16.102.2
 log-adjacency-changes
 network 10.1.23.2 0.0.0.0 area 0
 network 10.1.24.2 0.0.0.0 area 0
 network 172.16.102.2 0.0.0.0 area 0
!
router bgp 100
 no synchronization
 bgp router-id 172.16.102.2
 bgp log-neighbor-changes
 network 172.16.102.0 mask 255.255.255.0
 neighbor 172.16.101.1 remote-as 100
 neighbor 172.16.101.1 update-source Loopback0
 neighbor 172.16.103.3 remote-as 100
 neighbor 172.16.103.3 update-source Loopback0
 neighbor 172.16.104.4 remote-as 100
 neighbor 172.16.104.4 update-source Loopback0
 no auto-summary
!

R3 Configuration:
!
router ospf 1
 router-id 172.16.103.3
 log-adjacency-changes
 network 10.1.13.3 0.0.0.0 area 0
 network 10.1.23.3 0.0.0.0 area 0
 network 172.16.103.3 0.0.0.0 area 0
router bgp 100
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.35.5 remote-as 50
 neighbor 172.16.101.1 remote-as 100
 neighbor 172.16.101.1 update-source Loopback0
 neighbor 172.16.102.2 remote-as 100
 neighbor 172.16.102.2 update-source Loopback0
 neighbor 172.16.104.4 remote-as 100
 neighbor 172.16.104.4 update-source Loopback0
 no auto-summary
!

R4 Configuration:
!
router ospf 1
 router-id 172.16.104.4
 log-adjacency-changes
 network 10.1.14.4 0.0.0.0 area 0
 network 10.1.24.4 0.0.0.0 area 0
 network 172.16.104.4 0.0.0.0 area 0
!
router bgp 100
 no synchronization
 bgp router-id 172.16.104.4
 bgp log-neighbor-changes
 network 172.16.104.0 mask 255.255.255.0
 neighbor 172.16.101.1 remote-as 100
 neighbor 172.16.101.1 update-source Loopback0
 neighbor 172.16.102.2 remote-as 100
 neighbor 172.16.102.2 update-source Loopback0
 neighbor 172.16.103.3 remote-as 100
 neighbor 172.16.103.3 update-source Loopback0
!

Verification:
Pic. 2 - R1's BGP Neighbors.
Pic. 3 - R2's BGP Neighbors.

Pic. 4 - R3's BGP Neighbors.

Pic. 5 - R4's BGP Neighbors.
Task 2
Configure R3 in such a way so the response time of BGP to adjacency changes is improved. Use a method of detecting the loss of the peer that is not based on the interface state but is event driven such as a loss of the path to the IGP address used for peering.

R3 Configuration:
router bgp 100
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.35.5 remote-as 50
 neighbor 172.16.101.1 remote-as 100
 neighbor 172.16.101.1 update-source Loopback0
 neighbor 172.16.101.1 fall-over
 neighbor 172.16.102.2 remote-as 100
 neighbor 172.16.102.2 update-source Loopback0
 neighbor 172.16.102.2 fall-over
 neighbor 172.16.104.4 remote-as 100
 neighbor 172.16.104.4 update-source Loopback0
 neighbor 172.16.104.4 fall-over
 no auto-summary
!

Verification:
Pic. 6 - BGP Fallover. 

Source:
http://www.cisco.com/en/US/docs/ios/12_0s/feature/guide/cs_bsfda.html
Read More

Lab 139 - BGP Soft Reconfiguration

May 18, 2011
Prerequisites: CCNP level skills.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl


Task 1
Configure R5 in such way, that if BGP in R3 does not support 'Route Refresh' message, it can still apply inbound policy without asking R5 to re-send their BGP prefixes.

Solution

Task 1
Configure R5 in such way, that if BGP in R3 does not support 'Route Refresh' message, it can still apply inbound policy without asking R5 to re-send their BGP prefixes.


Pic. 2 - BGP Before Applying Configuration.


R5 Configuration:
!
router bgp 50
 no synchronization
 bgp router-id 172.16.105.5
 bgp log-neighbor-changes
 network 172.16.105.0 mask 255.255.255.0
 neighbor 10.1.35.3 remote-as 123
 neighbor 10.1.35.3 soft-reconfiguration inbound
 no auto-summary
!


Verfication:
Pic. 3 - BGP After Applying Configuration.


Notice!
This command creates the exact copy of the BGP table. This causes high memory utilization but allows to apply inbound filtering on R5 without tearing down the session if the Route-Refresh messages are not supported on R5.
Read More

Lab 138 - BGP ORF

May 18, 2011
Prerequisites: CCNP level skills.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
R5 should filter out all class A prefixes starting with 40.x.x.x. Configure routers in such a way that changing the inbound filtering policy on R5 should force R3 to apply the right filtering preventing it from sending prefixes R5 does not wish to receive.

Solution

Task 1

R5 should filter out all class A prefixes starting with 40.x.x.x. Configure routers in such a way that changing the inbound filtering policy on R5 should force R3 to apply the right filtering preventing it from sending prefixes R5 does not wish to receive.

R3 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.13.1 remote-as 123
 neighbor 10.1.13.1 route-reflector-client
 neighbor 10.1.13.1 next-hop-self
 neighbor 10.1.23.2 remote-as 123
 neighbor 10.1.23.2 route-reflector-client
 neighbor 10.1.23.2 next-hop-self 
 neighbor 10.1.35.5 remote-as 50
 neighbor 10.1.35.5 capability orf prefix-list receive
 no auto-summary
!


R5 Configuration:
!
router bgp 50
 no synchronization
 bgp router-id 172.16.105.5
 bgp log-neighbor-changes
 network 172.16.105.0 mask 255.255.255.0
 neighbor 10.1.35.3 remote-as 123
 neighbor 10.1.35.3 capability orf prefix-list send
 no auto-summary
!

Verification:

Pic. 2 - Outbound Route Filtering Negotiated between R3 and R5.


Notice!
ORF has been enabled and supports prefix-lists only (as of writing this post). Now, I can apply the prefix-list based filtering as per Task 1.

Pic. 3 - BGP Table on R5 Before Filtering.


R5 Configuration:
!
ip prefix-list FILTER seq 5 deny 40.0.0.0/8 le 32
ip prefix-list FILTER seq 10 permit 0.0.0.0/0 le 32
!
router bgp 50
 no synchronization
 bgp router-id 172.16.105.5
 bgp log-neighbor-changes
 network 172.16.105.0 mask 255.255.255.0
 neighbor 10.1.35.3 remote-as 123
 neighbor 10.1.35.3 capability orf prefix-list send
 neighbor 10.1.35.3 prefix-list FILTER in
 no auto-summary
!


Verification:

Pic. 4 -  Prefix-List Applied on R5.


Now, 'clear ip bgp * in' on R5.
Read More

Lab 137 - BGP Peer Templates

May 16, 2011
Prerequisites: CCNP level skills.

Note!
I have created a pdf document with OSPF Lab 1 and 2 containing a detailed lab breakdown. Check it out if want. Any feedback is most welcome.
http://www.4shared.com/document/W8lhDzNo/Hacking-Cisco-OSPF-Lab1-2-Brea.html

Topology
Pic. 1 - Topology Diagram.
 
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
Configure authentication between R3 and R5 (use password: 'CISCO123'). Configure the BGP timers: hello=30 seconds, holdtime=90 on R3 for all its iBGP peers. R3's iBGP sessions should inherit the same password. Do not use 'neighbor <address> password' command in R3 to accomplish your goal. R1 and R2 and R5 can use this command.  The configuration stipulates that iBGP current and future policy in R3 should be configured as a template.

Solution

Task 1
Configure authentication between R3 and R5 (use password: 'CISCO123'). Configure the BGP timers: hello=30 seconds, holdtime=90 in R3 for all its iBGP peers. R3's iBGP sessions should inherit the same password. Do not use 'neighbor <address> password' command on R3 to accomplish your goal. R1 and R2 and R5 can use this command.  The configuration stipulates that iBGP current and future policy in R3 should be configured as a template.

R1 Configuration:
router bgp 123
 no synchronization
 bgp router-id 172.16.101.1
 bgp log-neighbor-changes
 network 172.16.101.0 mask 255.255.255.0
 neighbor 10.1.13.3 remote-as 123
 neighbor 10.1.13.3 password CISCO123
 neighbor 10.1.14.4 remote-as 40
 no auto-summary
!

R2 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.102.2
 bgp log-neighbor-changes
 network 172.16.102.0 mask 255.255.255.0
 neighbor 10.1.23.3 remote-as 123
 neighbor 10.1.23.3 password CISCO123
 neighbor 10.1.23.3 next-hop-self
 neighbor 10.1.24.4 remote-as 40
 no auto-summary
!

R3 Configuration:
!
router bgp 123
 template peer-policy IBGP_POLICY
  next-hop-self
 exit-peer-policy
 !
 template peer-session AUTHENTICATION
  password CISCO123
 exit-peer-session
 !
 template peer-session IBGP_ROUTERS
  remote-as 123
  timers 30 90
  inherit peer-session AUTHENTICATION
 exit-peer-session
 !
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.13.1 inherit peer-session IBGP_ROUTERS
 neighbor 10.1.13.1 inherit peer-policy IBGP_POLICY
 neighbor 10.1.23.2 inherit peer-session IBGP_ROUTERS
 neighbor 10.1.23.2 inherit peer-policy IBGP_POLICY
 neighbor 10.1.35.5 remote-as 50
 neighbor 10.1.35.5 inherit peer-session AUTHENTICATION
 no auto-summary
!

Verification:
Pic. R3's Neighbors.

Read More

Lab 136 - BGP Peer Groups

May 16, 2011

Disclaimer
The author of the posts will not assume any liability or responsibility to any person or entity with respect to loss or damages incurred from information contained in this blog. Any resemblance to some other training materials and/or CCIE exam is completely coincidental.
Full information:
http://hackingcisco.blogspot.com/2011/01/cisco-going-pro.html

Prerequisites: CCNP level skills.

Note!
I have created a pdf document with OSPF Lab 1 and 2 containing a detailed lab breakdown. Check it out if want. Any feedback is most welcome.
http://www.4shared.com/document/W8lhDzNo/Hacking-Cisco-OSPF-Lab1-2-Brea.html

Topology
Pic. 1 - Topology Diagram.
 
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
R3 in AS 123 is going to peer with few hundred routers running iBGP session and you will need to save its resources (CPU). Configure R3 iBGP peering in such a way that it checks the routing table only once and replicates the same update to all its iBGP peers.

Solution


Task 1
R3 in AS 123 is going to peer with few hundred routers running iBGP session and you will need to save its resources (CPU). Configure R3 iBGP peering in such a way that it checks the routing table only once and replicates the same update to all its iBGP peers.
R3 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 network 172.16.103.0 mask 255.255.255.0
 neighbor IBGP_ROUTERS peer-group
 neighbor IBGP_ROUTERS remote-as 123
 neighbor IBGP_ROUTERS route-reflector-client
 neighbor IBGP_ROUTERS next-hop-self
 neighbor 10.1.13.1 peer-group IBGP_ROUTERS
 neighbor 10.1.23.2 peer-group IBGP_ROUTERS
 neighbor 10.1.35.5 remote-as 50
 no auto-summary
!

Verification:
Pic. 2 - BGP Peer Group.
Pic. 3 - BGP Peer Group Members Summary.

Note!
BGP Peer groups have limitations:
  • All neighbors that shared the same peer group configuration also had to share the same outbound routing policies.
  • All neighbors had to belong to the same peer group and address family. Neighbors configured in different address-families could not belong to different peer groups.
Source:
http://www.cisco.com/en/US/docs/ios/12_0s/feature/guide/s_bgpct.html#wp1027184

(The second bullet point tries to underline the fact that you cannot mix iBGP and eBGP peers in the same peer group).
Read More

Lab 135 - BGP TTL Security

May 11, 2011
Prerequisites: CCNP level skills.

Note!
I have created a pdf document with OSPF Lab 1 and 2 containing a detailed lab breakdown. Check it out if want. Any feedback is most welcome.
http://www.4shared.com/document/W8lhDzNo/Hacking-Cisco-OSPF-Lab1-2-Brea.html

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
AS 50 has been experiencing a SYN attack on TCP port 179 (BGP). In order to protect the router, configure R5 so that it accepts BGP packets only from its directly connected neighbor.

Solution

Task 1
AS 50 has been experiencing a SYN attack on TCP port 179 (BGP). In order to protect the router, configure R5 so that it accepts BGP packets only from its directly connected neighbor.
Notice!
These attacks must have their TTL higher than 1 in order to reach AS 50. Due to the volatile behavior of BGP paths, the attacker will find it very difficult or almost impossible to calculate their TTL value to be 1 when delivered to our router. The configuration must be done on both neighbors (R3 and R5).

R3 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.13.1 remote-as 123
 neighbor 10.1.13.1 route-reflector-client
 neighbor 10.1.13.1 next-hop-self
 neighbor 10.1.23.2 remote-as 123
 neighbor 10.1.23.2 route-reflector-client
 neighbor 10.1.23.2 next-hop-self
 neighbor 10.1.35.5 remote-as 50
 neighbor 10.1.35.5 ttl-security hops 1
 no auto-summary
!

R5 Configuration:
!
router bgp 50
 no synchronization
 bgp router-id 172.16.105.5
 bgp log-neighbor-changes
 network 172.16.105.0 mask 255.255.255.0
 neighbor 10.1.35.3 remote-as 123
 neighbor 10.1.35.3 ttl-security hops 1
 no auto-summary
!

Verification:
Pic. 2 - BGP Details on R3.

Pic. 3 - BGP Details on R5.
Read More

Lab 133 - BGP Dampening using Route-Map

May 10, 2011
Prerequisites: CCNP level skills.


Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
Configure R1 and R2 should apply the route dampening for prefixes 40.x.x.x according to the following:
  • Max-Suppres=50 minutes
  • Suppress=2000 points
  • Reuse=800 points
  • Half-Time=10 minutes
Prefixes 44.4.x.x should use the following dampening policy:

  • Max-Suppres=90 minutes
  • Suppress=2500 points
  • Reuse=700 points
  • Half-Time=20 minutes
Solution

Task 1
Configure R1 and R2 should apply the route dampening for prefixes 40.x.x.x according to the following:
  • Max-Suppres=50 minutes
  • Suppress=3000 points
  • Reuse=800 points
  • Half-Time=15 minutes
Prefixes 44.x.x.x should use the following dampening policy:
  • Max-Suppres=90 minutes
  • Suppress=2500 points
  • Reuse=700 points
  • Half-Time=20 minutes
R1 Configuration:
!
ip prefix-list NET_40 seq 5 permit 40.0.0.0/8 le 32
!
ip prefix-list NET_44 seq 5 permit 44.0.0.0/8 le 32
!
route-map DAMPEN permit 10
 match ip address prefix-list NET_40
 set dampening 15 800 3000 50
!        
route-map DAMPEN permit 20
 match ip address prefix-list NET_44
 set dampening 20 700 2500 90
!
router bgp 123
 no synchronization
 bgp router-id 172.16.101.1
 bgp log-neighbor-changes
 bgp dampening route-map DAMPEN
 network 172.16.101.0 mask 255.255.255.0
 neighbor 10.1.13.3 remote-as 123
 neighbor 10.1.14.4 remote-as 40
 no auto-summary
!

Verification:
Pic. 2 - R1 Dampening Policy.

R2 Configuration:
!
ip prefix-list NET_40 seq 5 permit 40.0.0.0/8 le 32
!
ip prefix-list NET_44 seq 5 permit 44.0.0.0/8 le 32
!
route-map DAMPEN permit 10
 match ip address prefix-list NET_40
 set dampening 15 800 3000 50
!        
route-map DAMPEN permit 20
 match ip address prefix-list NET_44
 set dampening 20 700 2500 90
!
router bgp 123
 no synchronization
 bgp router-id 172.16.102.2
 bgp log-neighbor-changes
 bgp dampening route-map DAMPEN
 network 172.16.102.0 mask 255.255.255.0
 neighbor 10.1.23.3 remote-as 123
 neighbor 10.1.23.3 next-hop-self
 neighbor 10.1.24.4 remote-as 40
 no auto-summary
!

Verification:
Pic. 2 - R2 Dampening Policy.
Read More

Lab 132 - BGP Dampening

May 10, 2011
Prerequisites: CCNP level skills.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
Configure R3 to use BGP dampening according to the following:
  • Penalty should be reduced by half after 10 minutes (default=15).
  • The dampened route must be reused when it reaches value of 700. (default=750).
  • Route should not be used when it reaches 2000 points (default=2000).
  • The routes that experience flaps should not be suppressed for more than 40. minutes (default=4 x half-time).
Solution

Task 1
Configure R3 to use BGP dampening according to the following:
  • Penalty should be reduced by half after 10 minutes (default=15).
  • The dampened route must be reused when it reaches value of 700. (default=750).
  • Route should not be used when it reaches 2000 points (default=2000).
  • The routes that experience flaps should not be suppressed for more than 40. minutes (default=4 x half-time).
R3 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 bgp dampening 10 700 2000 40
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.13.1 remote-as 123
 neighbor 10.1.13.1 route-reflector-client
 neighbor 10.1.13.1 next-hop-self
 neighbor 10.1.23.2 remote-as 123
 neighbor 10.1.23.2 route-reflector-client
 neighbor 10.1.23.2 next-hop-self
 neighbor 10.1.35.5 remote-as 50
 no auto-summary
!

Verification:
Pic. 2 - BGP Dampening Parameters.

Read More

Lab 131 - BGP Next-Hop using Redistribution into IGP

May 09, 2011
Prerequisites: CCNP level skills.

Note!
Use the configuration from Lab 130 except for route-maps that change the next-hop.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
Similarly to the lab 129 and 130, deal with the next hop on R1, R2 and R3, but do not use 'next-hop-self' or route-map to change the next-hop while advertising BGP prefixes in AS 123.

Solution

Task 1
Similarly to the lab 129 and 130, deal with the next hop on R1, R2 and R3, but do not use 'next-hop-self' or route-map to change the next-hop while advertising BGP prefixes in AS 123.

R1 Configuration:
!
router ospf 1
 router-id 172.16.101.1
 log-adjacency-changes
 redistribute connected subnets
 network 10.1.13.1 0.0.0.0 area 0
!

R2 Configuration:
!
router ospf 1
 router-id 172.16.102.2
 log-adjacency-changes
 redistribute connected subnets
 network 10.1.23.2 0.0.0.0 area 0
!

R3 Configuration:
!
router ospf 1
 router-id 172.16.103.3
 log-adjacency-changes
 redistribute connected subnets
 network 10.1.13.3 0.0.0.0 area 0
 network 10.1.23.3 0.0.0.0 area 0
!

Verification:
Pic. 2 - BGP Prefix from AS 50 on R1.

Pic. 3 - Reachability to 10.1.3.5 on R1.
Read More

Lab 130 - BGP Next-Hop using Route-map

May 09, 2011
Prerequisites: CCNP level skills.

Note!
Use the configuration from Lab 129 except for 'next-hop-self' command.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
Similarly to the lab 129, deal with the next hop on R1, R2 and R3, but do not use 'next-hop-self' command or redistribution into IGP.

Solution

Task 1
Similarly to the lab 129, deal with the next hop on R1, R2 and R3, but do not use 'next-hop-self' command or redistribution into IGP.
R1 Configuration:
!
route-map SET_NEXT_HOP permit 10
 set ip next-hop 10.1.13.1
!
router bgp 123
 no synchronization
 bgp router-id 172.16.101.1
 bgp log-neighbor-changes
 network 172.16.101.0 mask 255.255.255.0
 neighbor 10.1.13.3 remote-as 123
 neighbor 10.1.13.3 route-map SET_NEXT_HOP out
 neighbor 10.1.14.4 remote-as 40
 no auto-summary
!

Then, 'clear ip bgp * out'

Notice!
While configuring the 'set ip next-hop 10.1.13.1' we get the warning which can be ignored. We know what we're doing after all ;)

Pic. 2 - Warning.

R2 Configuration:
!
route-map SET_NEXT_HOP permit 10
 set ip next-hop 10.1.23.2
!
router bgp 123
 no synchronization
 bgp router-id 172.16.102.2
 bgp log-neighbor-changes
 network 172.16.102.0 mask 255.255.255.0
 neighbor 10.1.23.3 remote-as 123
 neighbor 10.1.23.3 route-map SET_NEXT_HOP out
 neighbor 10.1.24.4 remote-as 40
 no auto-summary
!

R3 Configuration:
!
route-map SET_NEXT_HOP_R2 permit 10
 set ip next-hop 10.1.23.3
!
route-map SET_NEXT_HOP_R1 permit 10
 set ip next-hop 10.1.13.3
!
router bgp 123
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.13.1 remote-as 123
 neighbor 10.1.13.1 route-reflector-client
 neighbor 10.1.13.1 route-map SET_NEXT_HOP_R1 out
 neighbor 10.1.23.2 remote-as 123
 neighbor 10.1.23.2 route-reflector-client
 neighbor 10.1.23.2 route-map SET_NEXT_HOP_R2 out
 neighbor 10.1.35.5 remote-as 50
 no auto-summary
!

Verification:
This time let's check if R1 and R2 have the best path to prefix from AS 50.

Pic. 3 - AS 50 Prefix on R1.

 Pic. 3 - AS 50 Prefix on R2.

Read More

Lab 129 - BGP Next-Hop using Next-Hop-Self

May 09, 2011
Prerequisites: CCNP level skills.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
Configure OSPF area 0 only on point-to-point links between:
  • R1 and R3
  • R2 and R3
Do not enable OSPF on links connecting AS 123 to AS 40 and AS 50!

Task 2
Configure BGP peering as per Pic. 1. Advertise all loopbacks into BGP. Make sure that R3 can reach loopbacks advertised by AS 40 and R1 and R2 can reach the loopback advertised by AS 50. Do not use route-map or redistribution into OSPF to accomplish that.

Solution

Task 1
Configure OSPF area 0 only on point-to-point links between:
  • R1 and R3
  • R2 and R3
Do not enable OSPF on links connecting AS 123 to AS 40 and AS 50!


R1 Configuration:
!
router ospf 1
 router-id 172.16.101.1
 log-adjacency-changes
 network 10.1.13.1 0.0.0.0 area 0
!

R2 Configuration:
!
router ospf 1
 router-id 172.16.102.2
 log-adjacency-changes
 network 10.1.23.2 0.0.0.0 area 0
!


R3 Configuration:
!
router ospf 1
 router-id 172.16.103.3
 log-adjacency-changes
 network 10.1.13.3 0.0.0.0 area 0
 network 10.1.23.3 0.0.0.0 area 0
!


Verification:
Pic. 2 - OSPF Neighbors on R3.

Task 2
Configure BGP peering as per Pic. 1. Advertise all loopbacks into BGP. Make sure that R3 can reach loopbacks advertised by AS 40 and R1 and R2 can reach the loopback advertised by AS 50. Do not use route-map or redistribution into OSPF to accomplish that.
R1 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.101.1
 bgp log-neighbor-changes
 network 172.16.101.0 mask 255.255.255.0
 neighbor 10.1.13.3 remote-as 123
 neighbor 10.1.14.4 remote-as 40
 no auto-summary
!


R2 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.102.2
 bgp log-neighbor-changes
 network 172.16.102.0 mask 255.255.255.0
 neighbor 10.1.23.3 remote-as 123
 neighbor 10.1.24.4 remote-as 40
 no auto-summary
!

R3 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.13.1 remote-as 123
 neighbor 10.1.13.1 route-reflector-client
 neighbor 10.1.23.2 remote-as 123
 neighbor 10.1.23.2 route-reflector-client
 neighbor 10.1.35.5 remote-as 50
 no auto-summary
!

R4 Configuration:
!
router bgp 40
 no synchronization
 bgp router-id 172.16.104.4
 bgp log-neighbor-changes
 network 172.16.104.0 mask 255.255.255.0
 network 172.16.144.0 mask 255.255.255.0
 redistribute connected route-map CONN_TO_BGP
 neighbor 10.1.14.1 remote-as 123
 neighbor 10.1.24.2 remote-as 123
 no auto-summary
!

R5 Configuration:
!
router bgp 50
 no synchronization
 bgp router-id 172.16.105.5
 bgp log-neighbor-changes
 network 172.16.105.0 mask 255.255.255.0
 neighbor 10.1.35.3 remote-as 123
 no auto-summary
!

Verification:
Pic. 3 - BGP Table on R3.

Notice!
All prefixes learned from AS 40 have missing best path marker '>'. The reason is that R3 does not know how to reach the next hop for these (10.1.14.4 and 10.1.24.4). The same problem will R1 and R2 have for prefix learned from AS 50. This is due to the fact that eBGP next-hop attribute is preserved over iBGP session.

Pic. 4 - R3's Routing Table - Next Hop Addresses.

The BGP table for a specific prefix shows the problem.

Pic. 5 - Detailed BGP Prefix Information.

In order to fix this problem, the next-hop-self command can be used given the stipulations (no redistribution into OSPF, or route-map to be used).

R1 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.101.1
 bgp log-neighbor-changes
 network 172.16.101.0 mask 255.255.255.0
 neighbor 10.1.13.3 remote-as 123
 neighbor 10.1.13.3 next-hop-self
 neighbor 10.1.14.4 remote-as 40
 no auto-summary
!


R2 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.102.2
 bgp log-neighbor-changes
 network 172.16.102.0 mask 255.255.255.0
 neighbor 10.1.23.3 remote-as 123
 neighbor 10.1.23.3 next-hop-self
 neighbor 10.1.24.4 remote-as 40
 no auto-summary
!

R3 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.103.3
 bgp log-neighbor-changes
 network 172.16.103.0 mask 255.255.255.0
 neighbor 10.1.13.1 remote-as 123
 neighbor 10.1.13.1 route-reflector-client
 neighbor 10.1.13.1 next-hop-self
 neighbor 10.1.23.2 remote-as 123
 neighbor 10.1.23.2 route-reflector-client
 neighbor 10.1.23.2 next-hop-self
 neighbor 10.1.35.5 remote-as 50
 no auto-summary
!

Verification:
Pic. 6 - BGP Table on R3.
Read More

Lab 128 - BGP Remove-Private-AS

May 08, 2011
Prerequisites: CCNP level skills.

Topology

Pic. 1 - Topology Diagram.
Icons designed by: Andrzej Szoblik - http://www.newo.pl

Task 1
R5 is connecting to their Service Provider. The company has neither their own public AS number nor their public IP addresses. For the purpose of BGP configuration AS 123 has allocated a private as number for R5 (AS 65005). Configure routers in AS 123 so this private AS number is not advertised over EBGP peerings.

Solution

Task 1
R5 is connecting to their Service Provider. The company has neither their own public AS number nor their public IP addresses. For the purpose of BGP configuration AS 123 has allocated a private as number for R5 (AS 65005). Configure routers in AS 123 so this private AS number is not advertised over EBGP peerings.
Pic. 2 - R4 Receives the Private AS number from R1 and R2.

R1 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.101.1
 bgp log-neighbor-changes
 network 172.16.101.0 mask 255.255.255.0
 neighbor 10.1.13.3 remote-as 123
 neighbor 10.1.13.3 next-hop-self
 neighbor 10.1.14.4 remote-as 40
 neighbor 10.1.14.4 remove-private-as
 no auto-summary
!

R2 Configuration:
!
router bgp 123
 no synchronization
 bgp router-id 172.16.102.2
 bgp log-neighbor-changes
 network 172.16.102.0 mask 255.255.255.0
 neighbor 10.1.23.3 remote-as 123
 neighbor 10.1.23.3 next-hop-self
 neighbor 10.1.24.4 remote-as 40
 neighbor 10.1.24.4 remove-private-as
 no auto-summary
!

Pic. 3 - BGP Table on R4.

Notice!
Both R1 and R2 have removed the private AS from their advertisement sent to AS 40.
Read More

Post Top Ad