Mailing List Archive

Route Server patch for Quagga-0.96.4
Hello, I've been working on a patch for adding Route Server functionalities to Quagga.
The work is not yet complete, but the main features are ready, and I'm releasing a first
version so that anybody can test it and find possible bugs, make suggestions, etc.

The main idea is the following:

- For each peer configured as Route Server client (rsclient from now on) a separated
RIB (struct bgp_table) is mantained.

- For each announce the following is done:

IF (announcing neighbor is not a rsclient)
* Apply all 'IN' filters/route-maps/etc and (if not denied) insert it
into the 'NORMAL' table.
* FOR (each rsclient)
* Apply rsclient's 'IMPORT' policy (route-map) and (if not denied)
insert the announce into rsclient's table

ELSE // Announcing neighbor is a rsclient
* Apply all 'IN' filters/route-maps/etc and (if not denied) insert it
into the 'NORMAL' table.
* FOR (each rsclient)
* Apply announcer's 'EXPORT' policy (route-map).
If not denied then apply receiver's 'IMPORT' policy (route-map).
If not denied insert the announce into receiver rsclient's table.

The result is that the 'NORMAL' table contains the same routes that it would contain
without any peer configured as rsclient. And each of the rsclient's tables should
contain the same routes than the 'NORMAL' table of the corresponding rsclient would
contain in a full-mesh topology, where the 'IN' and 'OUT' policies of each rsclient
were the same as the 'IMPORT' and 'EXPORT' (respectively) policies for that peer in
the Route Server topology.

- Peers configured as rsclients receive announces only from their corresponding table, and
not from the 'NORMAL' table.

- To make possible that a single 'IMPORT' or 'EXPORT' route-map represents all the
separated 'IN' or 'OUT' (respectively) route-maps from the full-mesh topology, the
following statements have been added to the usual route-map sintaxis:

* 'match peer (A.B.C.D|X:X::X:X)' => This has a different behaviour depending on
the kind of route-map it appears in. For 'IMPORT'
route-maps it matches with the peer announcing the route.
For 'EXPORT' route-maps it matches with the peer into whose
table the announcement is being considered for insertion.

* 'call WORD' => Jumps to the route-map specified by WORD.

A sample configuration could be the following:

router bgp 65000
!
neighbor 1.1.1.1 remote-as 65001
neighbor 1.1.1.1 route-map PEER1-IMPORT import
neighbor 1.1.1.1 route-map PEER1-EXPORT export
neighbor 1.1.1.1 route-server-client
neighbor 1.1.1.1 soft-reconfiguration inbound
neighbor 1.1.1.1 activate
!
neighbor 2.2.2.2 remote-as 65002
neighbor 2.2.2.2 route-map PEER1-IMPORT import
neighbor 2.2.2.2 route-map PEER1-EXPORT export
neighbor 2.2.2.2 route-server-client
neighbor 2.2.2.2 soft-reconfiguration inbound
neighbor 2.2.2.2 activate
!
neighbor 3.3.3.3 remote-as 65003
neighbor 3.3.3.3 route-map PEER1-IMPORT import
neighbor 3.3.3.3 route-map PEER1-EXPORT export
neighbor 3.3.3.3 route-server-client
neighbor 3.3.3.3 soft-reconfiguration inbound
neighbor 3.3.3.3 activate
!
route-map PEER1-IMPORT permit 10
match 2.2.2.2
call PEER1-FROM-PEER2
route-map PEER1-IMPORT permit 20
match 3.3.3.3
call PEER1-FROM-PEER3
route-map PEER1-IMPORT deny 30
!
route-map PEER1-EXPORT permit 10
match peer2
call PEER1-TO-PEER2
route-map PEER1-EXPORT permit 20
match peer3
call PEER1-TO-PEER3
route-map PEER1-EXPORT deny 30
!
route-map PEER1-FROM-PEER2 ...
.
.
.
(and so on)


Other useful commands that I have added to Quagga are the following:

- 'show bgp rsclient summary' (and similarly for other address families)
This command shows a table resuming all the rsclients configured for the
cooresponding address family.

- 'show bgp rsclient (A.B.C.D|X:X::X:X)'
This commans show the RIB for the specified rsclient.

- 'clear bgp (A.B.C.D|X:X::X:X) rsclient'
This command can be used after changing some peer's policy for reconsidering
all announces from other peers with 'soft-reconfiguration' enabled (and also
'network ...' routes). I.E. If we change IMPORT policy for peer1, then we can
use the command "clear bgp peer1 rsclient" for reconsidering all the announces
from other peers (at least from other peers with 'soft-reconfiguration' enabled)
for insertion into peer1's table.

I hope I've explained myself quite clearly. Probably I've forgotten to talk about some
important issues, but this email is getting too long... :-)
Please ask/make any question/suggestion you have.

Any feedback is welcome!

Regards,

Jose
Route Server patch for Quagga-0.96.4 [ In reply to ]
Hello, I've been working on a patch for adding Route Server functionalities to Quagga.
The work is not yet complete, but the main features are ready, and I'm releasing a first
version so that anybody can test it and find possible bugs, make suggestions, etc.

The main idea is the following:

- For each peer configured as Route Server client (rsclient from now on) a separated
RIB (struct bgp_table) is mantained.

- For each announce the following is done:

IF (announcing neighbor is not a rsclient)
* Apply all 'IN' filters/route-maps/etc and (if not denied) insert it
into the 'NORMAL' table.
* FOR (each rsclient)
* Apply rsclient's 'IMPORT' policy (route-map) and (if not denied)
insert the announce into rsclient's table

ELSE // Announcing neighbor is a rsclient
* Apply all 'IN' filters/route-maps/etc and (if not denied) insert it
into the 'NORMAL' table.
* FOR (each rsclient)
* Apply announcer's 'EXPORT' policy (route-map).
If not denied then apply receiver's 'IMPORT' policy (route-map).
If not denied insert the announce into receiver rsclient's table.

The result is that the 'NORMAL' table contains the same routes that it would contain
without any peer configured as rsclient. And each of the rsclient's tables should
contain the same routes than the 'NORMAL' table of the corresponding rsclient would
contain in a full-mesh topology, where the 'IN' and 'OUT' policies of each rsclient
were the same as the 'IMPORT' and 'EXPORT' (respectively) policies for that peer in
the Route Server topology.

- Peers configured as rsclients receive announces only from their corresponding table, and
not from the 'NORMAL' table.

- To make possible that a single 'IMPORT' or 'EXPORT' route-map represents all the
separated 'IN' or 'OUT' (respectively) route-maps from the full-mesh topology, the
following statements have been added to the usual route-map sintaxis:

* 'match peer (A.B.C.D|X:X::X:X)' => This has a different behaviour depending on
the kind of route-map it appears in. For 'IMPORT'
route-maps it matches with the peer announcing the route.
For 'EXPORT' route-maps it matches with the peer into whose
table the announcement is being considered for insertion.

* 'call WORD' => Jumps to the route-map specified by WORD.

A sample configuration could be the following:

router bgp 65000
!
neighbor 1.1.1.1 remote-as 65001
neighbor 1.1.1.1 route-map PEER1-IMPORT import
neighbor 1.1.1.1 route-map PEER1-EXPORT export
neighbor 1.1.1.1 route-server-client
neighbor 1.1.1.1 soft-reconfiguration inbound
neighbor 1.1.1.1 activate
!
neighbor 2.2.2.2 remote-as 65002
neighbor 2.2.2.2 route-map PEER1-IMPORT import
neighbor 2.2.2.2 route-map PEER1-EXPORT export
neighbor 2.2.2.2 route-server-client
neighbor 2.2.2.2 soft-reconfiguration inbound
neighbor 2.2.2.2 activate
!
neighbor 3.3.3.3 remote-as 65003
neighbor 3.3.3.3 route-map PEER1-IMPORT import
neighbor 3.3.3.3 route-map PEER1-EXPORT export
neighbor 3.3.3.3 route-server-client
neighbor 3.3.3.3 soft-reconfiguration inbound
neighbor 3.3.3.3 activate
!
route-map PEER1-IMPORT permit 10
match 2.2.2.2
call PEER1-FROM-PEER2
route-map PEER1-IMPORT permit 20
match 3.3.3.3
call PEER1-FROM-PEER3
route-map PEER1-IMPORT deny 30
!
route-map PEER1-EXPORT permit 10
match peer2
call PEER1-TO-PEER2
route-map PEER1-EXPORT permit 20
match peer3
call PEER1-TO-PEER3
route-map PEER1-EXPORT deny 30
!
route-map PEER1-FROM-PEER2 ...
.
.
.
(and so on)


Other useful commands that I have added to Quagga are the following:

- 'show bgp rsclient summary' (and similarly for other address families)
This command shows a table resuming all the rsclients configured for the
cooresponding address family.

- 'show bgp rsclient (A.B.C.D|X:X::X:X)'
This commans show the RIB for the specified rsclient.

- 'clear bgp (A.B.C.D|X:X::X:X) rsclient'
This command can be used after changing some peer's policy for reconsidering
all announces from other peers with 'soft-reconfiguration' enabled (and also
'network ...' routes). I.E. If we change IMPORT policy for peer1, then we can
use the command "clear bgp peer1 rsclient" for reconsidering all the announces
from other peers (at least from other peers with 'soft-reconfiguration' enabled)
for insertion into peer1's table.

I hope I've explained myself quite clearly. Probably I've forgotten to talk about some
important issues, but this email is getting too long... :-)
Please ask/make any question/suggestion you have.

Any feedback is welcome!

Regards,

Jose
Re: Route Server patch for Quagga-0.96.4 [ In reply to ]
Hi Jose,

On Sat, 27 Dec 2003, Jose Luis Rubio wrote:

> Hello, I've been working on a patch for adding Route Server
> functionalities to Quagga. The work is not yet complete, but the
> main features are ready, and I'm releasing a first version so that
> anybody can test it and find possible bugs, make suggestions, etc.

[snip]

nice :)

> I hope I've explained myself quite clearly. Probably I've forgotten
> to talk about some important issues, but this email is getting too
> long... :-) Please ask/make any question/suggestion you have.
>
> Any feedback is welcome!

well done :)

I'll try review the patch ASAP.

> Regards,
>
> Jose

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
You are in the hall of the mountain king.