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

route section #10

Open
edoput opened this issue May 25, 2017 · 2 comments
Open

route section #10

edoput opened this issue May 25, 2017 · 2 comments
Labels

Comments

@edoput
Copy link
Owner

edoput commented May 25, 2017

Available keys

route.1.devname
route.1.gateway
route.1.ip
route.1.netmask
route.1.status
route.status

As a static route in netjson has only destination and next I'm a little confused about what is what?

@edoput
Copy link
Owner Author

edoput commented Jul 13, 2017

after talking with @gabri94 I got all the information that I needed

// route object
{
    "destination": "192.168.1.0/24",
    "next": "192.168.1.1"
}

produces

# this could be the interface that has the ip
route.1.devname=
route.1.gateway=192.168.1.1
route.1.ip=192.168.1.0
route.1.netmask=255.255.255.0
route.1.status=enabled
route.status=enabled

@edoput
Copy link
Owner Author

edoput commented Jul 14, 2017

The only important part to remember is that the management interface produces a route like this.

Edit: It's not the management interface but the interface with a gateway defined

{
    "interfaces": [
        {
            "name": "ifname",
            ...,
            "addresses": [
                {
                    "address": "192.168.1.20",
                    "family": "ipv4",
                    "gateway": "192.168.1.1",
                    "management": true,
                    "proto": "static"
                }
           ]
       }
    ]
}

produces

route.1.devname=ifname
route.1.gateway=192.168.1.1
route.1.ip=192.168.1.0
route.1.netmask=255.255.255.0
route.1.status=enabled
route.status=enabled

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

No branches or pull requests

1 participant