This is a discussion on Sending Informs with fixed source ports within the SNMP Coders forums, part of the Networking and Network Related category; This is a multi-part message in MIME format. --===============1725999064== content-class: urn:content-classes:message Content-Type: multipart/alternative; ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
This is a multi-part message in MIME format.
--===============1725999064== content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C7916F.0DB76554" This is a multi-part message in MIME format. ------_=_NextPart_001_01C7916F.0DB76554 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, =20 The initial Problem: ----------------------------- Inform ACKs are block by my Firewall. =20 Net-SNMP sends out an Infrom : [port X] --> [port 162] Std. Infrom receiver replies: [port Y] --> [port X] =20 * X,Y are random ports. =20 Solution concept: -------------------------- AMke net-snmp send the Informs from fixed source-ports. So that we can allow the predefined UDP ports in the Firewall =20 =20 Implementation outline: ------------------------------------ 1) I'm using the snmpNotifyMIB and snmpTargetMIB for sending traps. =20 2) Becasue net-snmp maintains an open session for each Infrom receiver, and each such session binds to a certain port to be re-used for sending out Informs, it seems that I need a different port for each Inform receiver. (In my case I limit the receivers' number to 3, so I'll predefine 3 ports.) =20 3) I thought that in get_target_sessions() (target.c), I can set the [localname , local_port] in the netsnmp_session structure of each receiver, when the session is created. =20 It doesn't seem to be working very neatly. I'm working on it. =20 =20 Quesitons: ---------------- 1) Does this make sence? 2) Can all Infrom-receivers be using the same session? (So I can use only 1 port) =20 P.S: I also would like to disable the engineID Probe which is not really needed since we can take the engineID from the USM table of the appropriate user. Any ideas about that? (I thought I can access the USM table also in the get_target_sessions() and set the appropriate securityEndingID. =20 Thanks, Erez. =20 ------_=_NextPart_001_01C7916F.0DB76554 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dus-ascii"> <META content=3D"MSHTML 6.00.2900.2963" name=3DGENERATOR></HEAD> <BODY> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2>Hi,</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>The = initial=20 Problem:</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2>-----------------------------</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>Inform = ACKs are=20 block by my Firewall.</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial = size=3D2>Net-SNMP sends out=20 an Infrom : [port X] --> [port 162]</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>Std. = Infrom receiver=20 replies: [port Y] --> = [port=20 X]</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>* X,Y = are random=20 ports.</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial = size=3D2>Solution=20 concept:</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2>--------------------------</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>AMke = net-snmp=20 send the Informs from fixed source-ports.</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>So = that we can allow=20 the predefined UDP ports in the Firewall</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial = size=3D2>Implementation =20 outline:</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2>------------------------------------</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>1) I'm = using the=20 snmpNotifyMIB and snmpTargetMIB for sending traps.</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>2) = Becasue net-snmp=20 maintains an open session for each Infrom receiver,</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial = size=3D2> =20 and each such session binds to a certain port to be re-used for sending = out=20 Informs,</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial = size=3D2> =20 it seems that I need a different port for each Inform=20 receiver.</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial = size=3D2> =20 (In my case I limit the receivers' number to 3, so I'll predefine 3=20 ports.)</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>3) I = thought that in=20 get_target_sessions() (target.c),</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial = size=3D2> I=20 can set the [localname , local_port] in the netsnmp_session = structure of=20 each receiver,</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial = size=3D2> when=20 the session is created.</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007> <FONT = face=3DArial=20 size=3D2>It doesn't seem to be working very neatly. I'm working on=20 it.</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007></SPAN><SPAN=20 class=3D800402712-08052007></SPAN><SPAN = class=3D800402712-08052007></SPAN><SPAN=20 class=3D800402712-08052007><FONT face=3DArial = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2>Quesitons:</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2>----------------</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>1) = Does this make=20 sence?</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>2) Can = all=20 Infrom-receivers be using the same session? (So I can use only 1=20 port)</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2>P.S:</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>I also = would like to=20 disable the engineID Probe which is not really needed since we can take = the=20 engineID from the USM table of the appropriate user.</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial size=3D2>Any = ideas about=20 that? (I thought I can access the USM table also in the = get_target_sessions()=20 and set the appropriate securityEndingID.</FONT></SPAN></DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D800402712-08052007><FONT face=3DArial = size=3D2></FONT></SPAN><SPAN=20 class=3D800402712-08052007><FONT face=3DArial = size=3D2>Thanks,</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft> <DIV class=3DMsoNormal dir=3Dltr align=3Dleft><FONT face=3DArial = size=3D2><SPAN=20 class=3D800402712-08052007>Erez.</SPAN></FONT></DIV></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML> ------_=_NextPart_001_01C7916F.0DB76554-- --===============1725999064== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ --===============1725999064== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders --===============1725999064==-- |
![]() |
| Thread Tools | |
| Display Modes | |
|
|