Skip to content

How to add a resolved next hop to fboss #14

Closed

Description

@vitaliy-senchyshyn

Hi everyone,

I'm trying to configure some routes on fboss(currently with sim_agent) using fboss_route.py and wandering how can I add a route with resolved NH since everything I've tried is unresolved? Actually how to configure resolved NH (or a host which can be used as NH) at all?

Even if I try to add a route with IP of my own interface(10.10.10.1) I see the log message which tells me that the NH is unresolved(see the log below the config). I have even tried to do a hack by calling directly ArpHandler::arpUpdateRequired() from the code and I apparently the ARP entry was added(saw the log message: "Adding ARP entry for 10.10.10.2 --> 10:10:10:10:10:02") but after that when I tried to add a route with 10.10.10.2 NH I still saw this log message about unresolved NH.

BTW, why does this route appear in the table: "Added route 10.10.10.0/24@ State:CR, => 10.10.10.1@I1"? We can not route using our own IP as NH.

Now I'm really confused and don't know how to proceed.

The config is very simple:
{
"version": 0,
"ports": [
{
"logicalID": 1,
"state": 2,
"minFrameSize": 64,
"maxFrameSize": 1500,
"parserType": 1,
"routable": true,
"ingressVlan": 110,
"speed": 0
},
{
"logicalID": 2,
"state": 2,
"minFrameSize": 64,
"maxFrameSize": 1500,
"parserType": 1,
"routable": true,
"ingressVlan": 120,
"speed": 0
}
],
"vlans": [
{
"name": "V110",
"id": 110,
"recordStats": true,
"routable": true,
"ipAddresses": [
"10.10.10.1"
]
},
{
"name": "V120",
"id": 120,
"recordStats": true,
"routable": true,
"ipAddresses": [
"20.20.20.1"
]
}
],
"vlanPorts": [
{
"vlanID": 110,
"logicalPort": 1,
"spanningTreeState": 2,
"emitTags": false
},
{
"vlanID": 120,
"logicalPort": 2,
"spanningTreeState": 2,
"emitTags": false
}
],
"defaultVlan": 110,
"interfaces":
[
{
"intfID": 1,
"routerID": 4,
"vlanID": 110,
"mac":"10:10:10:10:10:01",
"ipAddresses": [
"10.10.10.1/24"
]
},
{
"intfID": 2,
"routerID": 4,
"vlanID": 120,
"mac":"20:20:20:20:20:01",
"ipAddresses": [
"20.20.20.1/24"
]
}

],
"arpTimeoutSeconds": 60,
"arpRefreshSeconds": 20,
"arpAgerInterval": 5,
"proactiveArp": false
}

The log:

./sim_agent --logtostderr=1 --minloglevel=0 -v=3 --config ../fboss.json
I1214 20:53:57.288607 11626 SwSwitch.cpp:294] Registering state observer: IPv6Handler
I1214 20:53:57.288758 11626 SwSwitch.cpp:294] Registering state observer: NeighborUpdater
I1214 20:53:57.289929 11627 SwSwitch.cpp:227] hardware initialized in 0 seconds; applying initial config
I1214 20:53:57.290119 11626 ThriftServer.cpp:223] libevent 2.0.21-stable method epoll
I1214 20:53:57.301103 11627 Main.cpp:135] local MAC is 02:00:00:00:00:01
I1214 20:53:57.301318 11630 SwSwitch.cpp:420] preparing state update apply initial config
I1214 20:53:57.301331 11630 SwSwitch.cpp:919] Loading config from local config file ../fboss.json
I1214 20:53:57.312749 11630 RouteUpdater.cpp:115] Added route 10.10.10.0/24@ State:CR, => 10.10.10.1@I1
I1214 20:53:57.312891 11630 RouteUpdater.cpp:115] Added route 20.20.20.0/24@ State:CR, => 20.20.20.1@I2
I1214 20:53:57.313022 11630 RouteUpdater.cpp:115] Added route fe80::/64@ State:R, => TO_CPU
I1214 20:53:57.313503 11630 SwSwitch.cpp:515] Updating state: old_gen=0 new_gen=1
I1214 20:53:57.313855 11630 SwSwitch.cpp:560] Update state took 281us
I1214 20:53:57.314029 11627 FunctionScheduler.cpp:137] Starting FunctionScheduler with 4 functions.
I1214 20:53:57.314059 11627 FunctionScheduler.cpp:144] - func: updateStats, period = 1000ms, delay = 0ms
I1214 20:53:57.314070 11627 FunctionScheduler.cpp:144] - func: flushWarmBoot, period = 1000ms, delay = 30000ms
I1214 20:53:57.314075 11627 FunctionScheduler.cpp:144] - func: DetectTransceiver, period = 1000ms, delay = 0ms
I1214 20:53:57.314084 11627 FunctionScheduler.cpp:144] - func: CacheUpdateTransceiver, period = 15000ms, delay = 15000ms
I1214 20:53:57.314127 11627 Main.cpp:179] Started background thread: UpdateStatsThread
I1214 20:53:57.331481 11626 Main.cpp:301] serving on localhost on port 5909
I1214 21:02:43.154876 11630 SwSwitch.cpp:420] preparing state update sync fib
I1214 21:02:43.154989 11630 RouteUpdater.cpp:115] Added route 10.10.10.0/24@ State:CR, => 10.10.10.1@I1
I1214 21:02:43.155028 11630 RouteUpdater.cpp:115] Added route 20.20.20.0/24@ State:CR, => 20.20.20.1@I2
I1214 21:02:43.155066 11630 RouteUpdater.cpp:115] Added route fe80::/64@ State:R, => TO_CPU
I1214 21:02:43.155227 11645 ThriftHandler.cpp:86] Sync 0 routes took 363us
I1214 21:02:43.155900 11648 Acceptor.cpp:395] Acceptor=0x2cc8c98 onEmpty()
I1214 21:02:44.977035 11630 SwSwitch.cpp:420] preparing state update add unicast route
I1214 21:02:44.977193 11630 RouteUpdater.cpp:115] Added route 7.7.7.0/[email protected]. State:, => DROP
I1214 21:02:44.977212 11630 RouteUpdater.cpp:266] Could not find route for nhop : 10.10.10.1
I1214 21:02:44.977223 11630 RouteUpdater.cpp:307] Cannot resolve route 7.7.7.0/[email protected]. State:U, => DROP
I1214 21:02:44.977314 11630 SwSwitch.cpp:515] Updating state: old_gen=1 new_gen=2
I1214 21:02:44.977344 11630 SwSwitch.cpp:560] Update state took 29us
I1214 21:02:44.977373 11645 ThriftHandler.cpp:86] Add 1 routes took 422us
I1214 21:02:44.977731 11649 Acceptor.cpp:395] Acceptor=0x2ccd228 onEmpty()

Activity

  1. changed the title [-]How to add resolved next hop to fboss[/-] [+]How to add a resolved next hop to fboss[/+] on Dec 14, 2015
  2. vitaliy-senchyshyn commented on Dec 15, 2015

    @vitaliy-senchyshyn
    Author

    Have found the root cause. The problem was in VRF id. In my config it was 4 whereas the one added by fboss_route.py is 0.

    Therefore, closing the issue.

  3. added a commit that references this issue on Nov 17, 2021
  4. added a commit that references this issue on Sep 26, 2023
  5. mt148575-hub commented on Oct 6, 2026

    @mt148575-hub

    Kawshar Hasan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions