Binding to specific IP

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
rossmc
Posts: 2
Joined: Fri Mar 21, 2008 12:12 pm

Binding to specific IP

Post by rossmc »

I've done a search and looked around Google but have been unable to find anything so far.

I have Cacti configured on a server but I need it to work such that any SNMP requests from the Cacti server out to other devices will come from a different IP (not the eth0 IP but the IP on eth0:1).

Is there any way I can achieve this?


Thanks!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Currently not available.
You may add a new Feature Request.
This has to be done for cmd.php AND spine
Reinhard
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

I don't see how that would work. snmpget/walk/etc do not take an interface or subinterface option, so I don't see how the commands could be told to use a different interface.

This would be a network issue, and should be left at that level....
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

That's not correct. From "man snmp.conf"
clientaddr [<transport-specifier>:]<transport-address>
specifies the source address to be used by command-line applications when sending SNMP requests.
See snmpcmd(1) for more information about the format of addresses.

This value is also used by snmpd when generating notifications.
So in fact it is possible to specify the source address (only as a global option, don't know how this will work if different targets are reachable on different interfaces).
Perhaps this solves already the initial problem, because it's outside cacti at all
Reinhard
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

I still stand by the statement that the individual commands do not allow for this, so it can't be moved into Cacti....
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Linegod wrote:I still stand by the statement ... it can't be moved into Cacti....
Yep, didn't I say this? But it IS possible to direct ALL snmp* commands to use the specified interface. Still not sure, how spine will work. I bet it will NOT use the specified interface. But that's one for Larry
Reinhard
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

gandalf wrote:Yep, didn't I say this? .... I bet it will NOT use the specified interface.
Guess you did....

I as well doubt spine will use the specified interface....
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
sigey
Posts: 25
Joined: Mon Feb 14, 2005 9:17 am
Location: MV
Contact:

Post by sigey »

yes gandalf definitely you can define a source interface to as per snmpd.conf
a harder way maybe to use netfilter:iptables post-routing :D
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

I think clarification is needed.

Utilities such as the ones Cacti can use:

snmpget
snmpwalk
snmpbulkget
snmpbulkwalk

These are the utilities of concern. I don't know the syntax, but I don't recall these paying much attention to a configuration file. And I know they will not pay attention to snmpd.conf. Maybe snmp.conf, but I'm uncertain.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests