Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Seems simple, but how? Get WAN IP address?

    Scheduled Pinned Locked Moved SNMP
    3 Posts 2 Posters 2.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      GomezAddams
      last edited by

      Is it possible to get the IP address of the WAN interface via SNMP? I'd think this would be easy, but perhaps not so much.

      1 Reply Last reply Reply Quote 0
      • T
        tehknowledge
        last edited by

        @GomezAddams:

        Is it possible to get the IP address of the WAN interface via SNMP? I'd think this would be easy, but perhaps not so much.

        I received my IP with the following SNMP get

        snmpwalk -v1 -c <communitystring><firewallip>.1.3.6.1.2.1.4.22.1.1.2</firewallip></communitystring>

        1 Reply Last reply Reply Quote 0
        • G
          GomezAddams
          last edited by

          I get a list of known IP addresses and the interface they have been seen on

          C:\usr\bin>snmpwalk -v 1 -m ALL 192.168.1.1 public .1.3.6.1.2.1.4.22.1.1.2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.1 = 2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.10 = 2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.11 = 2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.12 = 2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.13 = 2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.14 = 2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.152 = 2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.154 = 2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.155 = 2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.160 = 2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.162 = 2
          ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaIfIndex.2.192.168.1.171 = 2

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.