Configuring BGP between 3 routers in GNS3 throws an error.

huangapple go评论93阅读模式
英文:

Configuring BGP between 3 routers in GNS3 throws an error

问题

为了学校作业,我们需要使用GNS3来设置一个环形中的3台路由器,以使用BGP进行通信,并连接一台PC到每台路由器。然后,我们需要尝试从一台PC向另一台PC发送ping请求,同时暂时中断两台路由器之间的连接,看看它如何选择另一条路径。我的设置

我们已经获得了IP地址,并被要求使用AS65531-AS65533,并使用VyOS作为路由器,Alpine Linux作为PC。以下是我用于R1、R2和R3的命令以及PC1、PC2和PC3的/etc/network/interfaces文件(一个示例,其他文件相同,但数字不同):

PC:
# 针对eth0的静态配置
auto eth0
iface eth0 inet static
        address 192.168.2.1
        netmask 255.255.255.252
        gateway 192.168.2.2

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

我们在说明中收到了这些命令。然而,当我运行set protocols bgp 65532 network 192.168.2.0/30命令时,它会抛出以下错误:

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

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

[edit]

如果我忽略这个错误,它可以成功从PC1到R1,从R1到R2进行ping,但无法从PC1到PC2进行ping。如果我尝试从PC1 ping R2,我可以在Wireshark中看到ping请求,但看不到ping回复。

我向我的朋友请教了他的解决方案,然后我尝试了他使用的相同配置和命令,但出现了相同的错误,所以我想问题可能出在我的GNS3设置上。

英文:

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.

答案1

得分: 0

将地址族放在那里,所以:
设置协议BGP 65532地址族IPv4单播网络10.3.0.0/24

英文:

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

huangapple
  • 本文由 发表于 2023年4月13日 14:59:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/76002509.html
  • bgp
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定