antrea
antrea copied to clipboard
BGP Antctl commands
antctl agent command to -
-
[x] get effective BGPPolicy name. (https://github.com/antrea-io/antrea/pull/6646) It is nice to also have some basic info about it like LocalASN, RouterID, ListenPort.
antctl get bgppolicy(orget bp) , exclude short nameget bp -
[ ] ~get ASN, RouterID and ListenPort directly from local BGP server corresponding to effective BGPPolicy. It can be helpful in debugging when BGP server is not running properly or its configuration is different from effective BGPPolicy due to some unknown reason.
antctl get bgpserver(orget bs) , exclude short nameget bsThis command was earlier excluded , check details here We replanned to include this command as gobgp binary support is excluded now. details here~ -
[x] get BGP Peers(known by their Address) added to effective BGPPolicy. (https://github.com/antrea-io/antrea/pull/6689) It is nice to also have ASN and State of each BGP Peer which can be
unknown,idle,active,establishedetc.antctl get bgppeers, include peer and state in command output, other details will be added later. -
[ ] get routes advertised by effective BGPPolicy. (https://github.com/antrea-io/antrea/pull/6734) It is nice to also have Advertisement type for each advertised routes.
AdvertisementTypecan beegress,service,podorall(defaultall)antctl get bgproutes --type <AdvertisementType>( currently excluding--type, it will be supported later only for advertised routes )
antctl get bgproutes --peer <peer-ip-address> --in or(--out) for received or advertised routes respectively.
- if
--inor (--out) is omitted, the command will use--out(advertised routes) as default. - if
--peerflag is omitted we will consider routes from all peers depending on--inor(--out) flag provided.
Hi, @Atish-iaf! If you're already working on this issue, I would like to be a part of it.
CC: @rajnkamr
antctlagent command to -
- [ ] get effective BGPPolicy name. It is nice to also have some basic info about it like LocalASN, RouterID, ListenPort.
antctl get bgppolicy(orget bp)
Maybe remove the alias bp, it is not a great short name. IMO, only outputting the effective BGPPolicy name is sufficient for this command.
- [ ] get ASN, RouterID and ListenPort directly from local BGP server corresponding to effective BGPPolicy. It can be helpful in debugging when BGP server is not running properly or its configuration is different from effective BGPPolicy due to some unknown reason.
antctl get bgpserver(orget bs)
Maybe remove the alias bs. The output of the command might contain:
- local listen port;
- router ID;
- local ASN;
- other attributes of the config to start gobgp server added in the future.
- [ ] get BGP Peers(known by their Address) added to effective BGPPolicy. It is nice to also have ASN and State of each BGP Peer which can be
unknown,idle,active,establishedetc.antctl get bgppeers
I'm fine this with one.
- [ ] get routes advertised by effective BGPPolicy. It is nice to also have Advertisement type for each advertised routes.
AdvertisementTypecan beegress,service,podorall(defaultall)antctl get bgproutes --type <AdvertisementType>
IIRC, we can only identify the routes received from remote peers as well as the routes sent to remote peers (by getting the routes from the bgpserver on a Node).
cc @antoninbas @tnqn
Maybe remove the alias
bp, it is not a great short name. IMO, only outputting the effective BGPPolicy name is sufficient for this command.
For effective policy we might want to have asn, router id and listen port details given that at one time only one bgp policy can be effective however multiple bgp policies could have been applied .
may be can add option to display only effective bgp policy name with antctl get bgppolicy and antctl get bgppolicy --detailsfor all other details ?
NAME LOCAL ASN ROUTER ID LISTEN PORT
bgp-policy-1 64512 192.168.1.1 179
- [ ] get ASN, RouterID and ListenPort directly from local BGP server corresponding to effective BGPPolicy. It can be helpful in debugging when BGP server is not running properly or its configuration is different from effective BGPPolicy due to some unknown reason.
antctl get bgpserver(orget bs)Maybe remove the alias
bs. The output of the command might contain:
- local listen port;
- router ID;
- local ASN;
- other attributes of the config to start gobgp server added in the future.
Usually this command is equivalent to gobgp global which gets information by calling gobgp apis
may be add antctl get bgpserver --details for future expansion
AS: 64512
Router-ID: 192.168.1.1
Listening Port: 179
- get BGP Peers(known by their Address) added to effective BGPPolicy. It is nice to also have ASN and State of each BGP Peer which can be
unknown,idle,active,establishedetc.antctl get bgppeersI'm fine this with one.
for
antctl get bgppeers
Usually this command can have more information in future but for now, peer, as and state should be ok to start with
Peer AS State Uptime Received Advertised
192.168.2.2 64513 Establ 4d12h 24 13
192.168.3.3 64514 Establ 1d02h 18 15
IMO- can add another command to get bgp peer specific details using gobgp apis ( second phase)
antctl get peer xyz similar to gobgp neighbor 192.168.255.1
- get routes advertised by effective BGPPolicy. It is nice to also have Advertisement type for each advertised routes.
AdvertisementTypecan beegress,service,podorall(defaultall)antctl get bgproutes --type <AdvertisementType>IIRC, we can only identify the routes received from remote peers as well as the routes sent to remote peers (by getting the routes from the bgpserver on a Node).
It seems it is possible to filter advertised routes, usually routes which starts with * are advertized routes ! from gobgp standard output
gobgp global rib
Network Next Hop AS_PATH Age Attrs
*> 192.168.100.0/24 192.168.1.101 00:00:06 [{Origin: i}]
What's the difference between "antctl get bgpolicy" and "antctl get bgprouter"? It's better to have fewer commands if possible.
For "antctl get bgproutes", we should have the ability to filter by peer. Filtering routes by "type", or being able to tie each route to a specific resource, sounds nice, but I wonder if it is worth it as it may increase the complexity of the implementation without adding too much value.
What's the difference between "antctl get bgpolicy" and "antctl get bgprouter"? It's better to have fewer commands if possible.
antctl get bgpserver retrieves information from gobgp daemon.
For "antctl get bgproutes", we should have the ability to filter by peer. Filtering routes by "type", or being able to tie each route to a specific resource, sounds nice, but I wonder if it is worth it as it may increase the complexity of the implementation without adding too much value.
Makes sense to me as for each bgp peer, a local rib is maintained which could be used to filter routes based on peer, we can have an extension of command antctl get bgproutes which could list all routes received from/sent to a peer antctl get bgproutes --peer <peer-ip-address>
What's the difference between "antctl get bgpolicy" and "antctl get bgprouter"? It's better to have fewer commands if possible.
antctl get bgpserverretrieves information from gobgp daemon.
In this case, I wonder if antctl get bgpserver should really be included, especially if we are going to include the gobgp binary in the antrea-agent image for troubleshooting purposes. The command is only useful if we assume there is a very obvious bug in either Antrea or gobgp?
What's the difference between "antctl get bgpolicy" and "antctl get bgprouter"? It's better to have fewer commands if possible.
antctl get bgpserverretrieves information from gobgp daemon.In this case, I wonder if
antctl get bgpservershould really be included, especially if we are going to include the gobgp binary in the antrea-agent image for troubleshooting purposes. The command is only useful if we assume there is a very obvious bug in either Antrea or gobgp?
As it provides same information as provided by gobgp global, do not see a strong case for supporting antctl get bgpserver , also explained about command output in second section , we will drop this command.
@rajnkamr I suppose this issue can be closed now?
Yes, antctl bgp PRs and follow up PR is also merged.