Networking Forums

Networking Forums > Network Hardware > Home Networking > SNMP and external IP

Reply
Thread Tools Display Modes

SNMP and external IP

 
 
Dave J
Guest
Posts: n/a

 
      12-30-2004, 11:07 AM
Is there any way to use SNMP to acquire the external IP address of a NAT
router?

I'm after persuading my (homemade) dynamic dns client to function over the
NAT link, and short of abusing the system by auto-updating every five
minutes, or using an external host, I can't think of a way to do it.

The only thoughts I've had have been DHCP (apparently no good by my
reading anyhow) or SNMP.

I'm capable of writing my own agent/client for any useable protocol.

Any clues?

Dave J.
 
Reply With Quote
 
 
 
 
Alex Fraser
Guest
Posts: n/a

 
      12-30-2004, 12:24 PM
"Dave J" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Is there any way to use SNMP to acquire the external IP address of a NAT
> router?


Yes. snmpwalk starting at 1.3.6.1.2.1.4.20.1.1 lists all IP addresses on my
router.

See http://www.ibr.cs.tu-bs.de/cgi-bin/sbrowser.cgi

HTH,
Alex


 
Reply With Quote
 
Alex Fraser
Guest
Posts: n/a

 
      12-30-2004, 01:05 PM
"Alex Fraser" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Dave J" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Is there any way to use SNMP to acquire the external IP address of a
> > NAT router?

>
> Yes. snmpwalk starting at 1.3.6.1.2.1.4.20.1.1 lists all IP addresses on
> my router.
>
> See http://www.ibr.cs.tu-bs.de/cgi-bin/sbrowser.cgi


To expand a little, OIDs under the above should have corresponding ones with
the interface index under 1.3.6.1.2.1.4.20.1.2. AIUI it's permissable for an
interface index to change when the system is reinitialised, but IME that
doesn't happen unless the hardware is changed, and that won't happen in a
router. So, as a one-off, you can manually find the interface index for the
router's WAN port. Then (in your DNS update client) you can poll (walking
....1 and ...2) to find the address associated with that interface.

That said, it's undoubtedly easier and probably satisfactory just to walk
the address entries looking for a routable address.

Alex


 
Reply With Quote
 
Dave J
Guest
Posts: n/a

 
      01-10-2005, 09:33 AM
In MsgID<(E-Mail Removed)> within uk.comp.home-networking,
'Alex Fraser' wrote:

>> See http://www.ibr.cs.tu-bs.de/cgi-bin/sbrowser.cgi

>
>To expand a little, OIDs under the above should have corresponding ones with
>the interface index under 1.3.6.1.2.1.4.20.1.2. AIUI it's permissable for an
>interface index to change when the system is reinitialised, but IME that
>doesn't happen unless the hardware is changed, and that won't happen in a
>router. So, as a one-off, you can manually find the interface index for the
>router's WAN port. Then (in your DNS update client) you can poll (walking
>...1 and ...2) to find the address associated with that interface.
>
>That said, it's undoubtedly easier and probably satisfactory just to walk
>the address entries looking for a routable address.


Thanks for that. I'm currently trying to find out how the requests are
structured, but only half heartedly, as I'm sporting the latest
fashionable lurgii, the super-intense coldie-fluie one.. (

Slightly annoying as I've seen at least one presentation that described
the packets in lovely detail, discovered by accident when I was revising
for an (almost unrelated) exam, but it seems to have disappeared from my
history file..

--
Dave Johnson - (E-Mail Removed)
 
Reply With Quote
 
Alex Fraser
Guest
Posts: n/a

 
      01-10-2005, 03:16 PM
"Dave J" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In MsgID<(E-Mail Removed)> within uk.comp.home-networking,
> 'Alex Fraser' wrote:

[snip]
> Thanks for that. I'm currently trying to find out how the requests are
> structured, but only half heartedly, as I'm sporting the latest
> fashionable lurgii, the super-intense coldie-fluie one.. (


Unless you have some pressing need to construct/parse packets yourself, you
might save time by using the Net-SNMP library, http://www.net-snmp.org/.
Even if you don't want to use it, the command-line tools it comes with will
probably be useful.

Alex


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SNMP counters for external monitoring WR Windows Networking 0 08-09-2006 10:07 AM
SNMP service is running OK, but get no SNMP relevant data from ser Marlon Brown Windows Networking 0 01-18-2006 06:14 PM
MN-700 & SNMP Cody Dawg Broadband Hardware 0 01-13-2005 03:08 PM
SNMP James Thompson Broadband Hardware 1 06-25-2004 04:15 AM
SNMP help John Dollar Linux Networking 1 11-04-2003 09:51 PM



1 2 3 4 5 6 7 8 9 10 11