Pages

network cisco ccna gns3 certification arteq

network cisco ccna gns3 certification arteq
a network runs through it

Search insearchofthecert

Showing posts with label synchronization. Show all posts
Showing posts with label synchronization. Show all posts

Tuesday, December 25, 2012

bgp synchro historically...

the why?

from here: http://www.cisco.com/en/US/docs/ios/12_3/iproute/command/reference/ip2_s3g.html#wp1041409


synchronization


To enable the synchronization between BGP and your Interior Gateway Protocol (IGP) system, use the synchronization command in address family or router configuration mode. To enable the Cisco IOS software to advertise a network route without waiting for the IGP, use the no form of this command.

synchronization

no synchronization

Command History



Release

Modification

10.0

This command was introduced.

12.0(7)T

Address family configuration mode was added.

12.2(8)T

Command default behavior changed to disabled.


Usage Guidelines


Usually, a BGP speaker does not advertise a route to an external neighbor unless that route is local or exists in the IGP. By default, synchronization between BGP and the IGP is turned off to allow the Cisco IOS software to advertise a network route without waiting for route validation from the IGP. This feature allows routers and access servers within an autonomous system to have the route before BGP makes it available to other autonomous systems.

Use the synchronization command if routers in the autonomous system do not speak BGP.

and from yap:


 http://www.itcertnotes.com/2012/01/bgp-synchronization.html

The BGP synchronization rule states that a BGP router cannot use an IBGP-learned transit route nor advertise it to an EBGP peer; unless it is synchronized in both BGP and IGP routing tables – IGP has redistributed and propagated it across the AS and installed it in the local IP routing table. BGP running in a transit AS that is passing traffic between ASes should not advertise a route before all routers in the AS have learned about the route via IGP. The BGP synchronization rule ensures consistency information throughout an AS to avoid routing black holes within the AS, eg: advertising a destination to an EBGP neighbor when not all routers within the AS can route to the destination.

BGP synchronization should only be used when there are routers in the AS that do not run BGP. It is safe to disable BGP synchronization only if all routers in the transit path in the AS – the path between the BGP border routers, are running BGP; or when the AS is not a transit AS. BGP synchronization is enabled by default in earlier version of Cisco IOS releases. Most current Cisco IOS releases (Cisco IOS Release 12.2(8)T and later) has disabled BGP synchronization by default, as most ISPs run BGP on all routers within their ASes.


and this from:
 http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDQQFjAA&url=http%3A%2F%2Fwww.cisco.com%2Fimage%2Fgif%2Fpaws%2F13753%2F25.pdf&ei=ZTLaUJDuHbC70QGH5oGoBg&usg=AFQjCNFedx4tm6q2qoiGrJaayKP43xsE_Q&sig2=x_0yP-0qBR0zaP-0HXQUvw

 Why Routers Ignore Paths

Assume that all paths that a router receives for a particular prefix are arranged in a list. The list is similar to
the output of the show ip bgp longer−prefixes command. In this case, some paths are not considered as
candidates for the best path. Such paths typically do not have the valid flag in the output of the show ip bgp
longer−prefixes command. Routers ignore paths in these circumstances:

• Paths that are marked as not synchronized in the show ip bgp longer−prefixes output

If BGP synchronization is enabled, there must be a match for the prefix in the IP routing table in order for an internal BGP (iBGP) path to be considered a valid path. BGP synchronization is enabled by
default in Cisco IOS® Software. If the matching route is learned from an Open Shortest Path First (OSPF) neighbor, its OSPF router ID must match the BGP router ID of the iBGP neighbor. Most users prefer to disable synchronization with use of the no synchronization BGP subcommand.

Note: Synchronization is disabled by default in Cisco IOS Software Release 12.2(8)T and later.

• Paths for which the NEXT_HOP is inaccessible
Be sure that there is an Interior Gateway Protocol (IGP) route to the NEXT_HOP that is associated with the path.

more bgp synchro...

from:  http://www.inetdaemon.com/tutorials/internet/ip/routing/bgp/operation/synchronization.shtml

BGP is an exterior gateway protocol, which means it does not keep track of routing within it's own AS. For BGP to work properly, you must be running an interior gateway protocol such as RIP, IGRP, OSPF, IS-IS or EIGRP.
A Cisco router running BGP will not advertise a route unless the route appears in the IP routing table and there is a network statement authorizing BGP to advertise the route.
While a network administrator can configure a network statement at any time, this will not guarantee the advertisement of the route. A route to an interior host will not appear in the IP table until it has been selected by an interior protocol as the best route and inserted in the IP routing table. Once the internal route appears, BGP and the interior routing protocol are said to be 'synchronized'.
This is necessary to prevent routing loops. A BGP speaking router will only advertise it's own routes, and will not announce any of it's iBGP neighbor's routes to any other iBGP peer. BGP does this to prevent routing loops within the AS.

not bad...

http://docwiki.cisco.com/wiki/Internetworking_Case_Studies_--_Using_the_Border_Gateway_Protocol_for_Interdomain_Routing#Synchronization

http://www.nnk.com.au/index.php?option=com_content&view=article&id=22:bgp-synchronization&catid=3:articles&Itemid=5


pause for station identification...

let's hope narbik doesn't mind the free publicity...

R5#sh ip bgp
R5#


When redistributing between OSPF and BGP, we should review BGP’s synchronization rule which states:

An IBGP learned prefix will not be advertised to another BGP speaker unless that same prefix resides in the IBGP speaker’s local IGP table.


Basically this rule was set to stop blackholing routes. This rule is well defined in RFC 1745 and it possesses another requirement, and that’s when OSPF is the IGP used within the AS. This rule does not apply if the IGP is NOT OSPF.


This RFC states that if OSPF is used as the IGP in the AS, the router ids of OSPF and BGP on the border router, which is the router that performs the redistribution of BGP into OSPF must be the same.


to wit:

R2#sh run | b router
router ospf 1
 router-id 0.0.0.2
 redistribute bgp 234 subnets
 network 10.1.23.0 0.0.0.255 area 0
!
router bgp 234
 synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 neighbor 10.1.12.1 remote-as 100
 neighbor 10.1.23.3 remote-as 234
 neighbor 10.1.23.3 next-hop-self
 neighbor 10.1.34.4 remote-as 234
 neighbor 10.1.34.4 next-hop-self


not so fast with the router id's...

first:

R3#sh ip bgp | b Net
     Network          Next Hop            Metric LocPrf Weight Path
 * i 1.0.0.0          10.1.23.2                0    100      0 100 i


good... now match the id's and clear bgp and ospf on r2...

R2#sh run | b router
router ospf 1
 router-id 2.2.2.2
 redistribute bgp 234 subnets
 network 10.1.23.0 0.0.0.255 area 0
!
router bgp 234
 synchronization
 bgp router-id 2.2.2.2


and this is what we accomplished... a rib failure...

R3#sh ip bgp | b Net
     Network          Next Hop            Metric LocPrf Weight Path
 r>i 1.0.0.0          10.1.23.2                0    100      0 100 i


and it's what we wanted...

R3#sh ip bgp rib-fa
  Network            Next Hop                      RIB-failure   RIB-NH Matches
1.0.0.0            10.1.23.2           Higher admin distance              n/a


although a route now exists in r5 to 1.0.0.0 there is no way back...

R5#sh ip route bgp | b Gate
Gateway of last resort is not set

B     1.0.0.0/8 [20/0] via 10.1.45.4, 08:33:40


r1 is still not in the game...

R1#sh ip route ospf
R1#


R2

router bgp 234
  neighbor 10.1.12.1 default-originate


and R4

R4(config)#router ospf 1
R4(config-router)#netw 10.1.45.4 0.0.0.255 area 0


solves the dilemma...

R1#sh ip route | b Gate
Gateway of last resort is 10.1.12.2 to network 0.0.0.0

B*    0.0.0.0/0 [20/0] via 10.1.12.2, 00:04:19


R5#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/66/76 ms



reason number 2013...

...that you should be digging into the cisco learning network... besides the fact i've posted many articles and downloadables there under my profile...

narbik on bgp synchronization, from the link below:

a downloadable pdf from the man, the myth...


http://micronics.nl/BGP-Syn.pdf http://micronics.nl/BGP-Syn.pdf

you can set up an account and receive automatic email notifications from the groups you belong to, on topics that interest you, because we live in the age of information transfer and shit...

this has been a public service announcement...

a mind is a terrible thing...

Saturday, October 20, 2012

post 600...

that's 50 posts a month average... since november 2011...

to celebrate, we take a look at synchronization...

eigrp and ospf have somewhat similar ideas about synchronization, bgp on the other hand (of course) gives it an entirely different meaning...

eigrp:

in eigrp, synchronization is synonymous with network convergence...

from:  http://www.cisco.com/en/US/docs/ios/12_2/ip/configuration/guide/1cfeigrp.html

Diffusing Update Algorithm (DUAL) algorithm guarantees loop-free operation at every instant throughout a route computation and allows all devices involved in a topology change to synchronize at the same time. Routers that are not affected by topology changes are not involved in recomputations. The convergence time with DUAL rivals that of any other existing routing protocol.

ospf's synchronization concern is it's database, naturally with the intent to form adjacencies... 

from rfc 2328:


7.2.  The Synchronization of Databases

        In a link-state routing algorithm, it is very important for all
        routers' link-state databases to stay synchronized.  OSPF
        simplifies this by requiring only adjacent routers to remain
        synchronized.  The synchronization process begins as soon as the
        routers attempt to bring up the adjacency.

with bgp, however:


http://www.cisco.com/en/US/tech/tk365/technologies_q_and_a_item09186a00800949e8.shtml#nineteen

If your AS passes traffic from another AS to a third AS, BGP should not advertise a route before all routers in your AS learn about the route via IGP. BGP waits until IGP propagates the route within the AS and then advertises it to external peers. A BGP router with synchronization enabled does not install iBGP learned routes into its routing table if it is not able to validate those routes in its IGP. Issue the no synchronization command under router bgp in order to disable synchronization. This prevents BGP from validating iBGP routes in IGP. Refer to BGP Case Studies: Synchronization for a more detailed explanation.