Author Archive

Thursday, September 17th, 2015 | Author:
  • भाग 1 – परिचय – सरल लाईनहरु सेट अप (यो पोस्ट)
  • भाग 2 – Reliably यातायात चिन्ने – टुक्राकेस नियम सेट अप (चाँडै आउँदै टीएम)
  • भाग 3 – प्राथमिकता र सीमा – लाम पेड सेट अप (चाँडै आउँदै टीएम)
  • भाग 4 – Monitoring Usage – लाईनहरु Redefining – Limiting Abusive Devices (चाँडै आउँदै टीएम)
  • भाग 5 – ??? मुनाफा ???

परिचय

The first problem one usually comes across after being tasked with improving an Internet connection is that the connection is overutilised. सामान्यतया कोही होइन किन थाह, जो, वा के समस्या पैदा भएको छ – except of course everyone blames the ISP. कहिलेकाहीं यो आईएसपी छ – but typically you can’t prove that without having an alternative connection immediately available. I currently manage or help manage four “साइटहरु / परिसर” प्रयोग QoS आफ्नो इन्टरनेट जडान प्रबन्ध गर्न. एक मेरो कार्यस्थल छ, two are home connections, and the last one is a slightly variable one – सामान्यतया बस एक घर जडान तर वैकल्पिक, for a weekend every few months, it becomes a 140-मानिस (र बढ्दै) लैन. मजा. 🙂

MikroTik RouterOS र

MikroTikको RouterOS is very powerful in the right hands. Many other routers support QoS but not with the fine-grain control MikroTik provides. Alternatively you could utilise other Linux-based router OS’s, जस्तै डीडी-हाय, Smoothwall, Untangle, र त निस्कने. यी अधिकांश सामान्यतया तपाईं बारेमा झूट एक स्पेयर सर्भर वा संगत हार्डवेयर राउटर भन्ने आवश्यकता. Mikrotik बेच्छ RouterBoards builtin RouterOS छ कि – र तिनीहरूले अपेक्षाकृत सस्तो हो.

Routers संग मेरो अनुभव मुख्यतया संग छ सिस्को र MikroTik – and my experience with QoS is primarily with आवंटित गरेको NetEnforcer / NetXplorer प्रणाली र MikroTik. मेरो अनुभव मा सबैभन्दा लोकप्रिय MikroTik उपकरणहरू (आफ्नो समर्पित दीर्घकालीन वायरलेस उपकरणहरू भन्दा अन्य) छन् आफ्नो rb750 (नाउँ नयाँ संस्करण “हेक्स“) र rb950-आधारित बोर्डहरू. तिनीहरूले छ धेरै अरूलाई available and are relatively inexpensive. In historical comparison with Cisco’s premium devices, म रूपमा MikroTik गरेको उपकरणहरू वर्णन गर्न tended छु “90% विशेषताहरु मा 10% लागत”. यो पुस्तिका मुख्यतया SME / घर प्रयोग उद्देश्य छ रूपमा, inexpensive makes more sense. If you’re looking at getting a MikroTik device, MikroTik routers के ध्यान दिनुहोस कि छैन typically include DSL modems, यसरी आफ्नो अवस्थित उपकरण अझै पनि सामान्यतया आवश्यक छ. यो छ कि पनि नोट छैन कोर्नु देखि एक MikroTik उपकरण सेट मा एक ट्यूटोरियल. भनेर पहिले नै लागि अनलाइन उपलब्ध गाइड प्रशस्त छन्.

अभ्यास मा सिद्धान्त – पहिलो कदम

सही QoS सेट अप गर्न, you need to have an idea of a policy that takes into account the following:

  • समग्र जडान गति
  • कति प्रयोगकर्ता / उपकरणहरू जडान प्रयोग गरिनेछ
  • The users/devices/services/protocols that should be prioritised for latency and/or throughput

मेरो उदाहरण मा माथि हासिल गर्न, म निम्न ग्रहण हुनेछ:

  • स्थानीय नेटवर्क छ जहाँ MikroTik पूर्वनिर्धारित सञ्जाल कन्फिगरेसन सेट अप छ 192.168.88.0/24 र इन्टरनेट जडान मार्फत प्रदान गरिएको छ PPPoE.
  • जडान गति 10 / 2Mbps छ (10 एमबीपीएस डाउनलोड गति; 2 एमबीपीएस अपलोड गति)
  • त्यहाँ हुनेछ 5 जस्तै धेरै संग प्रयोगकर्ता 15 उपकरणहरू (धेरै कम्प्युटर / पाटी / मोबाइल फोन / वाईफाई आदि)
  • विशिष्ट डाउनलोड ल्याटेन्सी संग throughput तर कम-प्राथमिकता साथ उच्च प्राथमिकता आवश्यकता
  • Gaming/Skype/Administrative protocols require high priority with both latency and throughput
  • कुनै प्रयोगकर्ता अरूलाई भन्दा prioritized गर्न छन्

The first and probably quickest step is to set up what RouterOS refers to as a सरल लाम.

म सरल लामबद्धहरू सेट अप गर्न म मेरो MikroTik उपकरणमा मुक्ति गरेका छोटो लिपि गर्नुभयो. निम्नानुसार यो छ:

:देखि एक्स लागि 1 गर्न 254 के ={
 /सरल ऐड नाम लाम ="इन्टरनेट-usage- $ एक्स" DST ="pppoe" अधिकतम-सीमा = 1900k / 9500k लक्ष्य ="192.168.88.$एक्स"
}

के माथि गर्छ सीमा कुनै व्यक्तिगत उपकरणमा प्रयोग गर्न सक्नुहुन्छ अधिकतम गति छ “1900K” (1.9एमबी) अपलोड र “9500K” (9.5एमबी) डाउनलोड.

नोट्स:

  • अधिकतम सीमा मा किन कारण 95% of the line’s maximum speed is that this guarantees no single device can fully starve the connection, negatively affecting the other users. With a larger userbase I would enforce this limit further. उदाहरणका लागि, संग 100 म 1Mb रूपमा पनि रूपमा सानो 15Mb यो सीमा सेट या सक्छ एक 20 मेगाबाइट सेवा प्रयोगकर्ता. यो कसरी पुरा निर्भर छ “अपमानजनक” यो प्रयोगकर्ता छन् र, तपाईं बाहिर आंकडा रूपमा कहाँ र कति दुरुपयोग हुन्छ, you can adjust it appropriately.
  • यो उपसर्ग “इन्टरनेट-उपयोग” नाम प्यारामिटर अनुकूलित गर्न सकिन्छ. सामान्यतया म परिसर नाम उल्लेख गर्न यी सेट. उदाहरणका लागि, with premises named “अल्फा” र “बीटा”, म सामान्यतया राख्नु हुनेछ “इन्टरनेट-अल्फा” र “इन्टरनेट-बिटा”. यो instinctively साइटहरु बीच differentiating संग मदत गर्छ.
  • यो DST प्यारामिटर छ “pppoe” उदाहरणबाट. यो नाम संग substituted गर्नुपर्छ इन्टरफेस that provides the Internet connection.

तपाईं आफ्नो कन्फिगरेसन गर्न उपयुक्त हुन लिपि अनुकूलन सुनिश्चित. यो MikroTik गर्न लिपि बचत र यसलाई चलान – वा यो कार्यान्वयन गर्न MikroTik गरेको टर्मिनल मा सिधै पेस्ट.

In my next post I will go over setting up what RouterOS refers to as टुक्राकेस नियम. यी नियमहरू सम्भव finer-grained QoS बनाउन क्रम मा नेटवर्क यातायात / चिन्न वर्गीकरण गर्नु गर्न सेवा.

शेयर
Category: random  | Leave a Comment
Thursday, September 17th, 2015 | Author:

गोपनीयता, समय, पैसा

म डेबिट आदेश रुचि छैन. म अर्को इकाइ सक्छन् विचार मन पर्यो कहिल्यै छु, इच्छा मा, मेरो पैसा लगभग कुनै पनि राशि लिन (राम्रो … जे उपलब्ध छ). एक सहयोगी संग मुद्दा औंल्याए MTN म एक डेबिट क्रम प्रयोग गरिएको थियो वेवास्ता गरिएको थियो. शायद “सुविधा” कारक यस्तो खराब कुरा छैन.

म यहाँ अंत सित प्रश्न तपाईं सुविधा चाहनुहुन्छ र संस्थाहरूको भरोसा गर्न सक्छौं कि वा छैन ठान्नु (आफ्नो पैसा संग यस मामला मा) – या तपाईं तिनीहरूलाई भरोसा र सुविधा forgo गर्न इच्छुक छन् सक्दैन भने. मेरो मामला मा, म अझै पनि सुविधा प्रश्न तापनि, म यो doubly आफ्नो जोडिएका संसारमा कम गर्न असुविधाजनक हुन सक्छ कि MTN संग कडा तरिका सिके “टाढाको द्वीप” स्थिति. लगभग आज सबैले यो सुविधा कारक संग जान्छ.

सुविधा

अर्कोतर्फ, अब एक लामो समय पहिले, I had a dispute with ग्रह स्वास्थ्य जहाँ सुविधा एक डबल-edged तरवार थियो. म उपभोक्ता उजुरीहरु आयोग आफ्नो व्यापार अभ्यास रिपोर्ट (पछि देखि रूपमा पुन सङ्गठित राष्ट्रीय उपभोक्ता आयोग) and never got feedback from them. The gist of the issue is that Planet Fitness’s sales agent lied to me and a friend in order to get more commission/money out of my pocket.

म छु एक डिस्कवरी जोस धेरै लाभ दिन्छ जो सदस्य, प्रीमियम ब्रान्डहरु मा कम दर सहित – ज्यादातर स्वास्थ्य-सम्बन्धित पाठ्यक्रम, as Discovery is a Medical Aid/Health Insurance provider. बस यो राख्न, डिस्कवरी भयानक छ. जोस गरेको लाभ थप ग्रह स्वास्थ्य समावेश जो जिम सदस्यता कवर. You still have to pay something, हरप्रकारका एक सानो टोकन, डिस्कवरी गर्न, जिम सदस्यता लागि. तर, पछि सबै, तिनीहरूले मलाई स्वस्थ हुन चाहनुहुन्छ, so they don’t mind footing the bulk of the bill. तर, स्पष्ट, यो ग्रह स्वास्थ्य मतलब’ बिक्री एजेन्ट आयोग प्राप्त छैन!

त्यसैले यो परिणाम मा कस्तो? परिणाम पीएफ गरेको बिक्री एजेन्ट एक लागि मलाई एक देखावटी आंकडा दिनुभएको छ “जोस-आधारित” सदस्यता. उहाँले झूठ बोल्यो. उहाँले त मलाई एक को एउटा देखावटी मूल्य लागि विन्दु लाइन मा साइन इन थियो “नियमित” सदस्यता (हो, यो पनि एक नियमित सदस्यता लागत हुनेछ भन्दा वास्तवमा अधिक थियो), ending up about 4 र 5 पल्ट जोस-आधारित सदस्यता जस्तै धेरै.

Epiphanies

Some time in 2011 मैले बल्ल म तिर्ने गर्न अनुमानित थियो लागत सम्म wisened. खोज म यो fiasco बारेमा पनि खुसी छैन पक्का छु. म जिम मा प्रबन्धक बोल्नुभयो, र म सम्पूर्ण ठेक्का स्क्राप हुनेछ भनेर आश्वासन थियो. म हिंसा लागि एक होइन … यसको लागि खेल नभएसम्म … एक Octagon मा … यो डेबिट आदेश अझै भइरहेको थियो किन तर प्रबन्धक मेरो 5th यात्रा पछि सोध्न, उहाँले म भ्रमणको लागि मलाई हतियार ल्याए थियो उहाँले छक्क थियो मलाई भन्नुभयो. केही अधिक भ्रमण पछि, यो प्रबन्धक वास्तवमा ग्रह स्वास्थ्य छोडेर मलाई बताए थियो “ठेक्का” was between myself and Head Office and that the local gym, स्पष्ट एक मताधिकार शैली सञ्चालन, कुनै भन्न सानो यो रद्द हुन सक्छ थियो कि वा छैन बारे. प्रधान कार्यालय कुनै भन्नुभयो भने, कठिन किस्मत.

By this point I’d lost it. I had my bank put a बन्द डेबिट आदेश. It was a huge schlep: I had to contact the bank every month because the debit order descriptions would change ever so slightly. It also cost me a little every couple of months to “reinstate” the blocking सेवा. म मदत तर बैंकिंग प्रणाली समर्थन लाग्छ सक्दैन नियमित अभिव्यक्ति तर कर्मचारी आवश्यक यसलाई कसरी प्रयोग गर्ने थाहा छैन.

Technically I’m still waiting on the CCC to get back to me (भयो कहिल्यै – मामला शायद यो दरारें माध्यम पतन यति माथि उल्लेख रूपमा र पाठ्यक्रम तिनीहरूले पुन सङ्गठित थिए). पाठ्यक्रम, कि बिन्दु द्वारा पीएफ पनि तिर्ने छैन मलाई ब्ल्याकलिस्ट चाहन्थे!

यो अप्रत्याशित हीरो

डिस्कवरी गर्न मुद्दा को एक haphazard उल्लेख (म एक दन्त भ्रमण बारे तिनीहरूलाई भनिन्छ लाग्छ) डिस्कवरी गरेको एजेन्ट को एक एक कलब्याक मा नतिजा. तिनीहरू त समस्या वर्णन गर्न मलाई सोध्नुभयो, विस्तार र लेखन मा, साँच्चै भयो कुरा राम्रो मेरो दृष्टिकोण देखि व्याख्या गर्न. म obliged. यो म हुनुको छैन तिनीहरूलाई सही थियो बाहिर जान्छ “पनि खुसी” यो बारेमा. वास्तवमा तिनीहरूले साँच्चै यो रुचि थिएन. About three weeks later, ग्रह स्वास्थ्य कहिल्यै तिनीहरूलाई भुक्तानी गरिएको थियो कि सबै monies लागि पूर्ण मलाई फिर्ता गरीयो.

डिस्कवरी भयानक छ. 🙂

शेयर
Sunday, August 04th, 2013 | Author:

I had a power outage affect my server’s large md RAID array. Rather than let the server as a whole be down while waiting for it to complete an fsck, I had it boot without the large array so I could run the fsck manually.

However, when running it manually I realised I had no way of knowing how far it was and how long it would take to complete. This is especially problematic with such a large array. With a little searching I found the tip of adding the -C parameter when calling fsck. I couldn’t find this in the documentation however: fsckhelp showed no such option.

The option turns out to be ext4-specific, and thus shows a perfectly functional progress bar with a percentage indicator. To find the information, instead offsckhelporman fsck”, you have to inputfsck.ext4helporman fsck.ext4”. 🙂

शेयर
Sunday, August 04th, 2013 | Author:

History

Much had changed since I last mentioned my personal serverit has grown by leaps and bounds (it now has a 7TB md RAID6) and it had recently been rebuilt with Ubuntu Server.

Arch was never a mistake. Arch Linux had already taught me so much about Linux (and will continue to do so on my other desktop). But Arch definitely requires more time and attention than I would like to spend on a server. Ideally I’d prefer to be able to forget about the server for a while until a reminder email saysumthere’s a couple updates you should look at, buddy.

Space isn’t freeand neither is space

The opportunity to migrate to Ubuntu was the fact that I had run out of SATA ports, the ports required to connect hard drives to the rest of the computerthat 7TB RAID array uses a lot of ports! I had even given away my very old 200GB hard disk as it took up one of those ports. I also warned the recipient that the disk’s SMART monitoring indicated it was unreliable. As a temporary workaround to the lack of SATA ports, I had even migrated the server’s OS to a set of four USB sticks in an md RAID1. Crazy. I know. I wasn’t too happy about the speed. I decided to go out and buy a new reliable hard drive and a SATA expansion card to go with it.

The server’s primary Arch partition was using about 7GB of disk. A big chunk of that was a swap file, cached data and otherwise miscellaneous or unnecessary files. Overall the actual size of the OS, including the /home folder, was only about 2GB. This prompted me to look into a super-fast SSD drive, thinking perhaps a smaller one might not be so expensive. It turned out that the cheapest non-SSD drive I could find actually cost more than one of these relatively small SSDs. Yay for me. 🙂

Choice? Woah?!

In choosing the OS, I’d already decided it wouldn’t be Arch. Out of all the other popular distributions, I’m most familiar with Ubuntu and CentOS. Fedora was also a possibilitybut I hadn’t seriously yet considered it for a server. Ubuntu won the round.

The next decision I had to make didn’t occur to me until Ubiquity (Ubuntu’s installation wizard) asked it of me: How to set up the partitions.

I was new to using SSDs in LinuxI’m well aware of the pitfalls of not using them correctly, mostly due to their risk of poor longevity if misused.

I didn’t want to use a dedicated swap partition. I plan on upgrading the server’s motherboard/CPU/memory not too far in the future. Based on that I decided I will put swap into a swap file on the existing md RAID. The swap won’t be particularly fast but its only purpose will be for that rare occasion when something’s gone wrong and the memory isn’t available.

This then left me to give the root path the full 60GB out of an Intel 330 SSD. I considered separating /home but it just seemed a little pointless, given how little was used in the past. I first set up the partition with LVMsomething I’ve recently been doing whenever I set up a Linux box (साँच्चै, there’s no excuse not to use LVM). When it got to the part where I would configure the filesystem, I clicked the drop-down and instinctively selected ext4. Then I noticed btrfs in the same list. Hang on!!

But a what?

Btrfs (“butter-eff-ess”, “better-eff-ess”, “bee-tree-eff-ess”, or whatever you fancy on the day) is a relatively new filesystem developed in order to bring Linuxfilesystem capabilities back on track with current filesystem tech. The existing King-of-the-Hill filesystem, “ext” (the current version called ext4) is pretty goodbut it is limited, stuck in an old paradigm (think of a brand new F22 Raptor vs. an F4 Phantom with a half-jested attempt at an equivalency upgrade) and is unlikely to be able to compete for very long with newer Enterprise filesystems such as Oracle’s ZFS. Btrfs still has a long way to go and is still considered experimental (depending on who you ask and what features you need). Many consider it to be stable for basic usebut nobody is going to make any guarantees. And, पाठ्यक्रम, everyone is saying to make and test backups!

Mooooooo

The most fundamental difference between ext and btrfs is that btrfs is aCoWorCopy on Writefilesystem. This means that data is never actually deliberately overwritten by the filesystem’s internals. If you write a change to a file, btrfs will write your changes to a new location on physical media and will update the internal pointers to refer to the new location. Btrfs goes a step further in that those internal pointers (referred to as metadata) are also CoW. Older versions of ext would have simply overwritten the data. Ext4 would use a Journal to ensure that corruption won’t occur should the AC plug be yanked out at the most inopportune moment. The journal results in a similar number of steps required to update data. With an SSD, the underlying hardware operates a similar CoW process no matter what filesystem you’re using. This is because SSD drives cannot actually overwrite datathey have to copy the data (with your changes) to a new location and then erase the old block entirely. An optimisation in this area is that an SSD might not even erase the old block but rather simply make a note to erase the block at a later time when things aren’t so busy. The end result is that SSD drives fit very well with a CoW filesystem and don’t perform as well with non-CoW filesystems.

To make matters interesting, CoW in the filesystem easily goes hand in hand with a feature called deduplication. This allows two (or more) identical blocks of data to be stored using only a single copy, saving space. With CoW, if a deduplicated file is modified, the separate twin won’t be affected as the modified file’s data will have been written to a different physical block.

CoW in turn makes snapshotting relatively easy to implement. When a snapshot is made the system merely records the new snapshot as being a duplication of all data and metadata within the volume. With CoW, when changes are made, the snapshot’s data stays intact, and a consistent view of the filesystem’s status at the time the snapshot was made can be maintained.

A new friend

With the above in mind, especially as Ubuntu has made btrfs available as an install-time option, I figured it would be a good time to dive into btrfs and explore a little. 🙂

भाग 2 coming soon

शेयर
Monday, October 29th, 2012 | Author:

It appears that, in infinite wisdom, Google have a security feature that can block an application from accessing or using your google account. I can see how this might be a problem for Google’s users, in particular their GTalkGmail users. In my case it was Pidgin having an issue with the Jabber सेवा (which is technically part of GTalk). I found the solution after a little digging. I was surprised at how old the issue was and how long this feature has existed!

To unlock the account and get your application online, use Google’s Captcha page here.

शेयर