Re: bird 2 and vpn4 mpls

2018-08-07 Thread Chris Herdt
I explicitly added the table name in this updated config, but it still
shows '---' in the table column:

# start config
router id 127.0.0.1;

vpn4 table vpntab4;

protocol bgp peer1 {
local as 65217;
neighbor 100.66.8.129 as 65217;
hold time 180;
vpn4 mpls {
table vpntab4;
import all;
};
}
# end config


My guess was that it used the default tables for ipv4 and ipv6 -- master4
and master6 -- even though it is not receiving any routes of those types. I
added entries for those types as well, but it still shows '---' for the
table name.

# start config
router id 127.0.0.1;

vpn4 table vpntab4;

protocol bgp peer1 {
local as 65217;
neighbor 100.66.8.129 as 65217;
hold time 180;
ipv4 {
table master4;
import none;
export none;
};
ipv6 {
table master6;
import none;
export none;
};
vpn4 mpls {
table vpntab4;
import all;
};
}
# end config


Ultimately I'm trying to use the bird-lg looking glass (
https://github.com/sileht/bird-lg) with bird, and it doesn't accept '---'
as a valid table. That may be an issue with bird-lg, if '---' is an
expected value. But I've defined all the table names that appear when I run
`birdc show route count`, but it's still showing '---'.



On Tue, Aug 7, 2018 at 5:25 AM Arvin Gan  wrote:

> Hi Chris,
>
>From your config-file,  table option is not assigned for protocol bgp
> peer1, but system will select the first table of given nettype.  ‘---’ in
> the table column, that mean you don’t define table name, used the default
> one.
>
>
>
> table *name*
>
> Specify a table to which the channel is connected. Default: the first
> table of given nettype.
>
>
>
> Thanks
>
> Arvin
>
>
>
> *From:* Bird-users  *On Behalf Of *Chris
> Herdt
> *Sent:* Tuesday, August 07, 2018 12:34 AM
> *To:* bird-users@network.cz
> *Subject:* bird 2 and vpn4 mpls
>
>
>
> Following the example at
> https://github.com/BIRD/bird/blob/v2.0.2/doc/bird.conf.example2, I set up
> a simple bird config (see below).
>
>
>
> It is working, but I am not certain what the '---' in the table column of
> the output of `show protocols` means. I expected the column to display
> vpntab4.
>
>
>
> $ sudo /usr/local/sbin/birdc show protocols
>
> BIRD v2.0.2 ready.
> Name   Proto  Table  State  Since Info
> peer1  BGP---up 17:14:48.474  Established
>
>
>
>
>
> The output of `show route count` shows that there are routes in table
> vpntab4:
>
>
>
> $ sudo /usr/local/sbin/birdc show route count
> BIRD v2.0.2 ready.
> 0 of 0 routes for 0 networks in table master4
> 0 of 0 routes for 0 networks in table master6
> 9581 of 9581 routes for 9581 networks in table vpntab4
> Total: 9581 of 9581 routes for 9581 networks in 3 tables
>
>
>
>
>
> The contents of my bird.conf:
>
>
>
> log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug
> };
> log stderr all;
>
> router id 127.0.0.1;
>
> vpn4 table vpntab4;
>
> protocol bgp peer1 {
>     local as 65321;
> neighbor 192.168.1.1 as 65321;
> hold time 180;
> vpn4 mpls {
> import all;
> };
> }
>
>
>
>
>
> Thanks,
>
>
>
> --
>
> Chris Herdt
> https://osric.com/chris/
>


-- 
Chris Herdt
Web Applications Developer
267-603-1066 (home)
734-754-3585 (cell)
http://osric.com/chris/


Re: bird 2 and vpn4 mpls

2018-08-08 Thread Chris Herdt
Thanks for the clarification! I confirmed that I see the specified
protocols using `show protocol all`:

With ipv4 and ipv6 tables added explicitly:

... [preceding lines] ...
Local capabilities
  Multiprotocol
AF announced: ipv4 vpn4-mpls ipv6
... [following lines] ...

With just the vpn4 mpls table:

... [preceding lines] ...
Local capabilities
  Multiprotocol
AF announced: vpn4-mpls
... [following lines] ...

I'll follow up with the bird-lg contributors, it's possible that it's not
ready to handle the output from BIRD 2 for multi-table protocols.


On Wed, Aug 8, 2018 at 6:26 AM Ondrej Zajicek 
wrote:

> On Mon, Aug 06, 2018 at 11:34:16AM -0500, Chris Herdt wrote:
> > Following the example at https://github.com/BIRD/bird/
> > blob/v2.0.2/doc/bird.conf.example2, I set up a simple bird config (see
> > below).
> >
> > It is working, but I am not certain what the '---' in the table column of
> > the output of `show protocols` means. I expected the column to display
> > vpntab4.
>
> Hi
>
> BGP in BIRD 2 is generally a multi-table protocol (although you use just
> one channel / one table) and because of that associated table is not shown
> in 'show protocol'. You will see it in 'show protocol all'.
>
> --
> Elen sila lumenn' omentielvo
>
> Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
> OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
> "To err is human -- to blame it on a computer is even more so."
>


-- 
Chris Herdt
https://osric.com/chris/


bird 2 and vpn4 mpls

2018-08-06 Thread Chris Herdt
Following the example at https://github.com/BIRD/bird/
blob/v2.0.2/doc/bird.conf.example2, I set up a simple bird config (see
below).

It is working, but I am not certain what the '---' in the table column of
the output of `show protocols` means. I expected the column to display
vpntab4.

$ sudo /usr/local/sbin/birdc show protocols
BIRD v2.0.2 ready.
Name   Proto  Table  State  Since Info
peer1  BGP---up 17:14:48.474  Established


The output of `show route count` shows that there are routes in table
vpntab4:

$ sudo /usr/local/sbin/birdc show route count
BIRD v2.0.2 ready.
0 of 0 routes for 0 networks in table master4
0 of 0 routes for 0 networks in table master6
9581 of 9581 routes for 9581 networks in table vpntab4
Total: 9581 of 9581 routes for 9581 networks in 3 tables


The contents of my bird.conf:

log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug };
log stderr all;

router id 127.0.0.1;

vpn4 table vpntab4;

protocol bgp peer1 {
local as 65321;
neighbor 192.168.1.1 as 65321;
hold time 180;
vpn4 mpls {
import all;
};
}


Thanks,

-- 
Chris Herdt
https://osric.com/chris/


Re: show route command syntax

2018-08-23 Thread Chris Herdt
On Wed, Aug 22, 2018 at 4:33 PM Maria Jan Matějka 
wrote:

> On August 22, 2018 8:40:16 PM GMT+02:00, Chris Herdt 
> wrote:
> > I'm using BIRD v2.0.2. I have successfully peered with another host
> > and am
> > receiving iBGP routes.
> >
> > bird> show route count
> > 0 of 0 routes for 0 networks in table master4
> > 0 of 0 routes for 0 networks in table master6
> > 9763 of 9763 routes for 9763 networks in table vpntab4
> > 0 of 0 routes for 0 networks in table vpntab6
> > Total: 9763 of 9763 routes for 9763 networks in 4 tables
> >
> > I can use 'show route all' to see all the routes (IP addresses
> > replaced):
> >
> > bird> show route all
> > Table vpntab4:
> > 192.168.100.0:24 192.168.42.199/32 unreachable [peer1 13:22:47.245
> > from
> > 192.168.12.3] * (100/-) [AS65321i]
> > Type: BGP univ
> > BGP.origin: IGP
> > BGP.as_path: 65321
> > BGP.next_hop: 192.168.100.0
> > BGP.local_pref: 100
> > BGP.originator_id: 192.168.100.0
> > BGP.cluster_list: 192.168.12.3 192.168.100.1
> > BGP.ext_community: (rt, 65123, 6)
> > BGP.mpls_label_stack: 54321
> > etc.
> >
> > However, I can't seem to figure out the syntax to retrieve a specific
> > route. E.g.:
> >
> > bird> show route for 192.168.42.199/32
> > Network not found
> >
> > Thanks in advance.
>
> Hello!
>
> You are using a vpn4 table so you should ask for a vpn4 prefix, like
>
> show route for 192.168.100.0:24 192.168.42.99/32
>
> I'm writing from my phone, not testing it. Anyway, it should work.
>
> Maria
>

That worked! Thanks for your help!

-- 
Chris Herdt
https://osric.com/chris/


vpn6-mpls routes on BIRD 2

2018-08-23 Thread Chris Herdt
Thanks to the list for all the help you've given me so far!

Another question: I am running BIRD 2.0.2 and peering with a host that is
announcing vpn4 mpls and vpn6 mpls routes.

The vpn4 mpls routes are working, but all of the vpn6 mpls routes appear as
withdrawn routes. I'm not sure why -- I looked at the packet capture in
Wireshark and the UPDATE messages containing the IPv6 routes all show zero
for Withdrawn Routes Length. Any ideas?

Here's the result of 'show protocols all peer1' (addresses changed):

bird> show protocols all peer1
Name   Proto  Table  State  Since Info
peer1  BGP---up 14:35:04.353  Established
  BGP state:  Established
Neighbor address: 192.168.42.1
Neighbor AS:  65321
Neighbor ID:  192.168.42.1
Local capabilities
  Multiprotocol
AF announced: vpn4-mpls vpn6-mpls
  Route refresh
  Graceful restart
  4-octet AS numbers
  Enhanced refresh
Neighbor capabilities
  Multiprotocol
AF announced: vpn4-mpls vpn6-mpls
  Route refresh
  Extended next hop
IPv6 nexthop: ipv4 ipv4-mc
  Graceful restart
Restart time: 120
AF supported: vpn4-mpls vpn6-mpls
AF preserved:
  4-octet AS numbers
Session:  internal multihop AS4
Source address:   192.168.100.1
Hold timer:   12.954/15
Keepalive timer:  0.005/5
  Channel vpn4-mpls
State:  UP
Table:  vpntab4
Preference: 100
Input filter:   ACCEPT
Output filter:  REJECT
Routes: 9771 imported, 0 exported
Route change stats: received   rejected   filteredignored
accepted
  Import updates:   9771  0  0  0
9771
  Import withdraws:   20  0---
20  0
  Export updates:   9771   9771  0
---  0
  Export withdraws:0------
---  0
BGP Next hop:   192.168.100.1
IGP IPv4 table: master4
  Channel vpn6-mpls
State:  UP
Table:  vpntab6
Preference: 100
Input filter:   ACCEPT
Output filter:  REJECT
Routes: 0 imported, 0 exported
Route change stats: received   rejected   filteredignored
accepted
  Import updates:  0  0  0
0  0
  Import withdraws: 2785  0---
2785  0
  Export updates:  0  0  0
---  0
  Export withdraws:0------
---  0
BGP Next hop:   ::
IGP IPv6 table: master6


-- 
Chris Herdt
https://osric.com/chris/


Re: vpn6-mpls routes on BIRD 2

2018-08-24 Thread Chris Herdt
That was it! Thank you!

In case it is useful for anyone else, here's my entire config (ASNs and IPs
anonymized):

# start config
router id 127.0.0.1;

vpn4 table vpntab4;
vpn6 table vpntab6;

protocol bgp peer1 {
local as 65321;
neighbor 192.168.42.1 as 65321;
hold time 180;
vpn4 mpls {
table vpntab4;
import all;
};
vpn6 mpls {
table vpntab6;
import all;
extended next hop;
};
}
# end config


On Fri, Aug 24, 2018 at 12:24 PM Jan Maria Matejka 
wrote:

> I suspect you are missing the "extended next hop" option in your
> BGP protocol config.
>
> Thanks
> Maria
>
> On 08/24/2018 07:02 PM, Chris Herdt wrote:
> > When I run bird in debug mode, I do see a lot of messages about missing
> next hop:
> >
> > bird: peer1: Missing next hop address
> > bird: peer1: Invalid NEXT_HOP attribute
> > bird: peer1: Invalid NEXT_HOP attribute
> > bird: peer1: Invalid NEXT_HOP attribute
> > [etc.]
> >
> > When I examine the update packets coming in for IPv6 route
> announcements, the next hop is an IPv4 address in this format (addresses
> changed for anonymity):
> >
> > :::192.168.42.6
> >
> > I have also tried a couple different things in my config files to
> explicitly set the next hop address, but the next hop address is still
> missing:
> >
> > filter setnexthop
> > ip explicit_next_hop;
> > {
> > explicit_next_hop = fd12:3456:789a:1::1;
> > bgp_next_hop = explicit_next_hop;
> > accept;
> > }
> >
> > ...
> >
> > vpn6 mpls {
> > table vpntab6;
> > missing lladdr ignore;
> > next hop self;
> > import filter setnexthop;
> > };
> >
> >
> > Anyone have any advice?
> >
> > Thanks,
> >
> > On Thu, Aug 23, 2018 at 8:42 PM Arvin Gan  a...@advaoptical.com>> wrote:
> >
> > Hi ,
> >
> >   From your protocols info, “BGP Next hop:   ::”  in channel
> vpn6-mpls, if next hop is empty, the route is withdrawn. Suggest to check
> it.
> >
> > __ __
> >
> > Best Regards,
> >
> > Arvin Gan
> >
> > __ __
> >
> > *From:*Bird-users  bird-users-boun...@network.cz>> *On Behalf Of *Chris Herdt
> > *Sent:* Friday, August 24, 2018 5:48 AM
> > *To:* bird-users@network.cz <mailto:bird-users@network.cz>
> > *Subject:* vpn6-mpls routes on BIRD 2
> >
> > __ __
> >
> > Thanks to the list for all the help you've given me so far!
> >
> > __ __
> >
> > Another question: I am running BIRD 2.0.2 and peering with a host
> that is announcing vpn4 mpls and vpn6 mpls routes.
> >
> > __ __
> >
> > The vpn4 mpls routes are working, but all of the vpn6 mpls routes
> appear as withdrawn routes. I'm not sure why -- I looked at the packet
> capture in Wireshark and the UPDATE messages containing the IPv6 routes all
> show zero for Withdrawn Routes Length. Any ideas?
> >
> > __ __
> >
> > Here's the result of 'show protocols all peer1' (addresses
> changed):
> >
> > __ __
> >
> > bird> show protocols all peer1
> > Name   Proto  Table  State  Since Info
> > peer1  BGP---up 14:35:04.353  Established
> >   BGP state:  Established
> > Neighbor address: 192.168.42.1
> > Neighbor AS:  65321
> > Neighbor ID:  192.168.42.1
> > Local capabilities
> >   Multiprotocol
> > AF announced: vpn4-mpls vpn6-mpls
> >   Route refresh
> >   Graceful restart
> >   4-octet AS numbers
> >   Enhanced refresh
> > Neighbor capabilities
> >   Multiprotocol
> > AF announced: vpn4-mpls vpn6-mpls
> >   Route refresh
> >   Extended next hop
> > IPv6 nexthop: ipv4 ipv4-mc
> >   Graceful restart
> > Restart time: 120
> > AF supported: vpn4-mpls vpn6-mpls
> > AF preserved:
> >   4-octet AS numbers
> > Session:  internal multihop AS4
> > Source address:   192.168.100.1
> > Hold timer:   12.954/15
> > Keepalive timer:  0.005/5
> >   Channel vpn4-mpls
> >  

Filter ext_community?

2019-09-12 Thread Chris Herdt
I have a number of routes that include non-standard bgp_ext_community
entries, for example unknown 0x10b (VRF Route Import).

Is there a way to filter bgp_ext_community for only route targets?

I tried the following, but the ec datatype expects integers, not wildcards:

show route filter { if (rt, *, *) ~ bgp_ext_community then accept; reject;
} all

I'm using bird 2.0.2.

Thanks!

-- 
Chris Herdt