Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eBGP routes with different MED values cannot be imported correctly into RIB #2062

Open
ryu-s-4 opened this issue Apr 15, 2019 · 0 comments
Open

Comments

@ryu-s-4
Copy link

ryu-s-4 commented Apr 15, 2019

Hi,

I tried to advertise eBGP routes from two routers (R1 and R2 in the following picture) respectively with different MED values (but with the same destination) to DUT, where GoBGP is running as a routing protocol.
The topology is as show in the following.

<<<
|               |
|               |
|               |
| AS      ---------------
|65001    |     DUT     |
|         ---------------
|           |         |
>>>         |MED      |MED
<<<         |50       |100
|           |         |
|         ------   ------
|AS       | R1 |   | R2 |
|65002    ------   ------
|           |         |
|
>>>

Although the routes are advertised to DUT, it is observed that the routes cannot be imported correctly into RIB, specifically, the MED values are not set correctly for the advertised routes.
the appearance of “gobgp global rib” is as follows.

root@iptun-mic:~# gobgp global rib
   Network              Next Hop             AS_PATH              Age        Attrs
*> 20.0.0.0/24          172.16.4.2           65002                00:00:58   [{Origin: i} {Med: 0}]
*  20.0.0.0/24          172.16.5.2           65002                00:00:54   [{Origin: i} {Med: 0}]
root@iptun-mic:~#
root@iptun-mic:~# gobgp global rib
   Network              Next Hop             AS_PATH              Age        Attrs
*> 20.0.0.0/24          172.16.5.2           65002                00:00:10   [{Origin: i} {Med: 0}]
*  20.0.0.0/24          172.16.4.2           65002                00:00:08   [{Origin: i} {Med: 100}]
root@iptun-mic:~#
root@iptun-mic:~# gobgp global rib
   Network              Next Hop             AS_PATH              Age        Attrs
*> 20.0.0.0/24          172.16.4.2           65002                00:00:04   [{Origin: i} {Med: 0}]
*  20.0.0.0/24          172.16.5.2           65002                00:00:03   [{Origin: i} {Med: 50}]
root@iptun-mic:~#

As shown in the logs, MED values of the either (or both) of the routes are set with 0 randomly, and I have no idea why this happens.
The configuration for DUT is as follows.

# -*- coding: utf-8; mode: toml -*-

[global.config]
  as = 65001
  router-id = "10.10.10.10"

  [global.apply-policy.config]
    export-policy-list = ["policy-ipiptun-prefix"]
    default-export-policy = "accept-route"

[[neighbors]]
  [neighbors.config]
    neighbor-address = "172.16.4.2"
    peer-as = 65002

  [[neighbors.afi-safis]]
    [neighbors.afi-safis.config]
      afi-safi-name = "ipv4-unicast"

[[neighbors]]
  [neighbors.config]
    neighbor-address = "172.16.5.2"
    peer-as = 65002

  [[neighbors.afi-safis]]
    [neighbors.afi-safis.config]
      afi-safi-name = "ipv4-unicast"

[zebra]
  [zebra.config]
    enabled = true
    url = "unix:/var/run/frr/zserv.api"
    version=5

I wish I would know whether this is a bug or configuratoin mistake.
Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant