bgp

Configuring BGP between 3 routers in GNS3 throws an error


For a school assignment we have use GNS3 to set up 3 routers in a circle to communicate with BGP and hook up a PC to each of them. We then have to try pinging one PC from the other and suspending a connection between two routers and see how it takes the other path. My setup We were given the IP addresses and told to use AS65531-AS65533 and told to use VyOS as the routers and Alpine Linux as PCs. These are the commands that I use for R1, R2 and R3 and the /etc/network/interfaces files of the PC1, PC2 and PC3 (Example of one, others are the same, but with different numbers):

PC:
# Static config for eth0
auto eth0
iface eth0 inet static
        address 192.168.2.1
        netmask 255.255.255.252
        gateway 192.168.2.2
#       up echo nameserver 192.168.0.1 > /etc/resolv.conf

Router:
set interfaces ethernet eth0 address 192.168.2.2/30
set interfaces ethernet eth1 address 1.1.1.5/30
set protocols bgp 65532 neighbor 1.1.1.6 remote-as '65533'
set protocols bgp 65532 neighbor 1.1.1.6 update-source 1.1.1.5
set protocols bgp 65532 parameters router-id 1.1.1.5
set protocols bgp 65532 network 192.168.2.0/30

set interfaces ethernet eth2 address 1.1.1.2/30
set protocols bgp 65532 neighbor 1.1.1.1 remote-as '65531'
set protocols bgp 65532 neighbor 1.1.1.1 update-source 1.1.1.2
set protocols bgp 65532 parameters router-id 1.1.1.2
set protocols bgp 65532 network 192.168.2.0/30

We were given these commands in the instructions. However when I run the set protocols bgp 65532 network 192.168.2.0/30 command, it throws:

vyos@vyos# set protocols bgp 65532 network 10.3.0.0/24

  Configuration path: protocols bgp 65532 [network] is not valid
  Set failed

[edit]

If I ignore the error, it successfully pings from ex. PC1 to R1 and from R1 to R2, but not from PC1 to PC2. If I try pinging R2 from PC1 I can see the ping request in Wireshark, but not the ping reply.

I asked my friend for his solution and I tried the same configuration that worked for him with the commands he used and it threw the same error, so I imagine the problem might be somewhere in my GNS3 settings.


Solution

  • You have to put address-family in there so: set protocols bgp 65532 address-family ipv4-unicast network 10.3.0.0/24