Monday, June 21, 2010

Moving Interwebs

For anyone wondering why there hasn't been updates in over a year.. well that's because I moved blogs :-D

New site is: http://www.mikrotik-routeros.com/

Or alternatively you can checkout my full profile of sites here: http://www.google.com/profiles/krusher00

Tuesday, January 6, 2009

Internode Scripts

Just finished some scripting work that allows me to mangle internode unmetered traffic for some of our office connections along with my home connection.

The file the IP's are grabbed from looks like this:



Case Studies:
1) Home - I have 2 ADSL Connections an 8mb (unlimited) AAPT link and a 12Mb (ADSL2+ 55gb) Internode link that I use to provide my family* I want to ensure all the free content always goes out over the internode link rather than the AAPT link as streaming abc iView etc loads faster over the Internode connection.I also use the internode linux mirror heavily to update my ubuntu boxes.

2) Work - We have a couple of seperate links along with a newly installed Internode ADSL2+ We also use a number of linux boxes here and would like to make best use of the free content.

I work with routers that run Mikrotik RouterOS. Have to say first up that despite a few small issues I've had with the software from time to time, it is in my opinion the best cost-to-value software I've ever used.

Compared to cisco products etc, I can purchase a mikrotik licence ($60AUD and up depending on the version) and choose my own hardware platfor. Eg: If I'm cheap i can use an old PC as a router, if I want reliability I can buy a RouterBoard system from $150AUD and up.

So anyway, onto the script itself.

Script name: Fetch-Node-IP-List

/tool fetch address=example.com host=example.com mode=http src-path=unmetered_ip_address_list.txt
:log info "Download Complete"
:delay 10
/system script run Add-Node-Unmetered-IPs


Due to the fetch command only supporting http, I've setup a cron job on one of the linux servers to download the internode list daily onto a server where I can access it via http. If people are interested in obtaining this list (via http) daily then I'll set it up on a box that is open to the general public.

The script above simply downloads the most recent list, waits 10 seconds for the download to be complete (just in case) and then triggers the list modification script. I also like to leave comments in the log so I can go back at any time and check the log to confirm the script completed each section sucessfully.

Script name: Add-Node-Unmetered-IPs

:log info "Begining Address List Modification"
:if ( [/file get [/file find name=unmetered_ip_address_list.txt] size] > 0 ) do={

/ip firewall address-list remove [/ip firewall address-list find list=Node-Unmetered]

:global content [/file get [/file find name=unmetered_ip_address_list.txt] contents] ;
:global contentLen [ :len $content ] ;

:global lineEnd 0;
:global line "";
:global lastEnd 0;

:do {
:set lineEnd [:find $content "\n" $lastEnd ] ;
:set line [:pick $content $lastEnd $lineEnd] ;
:set lastEnd ( $lineEnd + 1 ) ;

:if ( [:pick $line 0 1] != "\n" ) do={
:local entry [:pick $line 0 ($lineEnd) ]
:if ( [:len $entry ] > 0 ) do={
/ip firewall address-list add list=Node-Unmetered address=$entry
}
}
} while ($lineEnd < $contentLen) } :log info "IP List Modification Complete"


This script does the following:
1. Checks for the existance of a non-empty text file
2. If so (file with content exists) deletes the full current address list
1. Grab the txt file and places it's contents into a variable
2. Finds a full line and places it's contents into a second variable
3. Checks the line isn't blank
4. If so (the line isn't blank) adds the contents in as a new address list entry
5. If not(the line is blank) continue onto the next line
5. Repeat until the end of file

Future improvements:
In the short term this works fine for checking and updating a small list of addresses across a number of sites. In the real world I've done a couple of things a bit shabbily, such as removing the IP address list at 2am which means it will drop any open connections at this time (sure there may not be any people on now, but that isn't the case all the time).

I'll be looking at modifying this so the router checks current IP's vs the list and determines and modifies only additions or deletions from the active list. But not for now.

*By Family I mean, my parents house where the ADSL is connected, my house which is connected 4km away via wireless and my Uncle and Aunties place connected 1km via wireless. I pay for the Internode connection myself and don't charge any money for it. If I were making a living of this then a) I'd require a wireless carrier licence myself and b) I'd need to be paying for a SOHO or Business grade ADSL connection through internode.

Thursday, September 11, 2008

eeepic gaming.

Got myself an eeePC 1000H series begining of this week.

After mucking about with defcon and a couple of steam games I attempted and succeeded in getting myself a decently running tf2 install..

all details an info on how to get it up and running I've put into a seperate eeePC blog at http://blog.epicwinrar.com

Tuesday, February 26, 2008

OC time. Computer.. not the show.

Decided its time to work on my Overclock settings on the PC a little more.
I'd upgraded the BIOS about a week ago and hadn't re-set the overclocking settings I'd saved previously.

For those who haven't seen/heard of the black box of doom I run.
DFI Lanparty P35 board.
Intel Q6600 Quad core CPU (defaults to 2.6ghz)
Corsair 2GB DDR2 800 TWIN2X2048-6400C3DF Kit(3-4-3-9)
Graphics card is an ATI Radeon HD 2900 XT (I like ati..what can I say..)
and 3tb of hard drive space (2 x 1tb and 2 x 500gb - no raid at the moment)
OS: Windows XP Pro SP2 + Ultramon (always running)

So, running up Everest (by Lavasoft) to do some benchmarking/inspections for me, I've started speeding up cpu and lowering memory timings.

Note: Results are the CPU benchmarking tests
CPU Queen
CPU PhotoWorxx
CPU Zlib (kb/s)
CPU AES
FPU Julia
FPU Mandel
FPU SinJulia

Tests Round 1:
CPU Overclocked to 3ghz, ram on auto.

22231, 29247, 81491kb/s, 23061, 23346, 11238, 17264

Tests Round 2:
CPU Overclocked to 3.0ghz ram settings 4-5-4-12 (turned voltage up to 1.95v for ram)

22295, 29773, 81567, 23092, 23337, 11256, 17210

Test Round 3:
CPU Overclocked to 3.1ghz ram remains the same.

23002, 29984, 84103, 23879, 24077, 11617, 17812

Test Round 4:
CPU Overclocked to 3.1ghz ram settings 4-5-4-10

Stopped here to boot up my ubuntu live cd and do a memtest as well, ensuring that the memory wasn't error-ing and likely to cause issues later on. (I'd recommend doing this before you start your overclocking also) Memtest reports a transfer rate of 3786MB/s on the RAM and no errors.

Test Round 5:
Made some major changes after reading the following - http://forums.techpowerup.com/showthread.php?p=655674
Settled on DRAM Speed of 333/800 - as it crashed on the suggested speed.
So changed CPU back to 3.2ghz and ram back to 5-5-5-15

24136, 31482, 88292, 25072, 25275, 12196, 18649

Test Round 7:
Another memtest to check how it's holding up. Everest benchmarks are sitting at a couple of top places on the Everest example charts. Memtest reports 4101MB/s RAM Transfer Speed

Everest Test gives results
24758, 32376, 90437kb/s, 25720, 25882, 12496, 19159

More tweaks tomorrow night.
Biggest issue can see at the moment is that the northbridge chip is heating up considerably after increasing the voltage, will try to reduce that without losing stability, or fit it with a full heatsink+fan

And for a quick stability test - OCCT



Friday, February 22, 2008

A long list of things to do.


So, as the title says.. this is a catch up for the blog, updating on past and planning for future tasks.

Completed:
----------
Holiday 1 week in Melbourne (Done, went and saw monty python spamalot :D )
Setup wireless network with ospf routing (done, also using my home connection to provide more bandwidth when required)
Setup wireless hotspot on the house (done, still trying to find a workable solution for a link to nambour thou :-/)
Map out unknown portions of work wireless network (I'm sure the previous admin left documentation somewhere, it's just easier if you figure it out yourself and understand it all)

Todo:
-----
Still working on home VoIP solution, been mucking about with trixbox, and also built my own asterisk + freePBX ubuntu system. Yet to get it all working thou.
IP accounting for traffic thats coming in from wireless network via my home connection. (Working on a better way to log this, rather than just using the mikrotik traffic counter)
- Currently trying to create myself a version of the script naturalnetworks used here http://blog.naturalnetworks.net/2007/08/recording-routeross-ip-accounting-data.html -
Rebuilding work VoIP server, with a Digium TDM410P with 2 FXO modules and 2 FXS modules + Echo cancellation module.



Planning networks for 2 new large accomodation areas, 1 with a number of buildings spread out over a city, looks as thou the best option is to use business-linked adsl2+ links back to a nearby datacenter.
Installing wireless point to link to Nambour
Installing wireless at a relative's house just down the road (linking back to my internet of course)

Oh and, the old man wants me to either build him up some sort of MythTV box or order a FiireEngine with LinuxMCE pre-installed. I'd like to try setup the Myth one, but not really enough time at the moment.

And thats about it.

Oh wait.. latest addiction: I picked up a couple of packs of the WOW Trading card game starter sets while I was in melbourne which is quite fun, even thou I have quit wow. Found an epic pop-culture store there too, where I bought dad a half price remote control dalek to modify :-) (it had some broken bits, all working fine now) - checkit out at www.minotaur.com.au (the store not the robot).

Thursday, September 6, 2007

New Computer

Just 2 pics of my new computer.

First up, specs:

Case - Thermaltake Armor WC edition (Built in water cooling system)
HDD - 2 x 500gb SATA Western Digital
RAM - Corsair Twin2x2048 6300C3DF Dominator (2 x 1gb DDR2)
Board - DFI Lanparty P35
CPU - Intel Core 2 Quad Q6700 2.66Ghz

Graphics Card (Not yet present) - ATI Radeon 2900xt

In case anyone is wondering, the metal cooling device down the bottom of the pictures is called a transpiper and helps cool the north and southbridge chips.



----

Monday, September 3, 2007

Testing code markup

This is some test text


Code:

This is some code markup
just testing
and some more
/ for i=1 to 100; next i