Getting error when running set bgp commands to peer

Getting below message when running command
set protocols bgp 65535 neighbor 192.168.50.1 remote-as internal

[ protocols bgp 65535 ]
[ protocols bgp 65535 neighbor eth0 ]
must set remote-as or peer-group with remote-as defined

But I am still able to save the configuration.

I have set the AS number for both the VM’s.

Hi @qwerty , can you share full bgp config and mention vyos version you’re using?

Also have you checked BGP configuration guide and the following section: BGP — VyOS 1.4.x (sagitta) documentation ?

@e.khudiyev thanks for replying.
Please find below information.

BGP configuration
vyos@vyos# show protocols bgp
DEBUG vexit_internal: calling getCompletionEnv() without config session
DEBUG vexit_internal: calling getCompletionEnv() without config session
bgp 65535 {
neighbor 192.168.50.1 {
description routereflector-enterprise
remote-as internal
}

Vyos version I am using is 1.3.0

I am following below document which is for 1.3 version.
1.3 Version documentation for BGP

first of all it seems that something wrong with your cli, do you have any other session open or background process stuck? Please try to reboot the device for example if possible. Secondarily, try to delete Neighbor eth1 even if it doesn’t appear in your configuration and make commit. If that doesn’t help type in the cli:

vtysh
show run

and check bgp config section there as well.

Type exit to jump back into vyos cli.

@e.khudiyev Yes you are right.
There is something wrong with CLI.
I have raised a separate ticket for that.

I tried running fg and cancelled the ping command which I guess was stopped. But it didnt work.
I am not able to got to operation mode because its throwing me error of ‘stopped jobs’ when I am exiting the configuration mode.
I dont want to restart the VM.
I want to understand why all these issues are happening?

are you sure only ping command was running in background? if so, check the following command to find out if it’s stopped:

sudo ps ax | grep ping

thanks @e.khudiyev .Let me check

@e.khudiyev I have restarted the system now its working fine but I am having issues.
Inside configuration its like below.

vyos@vyos# show protocols bgp
bgp 65535 {
neighbor 192.168.50.1 {
description routereflector-enterprise
remote-as 65535
}
parameters {
}
}

But when I am doing vtysh and doing ‘show run’ I am not getting neighbor configuration.
vyos# show run
Building configuration…

Current configuration:
!
frr version 7.5.1-20210926-00-g39e1d4747
frr defaults traditional
hostname vyos
log syslog
log facility local7
service integrated-vtysh-config
!
router bgp 65535
no bgp ebgp-requires-policy
no bgp network import-check
!
line vty
!
end

Its confusing me how all this works together.
Also Can I use 1.4 documentation for 1.3 Vyos?

I think there is no difference for the simple BGP configuration between 1.3 and 1.4 version. For 1.3 use this example: BGP — VyOS 1.3.x (equuleus) documentation

If it’s internal bgp (same AS number) set the peer AS as internal. Also, for iBGP it’s recommended to set source address (update-source) to your local address used for this session. Set appropriate address-family on both sides and other options that you need and everything will work without problem.

It is strange
May be caused by ⚓ T3741 [BGP] default no-ipv4-unicast - by default
Needs more tests

walgreenslistens Wrote:

I also faced similar error and don’t know what actual happening!!

Can you share exact vyos version, bgp configuration, and outputs after commit and show config?

@qwerty, I tested in the latest 1.3.0 version and the neighbor configured as internal, does show in the frr configuration. I would request you to check in the latest version.

vyos@vyos# set proto bgp 71 neighbor 172.31.0.2 remote-as internal
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# sa
Saving configuration to '/config/config.boot'...
Done
[edit]
vyos@vyos# exit
exit
vyos@vyos:~$ vtysh

Hello, this is FRRouting (version 7.3.1-20200726-01-g0cae52083).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

vyos# sh run
Building configuration...

Current configuration:
!
frr version 7.3.1-20200726-01-g0cae52083
frr defaults traditional
hostname vyos
log syslog informational
service integrated-vtysh-config
!
ip route 0.0.0.0/0 22.22.22.2
!
router bgp 71
 bgp router-id 11.11.11.12
 neighbor 11.11.11.11 remote-as 100
 neighbor 11.11.11.11 update-source 11.11.11.12
 neighbor 22.22.22.2 remote-as 79
 neighbor 172.31.0.2 remote-as internal
 !
 address-family ipv4 unicast
  network 172.31.0.0/24
 exit-address-family
!
line vty
!
end
vyos# exit
vyos@vyos# run sh ver

Version:          VyOS 1.3-beta-202110301129
Release train:    equuleus