tag:blogger.com,1999:blog-75405218732097153562024-03-14T15:29:08.531+05:30For the Curious .............Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.comBlogger50125tag:blogger.com,1999:blog-7540521873209715356.post-60047643639823583442016-01-05T12:27:00.002+05:302016-04-27T13:36:21.485+05:30Books on OpenStack<div dir="ltr" style="text-align: left;" trbidi="on">
Its been forever since I have updated anything on this blog. So what was I doing in all that time ?<br />
<br />
I thought, i would introduce myself to the world of writing a bit more professionally, so I wrote a book on Learning OpenStack<br />
<br />
The book is available on Amazon or the Publishers website (eBook $5 - Limited Time) <br />
<br />
https://www.packtpub.com/virtualization-and-cloud/learning-openstack<br />
<br />
I hope you enjoy it. Please let me know if you do have questions on the book and i will attempt to answer them here in the comments<br />
<br />
<br />
The next book on learning trove will soon be out, so keep your fingers crossed<br />
<br />
<br />
Update:<br />
<br />
The next one is also out - I hope you enjoy it<br />
<br />
http://www.amazon.com/OpenStack-Trove-Essentials-Alok-Shrivastwa/dp/1785285610<br />
<br />
<br />
<br />
<br /></div>
Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com11tag:blogger.com,1999:blog-7540521873209715356.post-61256525818717425792015-04-29T16:23:00.001+05:302015-04-29T16:27:48.616+05:30Kaise Tumhare Dar Hum Aaye<p>We have been engrossed so much in the material world that without His grace there is no way of pulling ourselves up. A song dedicated to this feeling …. <p>Kaise tumhare dar hum aaye <br>Kis vidhi tere darshan paye <br>Kai janmo se aas lagaye <br>Aan milo hari daras dikahye <p>Kaise tumhare dar hum aaye <br>Kis vidhi tere darshan paye <p>Prabhu Pankaj tum Keechad jaise <br>milenge tumko bolo kaise <br>Duniye aise prashn uthaye <br>laj rakho prabhu ab ur aaye <p>Kaise tumhare dar hum aaye <br>Kis vidhi tere darshan paye <p>janam janam se daag lagaye<br>aham dambh hum tyaag na paye <br>nirmal karo hume apnaye <br>tere bina nahi koi sahaye <p>Kaise tumhare dar hum aaye </p> Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com2tag:blogger.com,1999:blog-7540521873209715356.post-26396115054024063642015-04-13T20:51:00.001+05:302015-04-29T16:28:41.409+05:30Exposing a SQL DB through a WCF Service using Entity Framework<p>Its been a long time since I have written a blog. I had to implement a SQL database for an application and we needed to have exposed as a WCF endpoint. While there are several tutorial on how to do this, i thought it will be a good idea to show the simple and the quick way that we followed </p> <p>Things needed</p> <ul> <li>SQL Server</li> <li>Microsoft Visual Studio 2012 </li></ul> <p>This are two parts, creating the service and then the Client DLL. </p> <p><strong>Part 1 : Creating the WCF Service</strong> </p> <p><strong>Step 1: Create the Database</strong></p> <p>Create a SQL database, its tables, its relationships as you normally would.If there are any tables with binary columns, then please be informed that it should be excluded from the WCF service. </p> <p><strong>Step 2: Creating the EDMX file</strong> </p> <p>Create a new <strong>ASP.NET Empty Web Application</strong> in a new solution, call it what you like, I am it the TestDataModel</p> <p>Once this is done, its time to add the EDMX file. In order to do so Right click and add new item.</p> <p><a href="http://lh6.ggpht.com/-0DT99Bf_Bss/VSveUl3YlnI/AAAAAAAAE_g/VP2_4D3IGyk/s1600-h/image%25255B6%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh3.ggpht.com/-Wq3vAJhne2c/VSveVrmln5I/AAAAAAAAE_o/7iiC2lPqyzg/image_thumb%25255B2%25255D.png?imgmax=800" width="244" height="72"></a> </p> <p>Choose ADO.NET Entity Data model and give it the name TestDataModel.edmx </p> <p>Select Generate from Database </p> <p>Fill in the DB details </p> <p><a href="http://lh5.ggpht.com/-m_yuyoZe5Go/VSveWeZ0EQI/AAAAAAAAE_w/oDcZiyXfHTs/s1600-h/image%25255B9%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh5.ggpht.com/-A8lv3LkYPFY/VSveXbqcXVI/AAAAAAAAE_4/0DJporizOdI/image_thumb%25255B3%25255D.png?imgmax=800" width="179" height="244"></a> </p> <p>You can change the name of the entities, we are leaving it as it is </p> <p><a href="http://lh4.ggpht.com/-dg_urQSwD3U/VSveX7XF_8I/AAAAAAAAFAA/pAz9vLLQz88/s1600-h/image%25255B12%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh5.ggpht.com/-wPnbrADnnSA/VSveYvuLDmI/AAAAAAAAFAI/PQM2vF84SgU/image_thumb%25255B4%25255D.png?imgmax=800" width="244" height="178"></a> </p> <p>Choose the tables you want to expose using the WCF </p> <p><a href="http://lh6.ggpht.com/-PHo8o5Va_YM/VSveZcutAFI/AAAAAAAAFAQ/yFkK-wTnZa0/s1600-h/image%25255B15%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh5.ggpht.com/-MauS4M_O9Hs/VSveZ9BWJOI/AAAAAAAAFAY/GXKfwe6C7WQ/image_thumb%25255B5%25255D.png?imgmax=800" width="244" height="151"></a> </p> <p>You can please note the Model Namespace, or change it. Once you finish the step will be done </p> <p> </p> <p><strong>Step 2: Add a Nuget Package.</strong> </p> <p>In order to create the WCF, just add the entity framework nuget package. Right click on references, and Click on manage Nuget Packages </p> <p> </p> <p>Download and install the WCF Data Services Server </p> <p><a href="http://lh4.ggpht.com/-cX9YqEQbDFU/VSvea3yBJAI/AAAAAAAAFAg/FDmXUfxCpb8/s1600-h/image%25255B21%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh3.ggpht.com/-gZr-VcyZfXc/VSvebRjSGPI/AAAAAAAAFAo/QGew_qCW-PQ/image_thumb%25255B7%25255D.png?imgmax=800" width="244" height="188"></a> </p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p>This will install all the OData Components needs by our project</p> <p><a href="http://lh4.ggpht.com/-AyriHAtml1E/VSvecXMnxlI/AAAAAAAAFAw/dHvnP4GrE4s/s1600-h/image%25255B24%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh3.ggpht.com/-pEO5OMFpnhA/VSvecy0kzuI/AAAAAAAAFA4/Aq2L1zljd5c/image_thumb%25255B8%25255D.png?imgmax=800" width="244" height="153"></a> </p> <p>Step 3: Create the Data Service </p> <p>Right Click the Project Name –> Add –> WCF Data Service </p> <p><a href="http://lh6.ggpht.com/-5QJddWb1dUM/VSvee25DdXI/AAAAAAAAFBA/6q1qojTEUt4/s1600-h/image%25255B27%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh5.ggpht.com/-F1zOTy326tY/VSveh8t-V_I/AAAAAAAAFBI/NBh121rH_Vo/image_thumb%25255B9%25255D.png?imgmax=800" width="244" height="163"></a> </p> <p>Give it a name – I am calling it AzMgmtDataService (as my database is called AZMGMT) </p> <p><a href="http://lh6.ggpht.com/-evUh2KT2qqs/VSveiu2sSuI/AAAAAAAAFBQ/HgLN4ApPi8g/s1600-h/image%25255B30%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh6.ggpht.com/-BadflSLD9_4/VSvejOtGyfI/AAAAAAAAFBY/xYVFPmch8sk/image_thumb%25255B10%25255D.png?imgmax=800" width="244" height="85"></a> </p> <p>This will create a file and open it </p> <p><a href="http://lh6.ggpht.com/-ll9dCFk5vc0/VSvejoQAhwI/AAAAAAAAFBg/Ut1PKNEvFik/s1600-h/image%25255B33%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh5.ggpht.com/-Q4NrMkLoVcM/VSvekVGQBpI/AAAAAAAAFBo/e_-cme4rBzQ/image_thumb%25255B11%25255D.png?imgmax=800" width="244" height="171"></a> </p> <p>There are 2 main changes that we will do </p> <p><a href="http://lh4.ggpht.com/-X00puNz-2l0/VSvelHvYgVI/AAAAAAAAFBw/I5Jz0LqVAac/s1600-h/image%25255B36%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh4.ggpht.com/-epBtJ3n1Jak/VSvelowKPfI/AAAAAAAAFB4/PmlH0j5qsmo/image_thumb%25255B12%25255D.png?imgmax=800" width="244" height="122"></a> </p> <p>1. Put the Name of the data source class – in this case azmgmtEntities and setting the rights – I am going to give rights to every one for the sake of simplicity. </p> <p><a href="http://lh6.ggpht.com/--PP1GysD6wA/VSvemVvdR8I/AAAAAAAAFCA/IMIy5eMhGgQ/s1600-h/image%25255B40%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh5.ggpht.com/-kI9EQx2zDRo/VSvenC7BxXI/AAAAAAAAFCI/PYkjBnOnxSI/image_thumb%25255B14%25255D.png?imgmax=800" width="502" height="189"></a></p> <p>Notice the two lines that are written. First one gives the rights to all users, off course you can fine tune this line. The second line is optional, i leave it on for testing so that I can check the entity framework errors from the client. In production environment, please set the line to false </p> <p> </p> <p>That’s it, the WCF service is ready, you can deploy it in a manner you choose fit. Run a debug and it should open a browser. </p> <p>It may show a 404 not found or a forbidden page, please ensure the service name (WCF service name is provided in the URI) </p> <p><a href="http://lh5.ggpht.com/-DOGG7Ku9nhQ/VSveno4D_gI/AAAAAAAAFCQ/dBjVWVEXadM/s1600-h/image%25255B43%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh6.ggpht.com/-AIWguLCzr1o/VSveoXbBXII/AAAAAAAAFCY/XEJzaZp6fKc/image_thumb%25255B15%25255D.png?imgmax=800" width="219" height="128"></a> </p> <p>In my case, I added /AzmgmtDataService.svc </p> <p><a href="http://lh5.ggpht.com/-4GK6m9yiHvc/VSvepO-RhtI/AAAAAAAAFCg/xT3QHqhVpuA/s1600-h/image%25255B47%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh3.ggpht.com/-4hT4QaUPQys/VSvep5lgkNI/AAAAAAAAFCo/NAgz-qGmVVs/image_thumb%25255B17%25255D.png?imgmax=800" width="409" height="360"></a> </p> <p>This shows that the WCF service is working. You can use Linqpad to test it.</p> <p><a href="http://lh6.ggpht.com/-Mm79hhRvPu0/VSvergO8mRI/AAAAAAAAFCw/G0U15Nu70mg/s1600-h/image%25255B51%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh6.ggpht.com/-7usK7ALyBYk/VSvesXutu2I/AAAAAAAAFC4/LHhgHUkRfIc/image_thumb%25255B19%25255D.png?imgmax=800" width="528" height="251"></a> </p> <p> </p> <p><strong>Part 2: Creating the Client DLL</strong> </p> <p>This is an optional step, but I recommend it as it makes the client applications easy to use. </p> <p>We will use a visual studio utility (DataSvcUtil.exe)to generate a client class</p> <p>Open a Visual Studio command prompt and execute </p> <p>DataSvcUtil.exe /out:ClientClass.cs /uri:”http://localhost:57125/AzMgmtDataService.svc” </p> <p><a href="http://lh4.ggpht.com/-uWLArTPDBxk/VSvetmN2DuI/AAAAAAAAFDA/BV4pLpzeqUY/s1600-h/image%25255B58%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh4.ggpht.com/-RA_Fvyt1Beg/VSveuT7TEJI/AAAAAAAAFDI/EHrrP5zsQEc/image_thumb%25255B22%25255D.png?imgmax=800" width="680" height="161"></a> </p> <p> </p> <p>You should get a clientclass.cs file created </p> <p>The File should look like this </p> <p><a href="http://lh6.ggpht.com/-CKq4mQ-dFMQ/VSveveQZUdI/AAAAAAAAFDQ/97Ut9FQ6NNY/s1600-h/image%25255B62%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh4.ggpht.com/-gcLkwibbjiM/VSvewV0nIVI/AAAAAAAAFDY/C7pV4EEPNY8/image_thumb%25255B24%25255D.png?imgmax=800" width="488" height="277"></a> </p> <p>Add a new project to the solution of the type Class Library. Call it AzmgmtDataModelClient</p> <p>Copy paste the contents to the Class1.cs – Rename the class1.cs as AzmgmtDataModelClient.cs</p> <p> </p> <p>Add the references </p> <p> </p> <p><a href="http://lh3.ggpht.com/-DKdc4OSGAUQ/VSvexzf8VfI/AAAAAAAAFDg/2i6sWKKAbVo/s1600-h/image%25255B66%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh6.ggpht.com/-_xmfFEMNK_E/VSve136jY4I/AAAAAAAAFDo/oVHdYmPGskA/image_thumb%25255B26%25255D.png?imgmax=800" width="617" height="154"></a></p> <p>Build the Client Project. You will have got the DLL file to use it in your applications </p> <p> </p> <p><strong>FINAL (Optional)</strong></p> <p>The below shows how to use the client in other applications. So we create a test console application to do this </p> <p>Add a new project of the type Console application. Add the references (All the microsoft Odata references that we added in the client class and additionally the client dll) </p> <p>We will add two lines of code </p> <p><a href="http://lh3.ggpht.com/-iMv_pTG9z4U/VSve2cj2-fI/AAAAAAAAFDw/T-959j6bJxc/s1600-h/image%25255B70%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh4.ggpht.com/-v98XHpVqU1o/VSve3MZkGbI/AAAAAAAAFD4/fApFsbw3ZYc/image_thumb%25255B28%25255D.png?imgmax=800" width="677" height="166"></a> <p>Please remember that your entities name, URL and the object name will be different. In my case, I have a table called BusinessUnit in the DB that I want to use.I can use a LINQ query in order to filter my results <p> <p><strong>Setting up multiple projects for debug: </strong>Please remember that the Web Project needs to run so that the client DLL can access it. so, we need to run both projects simultaneously, so, right click on the solution and select properties <p> <p><a href="http://lh4.ggpht.com/-EdBQBMpPvtU/VSve31oFyeI/AAAAAAAAFEA/yyK6LsGvt60/s1600-h/image%25255B74%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh5.ggpht.com/-iYOl2VfnlUk/VSve4ve_CWI/AAAAAAAAFEI/zBXocg42IHk/image_thumb%25255B30%25255D.png?imgmax=800" width="476" height="193"></a> </p> <p>In my case, i want to debug only my test application. The client generation project doesnt need to be debugged at all.</p> <p>Click on the debug button and you will see a webpage and a console open. Since I have set a breakpoint in my console application its waiting for me </p> <p><a href="http://lh5.ggpht.com/-y4Lebm_Y1Lk/VSve5erMUhI/AAAAAAAAFEQ/AUuBeDqEtNo/s1600-h/image%25255B78%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh3.ggpht.com/-lUMBLSJrL1w/VSve6agqNLI/AAAAAAAAFEY/K8ppfvnLyRI/image_thumb%25255B32%25255D.png?imgmax=800" width="450" height="309"></a> </p> <p>As you can see the application is working as intended.</p> <p> </p> <p> </p> <p>I hope this has been the easiest way to expose a database using the WCF service. If you have any questions do let me know. </p> Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com0tag:blogger.com,1999:blog-7540521873209715356.post-13380220621301725512014-09-27T03:14:00.001+05:302015-04-29T16:29:00.797+05:30Outlook 2010 – Add Conference Details to Appointments<p align="justify">Are you a project manager. Do you use Outlook to create meetings every day and have Teleconferencing info and Web Conference Details. I am sure you do a lot of copy pasting and are always eager to ensure that you have sent the correct details. </p> <p align="justify">Well, good news ! I created an Outlook Add-In for it (I have tested it for Outlook 2010 – If you are interested,Leave a comment I will post the Outlook 2013 version and you can test it for me ). </p> <p align="justify">Please download it from <a href="http://bit.ly/1qDJhMu" target="_blank">HERE</a></p> <p align="justify">The Add-In should be fairly easy to install once you download it. </p> <p align="justify">Here are some instructions </p> <ul> <li> <div align="justify">Unzip and Click on the Setup.exe, The installation should be fairly quick </div></li> <li> <div align="justify">Once you have installed , Please restart your Outlook.exe (If already running, If not, just start it) </div></li> <li> <div align="justify">Try and create a new appointment / calendar invite </div></li> <li> <div align="justify">You will see a new Tab in the ribbon called the “My Teleconference” (if you don’t see this, ensure you have restarted the Outlook. If it still doesn’t work, it might not have installed properly </div></li></ul> <p align="justify"><a href="http://lh3.ggpht.com/-PVAIODPd3IA/VCXeMbGg7oI/AAAAAAAAEz0/kgoiCgIuBpE/s1600-h/image%25255B3%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto" border="0" alt="image" src="http://lh4.ggpht.com/-0NgzshpijRI/VCXeM8fzIGI/AAAAAAAAEz4/zrfPKyT8cho/image_thumb%25255B1%25255D.png?imgmax=800" width="390" height="131"></a> </p> <ul> <li>Please click on Configure/Change – You will get the settings window. Fill in the details and click on Save Settings</li></ul> <p><a href="http://lh5.ggpht.com/-HiPB5xzEzFo/VCXeNJ-79EI/AAAAAAAAE0A/lPxudz9gI80/s1600-h/image%25255B8%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto" border="0" alt="image" src="http://lh4.ggpht.com/-o4uLafjcrtc/VCXeNmRMD5I/AAAAAAAAE0I/zXmqsA2ErfQ/image_thumb%25255B4%25255D.png?imgmax=800" width="409" height="233"></a></p> <ul> <li>After you are done, you can from then on use the Fill Telecon Details on any Calendar appointment and it will fill the details </li></ul> <p>NOTE: Please be advised, that the body will be added to and not replaced, so you don’t loose what you were typing. However, if you click multiple times, the conference details will also be added multiple times </p> <p>The below shows the output</p> <p><a href="http://lh3.ggpht.com/-0Cr255g51ew/VCXeNw-W6LI/AAAAAAAAE0Q/Wqx9VxgMt5A/s1600-h/image%25255B15%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh5.ggpht.com/-eb5lvmjzCBM/VCXeOgoRsZI/AAAAAAAAE0c/TRxJI1WVGaM/image_thumb%25255B7%25255D.png?imgmax=800" width="454" height="355"></a> </p> <p></p> <p></p> <p>I hope this is helpful. If you would like more features, do leave it in the comments. </p> <p>Till next time …. </p> Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com0tag:blogger.com,1999:blog-7540521873209715356.post-58340530536206823642014-06-03T03:02:00.001+05:302014-06-03T03:02:55.391+05:30VMware vCAC Dynamic Property Dictionaries<p align="justify"> </p> <p align="justify">Hello, Its been a long time since I have blogged about some thing, so I thought, I would make up for it with a small goodie. If you have used vCAC, I am sure you have used property dictionaries. Now for the un-initiated, property dictionaries in vCAC (version 5.1 – 6.0.1) have all a single purpose, in order to get an input from the user while requesting a machine. </p> <p align="justify">This is by far one of the most helpful OOB (Out of Box features) for customizing the front end form. I wouldn’t take much time by explaining what this is – There have been enough blogs for that </p> <p align="justify">Please read </p> <p align="justify"><a title="http://www.virtualjad.com/2013/05/vcac-property-dictionary-customize.html" href="http://www.virtualjad.com/2013/05/vcac-property-dictionary-customize.html">http://www.virtualjad.com/2013/05/vcac-property-dictionary-customize.html</a> to understand what I am talking about. </p> <p align="justify">When you get to the part of creating an XML, continue reading the blog </p> <p align="justify">However, I have written a quick utility for you to download and generate the XML using a CSV file. I am sure the CSV file will be much easier to understand, manage, etc. </p> <p align="justify">Download the XML Generator from <a href="http://bit.ly/1oP8oAD" target="_blank">HERE</a></p> <p align="justify">Once you have downloaded, and started the software (You will need .Net 4.0 – No features are being used of .Net, however, my VS defaulted to that :) – In a planned upgrade, I will let you connect to your vCAC instance and even apply the configuration – This will then be upgraded to .NET 4.5 for vCAC 5.2 and vCAC 6.0) </p> <p align="justify">For now, here is how you would use it. </p> <p align="justify"><a href="http://lh5.ggpht.com/-K4xfOqWH1UU/U4ztZRSLRXI/AAAAAAAAEvw/-CUP5Pwq558/s1600-h/image%25255B2%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh4.ggpht.com/-1H1cZoAxl1I/U4ztZxZIM7I/AAAAAAAAEv4/vxUBHHU30UM/image_thumb.png?imgmax=800" width="101" height="119"></a> <a href="http://lh3.ggpht.com/-KPZ9RXr3acg/U4ztahz8wnI/AAAAAAAAEv8/LPE4IgrOkTY/s1600-h/image%25255B13%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh3.ggpht.com/-NZjcXQQEJ6Q/U4ztbEAKUxI/AAAAAAAAEwI/fKMZf0H-8SQ/image_thumb%25255B5%25255D.png?imgmax=800" width="364" height="128"></a> </p> <p align="justify">Create an CSV file (You could use Excel to do that) </p> <p align="justify"><a href="http://lh6.ggpht.com/-NiW6-SzqBA4/U4ztbkfzILI/AAAAAAAAEwQ/jr9qrzOOZYQ/s1600-h/image%25255B18%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh6.ggpht.com/-1wVcGA-iW0Y/U4ztcCAhC_I/AAAAAAAAEwU/RDvTAiImUKM/image_thumb%25255B8%25255D.png?imgmax=800" width="385" height="138"></a> </p> <p align="justify">The if you don’t have a format of the CSV, you could click on the tools Download Sample CSV to get the file. Off course, for the values, you can either put them one per line or use a pipe (“|”) as a delimiter to put in more than one values (The pipe will be considered as a delimiter), thus giving you the freedom, the XML will however be generated. </p> <p align="justify">Once you have saved your CSV</p> <p align="justify">Select the Input file and give a name for the Output. (Please remember the output file will be saved in the same location as the input file) </p> <p align="justify"><a href="http://lh3.ggpht.com/-08x_YIENbg8/U4ztchTEJnI/AAAAAAAAEwg/XhLwy3UXFmA/s1600-h/image%25255B26%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh6.ggpht.com/-mKyYTsXyJeE/U4ztdTREDbI/AAAAAAAAEwo/iDyK2fKb2lk/image_thumb%25255B12%25255D.png?imgmax=800" width="420" height="149"></a> </p> <p align="justify">Once you click on Generate, you will get the XML file. Please remember you cannot use this XML file directly – This is only for you to see. (And potentially backup)</p> <p align="justify"><a href="http://lh4.ggpht.com/-Lh2NIGEH4r0/U4ztd8A8d4I/AAAAAAAAEww/E-7ByNF8h9g/s1600-h/image%25255B31%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh6.ggpht.com/-AnlX2vgK2Gw/U4zteZ9YlhI/AAAAAAAAEw4/Y6y2r9YCOwc/image_thumb%25255B15%25255D.png?imgmax=800" width="337" height="312"></a> </p> <p align="justify">In order to generate a XML file directly, Please check the “Single Line” Checkbox and generate. Voila … You get a single line XML, which you can use in vCAC system directly </p> <p align="justify"><a href="http://lh3.ggpht.com/-wqsDkUr_NKg/U4ztfPDWQEI/AAAAAAAAEw8/5hXPzPZr-mU/s1600-h/image%25255B35%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh3.ggpht.com/-YnN9RIl7iHw/U4ztf0jfOPI/AAAAAAAAExI/5cj7kvixHYg/image_thumb%25255B17%25255D.png?imgmax=800" width="433" height="206"></a> </p> <p align="justify"><a href="http://lh5.ggpht.com/-IBWgG8TBiLU/U4zthBsAcZI/AAAAAAAAExM/Rt4551G5qCo/s1600-h/image%25255B39%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh6.ggpht.com/-MOr8LlY8rx4/U4ztheeoj1I/AAAAAAAAExU/c_WXzidOERY/image_thumb%25255B19%25255D.png?imgmax=800" width="575" height="50"></a> </p> <p align="justify"> </p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p>This is a quick tool i wrote, and is not extensively bug checked. If you face any issues, Please let me know in comments. </p> <p>If you have any more comments / questions, do let me know</p> <p>Till next time – Be Curious. </p> <p></p> <p> </p> <p> <div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:0e055eee-64bd-4039-bc85-940d8aa40caa" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px">Technorati Tags: <a href="http://technorati.com/tags/vCAC" rel="tag">vCAC</a>,<a href="http://technorati.com/tags/Vmware" rel="tag">Vmware</a>,<a href="http://technorati.com/tags/Property+Dictionary" rel="tag">Property Dictionary</a>,<a href="http://technorati.com/tags/Dynamic+Menu" rel="tag">Dynamic Menu</a></div></p> Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com2tag:blogger.com,1999:blog-7540521873209715356.post-65837516527931602192014-02-17T08:31:00.001+05:302014-02-17T08:31:39.779+05:30Exporting Contacts out of Blackberry with Windows Contacts<p align="justify">So, you are trying to get your contacts out of your blackberry and sync it to your Android / iPhone / Windows Phone, or just want to sync it to your Google account for backup purposes. Here are a few tips that will get you started – I have just enumerated some methods.</p> <h3>Option 1: Use Blackberry Desktop 6 (Manual)</h3> <p align="justify"> (Not the most updated software) – It can directly export out your contacts out in the CSV Format. Please read the official How-To <a href="https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCMQFjAA&url=http%3A%2F%2Fbtsc.webapps.blackberry.com%2Fbtsc%2FKB24488&ei=hXIBU5tJ5-WIB-b2gcAB&usg=AFQjCNEZXxYH-FNocXRtNfVbQLZxouf6-w" target="_blank">here</a></p> <h3>Option 2: Using Blackberry Desktop 7 (Manual)</h3> <p align="justify">If you have a Blackberry Desktop 7 – Which most likely you may end up having, here is how you can do it – For people who don’t want to use the sync (Option 3)</p> <h2>Step 1: Backup BB Contacts to Windows Contacts </h2> <h2></h2> <ul> <li> <div align="justify">Connect your Phone to your Windows (Assuming you have Windows 7/8/8.1) </div></li> <li> <div align="justify">Click On Organizer </div></li> <ul> <li> <div align="justify"><a href="http://lh3.ggpht.com/-rx9wWE70hE4/UwF7XnkPcXI/AAAAAAAAEqo/45cqKOUUmC0/s1600-h/image%25255B6%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto" border="0" alt="image" src="http://lh6.ggpht.com/-7aeyYc4fXok/UwF7Yot2agI/AAAAAAAAEqw/Tjc_MFIX6fU/image_thumb%25255B4%25255D.png?imgmax=800" width="181" height="208"></a> </div></li></ul> <li> <div align="justify">Select Configure </div></li></ul> <p align="justify"><a href="http://lh4.ggpht.com/-2dXtEW2plWQ/UwF7ZS8JwJI/AAAAAAAAEq4/US3o4pglNi8/s1600-h/image%25255B13%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto" border="0" alt="image" src="http://lh5.ggpht.com/-RXzqZJQN3DA/UwF7aOInfSI/AAAAAAAAErA/b6H8EOBfr1s/image_thumb%25255B7%25255D.png?imgmax=800" width="244" height="31"></a> </p> <p align="justify"><a href="http://lh3.ggpht.com/-HmcQV8iXkoM/UwF7bEhF65I/AAAAAAAAErI/CX5RkID4JoA/s1600-h/image%25255B14%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto" border="0" alt="image" src="http://lh6.ggpht.com/-8gv3GusnTrA/UwF7b6HdRLI/AAAAAAAAErM/quQAoMiaKIQ/image_thumb%25255B8%25255D.png?imgmax=800" width="244" height="140"></a></p> <ul> <li> <div align="justify">Select “One-Way to Your Computer and Windows Contacts (You may Sync it to your outlook, but that’s not covered in this blog) </div></li></ul> <p></p> <p></p> <p><a href="http://lh5.ggpht.com/-KHxKouOvpVg/UwF7ckr5h9I/AAAAAAAAErY/OA03kuK_Do8/s1600-h/image%25255B18%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto" border="0" alt="image" src="http://lh5.ggpht.com/-sLNmtdHghzc/UwF7dkaJDAI/AAAAAAAAErg/zP3sIP0F8X8/image_thumb%25255B10%25255D.png?imgmax=800" width="244" height="214"></a></p> <ul> <li>Click on Sync Organizer (Sync All) on the bottom right of window. </li></ul> <p>This step is now complete – The Contacts will now be in your windows contacts folder in windows 7 /8 /8.1 and Outlook Express (Address Book) in the prior version of windows</p> <h2>Step 2: Export Windows 7/8 Contacts to CSV</h2> <p> This is the next step in the process. Please open the contacts folder </p> <ul> <li>Press Windows Key + R (To open Run window)</li> <li>Type in the run window (Without the quotes) “%SYSTEMDRIVE%\Users\%USERNAME%\Contacts”</li> <li>This will open your contacts directory </li></ul> <p><a href="http://lh6.ggpht.com/-ojP_VUf7jWY/UwF7eS7T6EI/AAAAAAAAEro/guhlHcKpGAM/s1600-h/image%25255B21%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto" border="0" alt="image" src="http://lh3.ggpht.com/-U8BlppX6Cb0/UwF7fCih1qI/AAAAAAAAErs/zuGYVe-NnUA/image_thumb%25255B11%25255D.png?imgmax=800" width="244" height="96"></a></p> <ul> <li>Click on the “>>” on the top pane and click on export to CSV </li></ul> <p><a href="http://lh4.ggpht.com/-7_KIVmpBUQE/UwF7fpVAUQI/AAAAAAAAEr4/GATCpqIdUkM/s1600-h/image%25255B24%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh4.ggpht.com/-Z5ftCvlv820/UwF7gVKVfZI/AAAAAAAAEsA/L93ImxxDNso/image_thumb%25255B12%25255D.png?imgmax=800" width="244" height="164"></a> <a href="http://lh6.ggpht.com/-UAA5RlHOi1Y/UwF7hE8IK4I/AAAAAAAAEsI/xXIzDjo3JVE/s1600-h/image%25255B27%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://lh6.ggpht.com/-FzVWY81Px9w/UwF7hyjh2qI/AAAAAAAAEsQ/PxcuNJVFufE/image_thumb%25255B13%25255D.png?imgmax=800" width="244" height="125"></a> </p> <ul> <li>Save the CSV file as backup of your Contacts </li></ul> <p> </p> <h2>Step 3: Import the Contacts in G-Mail </h2> <ul> <li>Open <a href="http://google.com/contacts">http://google.com/contacts</a></li> <li>Click on “More” and Import </li></ul> <p><a href="http://lh6.ggpht.com/-3IpdtFtmTfg/UwF7iWuXPjI/AAAAAAAAEsY/oSwPHl6XNnI/s1600-h/image%25255B30%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto" border="0" alt="image" src="http://lh4.ggpht.com/-78QF7VoWSf4/UwF7i4uLDWI/AAAAAAAAEsg/dooWhHpH9Og/image_thumb%25255B14%25255D.png?imgmax=800" width="244" height="69"></a> </p> <ul> <li>Choose the CSV file </li></ul> <p><a href="http://lh4.ggpht.com/-QVbA1srfeUo/UwF7jmyIiXI/AAAAAAAAEso/pB921ItVfDs/s1600-h/image%25255B33%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto" border="0" alt="image" src="http://lh4.ggpht.com/-FQC57pvxliw/UwF7kQPtsRI/AAAAAAAAEsw/hDm_s5NGDPE/image_thumb%25255B15%25255D.png?imgmax=800" width="244" height="124"></a></p> <p align="justify">Hit Import and in a few moments, your contacts will be in your Google account. Now, the contacts will be synced any where you configure to do so, in your Windows Phone, iPhone or Android or simply can act as a backup of your contacts. </p> <p align="justify"> </p> <h3>Option 3. Automatic Google Contact Sync </h3> <ul> <li>Go to <a title="http://www.google.com/sync" href="http://www.google.com/sync">http://www.google.com/sync</a></li> <li>Install the Sync Software on your blackberry </li> <li>Sign-In </li> <li>Sync </li></ul> <p> </p> <p>I hope this has been informative, and would help you back your contacts up. Thanks for reading. Do leave comments if you face any issues.</p> <p> </p> <p> </p> <div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:570bc286-1be7-4227-90a4-0a11ef431464" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px">Technorati Tags: <a href="http://technorati.com/tags/Blackberry+Contacts+Backup" rel="tag">Blackberry Contacts Backup</a>,<a href="http://technorati.com/tags/Blackberry+Desktop+7+Contacts" rel="tag">Blackberry Desktop 7 Contacts</a>,<a href="http://technorati.com/tags/Windows+Contacts+CSV" rel="tag">Windows Contacts CSV</a></div> Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com8tag:blogger.com,1999:blog-7540521873209715356.post-42866189203641612142013-12-25T18:57:00.001+05:302013-12-29T09:05:59.833+05:30Installing 64 Bit software with Guest Agent in vCAC 5.2<div dir="ltr" style="text-align: left;" trbidi="on">
<div align="justify">
So you have set up your vCloud Automation Centre, followed the guide, put in multiple hours creating the enterprise groups, provisioning groups, reservations, blueprints, etc. Heck you have even customized / created some of the vCAC’s workflows and now, you just want to install some software after the machine is provisioned, you decide to use the Guest agent on windows. You followed some guides (i.e. The Operating guide) or <a href="http://dailyhypervisor.com/vcac-5-2-vcloud-automation-center-5-2-installing-the-5-2-guest-agent-on-windows/" target="_blank">this</a> blog </div>
<div align="justify">
<a href="http://dailyhypervisor.com/vcac-5-2-vcloud-automation-center-5-2-installing-the-5-2-guest-agent-on-windows/">http://dailyhypervisor.com/vcac-5-2-vcloud-automation-center-5-2-installing-the-5-2-guest-agent-on-windows/</a></div>
<div align="justify">
You have edited the InstallSoftware.js file (detailed in the above mentioned link) So for so good … You have for the testing purposes created a set of custom properties like given in sample and you are able to create the “Hello World “ Batch file (some thing that’s described <a href="http://dailyhypervisor.com/vcloud-automation-center-vcac-5-1-executing-scripts-with-the-windows-guest-agent/" target="_blank">here</a> )</div>
<div align="justify">
Now, you walk up to your boss and say, hey its ready! The system can now be used, your boss smiles at you happily and says, Excellent! please create a script that installs IIS 7 on the Windows 2008R2 server, we need to start with those. You happily write a Powershell script to do so and put that in the software0.install property, etc and when you run … BAM!! it fails!</div>
<div align="justify">
You try, then retry and then try again. It fails all the times, you modify the script several times, you test that the script works when you execute by hand, but some thing goes wrong when the system try’s to invoke it, you are certain this gets invoked (you log that ), but it doesnt work, you are bewildered and Googling for help, and may be then you come across this blog ;) </div>
<div align="justify">
Ok, I know the above was a little too melodramatic, however, the fact of the matter is this. If you try to invoke any 64 bit program using the vCAC Guest agent, it will FAIL :) </div>
<div align="justify">
Please note that this is true in vCAC 5.2, hopefully they will fix it in vCAC 6. But, if you are using it and its failing, look no further, you are very close to the solution … Read On … </div>
<div align="justify">
<strong>The Reason</strong> </div>
<div align="justify">
vCAC Guest Agent is a scripting agent, which means what ever you throw at it, it will execute without rhyme and reason (The only reason being that, you as an administrator told it to do so). Also, its worth noting that the agent itself is written in C++ and compiled as 32 bit. Any command that you invoke using a 32 bit software will also be 32 bit. So when you launch powershell using the guest agent to install IIS, it launches the 32 bit version of powershell and that wont be able to load the 64 bit server manager module. Hence the entire problem. Now, there is no way to change this default behaviour, because of the WOW64 (Windows On Windows), I am sure you guys have seen this folder. Please remember that when a 32 bit application makes a call, the WOW system intercepts it and invokes the executables in the %SystemDrive%Windows\SysWow64 rather than the %SystemDrive%Windows\System32 folder (which is used when you using 64 bit applications). It is marvelous that windows does this, but that prohibits us from being able to launch 64 bit applications. </div>
<div align="justify">
Ok, now you know the problem and the reason, now for the solution. The solution is in fact is very simple. I wrote a code which i call posh64.exe, which can be invoked from 32 bit / 64 bit but will run the 64bit powershell. I am going to give you the download link of the exe in this blog, but as this blog is for the curious, here is how I wrote it </div>
<div align="justify">
<strong>Writing Posh 64</strong> </div>
<div align="justify">
Open Visual Studio, Select New Project –> Windows Console Application (C#)–> Choose framework (I chose framework 2, which will be available by default on most windows machines) and I wrote this in the code </div>
<div class="csharpcode">
<pre class="alt"><span class="lnum"> 1: </span><span class="kwrd">using</span> System;</pre>
<pre><span class="lnum"> 2: </span><span class="kwrd">using</span> System.Diagnostics;</pre>
<pre class="alt"><span class="lnum"> 3: </span> </pre>
<pre><span class="lnum"> 4: </span><span class="kwrd">class</span> Program</pre>
<pre class="alt"><span class="lnum"> 5: </span>{</pre>
<pre><span class="lnum"> 6: </span> <span class="kwrd">static</span> <span class="kwrd">int</span> Main(<span class="kwrd">string</span>[] args)</pre>
<pre class="alt"><span class="lnum"> 7: </span> {</pre>
<pre><span class="lnum"> 8: </span> var p = <span class="kwrd">new</span> Process();</pre>
<pre class="alt"><span class="lnum"> 9: </span> p.StartInfo = <span class="kwrd">new</span> ProcessStartInfo(<span class="str">"PowerShell.exe"</span>, String.Join(<span class="str">" "</span>, args))</pre>
<pre><span class="lnum"> 10: </span> {</pre>
<pre class="alt"><span class="lnum"> 11: </span> UseShellExecute = <span class="kwrd">false</span></pre>
<pre><span class="lnum"> 12: </span> };</pre>
<pre class="alt"><span class="lnum"> 13: </span> </pre>
<pre><span class="lnum"> 14: </span> p.Start();</pre>
<pre class="alt"><span class="lnum"> 15: </span> p.WaitForExit();</pre>
<pre><span class="lnum"> 16: </span> </pre>
<pre class="alt"><span class="lnum"> 17: </span> </pre>
<pre><span class="lnum"> 18: </span> <span class="kwrd">return</span> p.ExitCode;</pre>
<pre class="alt"><span class="lnum"> 19: </span> }</pre>
<pre><span class="lnum"> 20: </span>}</pre>
</div>
<br />
<style type="text/css">.csharpcode, .csharpcode pre<br />{<br /> font-size: small;<br /> color: black;<br /> font-family: consolas, "Courier New", courier, monospace;<br /> background-color: #ffffff;<br /> /*white-space: pre;*/<br />}<br />.csharpcode pre { margin: 0em; }<br />.csharpcode .rem { color: #008000; }<br />.csharpcode .kwrd { color: #0000ff; }<br />.csharpcode .str { color: #006080; }<br />.csharpcode .op { color: #0000c0; }<br />.csharpcode .preproc { color: #cc6633; }<br />.csharpcode .asp { background-color: #ffff00; }<br />.csharpcode .html { color: #800000; }<br />.csharpcode .attr { color: #ff0000; }<br />.csharpcode .alt <br />{<br /> background-color: #f4f4f4;<br /> width: 100%;<br /> margin: 0em;<br />}<br />.csharpcode .lnum { color: #606060; }<br /></style><br />
<br />
<br />
<br />
<div align="justify">
20 lines of code (Actually less). So what does this do, just starts powershell.exe with the parameters that you pass to this application. Please note there is no error check or correction, as this is just meant to be a wrapper. If you want to put those, then its fine, feel free, how ever, this is not where the magic happens. If you just compile the above with default settings you will be again left with the same problem. </div>
<br />
<div align="justify">
Open the build property and choose the platform target as x64 (default will be Any CPU) </div>
<br />
<div align="justify">
<a href="http://lh3.ggpht.com/-ZNFS4Et4o64/UrrdK_Vx1BI/AAAAAAAAEpc/cFzu7KLEqv4/s1600-h/image%25255B3%25255D.png"><img alt="image" border="0" height="168" src="http://lh5.ggpht.com/--UhU1jbZDJc/UrrdL24P6fI/AAAAAAAAEpk/C7jViL9KgCs/image_thumb%25255B1%25255D.png?imgmax=800" style="border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline;" title="image" width="343" /></a> </div>
<br />
<div align="justify">
Now you can execute the code, and this will ONLY invoke 64 bit applications. You can bake the posh64.exe in your template and then use it like this </div>
<br />
<div align="justify">
<u>Invoke a Powershell script (64 bit)</u> </div>
<br />
<div align="justify">
posh64.exe <powershell script name> < powershell script arguments> </div>
<br />
<div align="justify">
<u>Invoke a Command Prompt (64 bit)</u> </div>
<br />
<div align="justify">
posh64.exe cmd.exe /c <what ever you want to invoke at the command line> </div>
<br />
<div align="justify">
<u>Invoke a Powershell Script (32 bit)</u> – I am not sure why would any one want to do this </div>
<br />
<div align="justify">
posh64.exe cmd.exe /c c:\windows\syswow64\powershell.exe <powershell script name > <powershell script arguments> </div>
<br />
<div align="justify">
You get the picture! </div>
<br />
<div align="justify">
Enjoy </div>
<br />
<div align="justify">
For people who don’t want to write this, here is the link to the <a href="https://drive.google.com/file/d/0B1UBg3r8CVdfdWd6Xzh2WHNTT2c/edit?usp=sharing" target="_blank">posh.exe</a> </div>
<br />
<div align="justify">
I hope you like it. Also, please let me know in the comments if you have questions! Merry Christmas !</div>
</div>
Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com1tag:blogger.com,1999:blog-7540521873209715356.post-56910783805873826952013-10-27T13:02:00.001+05:302013-10-27T13:02:54.880+05:30HOW-TO: Selectively Enable or Disable RSA Secure ID Integration in Cisco VPN Client<p align="justify">If your company uses Cisco ASA firewall and allow remote access through it (Using Cisco VPN Client). Also, If your company uses 2FA (Two Factor Authentication), using RSA Secure ID and have given you a Soft token, they are now integrated, which means when you try to connect you are only prompted for the PIN of the RSA Token and not the entire Pass code (Look at the below, prompting for PIN and Not Pass code)</p> <p align="justify"><a href="http://lh5.ggpht.com/-Se9C4jLhlAg/UmzBjTJ7sZI/AAAAAAAAEjI/NlgvYuNscnY/s1600-h/image%25255B2%25255D.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; float: none; margin-left: auto; display: block; border-top-width: 0px; margin-right: auto" border="0" alt="image" src="http://lh3.ggpht.com/-Z1hGSJTYfrs/UmzBkqK06_I/AAAAAAAAEjQ/BmAfuXEP1-w/image_thumb.png?imgmax=800" width="244" height="122"></a> </p> <p align="justify">Neat isn’t it ? But consider this, You are a consultant working for more than one company, and just two or more companies, one using the RSA, and the other NOT using it. Or both using RSA, but different How do you take care of that ?</p> <p align="justify">Cause, normally, it will pick one token and just blast away the pass-code with the pin you enter. Which means you can login to one company but not the others. This is a problem isn't it ?</p> <p align="justify">Fortunately for us, there is a solution </p> <p align="justify">You need to remember the following </p> <p align="justify"><strong>SDIUseHardwareToken (</strong>Enables a connection entry to avoid using RSA soft token.) <p align="justify">0 = Yes, use RSA SoftID (default)<br>1 = No, ignore RSA SoftID software installed on the PC.</p> <p align="justify"><strong>RadiusSDI (</strong>Tell the VPN client to assume Radius SDI is being used for extended authentication (XAuth).) <p align="justify">0 = No (default)<br>1 = Yes</p> <p align="justify">Ok, now you know the above, Now what <p align="justify"> <p align="justify">First, if you have multiple companies, all using, RSA, and by default the PIN works for one of them, you can leave that as is or you can just disable the PIN function all together and yourself enter the passcode. <p align="justify">Open the PCF file (It will be in the installation folder). Since I use a 32 Bit client, the Location was <p align="justify">c:\Program Files(x86)\Cisco Systems\VPN Client\Profiles <p align="justify"><a href="http://lh3.ggpht.com/-kx5uqmGMWIQ/UmzBlMj-4KI/AAAAAAAAEjY/qweBg2T8BiQ/s1600-h/image%25255B6%25255D.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; float: none; margin-left: auto; display: block; border-top-width: 0px; margin-right: auto" border="0" alt="image" src="http://lh6.ggpht.com/-D2KKORahZqo/UmzBmEuJhaI/AAAAAAAAEjg/Fc8Ipd49_OE/image_thumb%25255B2%25255D.png?imgmax=800" width="420" height="122"></a> <p>Open the PCF Files in a Notepad and edit or add the lines in the PCF (If the lines already exist, just change the values ) in the file and save it </p> <p><a href="http://lh3.ggpht.com/-uUavai0C5LQ/UmzBm2gT8UI/AAAAAAAAEjo/CisW4MUyCy4/s1600-h/image%25255B10%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto" border="0" alt="image" src="http://lh6.ggpht.com/-K7Xbt27EEZg/UmzBngnH95I/AAAAAAAAEjw/6gif1TJ2_10/image_thumb%25255B4%25255D.png?imgmax=800" width="408" height="117"></a> </p> <p>To Ignore the RSA Integration</p> <blockquote> <p><strong>RadiusSDI=0<br>SDIUseHardwareToken=1</strong></p></blockquote> <p>To Use the RSA Integration <blockquote> <p><strong>RadiusSDI=1</strong> <br><strong>SDIUseHardwareToken=0</strong></p></blockquote> <p>Once you set it to be ignoring the RSA, the prompt will change back to passcode. </p> <p><a href="http://lh5.ggpht.com/-oNjIA5WXtOg/UmzBoFq0uAI/AAAAAAAAEj4/rsBcp9faaV8/s1600-h/image%25255B13%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto" border="0" alt="image" src="http://lh6.ggpht.com/-UnBZiHLJ37E/UmzBpO6B71I/AAAAAAAAEkA/tn1MqODJnG8/image_thumb%25255B5%25255D.png?imgmax=800" width="244" height="132"></a> </p> <p align="justify">Hope this has been helpful and thanks for reading. Dop let me know if you have any questions in the comments section</p> <p align="justify"> </p> <p align="justify"> </p> <div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a050e268-19cc-4b86-9d81-ae4d197f69dd" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px">Technorati Tags: <a href="http://technorati.com/tags/Cisco+VPN" rel="tag">Cisco VPN</a>,<a href="http://technorati.com/tags/RSA+SecureID" rel="tag">RSA SecureID</a>,<a href="http://technorati.com/tags/VPN+Integration" rel="tag">VPN Integration</a>,<a href="http://technorati.com/tags/Disable+Secure+ID+Integration" rel="tag">Disable Secure ID Integration</a></div> Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com3tag:blogger.com,1999:blog-7540521873209715356.post-15468725124144268362013-10-17T02:37:00.001+05:302014-06-02T00:45:02.314+05:30Teri Yadon Ne Rulaya<div dir="ltr" style="text-align: left;" trbidi="on">
Another bhajan, depicting the persons quest to reach back … <br />
<br />
Teri yaadon ne rulaya, par ye samjh na aaya <br />
Ki tu jo hai khudaya, mere dil mein kabse aaya<br />
Taqdeer ka farishta jab humpe muskuraya<br />
Us waqt humko teri yadoon ne phir sataaya <br />
<br />
Teri yaadon ne rulaya, par ye samjh na aaya<br />
Ki tu jo hai khudaya, mere dil mein kabse aaya <br />
<br />
Hum tumse poochte rahe.....<br />
Hum tumse poochte rahe, kya humne ki khataya <br />
Teri yaad bhi humein gayi chod ya khudaya <br />
<br />
Teri yaadon ne rulaya, par ye samjh na aaya <br />
Ki tu jo hai khudaya, mere dil mein kabse aaya <br />
<br />
Jab yaadoin ke samndar mein,ho gaya akela <br />
Tab phir se tune aakar haas ke yehi tha bola<br />
Ki naata tera mera, yeh sab se hai purana, jitna bhi door jaye, hai mere paas aana <br />
Ki bande tu kabhi mujhe se juda ho na paya, jitna bhi tune meri yadoon ko thukraya <br />
<br />
Teri yaadon ne rulaya, par ye samjh na aaya <br />
Ki tu jo hai khudaya, mere dil mein kabse aaya <br />
<br />
mere dil ke aiyene mein.... <br />
mere dil ke aiyene mein, jab maine aaj jhaanka <br />
tera aks us mein paaya ab samajh mujhe aaya <br />
Teri yaadon ne rulaya, par ye samjh na aaya <br />
Ki tu jo hai khudaya, mere dil mein kabse aaya<br />
<br />
<br />
<b>Translation (Literal) in English ... </b><br />
<br />
Your memories have made me cry, I did not understand just one thing ...<br />
That lord, When did you get into my heart ... --- Para 1<br />
<br />
It was only when good fortune that smiled on me,<br />
that again your memories came to me<br />
<br />
--- Para 1 Line 1 ---<br />
<br />
We kept asking you ... What mistake did I do<br />
That even your memories left me ...<br />
<br />
--- Para 1 Line 1 ---<br />
<br />
When I was lost "alone" in the sea of memories ...<br />
Then again, you came, smiled and told me ...<br />
You said that your and my relation is the oldest of all ... However far you try to go, you will have come to me ...<br />
You were never able to truly forget me, how much ever you tried to ignore my memories ...<br />
<br />
--- Para 1 Line 1 ---<br />
<br />
When finally today I saw in my hearts mirror, I saw your reflection and I understood what you said myself .<br />
<br />
--- Para 1 Line 1 ---<br />
<br />
<br />
<br />
The tune that I created for this is at <a href="https://soundcloud.com/alok-shrivastwa/teri-yaadon-ne">https://soundcloud.com/alok-shrivastwa/teri-yaadon-ne</a><br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com0tag:blogger.com,1999:blog-7540521873209715356.post-11770736001463814692013-10-14T20:46:00.001+05:302014-06-02T00:45:02.312+05:30Har Saans Mein …<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<i>Here is another bhajan which you may like. </i><br />
<br />
Har saans mein tera naam liya … Gar yeh na kiya to khaak jiya …<br />
Oh Murali vale yeh to bata … Iske siva ab mujhe kaam hai kya …<br />
Kyun tune banaiyi yeh duniya … Jisme humein tumne daal diya … <br />
Ki ro ro kar karein ek sada .. Tere naam ka de do phir aasara...<br />
Tera naam amar, Aasav lagata ...Jo pee lay isko ek dafa ...<br />
Woh khud se bhi ho jaye juda ...Duniya ki usey ho kya parvaah ..<br />
Mahima is naam ki kaun kahe... Isey lekar papi bhi hai tarein<br />
Jo bhi is naam ke sang chale... Bhav sagaar sindhu se voh na darein... <br />
Ab karo kripa itni hum par ... ki bhatke hum na dar dar par .. <br />
Teri dar par humein swikaar karo ... Prabhu humari naiyya paar karo .. <br />
<br />
<i>I hope you like it … </i><br />
<br />
<b>Translation in English </b><br />
<i>I have gotten some requests for translation, so here is the translation (Mostly literal), leave your comments with your views.</i><br />
<br />
I take your name in every breath ... If I don't do this then what is my life after all<br />
Oh the one with the flute (Lord Krishna) please tell me this ... Is there any other work for me ...<br />
<br />
Why did you create this world ... And put us in it .....<br />
That we keep crying and request for just one thing ... give us the shelter of your name ....<br />
<br />
Your name is immortal, it is also feels like the drug, the person who drinks this once ...<br />
He will seperate from himself (his physical self) .. what concern may he have about the world ...<br />
<br />
Who can sing the praise of thy name ... taking this even the biggest sinners have attained salvation<br />
Who ever stays and walks with the name ... gets rid of this mundane ocean of existance ...<br />
<br />
Please I request you to grace me with this ... that we don't keep getting lost between places ...<br />
Please accept us at your door ... God, please get my boat across the worldly ocean ...<br />
<br />
<br />
The tune for this that i created is at <a href="https://soundcloud.com/alok-shrivastwa/har-saans-mein">https://soundcloud.com/alok-shrivastwa/har-saans-mein</a></div>
Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com0tag:blogger.com,1999:blog-7540521873209715356.post-65776816008251220972013-10-13T13:31:00.001+05:302013-10-13T13:31:42.942+05:30What do the planets tell us ….<p align="justify">Now, just a forewarning, this is not a blog which will teach you the tricks of the trade of Astrology (maybe I will write about that some other day), today this blog is about, how or why astrology works and to what extent. I have heard a lot of people asking, is it real, is it not just some one trying to scare us to dupe money out of us. The answer, well… its both, depends on who you see. </p> <p align="justify">Astrology (or as the world comes to know it – Vedic Astrology) has been around for millennia. It is one of the very profound science. However, its complicated and hence people don’t learn it fully or even to a decent extent and become astrologers. Now, beware of the people who show you something bad in your fate and try to get your money. Before, i start about some details that I plan on covering today, let me tell you one basic law that i will be falling back to in the entire course of this blog. “Everything is energy”, now what do I mean by that? well, everything that you see or don’t see has originated from energy. Also, everything carries its particular energy signatures. Now if you are a student of quantum physics, and you know about the Feynman diagrams, you will know that all interaction in that micro cosom is controlled by energy particles like photons, graviton, etc (in general Bosons). That’s as far as our present scientific knowledge in terms of the energy domain, however, I can quote some deeper concepts from the Sankhya Shastra, but for the fear of digressing, the rule is every thing is energy and energies interact amongst themselves. For the sake of understanding, i am going to give example in the wave domain of energy</p> <p align="justify">Now, that being said, lets talk about the Vedic astrology, in this, when a child is born, we prepare some thing called as “Kundali” (which literally means the coiled position of a snake). There are 12 houses in this Kundali and depending upon the time and place of the birth of the child, various planets are positioned with relation to themselves. This we call the birth chart. People use this birth chart for predicting the child’s future to an insanely accurate value (if you know how). Now, you may ask, don’t we have free will ? The answer is, we do, then how can some chart predict the future. The answer is the chart just predicts the energy interactions between different planets and the planets energy intersect with our own which controls the physical and our mental state, which when analyzed properly will give rise to what may happen in the future. </p> <p align="justify">I will give you an example, the charts will tell us that the person will be mentally disturbed un focused and , and he will be quickly angry, you can easily guess what comes next right ? Accidents, Fights, Job losses, etc. Well, that is a logical extension isn't it ? I have only taken an example of 2 attributes here, but we have about 108 emotional states (the nine energies – of Nava Durga or Prakriti (translation : Nature) in 12 houses), all of these energies ) and combination of these govern the state of body and mind of any human being and hence can help in predicting the future. There are different houses in the birth chart, all of these have a different significance, 1st house is for ones body, 2nd for parents, 9th for spouse and so on. Int his blog, i will ask a few questions, which are mostly asked and answer them so we can have a understanding.</p> <p align="justify">So, question number 1, why are the planets there where they are at the time of birth of a child. Well, I may sound a bit far fetched, but every action of ours gives out an energy in a very minute form, please remember that energy isn’t good or bad, its just phase shifted with reference to other energies, these energies don’t leave our side as the law of conservation of energy prohibits energy from being created or destroyed, these energies come in to interaction with other energies of the universe, and kind of settle themselves in relation to other energies, this constantly keeps happening every microsecond our our lives. When a soul is born, it is just manifestation of that energy into the Kundalini’s of the new body that the soul is chosen, the energies come with it. In order to further simplify this, imagine a point in relation of other energies, as the energies convolute, this energy moves with it, and then appears at a time and place which is suitable for that energy. So, it wont be wrong to say that the child carries the planets with him (or is carried by them).</p> <p align="justify">Question number 2, Why the planets. The answer to this, you may have already figured, its not just the planet, its all the energy in the entire universe, how ever, the energies are more profound as the distance decreases. In astrology, Nakshatras (or constellations) are also concerned, but they have a little less effect as the distance is a little more than that of the plants, so its the entire universe acting on each other and staying in the equilibrium. All of them can be analyzed. </p> <p align="justify">Question number 3: Why does a certain planet impact a certain quality: The answer to this is again simple, resonance. The energies of different frequencies are emitted by different planets, and have the impact on the resonant frequencies on earth. The matter has the same frequencies of the energy that it is made of and hence we have controlling planets, for example moon controlls the mind and (it also controls the water) and we know that mind (or thoughts) flow as water, sun controls the eyesight, so on and so forth. Please remember that these are also the secret of mantra’s as they create vibrations of different frequencies, which have different effect on body, mind, matter, etc. When a person gives you mantras in order to remediate some of your energy phase shift, they are just giving you a way to vibrate in a mode which will lower that phase difference or amplitude of the energy </p> <p align="justify">Question number 4: What happens to the actions that we do in the present: Its again going to emit small amounts of energy, unless you do a certain action so many times that the resultant energy is compounded, you will not see much of a difference. Its the same concept of Sin and good deed, its basically energies which will impact you in the future and if you do a great amount of it, the results and effects may start showing immediately. </p> <p align="justify">Question number 5: Is it essential to match Kundali during marriage: The Astakoot method of kundali matching is nothing more than a psychic profiling of the bride and the groom in terms of compatibility, its the matching of most fundamental energies that you may not even know exist in you, but please remember, this is the case of arranged marriage. If you love some one (truly), and have been in a relation ship for the sake of love (don’t fool yourself here), then this becomes absolutely unnecessary, as both of you have learnt to live with the other persons energy phases and possibly got accustomed to it. While the energies may change the thought process, and so on, but lf the love is strong enough then it will conquer it. </p> <p align="justify">I guess these questions help you understand the science behind this ancient art. I know, I have not done justice to this topic, if you are interested, let me know in the comments with questions if you have any and i will expand this further to the best of my knowledge. I hope, you have a few of your questions answered. </p> Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com0tag:blogger.com,1999:blog-7540521873209715356.post-15828461762700519312013-08-27T20:49:00.001+05:302014-06-02T00:45:02.317+05:30Karoon Ardaas Mauka Do …<p>A beautiful bhajan </p> <p>करूँ अरदास मौका दो ... तुम्हे दिल की सुनानी है ...(३)<br>अगर फुर्सत मिले तुमको ... नज़र तुमसे मिलनी है ... (३) <p>मुझे जी भर के मिलना है, तुम्हारे अनगिनत आशिक <br>कहीं रुखसत न हो जाये दीवानी जिंदगानी के <br>अगर फुर्सत मिले तुमको ... नज़र तुमसे मिलनी है <br>करूँ अरदास मौका दो ... तुम्हे दिल की सुनानी है <p>तुम्हे अफ़सोस न होगा, हमारे जैसों की खातिर <br>हमें मायूस करने की, तेरी आदत पुरानी है <br>अगर फुर्सत मिले तुमको ... नज़र तुमसे मिलनी है <br>करूँ अरदास मौका दो ... तुम्हे दिल की सुनानी है <p>सितम गर तू सितम कर ले <br>धड़कते दिल की धड़कन से .... (२)<br>मगर हर एक धड़कन से, तेरी आवाज आनी है <p>अगर फुर्सत मिले तुमको ... नज़र तुमसे मिलनी है <br>करूँ अरदास मौका दो ... तुम्हे दिल की सुनानी है Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com0tag:blogger.com,1999:blog-7540521873209715356.post-33528087015175067872013-07-21T12:35:00.001+05:302013-07-21T12:54:05.099+05:30Quantum Mechanics … Why is it tough to understand?<div dir="ltr" style="text-align: left;" trbidi="on">
<div align="justify">
So, in my quest of learning, I am now doing some research around Sankhya Shastra and also complementing it by the current knowledge that we humans posses in the field of Quantum Mechanics. I was also refreshing the knowledge I already seem to have on the topic, which I have to be honest is very basic. I am not a physicist, hence, I don’t do actual experiments, nevertheless I am decent enough with thought experiments based on the things that I have learn before </div>
<div align="justify">
While I was reading up and enhancing my knowledge in the field, I was also meeting up with some friends and acquaintances, when I spoke to them about QM, they seemed to have no idea about it. Though we are all taught the uncertainty principle, the photo electric effect and the work of Bohr, Einstein and Planck and a few notable others which form the basis of the Copenhagen interpretation of QM in schools, not many people actually understood it and no one ever wants to talk about it. I wondered, why did people not understand QM, is it that difficult ? Or is it not taught well…. While dwelling on this thought, the answer came to me in a much Philosophical form. I thought that it is best to share it with all of you. </div>
<div align="justify">
Now, the answer to the Question, Why is Quantum Mechanics so difficult to understand. The answer that came to me was that the reason is that it is incredibly simple. All the components of the nano-scopic world are so simple that we cant understand it…. Sounds conflicting right ? If it is simple, I should be able to understand it, but this philosophy then doesn’t hold good.. I still thought a little deeper and I remembered the one article that I had read somewhere and was explaining it to a few of my friends. </div>
<div align="justify">
The article was elaborate, but here is the gist… Why does a sparrow, when looking itself in the mirror pecks on it ? Why does a fish, when it sees its own reflection tries to go to fight with it and on the contrary, if you put a fake band-aid on an elephant and put the elephant in the front of a mirror, it will recognize itself and try to get rid of the band-aid on itself and not on the mirror? The answer on a philosophical level for me at that time was a little straight forward. In order to recognize others, you will first need to recognize yourself. Unless you recognize yourself, you will not be able to recognize others, and wont distinguish between a threat and friendly force. </div>
<div align="justify">
Now, it was time to expand this theory a bit, can dogs talk to each other ? We know humans can understand each other (To some extent even if not fairly well), can other animals of the same kind understand each other ? Yes, No or Maybe ? But can dogs understand humans (and may be vice versa ?)…. If you think up on all these questions, there will be a certain similarities between the answers.</div>
<div align="justify">
For instance, an owner of the dog, can understand the dog and Vice versa, but another human may not be able to understand it at the same level. I am fairly certain that other animals through the way of sound, movements, smell,etc can communicate and understand their kind. So why is that ? If I have to put a few more simple examples, why can you understand some people better than others ? You would say cause we are on the same level (or same wavelength) …. so, the next question is same wavelength of what ? </div>
<div align="justify">
The answer as it happens to be is simplicity, or un complicatedness. If your state of existence is at the same state of someone or some thing else, (or at least close) you can understand it, However, if it varies greatly you cannot. You cannot understand the reasons behind the things that people do, so on and so forth. Learning is a similar exercise, you understand the things best when you are at the same level of that thing, if its a complicated thing (and we being complicated our self) can understand it better. Though I feel “complicated” may not be the right word for the situation (Maybe Abstracted?) </div>
<div align="justify">
This world has made our living so complicated, some times so biased and judge mental that we cannot understand the simple things anymore. However, when you loose all that complexity in you, you may be able to come to terms with the simple things and people. (Off course the term simplicity here doesn’t refer to the “simple” living style in direct connection) </div>
<div align="justify">
Hence if you see, that all the scientists that have worked on the QM and related theories were in fact more philosophical than objective, Einstein, Bohr, De Broglie, etc were philosophical in various degrees. </div>
<div align="justify">
So, I leave you here with a thought, (Your thoughts are welcome in the comments till its constructive), I leave you with a thought that in order to learn and understand the universe in an un-abstracted manner, we will have to remove the abstraction from ourselves before anything, we should un complicate and live and think high and simple.</div>
<div align="justify">
Cheers !!!</div>
</div>
Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com2tag:blogger.com,1999:blog-7540521873209715356.post-59772732438447706502013-04-20T12:10:00.001+05:302013-04-20T12:11:00.565+05:30Dhyaan and Samadhi … What are they ?<div class="wlWriterHeaderFooter" style="float:none; margin:0px; padding:4px 0px 4px 0px;"><iframe src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2013/04/dhyaan-and-samadhi-what-are-they.html" scrolling="no" frameborder="0" style="border:none; width:130px; height:80px"></iframe></div><p align="justify">So you have been to India, or you practice Yoga, or Meditation, or trying to progress along your spiritual journey, You would have definitely heard these two words, “Dhyaan” (ध्यान ) and “Samadhi” (समाधी ). I have also heard some people use these words interchangeably, in wrong contexts, even understand them in a wrong way. So, I thought I would try and de-mystify these words for you. </p> <p align="justify">Lets start simple, both words are NOT the same. one is a “Process” and the other is a “State/Frame”, they cannot be used interchangeably. In order to delve deep, let us first see the definition of “Samadhi” and why people try to get there. Now before we get there, a standard Disclaimer.</p> <p align="justify"><em><strong>Disclaimer:</strong> All thoughts mentioned are my own, this is purely my understanding. You may choose to differ or agree. This post is not intended to prove anyone’s understanding right or wrong or what ever.</em> </p> <p align="justify">Now, that we have got it out of our way, Samadhi, by definition means “same state” or “state of oneness” with everything else. Again this is one of the most advanced topics in yoga. In this state the individual is connected and feels in unison with the whole universe and beyond. Now there are two important questions that need to be asked </p> <ol> <li> <div align="justify">How to get into it?</div> <li> <div align="justify">Why to get into it?</div></li></ol> <p align="justify">I am a firm believer of the fact that if the “Why” of any thing is strong enough the “How” becomes immaterial. </p> <p align="justify">Now in order to explain this, I am going to digress a little. Let’s take Newton’s Law of Gravity, which states, “Every body in this universe attracts every other body with a force that is proportional to the product of their masses and inversely proportional to the square of the distance between them”. Standard physics right ? It is, please remember that this is the same law on which even the Astrology works. In astrology, we see what is the angle, the distance, etc. of what planet, and what effects does that attraction cause, hence we can kind of sketch out the past, present and future a little. The problem is this science is not small, we have to also see what other planets are there, and integrate/differentiate these effects. This is purely science and that too the ones that we don’t understand completely. It is very clearly mentioned in this, that each planet controls some physical aspects of a person, as an example sun controls the eyes, etc. </p> <p align="justify">From this astrology, we know that the “Moon” is the controller of the mind, and we also know that moons gravity is also the controller of water (think High tides/low tides, etc.). Doing some simple mathematics here if a = b and b =c then a=c, by this, simple equation, we know that the mind is like water and we all know that its very difficult to control it as it keeps flowing. Now consider that the mind is a “bowl” of water. this bowl continuously being shaken by the elements like lust, anger, possessiveness, etc. in this world. The water (or mind) is continuously agitated, and hence the thoughts are not clear, and all the mental problems arise from there. Now this is a constant thing that happens to every one and every thing. </p> <p align="justify">Now that you know the bowl, The state in which the bowl will no longer be disturbed is called Samadhi, and the process of that stabilization is called Dhyaan. When the bowl is no longer shaking, the water is clear, then the Aatma (Soul) is able to look into it and see its own reflection, now we do know that the soul is a small part of the Supreme what we call God in all the religions, this is a state, where we can see the shadow or the form of the formless Supreme </p> <p align="justify">I am inclined to quote from the Nirvan shatakam</p> <blockquote> <p><em>Aham nirvikalpau niraakaar roopo, Vibhur vyaapya sarvatra sarvendriyaanaam<br>Sadaa mai samatvam na muktir na bandhah, Chidaanand roopah shivoham shivoham</em></p></blockquote> <p align="justify">This was written by Adi Shankarachrya, who gave us the “Advaita” philosophy. If, I had to describe this philosophy in one line, I would quote the above. The philosophy simply says, that every thing is one. The soul is “Shiva” itself, so by this definition the soul looking at its reflection will be looking at Shiva himself. </p> <p align="justify">I am giving all of this just for the “Why Samadhi?” question. I hope, we have got the the answers, it will differ for person to person, so basically you can go to Samadhi to</p> <ul> <li> <div align="justify">Find God (For the Religious)</div> <li> <div align="justify">Find yourself (For the Curious)</div> <li> <div align="justify">Just to get rid of mental disturbances, (For the Scientific) </div></li></ul> <p align="justify">This list can be made very exhaustive, but lets stop here for a moment and look at the “How”. Samadhi can be again sub divided into two parts, Forced and Practiced. </p> <p align="justify">Forced Samadhi is where you don’t have a choice but to be in Samadhi, for example at a funeral (not the Page-3 Funerals), every one at the funeral is in the same state of mind, that state of mind is the bitter truth of the world, all of us in some corner of our minds will realize the fact that the body is not immortal and what we are doing in this world would mean nothing after some time. This is a forced Samadhi, this stays for only a short period of time. If you have been to a funeral, you would see that this feeling links all of the people present at that funeral, no one is thinking if they drove down to the funeral in their shiny new Ferraris or walked down there! Those things become immaterial at the time. However this lasts only a very short time and once you are out of there, you are out of that state of mind, you are again absorbed in this world. </p> <p align="justify">Practiced Samadhi, this is where you actually want to be in the state for prolonged periods of time for what ever the reason (may be one of the one mentioned above?), this one, you make a voluntary effort of getting into Samadhi. Now the question comes “How”? </p> <p align="justify">The simplest of answers is “Dhyaan” or meditation. Now, what is meditation? If you have been to one of the classes that many people would conduct, they will tell you to clear your mind and concentrate on a point. Now, what this actually does, is basically mind is stuck up with a lot of things. So, Dhyaan is process of concentrating from many to one This is also the reason behind idol worship, where the devotee, can focus his thoughts, his energies, and all of his will from multiple components to one, in this case, the idol of the God. Once he is successfully able to meditate and concentrate on that one, the next step starts. (This is what is called Nirgun upaasana), from one to “none”, you heard me right none. </p> <p align="justify">So basically the whole process is to be able to concentrate on the infinite. Once we can do that, that is a definite state of Samadhi, you are now concentrating on “the Infinite” the supreme, by extension, you are now connected to him in spirit, and by extension, you are connected to every atom in this universe. You now know that you are everything and everything is you, you are one with every thing. If you are one with every thing nothing will ever disturb you again. This is not achieved in a day, there are years, decades, lives of practice that is required. In order for the body to remove its concentration from some thing, people make body habitual to live without it, and that’s why people abstain from it (one of the reasons, why people fast), there are multiple steps and people on a spiritual journey are at various checkpoints of the journey. </p> <p align="justify">I hope this has given you a perspective. I have tried only to use guiding examples and not hard and fast rules (that is the job of your Guru) so that people can imagine the rest. </p> Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com0tag:blogger.com,1999:blog-7540521873209715356.post-38206275366169575142013-04-20T10:23:00.001+05:302013-04-20T10:23:16.653+05:30Love is the Enemy !!!<div class="wlWriterHeaderFooter" style="float:none; margin:0px; padding:4px 0px 4px 0px;"><iframe src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2013/04/love-is-enemy.html" scrolling="no" frameborder="0" style="border:none; width:130px; height:80px"></iframe></div><p align="justify">Well, I am certainly not talking about Nick Black’s song and I am certainly not against love. Then what is this you ask? While I let you think about what this blog is all about, go ahead, listen to the song anyway </p> <div id="scid:53357c8b-5919-4e32-8c25-305d27c17a37:3109421f-c429-43d7-aec5-cd05b093e246" class="wlWriterSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; width: 254px; margin-right: auto"><embed src="http://www.youtube.com/v/FyQde__eM80" type="application/x-shockwave-flash" wmode="transparent" width="254" height="209"></embed></div> <p align="justify">Now this is about indeed about a “different kind of love”. Today, we talk about the scaling of our environments. Not all of our IT environments are actually scalable in every way. Network is perhaps the most scalable thing that you would see in the IT infrastructure today, if we think for a moment as to why is that, why can a 300 MHz CPU, 256 MB RAM, with virtually no storage outperform an application running on tens or hundred's of beefy servers? </p> <p align="justify">Why can network components handle tens of thousands of connections which hundreds of servers have a tough time processing. (I know some of you might be going… Err! … Servers actually have to process it, and not just forward it! )</p> <p align="justify">The answer lies very simply and plainly with us. “LOVE”, what I actually mean by this is basically when the network component sends out packets, its doesn’t actually care if the return / reply was sent, when was it sent, was it sent at all, through where was it sent, did some one else process the return packet so on and so forth. This gives them immense speed and scalability. </p> <p align="justify">On the other hand applications sit and wait for the packet to return, these connections keep their memory occupied and hence there is delay, new connections are not taken in that easily, etc. There by making scaling very very difficult. </p> <p align="justify">Now, since the scaling of applications are difficult, so is taking them to cloud, cause cloud is all about scale and not about state.This possibly was one of the few reasons for the cloud and the fact that compute is one of the first things in the cloud. </p> <p align="justify">Even while moving these application to the cloud, we see this as a challenge, if the application is all about state, they are still not able to use the full potential and benefits of the cloud, so now naturally the next question arises, how should these applications be designed for speed. Again the answer is a single liner. </p> <p align="justify">If you can, then have the application as event based and NOT state based, which means, the application execution should be completely asynchronous, it makes a call and forgets about it. When the response arrives, it triggers a event, the application picks up the event, recalls what it was and continues processing. Off course this cannot be done for all the applications, but most of them can work in this way, all it needs is basically the application would require some sort of web service or equivalent for the other systems to trigger off events. </p> <p align="justify">So, that’s it folks, I leave you with this thought, if you have comments, I would love to hear them! </p> Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com0tag:blogger.com,1999:blog-7540521873209715356.post-59550030190002110042012-11-28T13:14:00.001+05:302012-11-28T13:47:58.589+05:30Missed Call Notification on Samsung S3<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="wlWriterHeaderFooter" style="float: none; margin: 0px; padding: 4px 0px 4px 0px;">
<iframe frameborder="0" scrolling="no" src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2012/11/missed-call-notification-on-samsung-s3.html" style="border: none; height: 80px; width: 450px;"></iframe></div>
Are you a proud owner of the Samsung Galaxy S3 ? Do you have a persistent missed call notification which does not clear itself and there is a permanent red “1” icon on the Phone, Look no further, let’s look at the solution real quick. <br />
I must confess, this has haunted me for months before I could find the solution. I went from ICS to JB and had the same problem. Off course my phone is on the Stock ROM. <br />
<br />
The following steps needs to be taken to clear this out. <br />
1. Reboot the Phone – Duh!, I guess you guys would have done this.<br />
2. If you have voice mail services On, please ensure you have listened to all your Voicemails, and if possible deleted them and then rebooted your phone <br />
<br />
If the above 2 steps have not cleared it out, here is what you got to do. <br />
<br />
Go to your Settings app and click on Application manager, Scroll to the right , to select “ALL” and then select “Badge Provider”. Click on Clear data <br />
<br />
<a href="http://lh6.ggpht.com/-OACvq5RcKHc/ULXA186xwlI/AAAAAAAAEeE/rMxyv8TbWGA/s1600-h/image%25255B2%25255D.png"><img alt="image" border="0" height="244" src="http://lh3.ggpht.com/-VuaCSwwNJng/ULXA3NAtoKI/AAAAAAAAEeM/PZ8KA654ltE/image_thumb.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="213" /></a><a href="http://lh5.ggpht.com/-ORfTCHliI68/ULXA4waEo8I/AAAAAAAAEeU/eYpUiM9WOfU/s1600-h/image%25255B5%25255D.png"><img alt="image" border="0" height="244" src="http://lh5.ggpht.com/-YZRj-7DK9Tg/ULXA6Gs7njI/AAAAAAAAEec/AWUWJn1oY0Y/image_thumb%25255B1%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="227" /></a><a href="http://lh3.ggpht.com/-3oIVidJpO7I/ULXA8KSFxOI/AAAAAAAAEek/T0anraBH42g/s1600-h/image%25255B8%25255D.png"><img alt="image" border="0" height="244" src="http://lh6.ggpht.com/-C1fWmfnoJpw/ULXA9XMvqtI/AAAAAAAAEes/LI98wVpO2n8/image_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; margin: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="210" /></a><br />
<br />
If needed, click on Clear Cache also (In the badge provider) and then reboot the phone. Voila! … The notification should now be gone. <br />
<br />
Hope this helps !!!</div>
Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com80tag:blogger.com,1999:blog-7540521873209715356.post-42952800495464999602012-07-20T00:31:00.001+05:302012-07-20T00:31:50.154+05:30Networking for the future<div class="wlWriterHeaderFooter" style="float:none; margin:0px; padding:4px 0px 4px 0px;"><iframe src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2012/07/networking-for-future.html" scrolling="no" frameborder="0" style="border:none; width:450px; height:80px"></iframe></div><h3>Networking Needs</h3> <p>The Next Gen networking needs can be broadly listed down as the following <ul> <li>· More network layer 2 partitions <li>· Programmatically and dynamically shape the traffic <li>· Dynamically control the flow of traffic <li>· Automated provision of the networking resources <li>· QoS extensibility <li>· Security of the network </li></ul> <p>We also need to keep into mind that the IPv4 pool has officially exhausted, so these needs are applicable to both IPv4 (existing networks) and IPv6. <p>In order to full fill these needs there is not a single technology but a group of them which can work alongside each other. But the needs clearly mention that there needs to be software involved in the networking. Hence the umbrella term SDN – Software Defined Networking is coined. <h3>Software Defined Networking</h3> <p>Traditionally the routers/switches have had proprietary software inside them which took the decisions to forward packets and where to forward them. These software’s were proprietary and were controlled by companies who created them (example Cisco IOS). In order to explain the evolution process, let us take an example of a switch, which by far is the most critical component in the Data center environment. <h4>Evolution of NETWORKING Devices</h4> <p>In the oldest switches, all the activities (or most of it) were done in software. There was a single operating system and that controlled packet flow and all activities of the switch itself. This worked very well, but it was not fast enough and hence the use of ASIC’s was started. Let’s take a look at the very high level block diagram of the control points of the switches. <p><a href="http://lh4.ggpht.com/-IIs2tzK2aB0/UAhYgAkH0EI/AAAAAAAAEaA/-KhESkBRbLg/s1600-h/clip_image002%25255B3%25255D.jpg"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://lh4.ggpht.com/-Zj9WIVKfLQ8/UAhYg4JMm5I/AAAAAAAAEaI/LZeOlqwsJs8/clip_image002_thumb.jpg?imgmax=800" width="244" height="81"></a> <p>Switch Block Diagram: Software Only <p>After the use of high speed ASIC’s, the switches offloaded the mundane work to the ASIC’s and only the work that needed some processing was sent to the Operating System <p><a href="http://lh4.ggpht.com/-IYAlw7BMbKE/UAhYiIVrsdI/AAAAAAAAEaQ/vB0wP_tfyIk/s1600-h/clip_image004%25255B3%25255D.jpg"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://lh4.ggpht.com/-9M2zKhfOCz8/UAhYjZFWBSI/AAAAAAAAEaY/k5rHSiJp4EY/clip_image004_thumb.jpg?imgmax=800" width="244" height="115"></a> <p>Switch Block Diagram: ASIC + Software <p>This method was successful, with the improvements in the embedded systems and the capability of ASIC’s more and more functions could be now done in hardware rather in software. The next requirement was the high port density for datacenters and that could be given by using the chassis architecture and offloading all the brain on to different cards (The supervisor Modules). <p>This was the time, when we could separate the Data-plane and Control-Plane <p><a href="http://lh4.ggpht.com/-FzDQAbfa5E0/UAhYkrGZXTI/AAAAAAAAEag/_uRdfUmIN7s/s1600-h/clip_image006%25255B3%25255D.jpg"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://lh5.ggpht.com/-OWaNntKGEkM/UAhYl6I1y8I/AAAAAAAAEao/k9givCaHAvQ/clip_image006_thumb.jpg?imgmax=800" width="244" height="139"></a> <p>Where the supervisor module (or equivalent controller card) became the brains and used to keep track of the switching decisions, ACL’s, etc. <p>The Chassis backplane that is shown the diagram connects everything to everything within a switch. Having architecture like the one shown above enabled devices to be very high speed and gave rise to technologies like express forwarding. <p>However up to this point, the brains of a device remained in the device. The next technological innovation was the Extending of the fabric (Switch Backplane) not only across a device which was achieved in using stacking, but also across racks and sometimes datacenters. At this point in time, Virtual Chassis (Juniper) or Fabric Extender (Cisco Nexus) came into picture. In this the backplane of several devices are connected using cables (Proprietary or Ethernet) and then the top device acts as the brain and others as mere line cards. <p><a href="http://lh5.ggpht.com/-DqS--l23uaw/UAhYm_Il1TI/AAAAAAAAEaw/mfHtxsrVMbg/s1600-h/clip_image008%25255B3%25255D.jpg"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://lh6.ggpht.com/-rY0zs0cjJtk/UAhYn5CqL4I/AAAAAAAAEa4/dP_P48gxZtk/clip_image008_thumb.jpg?imgmax=800" width="244" height="156"></a> <p>This kind of switches are called Fabric Switches (Off course it is a little complicated than the diagram shown above, nevertheless it conveys the idea). <h4>Blow the brains out, Literally!!!</h4> <p>The need of hour in networking is to take the brain out of the system and create an abstraction layer. This is required as there are multiple different devices and multiple different vendors. Having already moved the controller out of the line card in a device meant that any device could function as the controller if it had the right tools. That is the basis of the software defined networking. <p>In SDN, the devices will have capability of accepting another device as their brain (controller) and the decisions can be left to them. In order to help in this task, a protocol was needed and in came “Open Flow” <p>The SDN allows the device to make a routing switching decision on a wide variety of parameters, dynamically and not controlled just by routing/switching protocols and can be completely programmed based on the requirement of the enterprise. <p><a href="http://lh3.ggpht.com/-1-NSYRFw1VQ/UAhZiE9-2DI/AAAAAAAAEbA/bbRNFqaKYEE/s1600-h/clip_image010%25255B3%25255D.jpg"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image010" border="0" alt="clip_image010" src="http://lh5.ggpht.com/-I-leaP9p1Fw/UAhZjaL3OmI/AAAAAAAAEbI/aN_gKSQ-g4c/clip_image010_thumb.jpg?imgmax=800" width="244" height="153"></a> <p>So, in this case, the server (or an Appliance) runs the open flow controller. The open flow switch sends information to the controller continuously (like Net Flow). The open flow controller on the basis of the information takes decisions. <p>We can configure it as per need and requirement. In normal cases, the line card sends the first packet to the routing / switching engine, which does the lookup and then tell the line card which port to forward it out of. The further packets of the same flow are sent in the same way but without contacting the routing engine. In the case of the open flow, the routing/switching engine can be the open flow controller and since the open flow controller takes the decision on many more parameters, it can do a very dynamic routing, load balancing over links, so on and so forth. <p>The open flow also allows to programmatically changing the configuration of the devices, and hence provisioning and other aspects are covered by the same protocol. So, the network is controlled by the same server that it is providing the network to, sounds ironical doesn’t it? But you can imagine the kind of ramifications that can happen. Single software will be able to orchestrate, manage, troubleshoot and optimize the network. <p>What’s more the Open flow is a standard protocol that works the same across all the vendor devices, hence the configuration and management of the devices can be abstracted and become vendor independent for most standard features. <h4>Vendors supporting open flow</h4> <p>All the major vendors are supporting Open Flow. Juniper JunOS has been having the programming capability for a long time. HP has released Open flow compatible switches, which will work with open source controllers and NEC controllers. Extreme, NEC and Cisco also support the Open Flow. Cisco has called the program Open Network Environment (ONE) and is working on API access in its NX-OS running on the Nexus devices. <h3>Open Flow components</h3> <p>As we saw that the open flow needs an open flow compatible switch and also an open flow controller. Here is a list of hardware and software switches which support open flow <h4>Switches</h4> <ul> <li>·HP 5400/6600 – Software Version K.15.05.5001 <li>·IBM G8264 <li>· Pronto <li>· NEC PF5240 <li>· NetFPGA Switch <li>· Open vSwitch <li>· Open WRT</li></ul> <h4>Controllers</h4> <p>The following open source controller software’s are available to as the flow controller <ul> <li>· NOX <li>· Beacon <li>· Helios <li>· BigSwitch <li>· SNAC <li>· Maestro</li></ul> <p>Please note that Open flow is right now in an experimental stage and will need some time for it to be baked and the features to be available. <h3>Constraints</h3> <p>Open flow and SDN are excellent, but there are things that it can’t do. It cannot virtualize the devices, it cannot make them multi-tenanted, and device vendors need to do that on the devices themselves, so we will still need the vendors to do that. Once they have done it (Like VRF’s) these can be managed by Open flow without any issues. This goes to say, that open flow or the SDN will need to work with other protocols and technologies to be close to what we are looking for. The open flow will solve all but not solve the network partition requirement that we looked at the beginning. <h3>Partition network into multiple layer 2 boundaries</h3> <p>With vendors going to multitenant model for their cloud computing offering, they need a way to securely partition the different tenants. The way it is normally done by using VLAN’s but the VLAN tag is only 12 bit long and so the maximum can be 4096. Take aside a few reserved VLAN’s and you have even lesser. <p>Also the VLAN’s cannot traverse the layer 3 boundary and in order to have multiple datacenters we will be looking for this. The way it is being traditionally built is the layer 2 links between the datacenters which are no longer feasible. <p>In order to solve this problems a new VLAN protocol called the Extended VLAN is devised <p>As the name VXLANs (Virtual eXtensible LANs) implies, the technology is meant to provide the same services to connected Ethernet end systems that VLANs do today, but in a more extensible manner. Compared to VLANs, VXLANs are extensible with regard to scale, and extensible with regard to the reach of their deployment. <p>The VXLAN draft defines the VXLAN Tunnel End Point (VTEP) which contains all the functionality needed to provide Ethernet layer 2 services to connected end systems. VTEPs are intended to be at the edge of the network, typically connecting an access switch (virtual or physical) to an IP transport network. It is expected that the VTEP functionality would be built into the access switch, but it is logically separate from the access switch. The figure below depicts the relative placement of the VTEP function. <p>Each end system connected to the same access switch communicates through the access switch. The access switch acts as any learning bridge does, by flooding out its ports when it doesn’t know the destination MAC, or sending out a single port when it has learned which direction leads to the end station as determined by source MAC learning. Broadcast traffic is sent out all ports. Further, the access switch can support multiple “bridge domains” which are typically identified as VLANs with an associated VLAN ID that is carried in the 802.1Q header on trunk ports. In the case of a VXLAN enabled switch, the bridge domain would instead by associated with a VXLAN ID. <p><a href="http://lh6.ggpht.com/-ufDTErBlRao/UAhZkQBoYxI/AAAAAAAAEbQ/GveyzllmG6I/s1600-h/clip_image011%25255B3%25255D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="clip_image011" border="0" alt="clip_image011" src="http://lh3.ggpht.com/-gqHNH-_zHZ0/UAhZmYHloPI/AAAAAAAAEbY/C3Yt2h6nf9M/clip_image011_thumb.png?imgmax=800" width="244" height="84"></a> <p>So with this two technologies we will be able to achive the requirements that we have mentioned in the star of the document. Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com1tag:blogger.com,1999:blog-7540521873209715356.post-17023706132274437232012-05-01T17:34:00.001+05:302012-05-01T17:34:32.518+05:30How to tackle “Network” related challenges in a Cloud – Part 1<div class="wlWriterHeaderFooter" style="float:none; margin:0px; padding:4px 0px 4px 0px;"><iframe src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2012/05/how-to-tackle-network-related.html" scrolling="no" frameborder="0" style="border:none; width:450px; height:80px"></iframe></div><p> </p> <h3><font style="font-weight: normal" size="3">So, we all know Cloud is the new buzz word in the IT industry and most of the companies are looking at using the Cloud in some form or the other. This has led the CIO’s to ask one question</font></h3> <p><font color="#0000ff">“What issues do we foresee in moving to the Cloud?”</font> <p>Even before we hear this question come out, we have a slew of topics that are presented on the same topic. This includes, Cloud Security, Cloud Integration, Cloud Management, so on and so forth. <p>Once issue that often gets missed, or given low priority is “Networks”, which are the basic life line of any Organization. Since network is so transparent that people talking about compute environments tend to overlook it. <p>If you are reading this, and going how is network impacted. Is it always impacted? In order to be able to answer these questions, we need to consider the following <p>· What is my current model <p>· What part of my Infrastructure will be cloud enabled? <p>· What Cloud model am I considering? <p>Depending on these questions, we may have to assess how much or little will the network component get impacted. <p>Now, for an example, let’s consider an Enterprise with local access moving into a Public Cloud. The current data flow of this organization will look something like this <p><a href="http://lh4.ggpht.com/-stEFKlsECWE/T5_QuQ13F1I/AAAAAAAAENo/7skSOakB4Ko/clip_image002%25255B3%25255D.jpg?imgmax=800"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://lh6.ggpht.com/-8x5K8BX83FQ/T5_RAmkQ1AI/AAAAAAAAENw/Z2jeBH93qXU/clip_image002_thumb.jpg?imgmax=800" width="244" height="145"></a> <p>The LAN infra connecting to the On Premise resource will typically be 1Gbps / 10 Gbps access speed, whereas the Internet connection is a slower link in comparison. The backplane and congestion component of the LAN is much lesser than the WAN. <p>Now, please consider that you have moved all your resources to the cloud. Can you imagine what the case will be ? <p><a href="http://lh6.ggpht.com/-2yKHbYNDOb4/T5_RB53Hl1I/AAAAAAAAEN4/SWaTss1BdMc/clip_image003%25255B3%25255D.png?imgmax=800"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image003" border="0" alt="clip_image003" src="http://lh6.ggpht.com/-NiHUgoKemNo/T5_RS8HnTLI/AAAAAAAAEOA/B8hdO4WvcMI/clip_image003_thumb.png?imgmax=800" width="244" height="163"></a> <p>All the traffic that we used to take for granted, flowing through the datacenter LAN at high speed, now has to traverse across the internet. Obviously we will have more requirements for bandwidth. But remember bandwidth is just one part of the story, we also have to consider the delay, the Jitter and the Quality of service on that link, because, we can’t go back to the users and say, Hey, I have made so much changes, so your experience is going to worsen a little, the users are not going to buy it. <p>So, I think we all see a problem here. But remember this was a drastic example, not many companies out there are going to be doing this, but the worst case example was taken to show that we need to think about the network component. <p>Remember that even as we go to, say a “Hosted Private Cloud”, or even centralizing the operations in a company to go for a Private cloud in the HQ, we do need to deal with the network requirements of the remote offices. <p>All said and done, how do we tackle it? After all this blog is all about the solution … We will be looking at a couple of solutions and you can remember that these solutions can be mixed and matched depending upon the requirement. <p>You will be surprised to know that one the solution for this problem created by the Cloud, has its solution in the Cloud as well … J … Yes you heard right … <p><u>Solution A:</u> <p>Use VDI or Virtual Desktop Infrastructure. Now, we all know that it is Desktop Virtualization and is a form of cloud adaptation. <p>If you put your User’s desktop in the same cloud as where you are putting your servers, then effectively, the access becomes local access and is much faster. The bandwidth requirement will be the bandwidth consumed by the thin client of the access workstation. The thin clients have a predictable and low bandwidth when compared to the individual applications on the internet. <p>Even if you are afraid of putting all your eggs in the same basket, you can still go for VDI with another cloud provider, and if you plan it right your access rates will be fast, as you will have more on demand bandwidth on the Cloud than you will typically purchase for a site. <p><u>Solution B:</u> <p>The solution B is to put in some Virtual WAN accelerators on your cloud and its pair on the remote site. Configure them properly and then you can reduce the amount of Bandwidth utilization that you will actually push to the internet. <p>If you want a managed solution, you may go with a provider like Aryaka, who will also give you the MPLS capabilities of QoS. In this solution, we have to carefully customize the access network so the ROI is beneficial <p>Depending on how much you are moving towards the cloud and what components are being moved, you may want to use Solution A / B or both. <p> <p>I will detail about it in the next Part Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com3tag:blogger.com,1999:blog-7540521873209715356.post-31519515876626859222012-02-15T21:34:00.001+05:302012-02-15T21:37:21.423+05:30Configuring Multicasting with Juniper EX switches (Part 1)<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="wlWriterHeaderFooter" style="float: none; margin: 0px; padding: 4px 0px 4px 0px;">
<iframe frameborder="0" scrolling="no" src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2012/02/configuring-multicasting-with-juniper.html" style="border: none; height: 80px; width: 450px;"></iframe></div>
<div align="justify">
Configuring multicast routing using Protocol Independent Multicast in a all Juniper environment is as simple as the Cisco environment, but when I searched, I dint find good articles or KB’s explaining this, so I decided to write one. </div>
<div align="justify">
I am fairly certain that if you have searched and arrived at this post, you know the basics of multicasting and IGMP, but yet, for the benefit of all readers, I will in brief describe the need for multicast. Please note, that this is just the IPv4 version of the story presented in a understandable manner and not all aspects of multicast are covered, but only the ones needed for this post.</div>
<div align="justify">
<strong>What is Multicast ?</strong></div>
<div align="justify">
In IPv4 we have 3 kinds of packets, </div>
<ul>
<li> <div align="justify">
Unicast – One Source, One Destination</div>
</li>
<li> <div align="justify">
Broadcast – One source and all destinations </div>
</li>
<li> <div align="justify">
Multicast – One source and many destinations </div>
</li>
</ul>
<div align="justify">
Now, all of us are familiar with the first one, we use it almost every minute we are on a network connected equipment. </div>
<div align="justify">
To, explain all this, lets choose different examples </div>
<div align="justify">
1. Phone call : One person calls the other person, now this is unicast communication, one source one destination, most of the communication on the network is unicast </div>
<div align="justify">
2. Shouting in a classroom : Broadcast, basically within the walls of the classroom all the people can hear you, this is basically a broad cast form of communication. In the network world, the wall of the classroom is basically the Layer 2 boundary as we all know that the moment broadcast hits a layer 3 device like a router or a firewall it is stopped. </div>
<div align="justify">
3. Holding a meeting: Now this is MULTICAST, there are 2 restrictions, in this if you see, only people invited to the meeting will hear your conversations, as well as the conversations will be not heard beyond the wall of the meeting room (or the Layer 2 boundary) </div>
<div align="justify">
Also, please think about which would you spend the least energy talking, Unicast is the least, followed by multicast and the highest energy is taken in broadcast. You can also see, that if you broadcasted the message which many people are not interested into, you are wasting their time (i.e) resources, so to alleviate the problem, multicast was created. </div>
<div align="justify">
<strong>Why IGMP and Multicast Routing?</strong></div>
<div align="justify">
Though this blog doesn’t deal with a whole lot of multicast routing concepts, we will see, why do we need it. You know that in olden times, having a meeting in a room was more than enough, but as the business grow large and having multiple offices, you now know that the meeting needs to go out of the walls in a controlled manner, may be via a passcode authenticated bridge or a WebEx (or similar) or screen share , right ? it’s the same with Multicast, because multicast is used by multiple media applications, you may need to get out of the boundary of a layer 2 (VLAN) or even across the subnets across the internet to some other office, in this case, you will need a protocol to do that. </div>
<div align="justify">
<strong>Applications of Multicast?</strong></div>
<div align="justify">
Multicast is normally used in media applications or video conferences. It’s a good idea to multicast them because they consume a lot of network bandwidth and if we broadcasted them it will create unnecessary havoc in the network </div>
<div align="justify">
<strong>How present day switches treat multicast?</strong></div>
<div align="justify">
Present day switches use some thing called as IGMP-Snooping. Which is nothing else but listening to the IGMP messages being sent from a host. The IGMP messages contain the detail which mentions which multicast stream are they listening to, and with that info, it does ahead and forwards that particular stream to the host, else it prunes all other multicast traffic. </div>
<div align="justify">
<strong>IGMP and its Snooping</strong></div>
<div align="justify">
IGMP (Internet Group Management Protocol) is basically a protocol, which sends messages about being interested or disinterested in a stream, they are normally sent between applications which support multicast (example <a href="http://www.videolan.org/" target="_blank" title="VLC">VLC</a> player) and the Multicast router on your network </div>
<div align="justify">
The different messages are </div>
<ul>
<li> <div align="justify">
Membership Query </div>
</li>
<li> <div align="justify">
Membership report</div>
</li>
<li> <div align="justify">
Leave Group</div>
</li>
</ul>
<div align="justify">
So, its just 3 types of messages. The query is sent by the multicast router, in order to figure out if there is anyone who is interested in any multicast group , the report is sent by the client mentioning the groups that it is interested in and leave group message is the message sent by hosts to tell the router that it is no longer interested in a particular group. </div>
<div align="justify">
Please note that IGMP and snooping by itself just works “inside the room” meaning inside the layer 2 boundary, if you have to take this to the layer 3 level, you will need a multicast protocol </div>
<div align="justify">
<strong>PIM (Protocol Independent Multicast) </strong></div>
<div align="justify">
The PIM is a protocol, which is by far the most used protocol for multicast traffic across the Layer 3. There are 2 basic modes in which this protocol works</div>
<ul>
<li> <div align="justify">
Dense Mode</div>
</li>
<li> <div align="justify">
Sparse Mode</div>
</li>
</ul>
<div align="justify">
There are combination of this, called sparse-dense mode, but we will not digress into those. </div>
<div align="justify">
To explain dense mode, I would quote the example of you going into a room full of people and start speaking about some topic. You also mention that the people not interested can leave the room, this is exactly how the dense mode works. The multicast starts happening as a broadcast and then the people send out “Leave group” messages if they are not interested in the stream, so the pruning happens after the hosts respond. </div>
<div align="justify">
The sparse mode is quite the opposite, wherein you actually tell people, please come into the room only if you are interested and then start talking, so people who are interested will start sending the “membership report” to join the group and only then the multicast stream will be forwarded to them </div>
<div align="justify">
In most places only the sparse mode is used (and some time sparse-dense), but I haven’t seen dense mode be used so often, as a lot of older computers, they don’t send out a prune message to stop the stream. </div>
<div align="justify">
Now, having understood the PIM, there is another term, I want you guys to understand and its perhaps the most important point. The Rendezvous point (RP in short), this point is basically the meeting point of the sender of the streams and the hosts interested in that stream. </div>
<div align="justify">
Equipped with all the above information, lets take into account the Juniper EX switch configuration. </div>
<div align="justify">
<strong>Multicast on Juniper</strong> </div>
<div align="justify">
There are 2 ways you can do inter-vlan multicast on the EX switches </div>
<ul>
<li> <div align="justify">
PIM</div>
</li>
<li> <div align="justify">
Multicast VLAN registration </div>
</li>
</ul>
<div align="justify">
The Multicast VLAN registration is the way to do it on the distribution layers only, which means, VLANS hosted in the same switch. So, it really cannot go over a WAN and do it at another site, but PIM on the other hand can do both. </div>
<div align="justify">
Depending on your needs, just select one of the 2 methods </div>
<div align="justify">
<a href="http://lh6.ggpht.com/-sel_bFb-vro/TzvXj7UDGPI/AAAAAAAAD7I/aY8qaZ3PVf8/s1600-h/image3.png"><img alt="image" border="0" height="380" src="http://lh6.ggpht.com/-0MnN3qZFgmU/TzvXl4rfSXI/AAAAAAAAD7Q/ydcL7bLO-Uw/image_thumb1.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="609" /></a></div>
<div align="justify">
In the above diagram, if you only want to have the multicast within the clients of datacenter 1, then you can use either of the 2 methods, but if you want the multicast to travel across the layer 3 link to the data centre 2 , then you can only use PIM. </div>
<div align="justify">
<br /></div>
<div align="justify">
<strong>Configuring MVR on Juniper EX Switches</strong> </div>
<div align="justify">
Considering the fact that the server switches and the Client switches are acting only on layer 2 mode, and the Inter vlan routing is happing on the core switches using RVI’s (which is the mostly the case), this configuration needs to go on the switches. </div>
<div align="justify">
In the diagram, you can see the VLAN 10 as the server VLAN , where the streaming server sits and the VLAN 20 and 30 as the client VLANs (Again, please note the VLAN 40 and 50 will not get this traffic as we are using MVR) </div>
<div align="justify">
Since I have said, so much, you should also be wondering, why bother with MVR, if the same can be done with the PIM. The answer is, MVR reduces the number of streams, assume that one client on vlan 20 and one client on VLAN 30 requests the stream, the switch will actually send 2 streams (one per vlan) if you use PIM, but in MVR, it only sends one stream there by making efficient use of the bandwidth available and again, you can use a igmp-proxy mode or a transparent mode. </div>
<pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">[edit protocols igmp-snooping]</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"><span style="color: blue;">set</span> vlan vlan10 data-forwarding source groups 225.10.0.0/16</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"><span style="color: blue;">set</span> vlan vlan20 data-forwarding receiver source-vlans vlan10</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"><span style="color: blue;">set</span> vlan vlan20 data-forwarding receiver install</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"><span style="color: blue;">set</span> vlan vlan30 data-forwarding receiver source-vlans vlan10</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"><span style="color: blue;">set</span> vlan vlan30 data-forwarding receiver install</pre>
</pre>
<br />
So, you can see that in the transparent mode, you just configure this on all the switches, when you go to the igmp-proxy mode, you will have to use one extra line <br />
<pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 10px; margin: 0em; width: 100%;">[edit protocols igmp-snooping]</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 10px; margin: 0em; width: 100%;"><span style="color: blue;">set</span> vlan vlan10 proxy source-address 10.1.1.1</pre>
</pre>
<br />
<div align="justify">
So, you are done. I have to confess, I don’t really use this mode. </div>
<br />
<div align="justify">
<br /></div>
<br />
<div align="justify">
<strong>PIM on EX switches</strong></div>
<br />
<div align="justify">
This is my favorite way to do multicast. I prefer the sparse mode and will show you how to configure it on Juniper EX switches </div>
<br />
<div align="justify">
Steps </div>
<br />
<ul><br />
<li><div align="justify">
Select a router to be the RP</div>
</li>
<li><div align="justify">
Set a loopback IP on that router (or L3 EX switch) </div>
</li>
<li><div align="justify">
Configure a RP protocol – I will use static here, but there are some options and variety of ways to use it. Static is the simplest to configure but it has the single point of failure issues </div>
</li>
<li><div align="justify">
Configure the RP </div>
</li>
<li><div align="justify">
Configure the layer 2 switches </div>
</li>
</ul>
<br />
<div align="justify">
<br /></div>
<br />
<div align="justify">
In most cases, we will have redundant routers, so I am changing the topology a little bit </div>
<br />
<div align="justify">
<a href="http://lh5.ggpht.com/-GmZLK-seMfQ/TzvXnrhn0bI/AAAAAAAAD7Y/EMHYm6ruBRk/s1600-h/image8.png"><img alt="image" border="0" height="398" src="http://lh4.ggpht.com/-dzKdgdCv3XI/TzvXpRInYfI/AAAAAAAAD7g/j9ZWQYXZUbs/image_thumb4.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="643" /></a></div>
<br />
<div align="justify">
<br /></div>
<br />
<div align="justify">
As you can see, I put in 2 core switches and made redundant connections on all the switches. Now, please note that you will need to configure Spanning tree protocol or its flavours to ensure a loop free network, that is not covered under this blog and we will assume that all of that is been taken care of</div>
<br />
<div align="justify">
We have decided on the following </div>
<br />
<ul><br />
<li><div align="justify">
RP : Core Switch 1 </div>
</li>
<li><div align="justify">
Multicast Group : 225.0.30.0/24 </div>
</li>
</ul>
<br />
<div align="justify">
<u>Configuration on all the Layer 2 switches</u> </div>
<br />
<div align="justify">
The only configuration needed on the Layer 2 switches are that IGMP-snooping should be on </div>
<pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 10px; margin: 0em; width: 100%;">root@ServerSwitch01> show configuration protocols</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 10px; margin: 0em; width: 100%;">igmp-snooping {</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 10px; margin: 0em; width: 100%;"> vlan all;</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 10px; margin: 0em; width: 100%;">}</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 10px; margin: 0em; width: 100%;"></pre>
</pre>
<br />
The same configuration should be on all the Server and Client Switches (especially the client switch)<br />
<br />
<u>On the RP</u><br />
<br />
<ul><br />
<li>Create a Loopback </li>
<li>Ensure the loopback is reachable from other devices (by adding it into appropriate routing) </li>
<li>Configure PIM</li>
</ul>
<pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">root@COR01> show configuration interfaces lo0</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">unit 0 {</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"> family inet {</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"> address 10.0.0.200/32;</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"> }</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">}</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"></pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">{master:0}</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">root@COR01></pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">root@COR01> show configuration protocols ospf</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">area 0.0.0.0 {</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"> <span style="color: blue;">interface</span> lo0.0 {</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"> passive;</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"> }</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">}</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">root@COR01></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">root@COR01> show configuration protocols pim</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">rp {</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"> local {</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"> address 10.0.0.200;</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"> }</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">}</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"><span style="color: blue;">interface</span> all {</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"> mode sparse;</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">}</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">{master:0}</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"></pre>
<span style="background-color: white;"></span></pre>
<br />
You can see that in this case, we have not mentioned a multicast range, so the whole 224.0.0.0/4 range will be used <br />
<br />
On the other routers (Layer 3), we will use a static rp configuration, they don’t need a loopback, but they should be able to reach the loopback of this RP <br />
<br />
<br />
<pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">root@COR02> show configuration protocols pim</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">rp {</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> <span style="color: blue;">static</span> {</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> address 10.0.0.200;</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> }</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">}</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"><span style="color: blue;">interface</span> all {</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> mode sparse;</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">}</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">{master:0}</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"></pre>
</pre>
<br />
<br />
<br />
The similar configuration is enough in the other devices. The multicast traffic should now be able to traverse between different vlans and even different datacentre <br />
<br />
<br />
<br />
Here are a few commands to check and verify <br />
<br />
On the Layer 2 switch <br />
<br />
“<strong><em>show igmp-snooping membership detail</em></strong>” <br />
<br />
This will show you that the IGMP snooping is working and see which client has requested for which group <br />
<br />
<br />
<pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">root@clientSwitch1> show igmp-snooping membership detail</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">VLAN: Client_DATA Tag: 20 (Index: 2)</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> Router interfaces:</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> xe-0/1/0.0 dynamic Uptime: 4d 17:23 timeout: 235</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> Group: 239.192.83.80</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> ge-0/0/30.0 timeout: 240 Last reporter: 10.0.14.17 Receiver count: 1, Flags: <V2-hosts></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> ge-0/0/23.0 timeout: 242 Last reporter: 10.0.14.61 Receiver count: 1, Flags: <V2-hosts></pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> ge-0/0/7.0 timeout: 246 Last reporter: 10.0.14.26 Receiver count: 1, Flags: <V2-hosts></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> ge-1/0/38.0 timeout: 248 Last reporter: 10.0.14.148 Receiver count: 1, Flags: <V2-hosts></pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> ge-1/0/32.0 timeout: 248 Last reporter: 10.0.14.30 Receiver count: 1, Flags: <V2-hosts></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> ge-2/0/43.0 timeout: 244 Last reporter: 10.0.14.56 Receiver count: 1, Flags: <V2-hosts></pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> ge-4/0/3.0 timeout: 243 Last reporter: 10.0.14.174 Receiver count: 1, Flags: <V2-hosts></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> ge-1/0/18.0 timeout: 242 Last reporter: 10.0.14.22 Receiver count: 1, Flags: <V2-hosts></pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> ge-1/0/3.0 timeout: 242 Last reporter: 10.0.14.130 Receiver count: 1, Flags: <V2-hosts></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> ge-1/0/37.0 timeout: 244 Last reporter: 10.0.14.36 Receiver count: 1, Flags: <V2-hosts></pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"></pre>
</pre>
<br />
Here you can see which are the clients requesting for the group <br />
<br />
<br />
<br />
On the Layer 3 devices <br />
<br />
show pim interfaces – This command will show the interfaces on which PIM is running and the neighbors and the designated router <br />
<br />
<strong><em>show pim join extensive</em></strong> – This command will show the different vlans where the streams are being forwarded <br />
<pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Group: 225.0.30.253</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> Source: 10.0.10.252</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> Flags: sparse,spt</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> Upstream <span style="color: blue;">interface</span>: vlan.10</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> Upstream neighbor: Direct</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> Upstream state: None, Local Source, Local RP</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> Keepalive timeout: 332</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> Uptime: 1d 18:25:48</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> Downstream neighbors:</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> <span style="color: blue;">Interface</span>: ge-0/0/37.0 (pruned)</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> 10.0.70.11 State: Prune Flags: SR Timeout: 208</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> Uptime: 1d 17:28:31 Time since last Prune: 00:00:02</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"></pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"></pre>
</pre>
<br />
<br />
<br />
Ensure the vlans are getting the traffic, this will happen only if the IGMP-snooping and the IGMP join messages reach the RP <br />
<br />
<strong><em>show pim rps extensive</em></strong> <br />
<br />
This is a very important command to check the status of RP and all the multicast groups associated with the RP <br />
<pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 650px;"><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">root@PDX-SWIT-COR01> show pim rps extensive</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Instance: PIM.master</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Address family INET</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">RP: 10.0.0.200</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Learned via: <span style="color: blue;">static</span> configuration</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Time Active: 4d 16:00:43</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Holdtime: 0</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Device Index: 26</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Subunit: 32769</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"><span style="color: blue;">Interface</span>: pimd.32769</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"><span style="color: blue;">Static</span> RP Override: Off</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Group Ranges:</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> 224.0.0.0/4</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Register State <span style="color: blue;">for</span> RP:</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Group Source FirstHop RP Address State Timeout</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">225.0.30.253 10.0.10.252 10.0.0.201 10.0.0.200 Receive 0</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">228.1.2.1 10.0.30.83 10.0.0.201 10.0.0.200 Receive 180</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"></pre>
</pre>
<br />
<br />
<br />
<br />
<br />
I hope this blog helped you get started on multicast on Juniper devices . please let me know if you have questions or comments. I will write on some advanced configuration in the future parts</div>Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com16tag:blogger.com,1999:blog-7540521873209715356.post-90563163713833862712011-11-25T16:20:00.001+05:302011-11-25T16:54:50.041+05:30HAProxy for Exchange 2010–Part 2 (Redundancy)<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="wlWriterHeaderFooter" style="float: none; margin: 0px; padding: 4px 0px 4px 0px;">
<iframe frameborder="0" scrolling="no" src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2011/11/haproxy-for-exchange-2010part-2.html" style="border: none; height: 80px; width: 450px;"></iframe></div>
<div align="justify">
After I wrote the blog for using HAProxy (<a href="http://haproxy.1wt.eu/">http://haproxy.1wt.eu/</a>) for Exchange 2010 in order to reduce a few thousand dollars from your budget of purchasing a load balancer. Now though that blog would have helped people in doing a Proof of Concept, there is some thing that is missing from it. <strong>REDUNDANCY!!!</strong></div>
<div align="justify">
Yes, the whole idea of load balancing is to remove the single point of failure, but what if the Load balancer is the new single point of failure ? yes, that’s why we need two of them </div>
<div align="justify">
For the people who are reading this first, please read the <a href="http://3-4-5-6.blogspot.com/2011/03/ha-proxy-for-exchange-2010-deployment.html">http://3-4-5-6.blogspot.com/2011/03/ha-proxy-for-exchange-2010-deployment.html</a></div>
<div align="justify">
Now, once you have read through it, you should know that this is a working load balancer example and Steve has also created a VMWare solution for it. </div>
<div align="justify">
Now, this is brilliant if the load balancer stays up, but we have to plan for the worse. Though, I haven’t seen the HAProxy crash “Knock on wood”, we still need a redundant solution. </div>
<div align="justify">
This blog will explain only the differences as to what you need to do to get a redundant solution. In terms of implementation, you will need to do this before you follow the HA Proxy deployment guide (link mentioned earlier). Just for the sake of completeness, I will document the complete solution here.</div>
<div align="justify">
<strong><u>Design</u></strong></div>
<div align="justify">
<a href="http://lh6.ggpht.com/-_9csoZfkuqc/Ts9y2tT4kXI/AAAAAAAADnQ/kMyXljT6wEI/s1600-h/image4.png"><img alt="image" border="0" height="391" src="http://lh4.ggpht.com/-16JAEI7sv0Q/Ts9y31WZhsI/AAAAAAAADnY/aeACpDwKbRY/image_thumb2.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="644" /></a></div>
<div align="justify">
<br /></div>
<div align="justify">
The above shows the diagram shows the single arm configuration of the load balancer. The Single arm configuration concept is explained <a href="http://3-4-5-6.blogspot.com/2011/04/design-strategies-in-f5-ltmpart-1.html" target="_blank" title="Single Arm Mode">here</a>. In the blog post, I have used f5 LTM as an example, but it is the same concept in all the load balancers. </div>
<div align="justify">
So, we can start now </div>
<div align="justify">
We will need 2 components for this to work, again, I am going to use Ubuntu. Once you have installed Ubuntu, we are going to have to install the following components </div>
<ul>
<li> <div align="justify">
keepalived</div>
</li>
<li> <div align="justify">
haproxy </div>
</li>
</ul>
<div align="justify">
After installing these components, we will configure the HA Proxy and the Exchange server. </div>
<div align="justify">
<strong><u>Before Starting:</u></strong></div>
<div align="justify">
Please note, we will be needing the following IP addresses, I have mentioned the IP’s I am going to use for this example in brackets</div>
<div align="justify">
1. Management IP of Load Balancer 1 (10.10.10.9/24)</div>
<div align="justify">
2. Management IP of Load Balancer 2 (10.10.10.10/24)</div>
<div align="justify">
3. Floating IP (10.10.10.11/24)</div>
<div align="justify">
4. IP address of CAS 1 : (10.10.10.20/24)</div>
<div align="justify">
5. IP address of CAS 2 : (10.10.10.21/24)</div>
<div align="justify">
Once the installation is done, set the management IP to the load balancer, here we will configure the Primary system </div>
<div align="justify">
<strong>On Active System</strong></div>
<div align="justify">
Set up IP address on eth0 </div>
<div align="justify">
<br /></div>
<pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Edit the file /etc/network/interfaces using vi or your preferred editor </pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">Add the following</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">auto eth0</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">iface eth0 inet static</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> address 10.10.10.9</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> netmask 255.255.255.0</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> network 10.10.10.0</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> broadcast 10.10.10.255</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> gateway 10.10.10.1</pre>
</pre>
<br />
<div align="justify">
This will set the management IP on the Active box, lets continue</div>
<br />
<div align="justify">
<strong><u>Backup box </u></strong></div>
<br />
<div align="justify">
Set the management IP address of the backup box </div>
<br />
<div align="justify">
<strong><u>Step 1: Install KeepAlived</u></strong> </div>
<pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">apt-get install keepalived</pre>
</pre>
<br />
Once you execute this command, now the Keep Alive daemon is installed on the Ubuntu system <br />
<br />
<strong><u>Step 2: Install HAProxy</u></strong> <br />
<pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">apt-get install haproxy</pre>
</pre>
<br />
This command will install the HA Proxy on the box. <br />
<br />
<strong><u>Step 3: Allow HAProxy to use non local IP</u></strong><br />
<br />
In order to do this, edit the file “/etc/sysctl.conf” and ensure this is added <br />
<pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">net.ipv4.ip_nonlocal_bind=1</pre>
</pre>
<br />
As you see, this will mention the HAProxy to allow to bind to an IP which may not be assigned to it. after you have added it <br />
<br />
run the command<br />
<br />
sysctl -p<br />
<br />
<br />
<br />
The idea is there will be a floating IP and that IP will be assigned to the active box and if the active box dies or the HA proxy dies, the standby will take over. <br />
<br />
<strong><u>Step 4: Configure the KeepAliveD</u></strong><br />
<br />
Configuring the keep alive d is very simple, you will need the floating IP. As an option you can send yourself an e-mail if the primary fails so that you can preemptively know. <br />
<br />
Edit the file “/etc/keepalived/keepalived.conf”<br />
<pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">global_defs {</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> notification_email {</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> yourusername@example.com</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> }</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> notification_email_from keepalived@loadbalancer01.example.com</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> smtp_server 192.168.1.200</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> smtp_connect_timeout 30</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">}</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> </pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">vrrp_script chk_haproxy { </pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> script "<span style="color: darkred;">killall -0 haproxy</span>" # this will check <span style="color: blue;">if</span> the haproxy is up</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> interval 5 # check every 5 seconds</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> weight 2 # add 2 points of priority <span style="color: blue;">if</span> OK</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">}</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> </pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">vrrp_instance VI_1 {</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> interface eth0</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> state MASTER # or "<span style="color: darkred;">BACKUP</span>" on backup</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> priority 101 # 101 on master, 100 on backup</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> virtual_router_id 51</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> </pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> smtp_alert # Activate SMTP notifications, you can remove this <span style="color: blue;">if</span> you dont want alerts</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> </pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> authentication {</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> auth_type PASS</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> auth_pass somepassword</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> }</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> </pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> virtual_ipaddress {</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> 10.10.10.11</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> }</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> track_script {</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> chk_haproxy</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;"> }</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">}</pre>
</pre>
<br />
<div align="justify">
<br /></div>
<br />
<div align="justify">
This will actually have the 10.10.10.11 as a floating IP and it will be assigned to only to the active box. </div>
<br />
<div align="justify">
The same configuration works on the Backup box , just change the priority to 100 and state to backup </div>
<br />
<div align="justify">
After this just follow the older blog from <a href="http://3-4-5-6.blogspot.com/2011/03/ha-proxy-for-exchange-2010-deployment.html#config_exchange" target="_blank">here</a>, Please follow it from the title “<b>Configuration of Exchange Server” </b></div>
<br />
<div align="justify">
You don’t need to follow other networking steps mentioned before the title. Once you complete that on both the load balancers, you officially have a redundant pair. </div>
<br />
<div align="justify">
You can now check on netstat –la to check the listening ports, you will see the active box is listening on the floating ip.</div>
<br />
<div align="justify">
<br /></div>
<br />
<div align="justify">
Enjoy !!!</div>
</div>Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com6tag:blogger.com,1999:blog-7540521873209715356.post-91458170715191803572011-11-01T01:17:00.001+05:302011-11-01T01:21:18.586+05:30How to SaaS-ify your .NET Application<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="wlWriterHeaderFooter" style="float: none; margin: 0px; padding: 4px 0px 4px 0px;">
<iframe frameborder="0" scrolling="no" src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2011/11/how-to-saas-ify-your-net-application.html" style="border: none; height: 80px; width: 450px;"></iframe></div>
<div align="justify">
Lately, I have been working on designing Cloud based Datacenters and suggesting Cloud Solutions for customers, etc. I have evaluated quite a few vendors at different spaces in the cloud (Infra, Platform, Security, etc.). I thought, I would share one of the most asked questions by customers. </div>
<blockquote>
<div align="justify">
<strong>Q: </strong><em>How do I SaaSify (or SaaS enable) my application ?</em></div>
</blockquote>
<div align="justify">
Before I jump on to answering that question, I would like to draw some background here, I believe in my prior blogs, I did mention about what is Cloud and all the other stuff (which you may not care about) . In this section, we will look at SaaS </div>
<div align="justify">
So, lets start from the basics, the “<em>Necessity”…</em>Quite frankly, the primary need for cloud is to ‘<strong>Get more Bang out of the buck’</strong> and that all … Isn’t it always about it? Almost, the cloud however also provides other features like availability, resiliency, yada yada … Lets answer the following question … </div>
<div align="justify">
Q: <em>What is SaaS? </em> </div>
<div align="justify">
Let’s take a look at software! How can I get more from the investment that I have always made? Wouldn’t it be nice, if I could have the same application used by my many customers, without having to deploy a completely new infrastructure, servers or instances of application for each one of them. (Like in traditional days) Now there is nothing wrong doing it the old way, but the overhead costs are high and a lot of computing resources are not effectively utilized. Now, I have already mentioned in my earlier blog, that cloud follows the “Natural Evolution” … It evolved from Servers to Blade Servers, to Virtual Servers, and now even squeezing more from the virtuals. </div>
<div align="justify">
This is nothing but SaaS, where multiple people can use the same software, without us having to put in a completely different deployment for each customer. People like the idea of multiple people using the software, and they getting paid for it. Then normally the next question is </div>
<div align="justify">
<em>Q: So how can I SaaS enable my application?</em> </div>
<div align="justify">
There are 2 ways, </div>
<div align="justify">
1. Have your developer re write the code to incorporate, the names of the client, billing structures, connection with some Authentication & Authorization (if not already present), etc !!! </div>
<div align="justify">
Doesn’t sound easy … Does it ? The cost of development (actually re-development) will be high and even going forward the overhead for management and operations will be high, </div>
<div align="justify">
I guess the below cartoon will portray my point</div>
<div align="justify">
<a href="http://lh4.ggpht.com/-3PW0upyeL7U/Tq77Pjm_OHI/AAAAAAAADmY/xD0qiYZV_PM/s1600-h/saas_option1%25255B3%25255D.png"><img alt="saas_option1" border="0" height="354" src="http://lh6.ggpht.com/-n2qDU7l5THU/Tq77RkDRqSI/AAAAAAAADmg/FG4vYohog78/saas_option1_thumb%25255B1%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="saas_option1" width="609" /></a></div>
<div align="justify">
This option works, but has a lot of Cons , let us take a look at Pro’s and Cons for this method </div>
<div align="justify">
Pros:</div>
<ul>
<li> <div align="justify">
Completely Controlled </div>
</li>
<li> <div align="justify">
Any programming Language</div>
</li>
</ul>
<div align="justify">
Cons:</div>
<ul>
<li> <div align="justify">
High Capital Expenditure </div>
</li>
<li> <div align="justify">
Time taking process</div>
</li>
<li> <div align="justify">
The business logic and the costing is still hard coded a lot of times and its essential for the program to change to modify pricing, etc</div>
</li>
</ul>
<div align="justify">
<br /></div>
<div align="justify">
<strong>Option 2:</strong> Use SaaS Grid</div>
<div align="justify">
SaaS Grid is the product from Apprenda. Please remember that this will only work if you have a .NET program (3-Tier web Architecture) to be SaaSified . It doesn’t work on Java</div>
<div align="justify">
Now, what SaaS Grid is under the covers is a .NET program itself which is capable of running other .NET programs inside it. Yes!! that’s it, same concept of Hypervisors (For those who don’t know, Hypervisors are the heart of the Virtual machine, a layer between the Hardware and multiple operating systems that they run on top of them) in the same way, (drawing an analogy ofcourse, ) SaaSgrid is the hypervisor between the operating system and the programs running on it. </div>
This product is a .NET application, it needs to be installed on servers, after which the application will itself host multiple other .NET applications. The application has a few features like <br />
<ul>
<li>· Authentication (Federation is Allowed)</li>
<li>· Authorization </li>
<li>· Multi tenancy</li>
<li>· Billing </li>
</ul>
These features can be used by any underlying .NET application by API calls. This is how it transforms a normal application in a multi tenanted model; <br />
<a href="http://lh3.ggpht.com/-KqfFtmGlRl0/Tq77S8F5IFI/AAAAAAAADmo/ixFgUK8IddE/s1600-h/image%25255B3%25255D.png"><img alt="image" border="0" height="257" src="http://lh6.ggpht.com/-_Xy_Fq4Xmww/Tq77Un9RcOI/AAAAAAAADmw/zL1OGfqLPh0/image_thumb%25255B1%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="599" /></a> <br />
<div align="justify">
With SaaSgrid, you are sure to use the following features</div>
<ul>
<li>You don’t have to code for the platform.</li>
<li>Time to market is made better by giving the developers access to create and deploy applications on will</li>
<li>Enforce compliance, by allowing / disallowing methods (DLL’s) </li>
<li>Allow easy scaling of the application.</li>
<li>Standardizing components like authentication</li>
<li>Offloading multi tenancy concepts </li>
<li>Abstract Infrastructure layer from the application. </li>
<li>Consolidate applications. </li>
</ul>
<div align="justify">
And the below diagram shows how SaaSGrid will assist when deploying multiple application</div>
<div align="justify">
<a href="http://lh6.ggpht.com/-RcycqEIlhDs/Tq77WpidpjI/AAAAAAAADm4/dBpGqaHtmgg/s1600-h/image%25255B7%25255D.png"><img alt="image" border="0" height="369" src="http://lh6.ggpht.com/-4ED6StMVTVg/Tq77Y0Y8enI/AAAAAAAADnA/hcSYfV1h_kg/image_thumb%25255B3%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="465" /></a></div>
<div align="justify">
<br /></div>
<div align="justify">
<em>Q: How does SaaS Grid saasify my application</em> </div>
SaaS Grid deployed the application as a normal application; it went ahead and did some changes on the database. (There are how ever 2 modes on the Database) <br />
If you chose commingled, it added columns representing the tenant name (so on and so forth), and it also created views, so when the application queries, it will query the view and hence no change needed in the application. <br />
If you chose Isolated, it created isolated databases for each tenant and then directed the queries of the application to the appropriate databases during the run time. <br />
SaaS Grid inherently has authentication and authorization, so it knows who logged in and what are they allowed to-do. <br />
SaaS Grid intercepts user calls to the application and application calls to the resources and re-routes accordingly, completely transparent to the application. The application doesn’t even need to know. As you can see, we have not deployed multiple different applications; we have not over used the resources at all. <br />
The SaaS grid does it very intelligently, so we don’t see any performance degradation. <br />
There is other fancy stuff that you can do but more on that later…. <br />
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:380c57f3-2986-4118-86dd-e3631bc373ed" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
Technorati Tags: <a href="http://technorati.com/tags/SaaS+Grid" rel="tag">SaaS Grid</a>,<a href="http://technorati.com/tags/Apprenda" rel="tag">Apprenda</a>,<a href="http://technorati.com/tags/SaaS+Enable" rel="tag">SaaS Enable</a>,<a href="http://technorati.com/tags/.NET+Applications" rel="tag">.NET Applications</a></div>
</div>Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com0tag:blogger.com,1999:blog-7540521873209715356.post-53300182281944835052011-08-17T02:25:00.002+05:302011-08-17T02:28:42.214+05:30HAProxy Load Balancer with SSL Offloading<div dir="ltr" style="text-align: left;" trbidi="on"><div class="wlWriterHeaderFooter" style="float: none; margin: 0px; padding: 4px 0px 4px 0px;"><iframe frameborder="0" scrolling="no" src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2011/08/haproxy-load-balancer-with-ssl.html" style="border: none; height: 80px; width: 450px;"></iframe></div><div align="justify">In my previous blog, where I mentioned how to use HA Proxy(<a href="http://haproxy.1wt.eu/">http://haproxy.1wt.eu/</a> – Open source Load balancing Solution) based load balancer for Exchange 2010 (<a href="http://3-4-5-6.blogspot.com/2011/03/ha-proxy-for-exchange-2010-deployment.html" target="_blank">Link to Post</a>), I had a few requests on how to do the SSL offloading as well. If you have followed that guide, you have your SSL certificates hosted on the Exchange Hub CAS servers. </div>Microsoft does suggest to use the SSL on the boxes, but you can offload it as well, please remember that I am writing this for a generic https server and we will be using 2 open source products. <br />
We will use HA Proxy for the Load balancing and the Pound for the SSL offloading. Now, for this purposes, I have used a single box, but for production machines, you may want to make a HA Pair of Linux box, which I will cover in a different post. <br />
I have been running HA Proxy in the exchange environment and it is great, the only thing, I could ask for is source port based persistence <img alt="Smile" class="wlEmoticon wlEmoticon-smile" src="http://lh4.ggpht.com/-UBcNydfn0BM/TkrZRr973EI/AAAAAAAADlM/Vq5SWac8axo/wlEmoticon-smile2.png?imgmax=800" style="border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;" />. <br />
Anycase, back to the topic. Here is how the architecture will look like.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://lh5.ggpht.com/-mgKYyhzgJYE/TkrZRs0UBxI/AAAAAAAADlQ/Ch-H0ymT6jA/s1600-h/image3.png" style="margin-left: 1em; margin-right: 1em;"><img alt="image" border="0" src="http://lh6.ggpht.com/-vnVaOoe0TEk/TkrZSGcfYuI/AAAAAAAADlU/-ELeyElJc-c/image_thumb1.png?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" /></a></div><br />
As you can see the Pound will do the SSL offload and send the traffic to HA Proxy and HA Proxy will do the load balancing. <br />
Don’t get me wrong guys, pound is capable of sending the traffic directly to the servers, but then you will not be able to use the cool features of ha proxy like cookie persistence, so on and so forth. <br />
<br />
In our test environment, here is what we will do. <br />
Client Facing IP: 192.168.10.10<br />
Server IP Address: 10.10.10.11, 10.10.10.12<br />
The Linux Box is 192.168.10.9 <br />
<br />
First, install Ubuntu (<a href="http://www.ubuntu.com/download/ubuntu/download">http://www.ubuntu.com/download/ubuntu/download</a>) on the box. <br />
Add the 192.168.10.10 as a Virtual IP on the box (If you are using a Active standby setup, this will be the floating IP)<br />
Edit the interfaces script in Ubuntu) <br />
<pre>vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.10.9
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.1
auto eth0:1
iface eth0:1 inet static
address 192.168.10.10
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.1
</pre><br />
<br />
<br />
Restart the Networking subsystem <br />
<pre>/etc/init.d/networking restart</pre><br />
Once that is done, the IP addresses will be shown when you execute “ifconfig –a” command.<br />
<br />
Then install the following packages<br />
<div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; height: 40px; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"><br />
<div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum1" style="color: #606060;"> 1:</span> sudo apt-get install haproxy pound</pre></div></div><br />
This will install the haproxy and pound, <br />
<br />
Now, lets roll<br />
<br />
<h2>Configuring pound:</h2><br />
In order to configure pound, you will need to edit the config file using vi (or editor of your choice) <br />
<br />
vi /etc/pound/pound.cfg<br />
<br />
The file should look like the following. Please note, that I have installed the server certificate as PEM on the system.<br />
<br />
<br />
<pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">## global options:
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">User "<span style="color: darkred;">www-data</span>"
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">Group "<span style="color: darkred;">www-data</span>"
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">#RootJail "<span style="color: darkred;">/chroot/pound</span>"
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">## Logging: (goes to syslog by default)
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">## 0 no logging
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">## 1 normal
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">## 2 extended
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">## 3 Apache-style (common log format)
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">LogLevel 1
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">## check backend every X secs:
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">Alive 30
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"># Creating Listener
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">ListenHTTPS
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">Address 192.168.10.10
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">Port 443
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">Cert "<span style="color: darkred;">/etc/pound/testdom.pem</span>"
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">Client 20
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">End
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">Service
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">HeadRequire "<span style="color: darkred;">Host:.*testdomain.com*</span>"
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">BackEnd
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">Address 127.0.0.2
</pre><pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">Port 80
</pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">End</pre></pre><br />
<br />
<br />
So, as you can see, it’s a generic configuration and then it is using the 127.x.x.x subnet to talk to the HA Proxy, the HAProxy will be listening on the particular IP and port. <br />
<br />
After the configuration is done, go ahead and restart pound. <br />
<br />
/etc/init.d/pound restart<br />
<br />
The HA Proxy configuration will look like this <br />
<br />
<div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"><br />
<div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum1" style="color: #606060;"> 1:</span> global</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum2" style="color: #606060;"> 2:</span> #uid 99</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum3" style="color: #606060;"> 3:</span> #gid 99</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum4" style="color: #606060;"> 4:</span> daemon</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum5" style="color: #606060;"> 5:</span> stats socket /var/run/haproxy.stat mode 600 level admin</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum6" style="color: #606060;"> 6:</span> maxconn 40000</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum7" style="color: #606060;"> 7:</span> ulimit-n 81000</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum8" style="color: #606060;"> 8:</span> pidfile /var/run/haproxy.pid</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum9" style="color: #606060;"> 9:</span> defaults</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum10" style="color: #606060;"> 10:</span> mode http</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum11" style="color: #606060;"> 11:</span> contimeout 4000</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum12" style="color: #606060;"> 12:</span> clitimeout 3600000</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum13" style="color: #606060;"> 13:</span> srvtimeout 3600000</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum14" style="color: #606060;"> 14:</span> balance roundrobin</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum15" style="color: #606060;"> 15:</span> listen ServerSSL 127.0.0.2:80</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum16" style="color: #606060;"> 16:</span> mode tcp</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum17" style="color: #606060;"> 17:</span> option persist</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum18" style="color: #606060;"> 18:</span> balance leastconn</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum19" style="color: #606060;"> 19:</span> stick-table type ip size 10240k expire 15m</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum20" style="color: #606060;"> 20:</span> stick on src</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum21" style="color: #606060;"> 21:</span> server Server1 10.10.10.11 weight 1 check port 80 inter 5000 rise 2 fall 3</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum22" style="color: #606060;"> 22:</span> server Server2 10.10.10.11 weight 1 check port 80 inter 5000 rise 2 fall 3</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum23" style="color: #606060;"> 23:</span> option redispatch</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum24" style="color: #606060;"> 24:</span> option abortonclose</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum25" style="color: #606060;"> 25:</span> maxconn 40000</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum26" style="color: #606060;"> 26:</span> listen stats :7000</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum27" style="color: #606060;"> 27:</span> stats enable</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum28" style="color: #606060;"> 28:</span> stats uri /</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum29" style="color: #606060;"> 29:</span> option httpclose</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum30" style="color: #606060;"> 30:</span> stats auth username:password</pre></div></div><br />
This might not seem like worth it, as this is for a single HTTPs client, but let me go ahead and do the same thing for exchange. <br />
<br />
Here is how the Pound configuration and HA Proxy configuration will look for Exchange 2010, with SSL offload.<br />
<br />
<br />
<span class="Apple-style-span" style="font-size: 24px; font-weight: bold;">Pound and HAProxy for Exchange 2010</span><br />
<br />
Pound Configuration:<br />
<br />
<div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"><br />
<div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum1" style="color: #606060;"> 1:</span> <span style="color: green;">## Pound Configuration</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum2" style="color: #606060;"> 2:</span> User "www-data"</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum3" style="color: #606060;"> 3:</span> Group "www-data"</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum4" style="color: #606060;"> 4:</span> <span style="color: green;">## Logging: (goes to syslog by default)</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum5" style="color: #606060;"> 5:</span> <span style="color: green;">## 0 no logging</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum6" style="color: #606060;"> 6:</span> <span style="color: green;">## 1 normal</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum7" style="color: #606060;"> 7:</span> <span style="color: green;">## 2 extended</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum8" style="color: #606060;"> 8:</span> <span style="color: green;">## 3 Apache-style (common log format)</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum9" style="color: #606060;"> 9:</span> LogLevel 1</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum10" style="color: #606060;"> 10:</span> <span style="color: green;">## check backend every X secs:</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum11" style="color: #606060;"> 11:</span> Alive 30</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum12" style="color: #606060;"> 12:</span> ListenHTTP</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum13" style="color: #606060;"> 13:</span> Address 192<span style="color: red;">.</span>168<span style="color: red;">.</span>10<span style="color: red;">.</span>10</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum14" style="color: #606060;"> 14:</span> Port 80</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum15" style="color: #606060;"> 15:</span> Client 10</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum16" style="color: #606060;"> 16:</span> End</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum17" style="color: #606060;"> 17:</span> ListenHTTPS</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum18" style="color: #606060;"> 18:</span> Address 192<span style="color: red;">.</span>168<span style="color: red;">.</span>10<span style="color: red;">.</span>10</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum19" style="color: #606060;"> 19:</span> Port 443</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum20" style="color: #606060;"> 20:</span> Cert "/etc/pound/mailserver<span style="color: red;">.</span>pem"</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum21" style="color: #606060;"> 21:</span> Client 20</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum22" style="color: #606060;"> 22:</span> End</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum23" style="color: #606060;"> 23:</span> Service</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum24" style="color: #606060;"> 24:</span> HeadRequire "Host:<span style="color: red;">.</span><span style="color: #cc6633;">*</span>mail<span style="color: red;">.</span>domain<span style="color: red;">.</span>com<span style="color: #cc6633;">*</span>"</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum25" style="color: #606060;"> 25:</span> BackEnd</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum26" style="color: #606060;"> 26:</span> Address 127<span style="color: red;">.</span>0<span style="color: red;">.</span>0<span style="color: red;">.</span>5</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum27" style="color: #606060;"> 27:</span> Port 80</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum28" style="color: #606060;"> 28:</span> End</pre></div></div><br />
HA Proxy Configuration:<br />
<br />
<div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"><br />
<div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum1" style="color: #606060;"> 1:</span> global</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum2" style="color: #606060;"> 2:</span> <span style="color: green;">#uid 99</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum3" style="color: #606060;"> 3:</span> <span style="color: green;">#gid 99</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum4" style="color: #606060;"> 4:</span> daemon</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum5" style="color: #606060;"> 5:</span> stats socket /var/run/haproxy<span style="color: red;">.</span>stat mode 600 level admin</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum6" style="color: #606060;"> 6:</span> maxconn 40000</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum7" style="color: #606060;"> 7:</span> ulimit-n 81000</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum8" style="color: #606060;"> 8:</span> pidfile /var/run/haproxy<span style="color: red;">.</span>pid</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum9" style="color: #606060;"> 9:</span> defaults</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum10" style="color: #606060;"> 10:</span> mode http</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum11" style="color: #606060;"> 11:</span> contimeout 4000</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum12" style="color: #606060;"> 12:</span> clitimeout 3600000</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum13" style="color: #606060;"> 13:</span> srvtimeout 3600000</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum14" style="color: #606060;"> 14:</span> balance roundrobin</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum15" style="color: #606060;"> 15:</span> listen Exchange2010-HTTP-HTTPS 127<span style="color: red;">.</span>0<span style="color: red;">.</span>0<span style="color: red;">.</span>5:80</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum16" style="color: #606060;"> 16:</span> mode tcp</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum17" style="color: #606060;"> 17:</span> option persist</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum18" style="color: #606060;"> 18:</span> balance roundrobin</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum19" style="color: #606060;"> 19:</span> stick-table type ip size 10240k expire 30m</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum20" style="color: #606060;"> 20:</span> stick on src</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum21" style="color: #606060;"> 21:</span> server HC-CAS1 10<span style="color: red;">.</span>10<span style="color: red;">.</span>10<span style="color: red;">.</span>11:80 weight 1 check port 80 inter 5000 rise 2 fall 3</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum22" style="color: #606060;"> 22:</span> server HC-CAS2 10<span style="color: red;">.</span>10<span style="color: red;">.</span>10<span style="color: red;">.</span>12:80 weight 1 check port 80 inter 5000 rise 2 fall 3</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum23" style="color: #606060;"> 23:</span> option redispatch</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum24" style="color: #606060;"> 24:</span> option abortonclose</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum25" style="color: #606060;"> 25:</span> maxconn 40000</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum26" style="color: #606060;"> 26:</span> listen Exchange2010 192<span style="color: red;">.</span>168<span style="color: red;">.</span>10<span style="color: red;">.</span>10:25</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum27" style="color: #606060;"> 27:</span> bind 192<span style="color: red;">.</span>168<span style="color: red;">.</span>10<span style="color: red;">.</span>10:110,192<span style="color: red;">.</span>168<span style="color: red;">.</span>10<span style="color: red;">.</span>10:135</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum28" style="color: #606060;"> 28:</span> bind 192<span style="color: red;">.</span>168<span style="color: red;">.</span>10<span style="color: red;">.</span>10:139,192<span style="color: red;">.</span>168<span style="color: red;">.</span>10<span style="color: red;">.</span>10:443</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum29" style="color: #606060;"> 29:</span> bind 192<span style="color: red;">.</span>168<span style="color: red;">.</span>10<span style="color: red;">.</span>10:60000,192<span style="color: red;">.</span>168<span style="color: red;">.</span>10<span style="color: red;">.</span>10:60001</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum30" style="color: #606060;"> 30:</span> bind 192<span style="color: red;">.</span>168<span style="color: red;">.</span>10<span style="color: red;">.</span>10:6001-6004</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum31" style="color: #606060;"> 31:</span> bind 192<span style="color: red;">.</span>168<span style="color: red;">.</span>10<span style="color: red;">.</span>10:993-995</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum32" style="color: #606060;"> 32:</span> mode tcp</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum33" style="color: #606060;"> 33:</span> option persist</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum34" style="color: #606060;"> 34:</span> balance roundrobin</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum35" style="color: #606060;"> 35:</span> stick-table type ip size 10240k expire 30m</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum36" style="color: #606060;"> 36:</span> stick on src</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum37" style="color: #606060;"> 37:</span> server HC-CAS1 10<span style="color: red;">.</span>10<span style="color: red;">.</span>10<span style="color: red;">.</span>11 weight 1 check port 80 inter 5000 rise 2 fall 3</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum38" style="color: #606060;"> 38:</span> server HC-CAS2 10<span style="color: red;">.</span>10<span style="color: red;">.</span>10<span style="color: red;">.</span>12 weight 1 check port 80 inter 5000 rise 2 fall 3</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum39" style="color: #606060;"> 39:</span> option redispatch</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum40" style="color: #606060;"> 40:</span> option abortonclose</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum41" style="color: #606060;"> 41:</span> maxconn 40000</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum42" style="color: #606060;"> 42:</span> listen stats :7000</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum43" style="color: #606060;"> 43:</span> stats enable</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum44" style="color: #606060;"> 44:</span> stats uri /</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum45" style="color: #606060;"> 45:</span> option httpclose</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span id="lnum46" style="color: #606060;"> 46:</span> stats auth username:password</pre></div></div><br />
Please note, that you will still have to make those changes on the Exchange server as noted in my earlier blog post. <br />
<br />
If you need explanation on any of the configuration components, do ask (for the HA proxy they are all explained in my previous blog post) <br />
<br />
I hope you find this informative and would like to thank you for reading.</div>Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com10tag:blogger.com,1999:blog-7540521873209715356.post-76282294028711621652011-08-17T00:58:00.005+05:302012-11-19T11:24:08.801+05:30Juniper Aggregate Interfaces (LACP/No LACP)<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="wlWriterHeaderFooter" style="float: none; margin: 0px; padding: 4px 0px 4px 0px;">
<iframe frameborder="0" scrolling="no" src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2011/08/juniper-aggregate-interfaces-lacpno.html" style="border: none; height: 80px; width: 450px;"></iframe></div>
<div align="justify">
Last week, I was implementing link aggregation on Juniper EX Series switches (EX4200). I was moving them off HP switches and putting them into Juniper.</div>
<div align="justify">
We were moving VMWare ESX boxes, NetApp and some physical boxes, though the configuration is very simple, I would like to mention how to do those with these boxes. </div>
<div align="justify">
Points to remember:</div>
<ul>
<li> <div align="justify">
You will explicitly need to create “Aggregated Ethernet” interfaces on juniper</div>
</li>
<li> <div align="justify">
You cannot have more than 64 AE interfaces on a single Virtual Chassis</div>
</li>
<li> <div align="justify">
You cannot change the algorithm for load balancing between the multiple links. (If you are interested in the Junipers LAG algorithm read <a href="http://kb.juniper.net/InfoCenter/index?page=content&id=KB18219" target="_blank">this</a> )</div>
</li>
</ul>
<div align="justify">
Now having said this, lets look at the common steps, you need to create the Aggregated Ethernet interfaces on the Juniper. </div>
<blockquote>
<div align="justify">
root@EX4200#set chassis aggregated-devices ethernet device-count <strong>4</strong></div>
</blockquote>
<div align="justify">
The above command will create 4 “ae” interfaces, after you commit, you should see ae0 – ae 3 created. You can have any value between 1 and 64 in the place of the 4.</div>
<div align="justify">
Please also remember that, the individual interfaces should have absolutely no configuration before they can be added to the aggregation. In our example, we have taken interfaces ge-0/0/0 and ge-0/0/1</div>
<blockquote>
<div align="justify">
root@EX4200#delete interfaces ge-0/0/0 unit 0</div>
<div align="justify">
root@EX4200#delete interfaces ge-0/0/1 unit 0</div>
</blockquote>
<div align="justify">
You may chose to completely delete the interface itself, so all the configuration under the interfaces (like mtu) will be cleared.</div>
<div align="justify">
At this point, you will have some thing similar</div>
<div align="justify">
<pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 12px; margin: 0em; width: 100%;">chassis {
</pre>
</pre>
</div>
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">aggregated-devices {</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">ethernet {</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">device-count 4;</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">}</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">}</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">}</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">interfaces</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">{</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">ge-0/0/0 {</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">}</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">ge-0/0/1 {</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">}</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 12px; white-space: pre;">}</span><br />
<br />
<div align="justify">
So, now that we have created the place holders for the aggregated interfaces, we will look into LACP in a little bit more detail. </div>
<br />
<div align="justify">
Please remember that LACP is a negotiation protocol. It’s a standard protocol comparable to Cisco PAgP, which was later standardized into LACP. Also, remember that both ends must support LACP for the bundling to work using LACP. </div>
<br />
<h2 align="justify">
</h2>
<br />
<h2 align="justify">
ESX and juniper EX:</h2>
<br />
<div align="justify">
When creating the Aggregated interface, remember that the ESX (version 4) doesn’t support LACP, so we will be doing a generic aggregation. In this example, the ESX ports are vmnic2 and vmnic3 and the Switch ports are ge-0/0/0 and ge-0/0/1</div>
<br />
<h3 align="justify">
</h3>
<span class="Apple-style-span" style="font-size: 13px; font-weight: bold;">On ESX</span><br />
<ul>
<li><div align="justify">
Add the multiple networks in a vSwitch</div>
</li>
<li><div align="justify">
Set Load Balancing as “Route based on IP Hash”</div>
</li>
<li><div align="justify">
Network Failover Detection as “Link Status Only” </div>
</li>
<li><div align="justify">
Notify Switch as Yes </div>
</li>
</ul>
<br />
<div align="justify">
<a href="http://lh5.ggpht.com/-tMc1hFQYbKA/TkrEykKYa6I/AAAAAAAADlA/3dq-TrLUDJg/s1600-h/image%25255B4%25255D.png"><img alt="image" border="0" height="412" src="http://lh6.ggpht.com/-tshFaisoShA/TkrEzzigTuI/AAAAAAAADlE/zni8ROIXdlQ/image_thumb%25255B2%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="411" /></a></div>
<br />
<div align="justify">
That’s all the change you need on VMWare. </div>
<br />
<div align="justify">
<span class="Apple-style-span" style="font-size: 13px; font-weight: bold;">On Juniper EX</span></div>
<br />
<ul>
<li><div align="justify">
Connect vmnic2 => ge-0/0/0</div>
</li>
<li><div align="justify">
Connect vmnic3 => ge-0/0/1</div>
</li>
</ul>
<br />
<div align="justify">
<pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 10px; margin: 0em; width: 100%;">1: set interface ge-0/0/0 ether-options 802.3ad ae0
</pre>
</pre>
</div>
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">2: set interface ge-0/0/1 ether-options 802.3ad ae0</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">3: set ae5 unit 0 description "<span style="color: darkred;">ESX - LAN Bundle</span>"</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">4: set ae5 unit 0 family ethernet-switching port-mode access vlan members vlan1</span><br />
<br />
<div align="justify">
So, with this, you see, we havent set any LACP properties, this is the way ESX likes is <img alt="Smile" class="wlEmoticon wlEmoticon-smile" src="http://lh4.ggpht.com/-88Cc3WSMeT8/TkrE0iWfYoI/AAAAAAAADlI/11FR1WW2SDU/wlEmoticon-smile%25255B2%25255D.png?imgmax=800" style="border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;" />. We should have the interfaces up. </div>
<br />
<div align="justify">
You can make sure by </div>
<br />
<div align="justify">
<pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">1: root@EX4200> show interfaces terse | match ae0
</pre>
</pre>
</div>
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 11px; white-space: pre;">2: ge-0/0/0.0 up up aenet --> ae0.0</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 11px; white-space: pre;">3: ge-0/0/1.0 up up aenet --> ae0.0</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 11px; white-space: pre;">4: ae0 up up</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 11px; white-space: pre;">5: ae0.0 up up eth-<span style="color: blue;">switch</span></span><br />
<span class="Apple-style-span" style="font-family: consolas, 'Courier New', courier, monospace;"><span class="Apple-style-span" style="font-size: 11px; white-space: pre;"><br />
</span></span><br />
<div align="justify">
If the ae interface status is down, which means some thing went wrong and you need to reconfigure. <br />
<br />
EDIT:<br />
There is one thing I forgot to mention, some times you will lose connectivity while doing the change. In that case, you would have configured the Management Network differently, but the source Hash will not be working...<br />
<br />
Please use the following to correct it ...<br />
<br />
"<span class="Apple-style-span" style="color: #333333; font-family: 'Courier New'; font-size: 13px;"># vim-cmd hostsvc/net/vswitch_setpolicy --nicteaming-policy=loadbalance_ip vSwitch0</span><br />
<span class="Apple-style-span" style="color: #333333; font-family: 'Courier New'; font-size: 13px;"># vim-cmd hostsvc/net/portgroup_set --nicteaming-policy=loadbalance_ip vSwitch0 </span></div>
<div align="justify">
<span class="Apple-style-span" style="color: #333333; font-family: 'Courier New'; font-size: 13px;">"</span></div>
<div align="justify">
<span class="Apple-style-span" style="color: #333333; font-family: 'Courier New'; font-size: 13px;"><br />
</span></div>
<div align="justify">
<span class="Apple-style-span" style="color: #333333; font-family: 'Courier New'; font-size: 13px;"><a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1022751">Link to VMWare KB</a></span></div>
<br />
<div align="justify">
<br />
EDIT 2:<br />
I was working with the ESX and ESXi and I was in for a shocking revelation... When I connected the ESXi ports which hosted the Managment network (even after making the Mgmt network to route based on IP Hash), the LACP bundle came up but there were 60% packet loss. On trying to find the reason, I found a weird work around.<br />
<br />
Now, in my case, there is just one single subnet, so obviously, on the Juniper end, I had set to port mode access. Turns out ESX doesn't like it, though it is an access port, so to make the LACP bundle work, I converted the ae interface to trunk and set the access vlan as a native-vlan-id ... wallah !! it started working :)<br />
<br />
Juniper EX configuration for the ESXi with Management Network<br />
<br />
<br />
<pre>unit 0 {
description "ESX1 - LAN";
family ethernet-switching {
port-mode trunk;
native-vlan-id server_vlan1;
}
}
<div>
</div>
</pre>
</div>
<div>
<br /></div>
<div>
Now, if you are using multiple vlans, then you may not have faced the problem in the first place as the port mode would have been trunk. </div>
<div>
<br /></div>
<div>
Another thing, I would like to mention is that, in Juniper, if you have noticed, I haven't put anything under vlan members, that is because, if the port mode is trunk, anything that you put under vlan members becomes tagged ... Wierd I know ...</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
I wouldn't leave this to chance that it is working, so i did some more digging around, I again read <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004048">this</a> link. (Which I had read some 5 times before), but here is what i read ... </div>
<div>
<br /></div>
<blockquote>
<span class="Apple-style-span" style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif, 'Bitstream Vera Sans'; font-size: 12px;"></span><br />
<h3 style="color: black; font-size: 14px; font-weight: bold; font: normal normal normal 14px/normal Arial, Helvetica, sans-serif, 'Bitstream Vera Sans'; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 5px; padding-top: 10px;">
<span class="Apple-style-span" style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif, 'Bitstream Vera Sans'; font-size: 12px;">"HP Switches Sample Configuration</span></h3>
<div style="font: normal normal normal 12px/normal Arial, Helvetica, sans-serif, 'Bitstream Vera Sans'; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span class="Apple-style-span" style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif, 'Bitstream Vera Sans'; font-size: 12px;">The following configuration is specific to HP switches:</span></div>
<ul style="font: normal normal normal 12px/normal Arial, Helvetica, sans-serif, 'Bitstream Vera Sans';">
<li style="font: normal normal normal 12px/normal Arial, Helvetica, sans-serif, 'Bitstream Vera Sans';"><span class="Apple-style-span" style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif, 'Bitstream Vera Sans'; font-size: 12px;">HP switches support only two modes of LACP, ACTIVE, and PASSIVE while ESX/ESXi does not support either LACP mode currently.</span></li>
<span class="Apple-style-span" style="background-color: white; color: #333333; font-family: Arial, Helvetica, sans-serif, 'Bitstream Vera Sans'; font-size: 12px;">
<li style="font: normal normal normal 12px/normal Arial, Helvetica, sans-serif, 'Bitstream Vera Sans';">Set HP Switch port mode to TRUNK to accomplish static link aggregation with ESX/ESXi.</li>
<li style="font: normal normal normal 12px/normal Arial, Helvetica, sans-serif, 'Bitstream Vera Sans';">TRUNK Mode of HP switch ports are the only supported aggregation method compatible with ESX 3.X NIC teaming mode IP hash. "</li>
</span></ul>
</blockquote>
<br />
<div>
Now, if you will notice, the Juniper also supports only Active and Passive LACP modes ... I had ignored it as it was for HP switches and for ESX3.x (I am running 4.x), but I guess this is the only explanation as to why it works this way. </div>
<div>
<br /></div>
<div>
Hopefully, you save some time digging around the info :)</div>
<br />
<br />
<br />
<br />
<span class="Apple-style-span" style="font-size: 24px; font-weight: bold;">NetApp and Juniper EX</span><br />
<br />
<div align="justify">
NetApp supports LACP, so here we will see how to create a LACP vif on the NetApp and the corresponding configuration on Juniper EX. </div>
<br />
<div align="justify">
In this case, on the netapp, we have 2 interfaces e0a and e0b (vif1), and on the Juniper side we have ge-0/0/2 and ge-0/0/3</div>
<br />
<h5 align="justify">
On Net App:</h5>
<br />
<div align="justify">
If the vif is created, we will remove that and recreate. </div>
<br />
<div align="justify">
the commands for NetApp are </div>
<br />
<div align="justify">
<pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 400px;"><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">1: ifconfig vif1 down
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">2: vif destroy vif1
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">3: vif create lacp vif1 -b ip e0a e0b</pre>
</pre>
</div>
<br />
<div align="justify">
So, this is really very clear, we turned down an interface, then destroyed its configuration and then we said, we will create a virtual interface called vif1 with lacp and the load balancing method of “ip” , that’s what the “-b” switch stood for, and then we added the 2 interfaces. </div>
<br />
<div align="justify">
The LACP is only available from version 7 and up, if you have a lower version, please go ahead and create a multi-mode vif and the Juniper switch configuration will like the ESX. </div>
<br />
<div align="justify">
<br /></div>
<span class="Apple-style-span" style="font-size: 13px; font-weight: bold;">On Juniper EX</span><br />
<br />
<ul>
<li><div align="justify">
Create the ae interfaces as mentioned in the beginning (if you already have configured them, then you don’t need to do it)</div>
</li>
<li><div align="justify">
Clean the configuration of the 2 interfaces.</div>
</li>
</ul>
The configuration on the EX switches will look like this<br />
<br />
<div align="justify">
<pre style="background-color: #fbfbfb; border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; border-right: #cecece 1px solid; border-top: #cecece 1px solid; height: 884px; min-height: 40px; overflow: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 620px;"><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">1: ae1 {
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">2: aggregated-ether-options {
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">3: link-speed 1g;
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">4: lacp {
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">5: active;
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">6: periodic slow;
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">7: }
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">8: }
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">9: unit 0 {
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">10: description "<span style="color: darkred;">NetApp1 - Controller 2 - LAN</span>";
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">11: family ethernet-switching {
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">12: port-mode access;
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">13: vlan {
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">14: members vlan1;
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">15: }
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">16: }
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">17: }
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">18: }
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">19: interfaces
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">20: {
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">21: ge-0/0/2 {
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">22: ether-options {
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">23: 802.3ad ae1;
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">24: }
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">25: }
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">26: ge-0/0/3 {
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">27: ether-options {
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">28: 802.3ad ae1;
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">29: }
</pre>
<pre style="background-color: white; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;">30: }
</pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: small; white-space: normal;">
</span></pre>
<pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 11px; margin: 0em; width: 100%;"><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: small; white-space: normal;">Once this is created, you can see the only difference is the LACP configuration that we put on the ae interface (this was not done for ESX/ESXi)</span></pre>
</pre>
</div>
<div align="justify">
You can check if the interfaces are up, the very same way, but in addition, you also will have a LACP command to check. </div>
<br />
<div align="justify">
<pre><pre style="background-color: #fbfbfb; font-family: consolas,'Courier New',courier,monospace; font-size: 10px; margin: 0em; width: 100%;">1: root@PDX-SWIT-SVC02> show interfaces terse | <span style="color: blue;">match</span> ae1.0
</pre>
</pre>
</div>
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">2: ge-0/0/2.0 up up aenet --> ae1.0</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">3: ge-0/0/3.0 up up aenet --> ae1.0</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">4: ae1.0 up up eth-switch</span><br />
<span class="Apple-style-span" style="font-family: consolas, 'Courier New', courier, monospace; font-size: xx-small;"><span class="Apple-style-span" style="white-space: pre;"><br />
</span></span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">6: {master:0}</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">7: root@EX4200> show lacp interfaces ae1</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">8: Aggregated interface: ae1</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">9: LACP state: Role Exp Def Dist Col Syn Aggr Timeout Activity</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">10: ge-0/0/2 Actor No No Yes Yes Yes Yes Slow Active</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">11: ge-0/0/2 Partner No No Yes Yes Yes Yes Slow Active</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">12: ge-0/0/3 Actor No No Yes Yes Yes Yes Slow Active</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">13: ge-0/0/3 Partner No No Yes Yes Yes Yes Slow Active</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">14: LACP protocol: Receive State Transmit State Mux State</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">15: ge-0/0/3 Current Slow periodic Collecting distributing</span><br />
<span class="Apple-style-span" style="background-color: white; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">16: ge-0/0/3 Current Slow periodic Collecting distributing</span><br />
<span class="Apple-style-span" style="background-color: #fbfbfb; font-family: consolas, 'Courier New', courier, monospace; font-size: 10px; white-space: pre;">17: </span><br />
<br />
You should be able to see if the LACP should be active for both partner and the Actor, if so, then the configuration works.<br />
<br />
<div align="justify">
Hope you have found the guide useful. Please do comment if some thing needs to be corrected / altered.</div>
</div>
Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com18tag:blogger.com,1999:blog-7540521873209715356.post-30498388155346055162011-06-26T07:02:00.003+05:302011-06-26T07:06:44.888+05:30Auto/Bulk Add devices in Cacti<div dir="ltr" style="text-align: left;" trbidi="on"><div class="wlWriterHeaderFooter" style="float: none; margin: 0px; padding: 4px 0px 4px 0px;"><iframe frameborder="0" scrolling="no" src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2011/06/autobulk-add-devices-in-cacti.html" style="border: none; height: 80px; width: 450px;"></iframe></div><div align="justify">Hi folks, I was doing some work with Cacti, and I had to add multiple devices in the graphing console automatically. Actually, the script is still incomplete and I have only added the graphs that don’t need a Data queries. This system consist of custom host templates and scripts (Like using iControl for F5 Monitoring and WebAPI for Bluecoat Monitoring), I may post those scripts later, but I thought, you could use this as a starting point. </div><div align="justify">For people who are wondering, cacti is a open source rrdtool based monitoring system, with a huge user base I must say. (<a href="http://cacti.net/">http://cacti.net/</a>) . It has multiple plugins which makes it even more fun to use.</div><div align="justify">Ok, things to note before you go on using the Script </div><ul><li> <div align="justify">Cacti system, built and ready</div></li>
<li> <div align="justify">The graphs will be added in tree with subdivisions as areas. In my case, I divided into (Americas, Asia Pacific and Europe and Middle East) </div></li>
<li> <div align="justify">This script adds the device and decides the zones by the domain name. </div></li>
<li> <div align="justify">You need another bootstrap script to call this for adding multiple devices. </div></li>
<li> <div align="justify">You can use any device template, please notice, that the interface graphs will not be added as I haven’t coded it to go to data queries). </div></li>
<li> <div align="justify">I have also installed the Plugin Architecture and installed the “Monitor Plugin” (<a href="http://docs.cacti.net/plugin:monitor">http://docs.cacti.net/plugin:monitor</a>) </div></li>
<li> <div align="justify">I will also add the device to monitoring using the script. </div></li>
</ul><div id="codeSnippetWrapper" style="background-color: #f4f4f4; border-bottom: silver 1px solid; border-left: silver 1px solid; border-right: silver 1px solid; border-top: silver 1px solid; cursor: text; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 20px 0px 10px; max-height: 200px; overflow: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: left; width: 97.5%;"><div id="codeSnippet" style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">#!/usr/bin/perl</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;"># Author : Alok. A. S (alokshrivastwa@hotmail.com)</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;"># Script to add multiple devices and thier corresponding graphs.</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;"># Module List</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">use</span> Net::SNMP; <span style="color: green;"># For PreChecks</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">use</span> Getopt::Long;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">use</span> Mysql;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## Variables ##</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $device_name = $ARGV[0];</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $device_template = $ARGV[1];</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $community_string = <span style="color: #006080;">"$ARGV[2]"</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $skip_check = <span style="color: #006080;">"$ARGV[3]"</span>;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $OID_sysname = <span style="color: #006080;">'1.3.6.1.2.1.1.5.0'</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$device_name = lc($device_name);</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## Check if all input are there</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span> (($device_name == <span style="color: #006080;">""</span> ) <span style="color: blue;">or</span> ($device_template == <span style="color: #006080;">""</span>) <span style="color: blue;">or</span> ($community_string == <span style="color: #006080;">""</span>))</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">&help();</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">exit</span> 127;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">sub help($_)</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">print</span> <span style="color: #006080;">"\n-----------------\nTo invoke this script the format is \n\n"</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">print</span> <span style="color: #006080;">"./scriptname.pl <hostname.domain.com> <device template> <SNMP Community> [skip_check]\n"</span>;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">print</span> <span style="color: #006080;">"\nDevice template can be : SGOS5/SGOS4/f5/Checkpoint/ASA\n"</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">print</span> <span style="color: #006080;">"please use \"skip_check\" if you want to skip the SNMP checks and add the device\n"</span>;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## Check if SNMP is working and the Device Name is proper, meaning we are not going to another device.</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## This is to ensure that the wrong device doesn't get added in monitoring or the same device doesnt get added in Monitoring</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span> ($skip_check != <span style="color: #006080;">"skip_check"</span>)</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my ($session, $error) = Net::SNMP->session(</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">-hostname => $device_name,</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">-community => $community_string,</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">);</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span> (!defined $session) {</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">printf <span style="color: #006080;">"\nCannot add Device, SNMP not working with the error - ERROR: %s.\n"</span>, $error;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">exit</span> 1;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $result = $session->get_request(-varbindlist => [ $OID_sysname ],);</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span> (!defined $result) {</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">printf <span style="color: #006080;">"\nCannot get the SysName OID, cannot continue due to the following error - ERROR: %s.\n"</span>, $session->error();</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$session->close();</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">exit</span> 1;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$SNMP_name = $result->{$OID_sysname};</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">printf <span style="color: #006080;">"The System Name Configured for host '%s' is %s.\n"</span>,</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$session->hostname(), $SNMP_name;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$session->close();</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$SNMP_name = lc($SNMP_name);</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span> ($skip_check != <span style="color: #006080;">"skip_check"</span>)</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span> ($device_name !~ m/$SNMP_name/i)</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">print</span> <span style="color: #006080;">"The SNMP Device name doesn't match the input name, Cannot Continue"</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">exit</span> 1;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## If we have made it so far, we need to see if the host template is available for the device and then decide to continue</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## We will also set some variables, which will be used in the actual addition of the devices.</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$php_var = <span style="color: #006080;">'/usr/bin/php'</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$cli_command_dir = <span style="color: #006080;">'/var/www/cacti/cli'</span>;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $system_get_template_id=`php -q $cli_command_dir/add_device.php --<span style="color: blue;">list</span>-host-templates | grep <span style="color: #006080;">"[0-9]"</span> | grep -i <span style="color: #006080;">"$device_template"</span> | awk <span style="color: #006080;">'{print \$1}'</span>`;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">chomp ($system_get_template_id);</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span> (($system_get_template_id == <span style="color: #006080;">'0'</span> ) <span style="color: blue;">or</span> ($system_get_template_id == <span style="color: #006080;">''</span> ))</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">print</span> <span style="color: #006080;">"Unknown template or template not in system, Quitting...."</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">exit</span> 1;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## If we have come so far, then we need to</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## 1. Add the Device in the Cacti</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## 2. Find assocaiated templates</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## 3. Add Graphs</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $new_desc = $device_name;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $region=<span style="color: #006080;">"Americas"</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span> ($device_name =~ m/\.aspac.domain.com$/i)</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$region=<span style="color: #006080;">"ASPAC"</span>;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span> ($device_name =~ m/\.emea.domain.com$/i)</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$region=<span style="color: #006080;">"EMEA"</span>;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$new_desc =~ s/\..*<span style="color: green;">//g;</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">system(<span style="color: #006080;">"php -q $cli_command_dir/add_device.php --description=$new_desc --ip=\"$device_name\" --template=\"$system_get_template_id\" --avail=snmp --ping_retries=2 --version=2 --community=\"$community_string\" --port=161 --timeout=500"</span>);</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## Get the Host-ID and add the corresponding graphs which need no data query</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $added_host_id = `php -q $cli_command_dir/add_tree.php --<span style="color: blue;">list</span>-hosts | grep $new_desc |awk <span style="color: #006080;">'{print \$1}'</span>`;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">chomp($added_host_id);</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span> (!($added_host_id >= <span style="color: #006080;">'1'</span>))</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">print</span> <span style="color: #006080;">"unknown host, possibly not added yet, quitting..."</span>;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">exit</span> 1;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">print</span> <span style="color: #006080;">"The host, $device_name has the id $added_host_id\n"</span>;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## Update the Database to start monitoring ##</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $database = <span style="color: #006080;">"cacti"</span>;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $host = <span style="color: #006080;">"localhost"</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $port = <span style="color: #006080;">"3306"</span>;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $user = <span style="color: #006080;">"cactiusername"</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $pw = <span style="color: #006080;">"cactipassword"</span>;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $cactiquery = <span style="color: #006080;">"update host set monitor='on' where id=\'$added_host_id\'"</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $connect1 = Mysql->connect($host, $database, $user, $pw);</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">$connect1->selectdb($database);</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $execute1 = $connect1->query($cactiquery);</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## Getting the Graph ID's and adding the Graphs that dont need query, you will need to add the queried graphs explicitly.</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my @graph_template_ids=`php -q $cli_command_dir/add_graphs.php --<span style="color: blue;">list</span>-graph-templates --host-template-id=$system_get_template_id | grep [0-9].* | awk <span style="color: #006080;">'{print \$1}'</span>`;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">foreach</span> $id (@graph_template_ids)</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">chomp($id);</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span>(length($id))</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">system(<span style="color: #006080;">"php -q $cli_command_dir/add_graphs.php --host-id=$added_host_id --graph-type=cg --graph-template-id=$id"</span>);</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## At this point, the graphs will be added but they will not be shown in the tree.</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">##</span></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $main_tree_id = `php -q $cli_command_dir/add_tree.php --<span style="color: blue;">list</span>-trees | grep <span style="color: #006080;">"$device_template"</span> | awk <span style="color: #006080;">'{print \$1}'</span>`;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">chomp($main_tree_id);</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $parent_id = `php -q $cli_command_dir/add_tree.php --<span style="color: blue;">list</span>-nodes --tree-id=$main_tree_id | grep $region | awk <span style="color: #006080;">'{print \$2}'</span>`;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">chomp($parent_id);</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">my $already_on_branch = `php -q $cli_command_dir/add_tree.php --<span style="color: blue;">list</span>-nodes --tree-id=$main_tree_id | grep $device_name | awk <span style="color: #006080;">'{print \$2}'</span>`;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">if</span> (($already_on_branch >= <span style="color: #006080;">'1'</span>))</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">{</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">print</span> <span style="color: #006080;">"\nDevice already on branch, Not adding..."</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">exit</span> 1;</pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">}</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: green;">## Add device to the tree</span></pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;">system(<span style="color: #006080;">"php -q $cli_command_dir/add_tree.php --type=node --node-type=host --host-id=$added_host_id --tree-id=$main_tree_id --parent-node=$parent_id"</span>);</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">print</span> <span style="color: #006080;">"\nDevice Added!!!"</span>;</pre><pre style="background-color: #f4f4f4; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"></pre><pre style="background-color: white; border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none; color: black; direction: ltr; font-family: 'Courier New', courier, monospace; font-size: 8pt; line-height: 12pt; margin: 0em; overflow: visible; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; width: 100%;"><span style="color: blue;">exit</span> 0;</pre></div></div><br />
<div align="justify">In the above script, I have used 3 different domain names, in order for the region to be determined. </div><br />
<div align="justify"><br />
</div><br />
<div align="justify">You will have to create a treee structure prior to this like this </div><br />
<div align="justify"><br />
</div><br />
<ul><li><div align="justify">Device Type (Tree Name)</div></li>
<ul><li><div align="justify">Americas (header)</div></li>
<li><div align="justify">EMEA (header)</div></li>
<li><div align="justify">ASPAC (header)</div></li>
</ul></ul>So in my case I created the tree structure<br />
<br />
<ul><li><div align="justify">SGOS5</div></li>
<ul><li><div align="justify">Americas</div></li>
<li><div align="justify">EMEA</div></li>
<li><div align="justify">ASPAC</div></li>
</ul><li><div align="justify">SGOS4</div></li>
<ul><li><div align="justify">Americas</div></li>
<li><div align="justify">EMEA</div></li>
<li><div align="justify">ASPAC</div></li>
</ul><li><div align="justify">f5</div></li>
<ul><li><div align="justify">Americas</div></li>
<li><div align="justify">EMEA</div></li>
<li><div align="justify">ASPAC</div></li>
</ul></ul><br />
<div align="justify">Another point I failed to mention is that, this is not the final script that I created, I followed the perl best practices in development and also made it modular, but I throw this out, so people can play with the script. Once I have the final script, I may post it on another blog. you can couple this with PHP and call it from there for bulk addition and things like that.</div><br />
<div align="justify">Till then, Ciao…</div><br />
<div align="justify"><br />
</div><br />
<div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:65a07605-8632-4988-ac94-e58e088d0594" style="display: inline; float: none; margin: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Technorati Tags: <a href="http://technorati.com/tags/Cacti" rel="tag">Cacti</a>,<a href="http://technorati.com/tags/Auto+add" rel="tag">Auto add</a>,<a href="http://technorati.com/tags/Bulk+add" rel="tag">Bulk add</a>,<a href="http://technorati.com/tags/Perl+script" rel="tag">Perl script</a>,<a href="http://technorati.com/tags/add+devices+to+Cacti" rel="tag">add devices to Cacti</a></div></div>Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com2tag:blogger.com,1999:blog-7540521873209715356.post-59882792213993333412011-06-26T06:29:00.002+05:302011-06-26T06:33:41.796+05:30Cloud Computing …. Designing a Private Cloud<div dir="ltr" style="text-align: left;" trbidi="on"><div class="wlWriterHeaderFooter" style="float: none; margin: 0px; padding: 4px 0px 4px 0px;"><iframe frameborder="0" scrolling="no" src="http://www.facebook.com/widgets/like.php?href=http://3-4-5-6.blogspot.com/2011/06/cloud-computing-designing-private-cloud.html" style="border: none; height: 80px; width: 450px;"></iframe></div><div align="justify"><br />
</div><div align="justify">Sorry folks, sorry for not being able to update my blog for a long time. I have been working on designing Cloud based solutions for Private Cloud. So, I thought, I will share some insight here. I am writing this with the perception that the readers have no or very little knowledge about the Cloud computing, so please forgive me if at certain places I point the obvious. Hope, you like the entry and let me know your views in the comments section. </div><div align="justify"><br />
</div><h3 align="justify">Introduction:</h3><div align="justify">Cloud Computing is the recent buzz word in the IT industry, but as the name, it also does not have a clear or well defined standards or structure or even capability matrix. As a result, it is also the most abused word in the IT industry. With all the jargon out there, it becomes pretty confusing. I attempt to give an insight in all of those. The document is majorly on PaaS (Plat form as a Service) </div><h3 align="justify"> </h3><h3 align="justify">What is Cloud Computing:</h3><div align="justify">Although there are multitudes of definitions out there, I think it would be safe to define, “Cloud Computing”, as a logical group of computational resources optimized and automated in a multi tenant model to provide scalability, reliability, redundancy and availability. </div><div align="justify"> </div><h4 align="justify">Time to welcome FLA’s:</h4><div align="justify">Its funny that I say this, but with Cloud Computing, TLA’s (Three Letter Acronyms) are out of the window, we are moving towards Four and Five Letter Acronyms. If you have ever heard or spoken about Cloud Computing, you would have used the words like </div><ul><li> <div align="justify">IaaS (Infrastructure as a Service)</div></li>
<li> <div align="justify">PaaS (Platform as a Service)</div></li>
<li> <div align="justify">SaaS (Software as a Service)</div></li>
<li> <div align="justify">SAaaS (Software Architecture as a Service) </div></li>
</ul><div align="justify">These days, you can take any good old IT terminology, add “aaS” and call it Cloud Computing. (At this point, I just could not help but notice how that word ‘aaS’ sounds. Get the pun?). Any case, since Cloud Computing is the new way of IT, every one wants a piece of it. In the next section, we will try to see the cloud evolution. </div><div align="justify"> </div><h4 align="justify">Cloud Evolution:</h4><div align="justify">For those who think that cloud is some form of a new technology, I will have to disappoint you, because it is not. Cloud is a logical evolution of IT. Trying to draw an analogy, let me take you back in time, when the only way you could send data was by purchasing “Leased Lines”. Since those were owned by the company, they could use them at any time and to the extent the data pipe would allow them, but then it was expensive, so the Telco used a concept well known to us, “Over Subscription”. Frame Relay came into existence, so did ATM. When the POP (Points of Presence) of the Telco providers started becoming the cost centers and they needed security and reusability, or virtualization to another degree, MPLS came in to existence. </div><div align="justify">On the compute side as well, we have seen Virtualization.When, we saw that on an average a physical compute power was only used about 5-10%, we decided to use hypervisors and make one physical box work as multiple virtual boxes, this evolved as Virtual Data Centers. The whole abstraction phenomenon has turned out to be very profitable, for both Corporates (In terms of Cost Saving) and the earth (In terms of lessening the Carbon footprint). Yes, we IT people are environment friendly too <img alt="Smile" class="wlEmoticon wlEmoticon-smile" src="http://lh4.ggpht.com/-8gCw1n3ZI-I/TgaENmezTZI/AAAAAAAADh8/uWQHagcyC1Q/wlEmoticon-smile%25255B2%25255D.png?imgmax=800" style="border-bottom-style: none; border-left-style: none; border-right-style: none; border-top-style: none;" /> </div><div align="justify">We have also seen that the code is so written that it centralizes management and the necessity of the compute power and hence have seen an increase in the Web Applications, which follows the cloud server models. </div><div align="justify">So moving naturally in the same line of sight, you see that what we call “Cloud” today is just the next level of abstraction in the same sense. </div><div align="justify"> </div><h4 align="justify">Cloud Standards:</h4><div align="justify"><a href="http://lh3.ggpht.com/-PUCTR3ozYYQ/TgaER11VWNI/AAAAAAAADiA/4nJGm9Q4gIY/s1600-h/image%25255B3%25255D.png"><img alt="image" border="0" height="272" src="http://lh3.ggpht.com/-xju-dOIpbkA/TgaETWjjmlI/AAAAAAAADiE/KpkIt1lnKMs/image_thumb%25255B1%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="433" /></a></div><div align="justify">If you are thinking, why the hell did I put this pic here, I will answer the question momentarily. As beautiful and awe inspiring the above picture looks, I would like to shift your attention to Why? The reasons are, there are various clouds in the Sky and each one of them is <b>different</b>. That’s the key, if we have to keep them beautiful and functional; they need to be different and much rather customized to the environment where they will be raining (In our case providing services). </div><div align="justify">With that opening statement, I think it will be safe to tell that there cannot be single standard in the space of the cloud and hence, that makes it a vast expanse to tread into. In the future there can be standards around some pieces of the cloud, but not the cloud itself. In the absence of such standards, there needs to be a lot of Custom work that needs to go in. In the upcoming topics, we will see the architecture blocks and we will also comment there about the gears that need to be put into place to make them work together. </div><div align="justify"> </div><h3 align="justify">Cloud Architecture:</h3><div align="justify">Here comes the big one (where we can have a lot of arguments float in), the architecture of the cloud. After we have gone through the above understanding, I think, we can safely say that we can treat the fact that “Cloud” can be considered as a Layered Architecture and some people only willing to implement some of those layers. It is also imperative for us to understand that though the layers work or need to work independently of one another in lot of senses, each layer provides services to the layer over it. Consider it like the OSI model or TCP/IP Stack. Though the focus was that each layer work independently, but that was too much hassle for technology to take care of and so a lot of functions “bleed” into other layers as well. We can safely assume that this will happen with the cloud as well and be prepared to it. </div><div align="justify"><a href="http://lh3.ggpht.com/-LEHs8g6UsPc/TgaEUQzjptI/AAAAAAAADiI/8rNxFJLmt20/s1600-h/image%25255B11%25255D.png"><img alt="image" border="0" height="191" src="http://lh6.ggpht.com/-bOs9WrFdyxg/TgaEUgVBhXI/AAAAAAAADiM/FaADIGcxnFA/image_thumb%25255B5%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="436" /></a></div><div align="justify">I am sure the above is a very quick and a shallow way of representing the layers, but they do drive home a broad view of what layer sits on top of whom. Having said the above, in the cloud, the layers have a few sub components. </div><div align="justify"><a href="http://lh6.ggpht.com/-85eajVrbvS4/TgaEVxOERYI/AAAAAAAADiQ/vwpWsIx-4G8/s1600-h/image%25255B7%25255D.png"><img alt="image" border="0" height="289" src="http://lh4.ggpht.com/-2KSG1UhhIEg/TgaEWT1AmUI/AAAAAAAADiU/uVN1VgS7Fwg/image_thumb%25255B3%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="522" /></a></div><div align="justify"> </div><div align="justify">When looking at providing the service on the Platform space, we can still detail the block diagram to a few more levels and then each block in itself will have an implementation diagram, so on and so forth. Since this blog is only for the high level understanding and choosing a route to the cloud, we wont get into Nitti gritty of the things. </div><div align="justify">In the below diagram, I have broken down the infra to show some building blocks of the 2 Layers that we will implement, if we need to implement the PaaS architecture. </div><div align="justify"><a href="http://lh4.ggpht.com/-LaBrHdyrKM8/TgaEXC9FBJI/AAAAAAAADiY/6MdXc29jtKA/s1600-h/image%25255B16%25255D.png"><img alt="image" border="0" height="188" src="http://lh5.ggpht.com/-OKnCFlFCucs/TgaEXkyIz7I/AAAAAAAADic/SIBv0EVlmPQ/image_thumb%25255B8%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="608" /></a></div><div align="justify">Having said the above, we have will see the questions that we need to ask ourselves before we start doing any work on the pieces of the puzzle. </div><div align="justify"> </div><h4 align="justify">Questionnaire (Pre Design) :</h4><div align="justify">In the below, we can see we have </div><ul><li> <div align="justify">What is my expectancy from the cloud? </div><ul><li> <div align="justify">We will only have to focus on providing the services to the applications, what the applications do is not going to be controlled. So the questions, that whether or not the application is bloated, mobile ready, will not be covered. We how ever have to design in a way that if the application is mobile ready, does my underlying infra supports it. Similarly, the design will have to take into consideration the Elasticity of the Cloud. </div></li>
</ul></li>
<li> <div align="justify">What Platforms do we provide as a Service? </div><ul><li> <div align="justify">Essentially, “All” cannot be a good answer in the beginning, going by the 80-20 rule, we will have to pickup the platforms which are used 80% of the times. We can add other Platforms to our belt as we go, and for the platforms which are not used much, we will have very little difference. </div></li>
</ul></li>
<li> <div align="justify">Using Current Infrastructure? </div><ul><li> <div align="justify">A lot of vendors there are pushing for new infrastructure to be bought for the cloud deployment, we need to evaluate how to currently use our current infrastructure and make cloud possible, or do we have to go for the new infrastructure.</div></li>
</ul></li>
<li> <div align="justify">What is my Current approach for providing Platform? </div><ul><li> <div align="justify">This essentially provides the current way, we do platform, this should answer questions like, do I run different Virtual servers for different applications, or we run multiple instances of the application on the same Virtual Server</div></li>
</ul></li>
<li> <div align="justify">What should be my new approach? </div><ul><li> <div align="justify">Again the same questions, but what can we do to optimize that. TBD can be a good answer, if we want to do PoC on all the ones we think we should try. </div></li>
</ul></li>
<li> <div align="justify">Does my Application require PCI / Sabers Oxley Compliance? </div><ul><li> <div align="justify">In most organizations this is a Key factor, and maintaining this might be key for our customers and third parties for business reasons, this will also dictate the placement of services in the network in physical and logical sense. </div></li>
</ul></li>
<li> <div align="justify">Current and New application architecture? </div><ul><li> <div align="justify">In this we need to look at the current landscape of the Applications, e.g. which applications have what platforms and Why?</div></li>
<li> <div align="justify">What coding architecture is used, including IDE’s and the development environment? </div></li>
<li> <div align="justify">What do we intend to do in the future, do we continue the same way, if not, what tweaking can come in. </div></li>
</ul></li>
<li> <div align="justify">What are my ITIL standards today & tomorrow? </div><ul><li> <div align="justify">We cannot kick out ITIL in most cases, so, how do we incorporate the Change Management and Incident Management process out of the window, how do I incorporate them in my automation. </div></li>
<li> <div align="justify">We also have to touch base on, since there is an abstraction, the people using our services will not be worried about the underlying pieces, but we will, how the “Cloud Operations” team will manage the cloud.</div></li>
</ul></li>
<li> <div align="justify">SLA’s? </div><ul><li> <div align="justify">We will have to do a deep dive in this. Since this is cloud, our typical SLA’s will be based on Business Restore and not the actual problem restoration. We will have to build another internal SLA for us to fix the problem from the root. </div></li>
</ul></li>
<li> <div align="justify">Supportability </div><ul><li> <div align="justify">We will have to look at how supportable are the blocks that we choose for the implementation and how much “finger pointing” are we going to have in our environment, work around those.</div></li>
</ul></li>
<li> <div align="justify">Use Public Clouds? </div><ul><li> <div align="justify">Again, this question is one which depends on a lot of prior questions with regards to compliance and such. So what part of the application can we take to the public cloud and what cannot be taken. </div></li>
<li> <div align="justify">Will I be using federation, if we go to the Public Cloud, so on and so forth. </div></li>
<li> <div align="justify">Can we have the development instances in the Public Cloud. </div></li>
</ul></li>
</ul><div align="justify">Having asked ourselves this question, we can actually start choosing the options that we need to build a cloud. One thing we need to keep in mind, that there will be many moving pieces and we might have to end up writing some code ourselves to make this gel together. </div><div align="justify"><br />
</div><h3 align="justify">Journey of an Platform to the Cloud:</h3><div align="justify">I figured, that rather than just posing some questions, it will be a good idea to take a Platform of a well defined industry standard and look at our choices, as this might help answer some of our questions. </div><div align="justify"> </div><h4 align="justify">The Platform:</h4><div align="justify">Here we will take standard “3-Tier” application architecture The Architecture is used in most of the companies that need to run with PCI/SOX compliance standards. The entity, I have not shown in the diagram is the Load balancer, as they may or may not be available in all the tiers. </div><div align="justify"><a href="http://lh3.ggpht.com/-Z0k26qhqrxo/TgaEYFMkFOI/AAAAAAAADig/3UryjlBipiM/s1600-h/image%25255B20%25255D.png"><img alt="image" border="0" height="260" src="http://lh4.ggpht.com/-HPZypV7SL_Y/TgaEYv-LtSI/AAAAAAAADik/rm0YporumvY/image_thumb%25255B10%25255D.png?imgmax=800" style="background-image: none; border-bottom: 0px; border-left: 0px; border-right: 0px; border-top: 0px; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="image" width="470" /></a></div><div align="justify"> </div><div align="justify">Now, the Logical interconnects of the application are clear. Let us make some assumptions.<br />
Web Based Application<br />
Application Server is Java<br />
Database is Oracle<br />
The Database servers have Locally connected storage and connectivity to LUN’s<br />
Now making these assumptions, and keeping the status quo of the application in terms of compliance, the Web-Tier is the only tier that can be moved to the cloud. In most cases, we may not have full blown 3-Tier architecture and we may collapse the Web and Application tier, in which case, we can have the Application tier moved to the Public cloud, you get the picture. If we don’t have to go ahead with the compliance, the whole data can be on a Public Cloud</div><h4 align="justify">The Strategies:</h4><div align="justify">The cloud buzz word comes with jargon like, Public, Private, Hybrid, Community, etc. We will look at a few of the strategies and the Pros and Cons of each. </div><h5 align="justify">Public: </h5><div align="justify">Move the application and Database to the service provider (Rackspace/Amazon, Cloud.com) and let the complete application sit there. </div><h6 align="justify">Pros:</h6><ul><li> <div align="justify">Easy </div></li>
<li> <div align="justify">No effort needed from our End other than some process changes</div></li>
<li> <div align="justify">Scalable</div></li>
</ul><h6 align="justify">Cons</h6><ul><li> <div align="justify">Non Compliant with PCI/SOX standards</div></li>
<li> <div align="justify">Cannot be modified much, SLA’s might not wet too well. </div></li>
<li> <div align="justify">No Insight of resources.</div></li>
<li> <div align="justify">Cannot reuse the infra already in place.</div></li>
<li> <div align="justify">Expensive in the Long run. (e.g. Zynga, a games company used Amazon(AWS) for a while, then they decided to move to a completely private cloud of their own to save some money, while using Amazon(AWS) as backup)</div></li>
</ul><h6 align="justify">Recommended Use:</h6><div align="justify">We can use the public cloud as a Development Platform, so the developers can benefit from there and we can remove the Dev Infrastructure and repurpose them as Production / QA. We will have to enforce strict policies for the access and set control points, so we don’t end up spending more than needed on the Public Cloud. </div><h5 align="justify">Private:</h5><div align="justify">In this, we create our own cloud, by pooling resources and having an orchestration engine which can be designed as per our own needs and standards (This is actually the key player here). The orchestration engine may be a single or a multi component engine, this will point to the pools and do the allocation of the resources as we see fit. </div><h6 align="justify">Pros:</h6><ul><li> <div align="justify">We can design the Cloud as our needs and re use the current infra already in place</div></li>
<li> <div align="justify">The Orchestration can be controlled by process and ITIL standards can be up kept</div></li>
<li> <div align="justify">Status Quo of Compliance will remain.</div></li>
<li> <div align="justify">Physical & Logical separation is possible. Deep inspection of traffic is possible.</div></li>
</ul><h6 align="justify">Cons:</h6><ul><li> <div align="justify">Have to manage the Infra</div></li>
<li> <div align="justify">Need to design the cloud strategy from ground up </div></li>
<li> <div align="justify">Expensive for small number of resources. </div></li>
</ul><h6 align="justify">Recommended Use:</h6><div align="justify">This is recommended for most of the enterprises, where they already have a lot of Infra which can be re used. Also, the applications which carry sensitive data, will suffer no loss of status quo. The applications, which need complete privacy, can be pushed here without any issues. </div><h5 align="justify">Hybrid Cloud:</h5><div align="justify">This is when part of our application stays inside and part of it goes to the public cloud. This is especially helpful when we need application that need bursting capability in network and/or compute power. The Pro’s and Cons of this are determined by the design. </div><h6 align="justify">Recommended Usage:</h6><div align="justify">As mentioned earlier, this is recommended for applications that need unpredictable burst ability. The orchestration engine will play a key in this kind of a deployment. </div><h4 align="justify"> </h4><h3 align="justify">Vendors and Products:</h3><div align="justify">I am just going to enumerate some vendors here, which might help you in looking at their offering.</div><ul><li> <div align="justify">VMWare: Virtualization, Orchestration of VMWare using vCloud</div></li>
<li> <div align="justify">RightScale: Orchestration of Compute (Virtual Servers) across multiple clouds</div></li>
<li> <div align="justify">Cloud.com: Stack to build compute resources.</div></li>
<li> <div align="justify">Openstack, Open Nebula, Eucalyptus : All open cloud orchestration engines (Eucalyptus also has an enterprise offering)</div></li>
<li> <div align="justify">Amazon EC2: Originally targeted as IaaS, but with custom AMI’s and orchestration can be very well be used as PaaS</div></li>
<li> <div align="justify">cloudfoundry.com – A commercial offering is yet to come out, but you can use this for the vFabric type PaaS offering</div></li>
<li> <div align="justify">HPSA/BMC: Orchestration</div></li>
<li> <div align="justify">vBlock: Virtualization and Orchestration of Compute resources</div></li>
<li> <div align="justify">Abiquo: Orchestration of Compute resources</div></li>
<li> <div align="justify">vFabric: Light weight, easily deployable components of Platform. </div></li>
<li> <div align="justify">Azure: IaaS/PaaS, Cloud in a Box, orchestration of compute resources.</div></li>
<li> <div align="justify">ExaLogic: Cloud in a box, and supports Open source</div></li>
</ul><div align="justify"> </div><h3 align="justify">Conclusion: </h3><div align="justify">There is lot more to be said (I will save them for the future blogs), As we can already see that the perfect cloud is far from achievable, we have to set our goals and take steps however small it may be, to achieve it. The good news is that cloud is supposed to be architected as modular, so there will be no flip switch to get this done. </div><div align="justify">Hope you liked the blog and if you have some points to add, feel free to comment and I will modify the blog accordingly. </div></div>Thunder Emperorhttp://www.blogger.com/profile/17080678595989876640noreply@blogger.com27