site-to-site VPN settings

diablo24
Building a reputation

site-to-site VPN settings

Hi,

 

In the API docs it shows the following:

{
  "mode": "spoke",
  "hubs": [
    {
      "hubId": "N_4901849",
      "useDefaultRoute": true
    },
    {
      "hubId": "N_1892489",
      "useDefaultRoute": false
    }
  ],
  "subnets": [
    {
      "localSubnet": "192.168.1.0/24",
      "useVpn": true
    },
    {
      "localSubnet": "192.168.128.0/24",
      "useVpn": true
    }
  ]
}

In the spoke mode you can get which hubs its connected to. Is the "hubId" the networkID of where the hub is located? Or is just a random string that's generated? Also, if the FW is the hub, is there any way to find this ID if its not the networked ID? I'm writing code to stitch up VPN connections and its difficult to associate hub and spoke without some unique identifier.

 

This is what I have when the FW is setup as hub:

{
    "mode": "hub",
    "hubs": [],
    "subnets": [
        {
            "localSubnet": "192.168.128.0/24",
            "useVpn": true
        },
        {
            "localSubnet": "137.68.11.0/24",
            "useVpn": false
        },
        {
            "localSubnet": "101.11.10.0/24",
            "useVpn": true
        }
    ]
}
4 REPLIES 4
MerakiDave
Meraki Employee
Meraki Employee

I'm not sure about those hubId numbers, they don't look like typical network IDs.  When I run the command https://dashboard.meraki.com/api/v0/organizations/<org-id>/networks in Postman for example, all of the network IDs are either L_ or N_ followed by 18 digits, so I'm not sure about those 7 digit identifiers, I'll try to check into it and let you know.  But run that also in your environment and see if there seems to be any correlation.  I looked through the updatevpnsettings function https://github.com/meraki/provisioning-lib/blob/master/python-3.5-api-module/merakiapi.py and don't think it's giving any answers on where the hubId is generated from.  

diablo24
Building a reputation

Thanks @MerakiDave

 

Unfortunately, I don't have a hub to connect to when I place my FW in spoke mode. So I'm unable to see the output.

diablo24
Building a reputation

@MerakiDave- Just following up to see if you found any other info on the hubId.

 

Thanks,

-Jerome

ITCaM
Comes here often

4 years later, I came across the same issue. For anyone else that stumbles across this thread. The hub id is the network id that the hub resides in. Just spoke with support and ran it for myself. Works a treat. 

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.
Labels