Now, expanding on this we need solve additional requirement from the
original post. How to prevent peer from coming back up. Well, for that
we could probably use EEM. Let's take a look.
event manager applet DISABLE_PEER
event routing network 2.2.2.2/32 type remove
action 10 cli command "enable"
action 20 cli command "configure terminal"
action 30 cli command "router bgp 1"
action 40 cli command "neighbor 2.2.2.2 shutdown"
action 50 cli command "end"
!
Enabling peer on R2.
R1#sh ip bgp sum
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ
Up/Down State/PfxRcd
2.2.2.2 4 2 6 5 1 0 0
00:00:37 0
Killing the interface on R2 here.
*Mar 29 01:33:59.679: %TRACKING-5-STATE: 1 ip sla 1 reachability Up->Down
*Mar 29 01:33:59.683: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Down Route to peer lost
*Mar 29 01:33:59.747: %SYS-5-CONFIG_I: Configured from console by on
vty0 (EEM:DISABLE_PEER)
-- Marko Milivojevic - CCIE #18427 Senior Technical Instructor - IPexpert YES! We include 400 hours of REAL rack time with our Blended Learning Solution! Mailto: markom_at_ipexpert.com Telephone: +1.810.326.1444 Fax: +1.810.454.0130 Web: http://www.ipexpert.com/ On Sun, Mar 28, 2010 at 17:05, Marko Milivojevic <markom_at_ipexpert.com> wrote: > On Sun, Mar 28, 2010 at 17:00, Narbik Kocharians <narbikk_at_gmail.com> wrote: >> Totally understand that, but i did not see any mention of OSPF or ISIS. > > Enjoy. > > R1: > > interface Loopback0 > B ip address 1.1.1.1 255.255.255.255 > ! > interface FastEthernet0/0 > B ip address 12.12.12.1 255.255.255.0 > ! > ip sla 1 > B icmp-echo 12.12.12.2 > B frequency 5 > ! > ip sla schedule 1 start-time now life forever > ! > track 1 ip sla 1 reachability > B default-state down > ! > ip route 2.2.2.2 255.255.255.255 12.12.12.2 track 1 > ! > route-map Neighbor-Alive > B match source-protocol static > ! > router bgp 1 > B neighbor 2.2.2.2 remote-as 2 > B neighbor 2.2.2.2 update-source Loopback0 > B neighbor 2.2.2.2 ebgp-multihop 2 > B neighbor 2.2.2.2 fall-over route-map Neighbor-Alive > ! > > R2: > > interface GigabitEthernet0/0 > B ip address 12.12.12.2 255.255.255.0 > ! > router bgp 2 > B neighbor 1.1.1.1 remote-as 1 > B neighbor 1.1.1.1 ebgp-multihop 2 > B neighbor 1.1.1.1 update-source Loopback0 > ! > > Notice what happens on R1 as soon as I shut down the port on R2 (there > is a switch between them). > > *Mar 29 00:59:19.679: %TRACKING-5-STATE: 1 ip sla 1 reachability Up->Down > *Mar 29 00:59:19.683: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Down Route to peer lost > > > -- > Marko Milivojevic - CCIE #18427 > Senior Technical Instructor - IPexpert > > YES! We include 400 hours of REAL rack > time with our Blended Learning Solution! > > Mailto: markom_at_ipexpert.com > Telephone: +1.810.326.1444 > Fax: +1.810.454.0130 > Web: http://www.ipexpert.com/ Blogs and organic groups at http://www.ccie.netReceived on Sun Mar 28 2010 - 17:38:50 ART
This archive was generated by hypermail 2.2.0 : Thu Apr 01 2010 - 07:26:36 ART