Notepad++ Editing Linux with SFTP.

Now if you haven’t tried Notepad++ get over to http://notepad-plus-plus.org/ and give it a go. It is once of the best text editors I have come across, not only is is light weight and gives you tabs for you files, it also has syntax highlighting for a good number of programming and scripting languages, can be run from a USB drive with out installing and On top of all that its a free download, so perfect in every respect.

Nopepad++ screen shot

Then there is the standard “compare” functions, ability to write macros, and a whole host tool for editing text.

But just a few days ago I found another function that I had not noticed before. Under the plugins one of the defaults is “Nppftp” clicking on this brings up a side panel that allows you to set up profiles for FTP and SFTP connections to remote servers.

Once you have set one up (SFTP for Linux ) and connected the remote file system will appear in a tree structure in this pane, allow you top open the files in Notepad++ edit and re-save them. And you get all the standard benefits of the application such as highlighting of code and copy paste between multiply files.

One thing to be careful of is the EOL settings, when creating new files, these defaults to windows format that will be miss read by the Linux system (look up EOL in google for more ifo on this). This can be changed either for an individual file under “Edit >> ELO Conversion >> Unix Format” on the menu bar. Or under “Settings >> preferences >> New Documents/….. ” to change the default.

So that’s one bonus point about Notepad++, but honestly even if this is not something you would use, give it a try, it has so many features over the basic notepad that comes with windows that there is something there for every one.

More Generating Test Data.

So Last time I mentioned you can generate traffice between two routers using TCP small Servers. This does work fine but there are some limitations, it can’t genetrate large amounts of traffic, it puts a high load on the CPU and it does not tell you much once it has completed.

A second method I came across is “TTCP” (Test TCP) which is avalible on many of the more recent IOS versions (11.2 upwards). This method not only gives you more control over the data that is sent, but also will provided you with infomation on how the trasfer of data went once it is complete. TTCP is also avalible for Windows and Linux/Unix, which means you can test between various end stations on the network.

It is all very simple to set up, simply at the “>” or “#” prompt type “TTCP”, and then follow the prompts. You will need to set up one router as the sender first, and then the second as the reciver. You can leave all the settings as default (you may want to reduce the “nbuf” setting as the default of 2048 can take some time to complete, espicaly on a slow link).

Once complete you will get an out put of time taken and bandwith achived among other stats. Again this is a very simple tool to give you a indication as to the state of a link, you can find more details in the below link to the CISCO site.

Cisco TTCP Document

New Job,

A few weeks ago I accepted a new job role, and I can’t wait to get started. I think I have mentioned before on this blog that I origianl trained as a scientist and for a time worked in a science lab before moving on to networks.

Well I am now going back in to the lab, but this time to help grow and develop there network through a large restructuring project, that will see the building of several world leading laboratory buildings and a through overhaul of the entire site. And the best part about it is I will have a major role in all of it. 🙂 With lots of hands on across lots of different network technologies, and while some are things I have experience with there are a few new ones as well to get my teeth in to 🙂

So after a fairly mundane year as far as networking has gone, I think getting back in to it will really give me the motivation to get back  studying and learning it all. Last year has not been standing still by any means, but has been a little slow in terms of networking.

To head up the network on one of the world leading laboratories for study of animal diseases is really a dream job for me, combining both of my hobbies in to one. All the hard work of the last 5 or so years really playing off..

Once I have started the role and settled in I will be posting a few more details about the position and where I can what things I am getting up to.

Raspberry Pi

I am sure a lot of you have hear about these, I have been trying to get one since the day it was released but still in the queue. http://www.raspberrypi.org/

Response was overwhelming and took down the sites of distributes, and this is what it is all about!

While it may not look much this is a 700mhz ARM processor, can play back Video at HD, with USB, Ethernet, HDMI output + more all on a board the size of a credit card, and for the sum of £22 ($30ish).  Perfect for a home brew media server or web server. or indeed many other hobby projects.

But it gets better the whole purpose behind this is to encourage kids to get in to programming. There are a lot of kids around that can use computers but as computers get easier to use, less of them a delving behind the screens to see how they work and more importantly how to make them work. So later in the year they will be releasing them in to the schools and collages. pre installed with tools and languages for the kids to have a play on.

One thing that hasn’t been widely covered is that when you purchase one you will be able to chose to purchase an additional unit that will be donated on your behalf to a school or other good cause. I think its a great idea, and while I will be getting one or two to play with over the next few weeks I hope for my own enjoyment and leaning experience. I hope the developers do see there dream bear fruit and get taken up by the schools and colleges to encourage the next round of IT stars.

I would encourage any one who is thinking of purchasing one to remember that they are a charity, and while the have produced something that many of us will get enjoyment from. That where possible we should try to feed back and encourage there idea of getting them in every school and collage in the country.

As soon as I get my hands on one I will be updating this blog, who knows in a month or two it might well be running from one 🙂

DevilWAH

Using Syslog while Studying in GNS3 (or indeed and cisco Lab)

I have been getting back in to my studying a lot lately and one thing I have found is the need to use a lot of debug commands so I can watch what is happening during things like routing updates and neighbour formation. One thing I do find though is that I am forever having to turn debug on and off, forgetting to do one or the other, and when it is on it clutters up the screen a breaks up the config I am entering making it difficult to read back.

Which got me thinking, I have used syslog servers a lot in the past, so why not send all the debugging out put to a syslog server and turn of logging to the console? This way I can have all the debugs in one place, and keep the console of the devices tidy so I can see what I am doing.

Now if you are doing this through GNS3 you will need a cloud connection so your PC can talk to your GNS3 network. If you are not sure how to do this there are lots of videos and walk though on the net, however the one below is one of the best I have found, very clear and complete.

How-To: Using the Cloud in GNS3 to Provide Internet Access from Matthew on Vimeo.

So once you have your cloud set up you then need to set up a simple GNS3 topology, Here I have set up 4 routers running OSPF connected through a switch as I am looking at the DR and BDR election process.

I have given R1 and R2 F0/1 address 192.168.10.10 and 192.168.10.20, and the loopback adapter used by the cloud is 192.168.10.254. Once the routers are booted and connected to the cloud, check they can ping the loop-back address (you may need to disable your fire wall on the loop-back connection.)

then of course you will need a SFTP server, in windows there are two good free choises, for a realy simple server that can run with out install try, http://tftpd32.jounin.net/tftpd32.html simple but does all you need, just make sure you disable dhcp and other none necessaries services in the settings. For a more complete tool try http://kiwisyslog.com/, they have a free syslog server offering that allows filtering and more.

In either case set it up and insure it is listing on the loopback interface, in the case of TFTP32d this is simple a case of choosing the interface from the drop down list.

Finale we need to change the logging setting of R1 and R2 to direct debugging message to the syslog server and not to the console. Remember debug messages are level 7 so we need to set console logging to level 6 or lower and trap logging to level 7. the following code will do just this from global config mode.

#logging 192.168.10.254
#logging console 6
#logging trap 7

So now we can enable the debugging and reset the neighbour relation ships to see what it looks like.

From the console

So not much there apart from we see the neighbours bounce as I clear the OSPF process.

So how about on the syslog server?? 

So here are all our debug messages, for us to scroll through and review at our leisure, If you have something like Kiwicat syslog server you could filer them in to views, based on device that sent it, or text with in message, ect.

You need to make sure of course that you either have the device connected directly to the syslog server network, or it has a route to get there. Directly connected is always best of course as you will insure that as long as that interface on the device is up you will catch all messages. On real hardware simply use a spare switch or create a separate VLAN and do exactly the same thing.

I have found for large labs this works great, indeed for testing setups for clients its great as well. once you have insured the correct debugging is enabled you can walk though test scripts and plans, safe in the knowledge that you have a full detailed log of every thing that has happened.

Simple to set up and hopefully some of you will find it useful.

DevilWAH

Running Unbuntu as a Diskless system.

Full Instructions from Unbuntu

Well the first question you might ask is why?

  1.  Allows you to boot a system to a second OS leaving the host hard drive untouched, this is similar to a duel boot but rather than having to set up duel boot on every device, you only need them all to have network boot enabled, and can manage the rest from a central server.
  2. Allows several hosts to boot from the same file system, very useful for some thing like “folding at home” where you might want to uses the resources of a users PC when they are away (out of hours) but do not want to have to install on to there profiles/OS. Changing the single file system updates every machine.
  3. You can build up mutiply images on the server, each streamlined for a specific job, and simply chose which one to boot to ad-hoc.

In my case I have used this for two purposes, first to run a computer cluster for disease modelling using a system called Condor, booting 16-20 users desktops to a single network image and using them to run models of disease spread for scientific papers.

And now more recently I have used the same principle for creating a GNS3 lab. I have several old laptops, as well as wife’s PC and even an old server. While at work I have access to servers and other lab equipment. I am not able to install Dynamips (GNS3’s back end), on to them all, and even if I could GNS3 runs far more stable on Linux than windows and I can’t guarantee other people will not uninstall or do any thing else that would stop it working.

The basic steps are to install Linux to a single machine, after which you copy this FS to your Server. (you need a server that supports PXE booting, TFTPD, NFS, and DHCP with PXE support)

And second set up your DHCP server to pass the name of the tftp serve along with the location on this server for a boot file.

Now there are more steps and the walk through above is a complete detailed process to get it up and running. If you have a few old boxes around you don’t know what to do with it fun to play with.  And will really help you learn the Linux FS.

DevilWAH

 

What a year!

Well its has been busy, and although I haven’t managed to post much I have managed to learn a lot this year (even if I haven’t completed my CCNP).

A lot of my time has been spent learning to script and have written a few application in the fllowing now. C#, VBA, VB.net, and perl. IF you want to get in to admin postitions I strongly suggest learning a scripting language. They all do the same thing so once you have learnt one you will find the rest easy to pick up. But they can save so much time, take away the “boring” jobs and just generally make you look good. Currently I am working on a full blown config generation tool, which once finished will turn a 2hr job in to a 5 minute one.

Apart from scripting, F5 load balancing and some fire wall stuff is where the rest of my time has gone. Oh and more recently setting up a VMware environment for lab purposes. In fact I want to right a post about setting up GNS3 using multiply load balanced external hyper-visors. of loading the process of the router emulation to a few Linux boxes allows you to create some complex network with out the issue of slowing down your desktop/laptop. So over Christmas I will post how to set up an unbuntu server, to run the Dynimaps as a demon so you can easly start and stop it. And how to set up GNS3 on your desktop machine to run them.

In a later post I will show you how to set up diskless unbuntu system. This is a great way to run identical instances of unbuntu all from the same network share/file system. This is an ideal way to run the dynamips hypervisors and allows you to use a machines resources with out affecting its install OS. Imagen booting from a Linux live cd across the network, set up exactly how you want it.

Aside from this it been about my daughter this year, this year has been truly amazing to see her grow. Watching the personality develop and her mind learning and expanding is the most fascinating and wonderful experience I have even known. 2011 has been a good year, and am looking forward to continuing in to 2012.

But 2012does come with the target of finishing CCNP and diving back head first in to CISCO. Hope every one else has had a good year and wishing you all a very merry christmas and a relaxing new year with friends and family.

DevilWAH

I need to learn more C#

Been playing around with it a lot, but come to the conclusion that I need to learn a bit more out of a book, than just using google and Microsoft sites. To be fair not done badly just a few areas I have been working on lately the code is a bit messy and I know there must be a better way to do it. So to help me on my way I have done two things.

Number one. Brought a Kindle, or to be more accurate my wife has got me one, just awaiting its arrival.

Number two. Getting hold of “Headfirst in to C#” and a few other C# books for it.

Hopefully by the end of this week I will have achieved the following in my application.

  1. Added controls to the output form for “Next config” and “Cancel”, Plus a button to copy to clipboard or download to file.
  2. Added the ability to create a single output from multiply lines in the entry form, and ability to chose a single line and out put only that config.
  3. After that I will be adding a header and footer section to the templates, that will all user to enter varibles aht are to be standard to all configs. Things like company information, user name, date, etc.

All simple stuff but just making sure it do it right now so when it comes to updating later it is all nice and clear. All about adding controls at run time at the moment and making sure its done in the most efficient way.