cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
614
Views
0
Helpful
3
Replies

Configuration Querry

netbeginner
Level 2
Level 2

Hii Freinds,

Wants to clear about some querries about BGP. Here is the example.

BGP is configured between our end & remote router. "10.5.2.10" is the remote end WAN IP address of primary link and "10.5.5.6" is remtore end WAN IP address of secondary/redundant link(that is when primary link goes down, all traffic auto shifted to backup link as BGP load shifting is there).

First section :-

router bgp 11111

no synchronization

bgp log-neighbor-changes

network 10.5.1.0 mask 255.255.255.0

network 10.5.2.0 mask 255.255.255.0

neighbor 10.5.2.10 remote-as 22222

neighbor 10.5.2.10 soft-reconfiguration inbound

neighbor 10.5.2.10 prefix-list TEST-CON out

neighbor 10.5.5.6 remote-as 22222

neighbor 10.5.5.6 soft-reconfiguration inbound

neighbor 10.5.5.6 route-map BGP-ROUTE in

neighbor 10.5.5.6 route-map NET-CONN out

+++++++++++++++++++

Second Section :-

ip prefix-list TEST-CON seq 5 permit 10.5.1.0/24

ip prefix-list TEST-CON seq 10 permit 10.5.2.0/24

++++++++++++++++++++

Third Section :-

route-map NET-CONN permit 10

match ip address prefix-list TEST-CON

set as-path prepend 11111 11111 11111

route-map BGP-ROUTE permit 10

set local-preference 25

+++++++++++++++++++++++++++++++

I want to understand the functions of some lines in this configuration. Extremely Sorry as you have to spend some of your time on this. but it'll be a great help for me to understand the working.

IN first Section :-

neighbor 10.5.2.10 prefix-list TEST-CON out

neighbor 10.5.5.6 remote-as 22222

neighbor 10.5.5.6 soft-reconfiguration inbound

neighbor 10.5.5.6 route-map BGP-ROUTE in

neighbor 10.5.5.6 route-map NET-CONN out

--> Could you please clear what all functions these above 5 lines are doing (specially about "OUT" & "IN" directed in these lines)...please

==================

In second section :-

ip prefix-list TEST-CON seq 5 permit 10.5.1.0/24

ip prefix-list TEST-CON seq 10 permit 10.5.2.0/24

--> Want to understand exact Role of prefix list.

in this above 2 lines "Sequence" is 5 (for 1st line) & 10(for 2nd line). is this standard. can't we put sequence 1 for 1st line or sequence 9 in 2nd line(or any other number).

===========================

In Third Section :-

route-map NET-CONN permit 10

match ip address prefix-list TEST-CON

set as-path prepend 11111 11111 11111

---> In First line, why it is "permit 10" (is this "10" standard ?)

--> set as-path prepend 11111 11111 11111

Kindly help me to understand the function of "set as-path prepend" command in easy way, as i have also went thru a web-site for searching & knowing the same, but not exactly clear to me.

route-map BGP-ROUTE permit 10

set local-preference 25

--> in first line again there is "permit 10" (what will happen if we'll put any other number or this is standard).

--> Finally the last one "set local-preference 25" what exactly this command is doing. i know that we can also increase or decrease this prefrenece no. (say lke.. 20 or 60 or some other integer between 0 to 4294967295).what will be the effect on network if we decrease or increase this preference no.

Thxns

3 Replies 3

CriscoSystems
Level 5
Level 5

FIRST SECTION:

neighbor 10.5.2.10 prefix-list TEST-CON out

This line means that when advertising routes to neighbor 10.5.2.10, _only_ routes that meet the conditions listed in the prefix-list called "TEST-CON" will be advertised. ("out" means the prefix-list affects outbound route updates; you can do the command with "in' instead and then the prefix-list will affect inbound, or arriving, route updates)

neighbor 10.5.5.6 remote-as 22222

This line simply tells BGP that the router whose address is 10.5.5.6 is a BGP

neighbor and that it is located in an autonomous system (AS) # 22222

neighbor 10.5.5.6 soft-reconfiguration inbound

This is more complicated. It causes the router to store two separate copies of its local BGP table. The copied table is used when doing a "soft" reset, which is when routers resend their BGP info without re-starting a new BGP session. (Don't worry about this now since you seem to be a bit new to BGP.)

neighbor 10.5.5.6 route-map BGP-ROUTE in

This is much like the prefix-list command above. The router will examine any route updates it receives FROM neighbor 10.5.5.6 to see if they meet the conditions listed in the route-map called "BGP-ROUTE." Route-maps are like prefix-lists, but route-maps can be much more complicated. A prefix-list can only look at IP prefixes; a route-map can look at IP addresses, interfaces, AS numbers, and many others.

neighbor 10.5.5.6 route-map NET-CONN out

As you probably know by now, the router will examine outbound route updates before sending them to 10.5.5.6; to see if they match the conditions in the route-map called NET-CONN.

I will try to answer your other questions a bit later - but other engineers here will probably answer first!!

-- stuey

(p.s. please remember to rate helpful posts)

CriscoSystems
Level 5
Level 5

SECOND SECTION:

ip prefix-list TEST-CON seq 5 permit 10.5.1.0/24

ip prefix-list TEST-CON seq 10 permit 10.5.2.0/24

Prefix-lists are somewhat like complicated access lists. You can define an IP prefix or a range of prefixes using "permit" or "deny" in the prefix-list. Then, as you see in your "FIRST SECTION" the prefix-list can be named in a BGP "neighbor" statement. Then the router will examine the prefix-list when sending or receiving route updates from that neighbor, and will permit or deny routing prefixes as defined in the prefix-list.

So in your example, you have configured:

neighbor 10.5.2.10 prefix-list TEST-CON out

And in your prefix-list, only 10.5.1.0/24 and 10.5.2.0/24 are permitted. Therefore BGP will _only_ advertise those 24-bit networks to neighbor 10.5.2.10. No other networks will be advertised to that neighbor.

(Actually I'm not certain that 10.5.2.0 will be advertised, due to split-horizon or some other loop avoidance mechanism. The neighbor is already connected to that network.)

For the sequence number you can use any number between 1 and 4,294,967,294!!

(p.s. please remember to rate helpful posts)

CriscoSystems
Level 5
Level 5

route-map NET-CONN permit 10

match ip address prefix-list TEST-CON

set as-path prepend 11111 11111 11111

---> In First line, why it is "permit 10" (is this "10" standard ?)

~~~~~~~~~===========~~~~~~~~~~

stuey says: Yes, by default, sequence numbers increment by 10 if you don't specify one. You are allowed to specify other numbers if you want.

~~~~~~~~~===========~~~~~~~~~~

--> set as-path prepend 11111 11111 11111

Kindly help me to understand the function of "set as-path prepend" command in easy way

~~~~~~~~~===========~~~~~~~~~~

stuey says: When BGP makes its routing decision, one of the very first things it examines is the AS path-length; that is, the number of ASes in the AS-path. The shortest AS-path; that is, the one with the fewest AS numbers in it, wins. The "set as-path prepend" statement lets you falsely expand the AS path-length. This makes the route less favorable. You would configure this if, for instance, you had two same-length paths to the same remote AS but you want one to carry all the traffic and the other one to wait as backup. Falsely setting a long AS path-length on the backup link means it will not be used, as long as the other link, with its SHORTER AS path-length, is operative.

~~~~~~~~~===========~~~~~~~~~~

route-map BGP-ROUTE permit 10

set local-preference 25

--> in first line again there is "permit 10" (what will happen if we'll put any other number or this is standard).

~~~~~~~~~===========~~~~~~~~~~

10 is the default; you're allowed to use what you like.

~~~~~~~~~===========~~~~~~~~~~

--> Finally the last one "set local-preference 25" what exactly this command is doing. What will be the effect on network if we decrease or increase this preference no.

~~~~~~~~~===========~~~~~~~~~~

stuey says: It's not possible to say exactly what it will do to a particular network without looking at the whole network. Local preference is used in the BGP routing decision before the AS path-length is examined. (Cisco routers look at the "weight" attribute before anything else, but the "weight" attribute doesn't exist on non-Cisco routers.) If the "weight" attributes are the same on multiple routes (and the synchronization and next-hop reachability conditions are satisfied), BGP will then select the route with the highest local-preference. ONLY IF ALL ROUTES' LOCAL-PREFERENCE ARE THE SAME, BGP will go on to examine local-origin, AS path-length, origin code, MED, etc. All routes have a default local-preference of 100. The local-preference for each route can be changed using route-maps, as you see above. (Also, each router may be configured with a "default local-preference," which will apply to all BGP routes the router originates.)

In your example, the route-map "BGP-ROUTE" doesn't have any "match" statements (which all route-maps ought to have), so I can't tell which routes will have their local-preference set to 25. Since default local-preference is 100, whichever routes DO have theirs set to 25 will lose the routing decision.

~~~~~~~~===========~~~~~~~~~~

As always, please rate helpful posts.

-- stuey

Review Cisco Networking products for a $25 gift card