Join the Conversation

To sign in, use your existing MySonicWall account. To create a free MySonicWall account click "Register".

Getting Interface IP when on DHCP

With v7 you can use the /reporting/interfaces/ipv4 endpoint to get IP info for an interface that is set to DHCP.

On 6.5 I cant seem to find a way to get the IP address of an interface that is set to DHCP.

Category: Developer Hub
Reply

Answers

  • MustafaAMustafaA SonicWall Employee
    edited February 2023

    "/reporting/interfaces/ipv4" endpoint will give you the statistical information of each firewall interface (rx_unicast_packets, rx_broadcast_packets, rx_errors, rx_bytes, tx_unicast_packets, tx_broadcast_packets, tx_errors, tx_bytes)

    "/interfaces/ipv4" endpoint will give you all the firewall interface configuration information. The following is an example model of the JSON response when using the GET method. More information can be found on sonicos-api.sonicwall.com

    {
      "interfaces": [
        {
          "ipv4": {
            "name": "string",
            "vlan": 0,
            "tunnel": 0,
            "ip_assignment": {
              "zone": "string",
              "mode": {}
            },
            "comment": "string",
            "mtu": 0,
            "mac": {},
            "link_speed": {},
            "management": {
              "http": true,
              "https": true,
              "ping": true,
              "snmp": true,
              "ssh": true,
              "fqdn_assignment": "string"
            },
            "user_login": {
              "http": true,
              "https": true
            },
            "https_redirect": true,
            "send_icmp_fragmentation": true,
            "fragment_packets": true,
            "ignore_df_bit": true,
            "auto_discovery": true,
            "flow_reporting": true,
            "multicast": true,
            "cos_8021p": true,
            "exclude_route": true,
            "asymmetric_route": true,
            "management_traffic_only": true,
            "dns_proxy": true,
            "shutdown_port": true,
            "secondary": {
              "ip": "string",
              "netmask": "string"
            },
            "default_8021p_cos": {
              "enable": true,
              "priority": "best-effort"
            },
            "sonicpoint": {
              "limit": {
                "value": 0
              },
              "reserve_address": {}
            },
            "bandwidth_management": {
              "egress": {
                "amount": 0
              },
              "ingress": {
                "amount": 0
              }
            },
            "port": {},
            "routed_mode": {},
            "native_bridge": {
              "interface": "string"
            },
            "firewalling": true,
            "one_arm_mode": true,
            "one_arm_peer": "string"
          }
        }
      ]
    }
    
Sign In or Register to comment.