- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Access default gateway/router for a network via WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-22-2013 10:16 AM
(also asked via a followup question to an existing thread in the General Discussions Forum, but this seems like a more appropriate place)I need to determine what the assigned gateway is for agiven network, but I can't find the API call to determine that.When I look at the WebUI, I can find it by editing the network in question and can see it under under IPv4 DHCP Options. But I can't seem to figure out the correct API call to get at that information using the WAPI. Querying the network itself just gives me this:
curl -K3 -u test:test -X https://192.168.10.5/wapi/1.2/network/abcdefghijklmnopqrstuvwxyz0123456789:192.168.10.0/24/default{ "_ref": "network/abcdefghijklmnopqrstuvwxyz0123456789:192.168.10.0/24/default", "comment": "vlan 10", "network": "192.168.10.0/24", "network_view": "default"}
So, how do I get at the gateway, or router for that that network ?Thanks,Paul
How to get Default gateway details
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-25-2013 01:49 AM
DHCP options for networks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-02-2013 02:28 PM
You would need to include a request to include the "options" field in order to see the default gateway and any other DHCP options. Format your query like the original request and include -d "_return_fields=options".
If you are using NIOS 6.9 or newer (with WAPI 1.3 or newer), you can use "_return_fields+=<fieldname>". Just make sure to escape the "+" so it looks like "_return_fields%2b=<fieldname>".