osrg / gobgp

BGP implemented in the Go Programming Language
https://osrg.github.io/gobgp/
Apache License 2.0
3.64k stars 693 forks source link

cat not add evpn neighbor by cli #2403

Closed redstar9451 closed 3 years ago

redstar9451 commented 3 years ago

gobpgd & gobgp global as 45092 router-id 10.18.105.179 gobgp neighbor add 10.18.147.73 as 65198 --address-family evpn

The neighbor 10.18.147.73 has not evpn address family attribute.

gobgp neighbor -j [{"apply_policy":{"export_policy":{"direction":2},"import_policy":{"direction":1}},"conf":{"local_as":45092,"neighbor_address":"10.18.147.73","peer_as":65198,"peer_type":1},"ebgp_multihop":{},"route_reflector":{},"state":{"messages":{"received":{"open":12,"total":12},"sent":{"open":12,"keepalive":23,"total":35}},"neighbor_address":"10.18.147.73","peer_as":65198,"peer_type":1,"queues":{},"session_state":5,"remote_cap":[{"type_url":"type.googleapis.com/gobgpapi.GracefulRestartCapability","value":"EHgaBgoECBkQRg=="},{"type_url":"type.googleapis.com/gobgpapi.FourOctetASNumberCapability","value":"CK79Aw=="},{"type_url":"type.googleapis.com/gobgpapi.ExtendedNexthopCapability","value":"CgwKBAgBEAESBAgCEAE="},{"type_url":"type.googleapis.com/gobgpapi.UnknownCapability","value":"CEI="},{"type_url":"type.googleapis.com/gobgpapi.UnknownCapability","value":"CEMSAwIBQA=="},{"type_url":"type.googleapis.com/gobgpapi.RouteRefreshCiscoCapability"},{"type_url":"type.googleapis.com/gobgpapi.RouteRefreshCapability"},{"type_url":"type.googleapis.com/gobgpapi.MultiProtocolCapability","value":"CgQIGRBG"}],"local_cap":[{"type_url":"type.googleapis.com/gobgpapi.RouteRefreshCapability"},{"type_url":"type.googleapis.com/gobgpapi.MultiProtocolCapability","value":"CgQIARAB"},{"type_url":"type.googleapis.com/gobgpapi.FourOctetASNumberCapability","value":"CKTgAg=="},{"type_url":"type.googleapis.com/gobgpapi.ExtendedNexthopCapability","value":"CgwKBAgBEAESBAgCEAE="}]},"timers":{"config":{"connect_retry":120,"hold_time":90,"keepalive_interval":30,"idle_hold_time_after_reset":30},"state":{"keepalive_interval":30,"negotiated_hold_time":90,"downtime":{"seconds":1615570257}}},"transport":{"local_address":"0.0.0.0"},"route_server":{},"graceful_restart":{},"afi_safis":[{"mp_graceful_restart":{"config":{}},"config":{"family":{"afi":1,"safi":1},"enabled":true},"state":{"family":{"afi":1,"safi":1},"enabled":true},"apply_policy":{"export_policy":{"direction":2},"import_policy":{"direction":1}},"route_selection_options":{"config":{}},"use_multiple_paths":{"config":{},"ebgp":{"config":{}},"ibgp":{"config":{}}},"route_target_membership":{"config":{}},"long_lived_graceful_restart":{"config":{}},"add_paths":{"config":{}}}]}]

redstar9451 commented 3 years ago

After read the source code, I found the correct usage: gobgp neighbor add 10.18.147.73 as 65198 family l2vpn-evpn

The help message below is simple, is there a method could display more useful help messages ? gobgp neighbor add --help Usage: gobgp neighbor add [flags]. --> "flags" does not help to get detail information

fujita commented 3 years ago

Can you send a pull request?

redstar9451 commented 3 years ago

I will try to pull a request and do that. Thanks for your reply.