Mailing List Archive

Setting a BGP daemon to advertise received router from its neighbors to other neighbors in Quagga
Hi all,

I am going to develop a full mesh topology using quagga. In my topology
every node is other node's customer and I want each node advertise every
route received from its neighbors to other neighbors.


The problem is that I do not know how I can define customer and provider
relation ship in quagga bgp conf files. I confused by route-map
description.
If some can define just one simple customer provider relationship
between just two nodes, I will be so appreciated.


Best,
Shahrooz
_______________________________________________
Quagga-users mailing list
Quagga-users@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-users
Re: Setting a BGP daemon to advertise received router from its neighbors to other neighbors in Quagga [ In reply to ]
On Fri, Jan 19, 2018 at 12:32 PM, shahrooz <shahrooz@cs.umass.edu> wrote:
> The problem is that I do not know how I can define customer and provider
> relation ship in quagga bgp conf files. I confused by route-map description.
> If some can define just one simple customer provider relationship between
> just two nodes, I will be so appreciated.

Another router of yours which is not a customer or provider is the
same AS number.

A customer or provider is a different AS number.

BCP 38, you reject any routes not expected from the customer in the
prefix-list applied to the customer via a route map,

You also limit the routes offered to the provider to just yours and
the customers' using a prefix-list applied to the provider via a route
map.

-Bill


--
William Herrin ................ herrin@dirtside.com bill@herrin.us
Dirtside Systems ......... Web: <http://www.dirtside.com/>
_______________________________________________
Quagga-users mailing list
Quagga-users@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-users
Re: Setting a BGP daemon to advertise received router from its neighbors to other neighbors in Quagga [ In reply to ]
Hi,

Thank you William, but I can not understand your email at all!

Here is the content of my AS which I want announce the routers received
from its customer:

AS 9 is AS 7's customer and AS 4 is AS 7's provider:

!neighbor 9
neighbor 1.9.0.1 remote-as 9
neighbor 1.9.0.1 port 20028
neighbor 1.9.0.1 update-source 1.7.0.1
!customer (full routes)
neighbor 1.9.0.1 route-map RMAP_CUSTFULL_IN in
neighbor 1.9.0.1 route-map RMAP_CUSTFULL_OUT out


!Policy
!
!community values:
! customer : 100:30
! non-customer: 100:20

!localpref values:
! customer: 30
! peer : 20
! provider: 10

!Route attributes for locally originated prefixes
!community values: 200:<numeric-attr>

route-map RMAP_PROV_IN permit 10
set community additive 100:20
set local-preference 10
route-map RMAP_NONCUST_OUT deny 10
match community NONCUST
route-map RMAP_NONCUST_OUT permit 20
match community CUST

! should never reach this actually
route-map RMAP_NONCUST_OUT permit 30

route-map RMAP_CUSTFULL_IN permit 10
set community additive 100:30
set local-preference 30

route-map RMAP_CUSTFULL_OUT permit 10


ip community-list standard CUST permit 100:30
ip community-list standard NONCUST permit 100:20
ip community-list standard NONLOCAL permit 100:20
ip community-list standard NONLOCAL permit 100:30


But it does not work. AS 7 receives update message from AS 9, but it
does not announce that to AS4!!

Best,
Shahrooz

On 2018-01-19 16:28, William Herrin wrote:
> On Fri, Jan 19, 2018 at 12:32 PM, shahrooz <shahrooz@cs.umass.edu>
> wrote:
>> The problem is that I do not know how I can define customer and
>> provider
>> relation ship in quagga bgp conf files. I confused by route-map
>> description.
>> If some can define just one simple customer provider relationship
>> between
>> just two nodes, I will be so appreciated.
>
> Another router of yours which is not a customer or provider is the
> same AS number.
>
> A customer or provider is a different AS number.
>
> BCP 38, you reject any routes not expected from the customer in the
> prefix-list applied to the customer via a route map,
>
> You also limit the routes offered to the provider to just yours and
> the customers' using a prefix-list applied to the provider via a route
> map.
>
> -Bill
>
>
> --
> William Herrin ................ herrin@dirtside.com bill@herrin.us
> Dirtside Systems ......... Web: <http://www.dirtside.com/>
_______________________________________________
Quagga-users mailing list
Quagga-users@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-users
Re: Setting a BGP daemon to advertise received router from its neighbors to other neighbors in Quagga [ In reply to ]
On Fri, Jan 19, 2018 at 4:37 PM, shahrooz <shahrooz@cs.umass.edu> wrote:
> Thank you William, but I can not understand your email at all!

Here's what one of mine looks like (addresses changed):

router bgp 65000
bgp router-id 1.2.3.4 bgp log-neighbor-changes
neighbor 169.254.169.254 remote-as 64515
neighbor 169.254.169.254 description Vultr upstream
neighbor 169.254.169.254 next-hop-self
neighbor 169.254.169.254 route-map vultr-bgp-in in
neighbor 169.254.169.254 route-map vultr-bgp-out out
neighbor 10.0.0.1 remote-as 65000
neighbor 10.0.0.1 description Tron
neighbor 10.0.0.1 next-hop-self
neighbor 10.0.0.1 route-map tron-bgp-out out
neighbor 10.1.0.1 remote-as 65000
neighbor 10.1.0.1 description Cloud
neighbor 10.1.0.1 next-hop-self
neighbor 10.1.0.1 route-map cloud-bgp-in in
neighbor 10.1.0.1 route-map cloud-bgp-out out
neighbor 10.2.0.1 remote-as 65000
neighbor 10.2.0.1 description Laharl
neighbor 10.2.0.1 next-hop-self

ip prefix-list from-transit seq 5 deny 199.33.224.0/23 le 32
ip prefix-list from-transit seq 25 deny 10.0.0.0/8 le 32
ip prefix-list from-transit seq 30 deny 127.0.0.0/8 le 32
ip prefix-list from-transit seq 35 deny 172.16.0.0/12 le 32
ip prefix-list from-transit seq 40 deny 192.168.0.0/16 le 32
ip prefix-list from-transit seq 45 deny 0.0.0.0/0
ip prefix-list from-transit seq 50 permit 0.0.0.0/0 le 32
ip prefix-list to-cloud seq 45 deny 0.0.0.0/0
ip prefix-list to-cloud seq 50 permit 0.0.0.0/0 le 16
ip prefix-list to-transit seq 10 permit 199.33.224.0/23
ip prefix-list to-transit seq 25 deny 0.0.0.0/0 le 32

ip as-path access-list 1 permit ^$
ip as-path access-list 1 deny .*
ip as-path access-list 10 permit .*

route-map vultr-bgp-in permit 10
match ip address prefix-list from-transit
set local-preference 120
!
route-map vultr-bgp-in deny 20
match as-path 10
!
route-map vultr-bgp-out permit 10
match as-path 1
match ip address prefix-list to-transit
!
route-map vultr-bgp-out deny 20
!
route-map cloud-bgp-in permit 10
match as-path 10
set as-path prepend 65000 65000
set local-preference 80
!
route-map cloud-bgp-in deny 20
match as-path 10
!
route-map cloud-bgp-out permit 10
match as-path 10
match ip address prefix-list to-cloud
set local-preference 80
!
route-map cloud-bgp-out deny 20
!
route-map tron-bgp-out permit 10
match as-path 10
set local-preference 80
!
route-map tron-bgp-out deny 20
!



--
William Herrin ................ herrin@dirtside.com bill@herrin.us
Dirtside Systems ......... Web: <http://www.dirtside.com/>
_______________________________________________
Quagga-users mailing list
Quagga-users@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-users