Network Speeds – MTU

I’ve been having an issue with copying data to my NAS for a while and I’ve finally had a chance to take a quick look at it. It’s an old NEtgear NAS Duo v1. I was only getting about 1/2 mb/s transfer to it, so I figured something was wrong there. I read a website from someone who had the same issue, their solution was to update the MTU for both the desktop and the NAS so I thought I would give it a try. OK so how do determine the optimal MTU setting for my desktop/nas?

Well that’s simple enough, you keep pinging a site with lower and lower packets until they stop being defragmented, add another number to it and bam, there you go.

Step 1
Open Command Prompt
Step 2
In the Command Prompt type in ping www..com -f -l 1472 and hit Enter. If you get ‘Packet needs to be fragmented but DF set.’ Message it means that the packet needs to be fragmented.
Step 3
Drop the test packet size down (10 or 12 bytes) and test again until your reach a packet size that does not fragment.
Step 4
Once you have a test packet that is not fragmented increase your packet size in small increments and retest until you find the largest possible packet that doesn’t fragment.
Step 6
Take the maximum packet size from the ping test and add 28. You add 28 bytes because 20 bytes are reserved for the IP header and 8 bytes must be allocated for the ICMP Echo Request header. Remember: You must add 28 to your results from the ping test!

An example:
1440 Max packet size from Ping Test
+ 28 IP and ICMP headers
1468 Your optimum MTU Setting

In your case if the maximum packet size is 1452 the optimal MTU (Maximum Transmission Unit) is 1452+28 i.e. 1480. Here 1452 is the packet size of the data sent but the MTU is 1480.

To update your MTU on a windows machine, you can do this from the command line [I did it from a command line with administrative rights]

netsh interface ipv4 set subinterface “Local Area Connection” mtu=1458 store=persistent

There you go, sorted, updated the MTU on my NAS and now I’m getting 11/12mb/s which isn’t that much, but it’s an old NAS so I’ll forgive it.

Fedora/Redhat Related Podcast

I’ve wanted to create a podcast for years, but never dared to do it, one because I sound crap recorded and two, as I want to google hangout it as well, I look crap :D

Now the time has come to stop being a wuss bag, so I’m planning the pilot episode. It might turn out to be a load of rubbish, but seeing as this post appears in the Fedora PLanet, I’m asking, what kind of things would you like to hear? Turorials? News? Reviews? Feel free to leave a comment on my blog!

Yes I know there are already a large number of linux related podcasts out there, but I thought I’d give it a try myself….keep your eyes on my blog for updates :D

Ubuntu Server 14.04 LTS NIC Bonding

As you know I like to play with os’s so I moved my webserver over to Ubuntu LTS, I like the idea of having long term support without having to upgrade my server to the latest and greatest version every 6 months.  As such I have two NICs in my server so wanted to play with network bonding, the previous OS on the machine was CentOS and this was a breeze to setup so I figured how hard could it be on Ubuntu?  Well not hard at all to be honest.

sudo apt-get install ifenslave-2.6

 

sudo vi /etc/modules

Make sure it has these in it

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with “#” are ignored.
loop
lp
rtc
bonding

Load the bonding kernel module.

sudo modprobe bonding

Edit Interfaces

sudo vi /etc/network/interfaces

This is mine for an example

auto lo
iface lo inet loopback

#eth0 is manually configured, and slave to the “bond0″ bonded NIC
auto eth0
iface eth0 inet manual
bond-master bond0
bond-primary eth0

#eth1 ditto, thus creating a 2-link bond.
auto eth1
iface eth1 inet manual
bond-master bond0

# bond0 is the bonding NIC and can be used like any other normal NIC.
# bond0 is configured using static network information.
auto bond0
iface bond0 inet static
address x.x.x.x
gateway x.x.x.x
netmask x.x.x.x
dns-nameservers x.x.x.x x.x.x.x
dns-search xxxxxxx
bond-mode balance-tlb
bond-miimon 100
bond-slaves none

Reboot or restart networking, you should then be able to check your bonding to see if it’s worked.

# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: transmit load balancing
Primary Slave: eth0 (primary_reselect always)
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: xx:xx:xx:xx:xx:xx
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: xx:xx:xx:xx:xx:xx
Slave queue ID: 0

Facebook scams and phishing

Facebook-ScamsFacebook is one of the, if not the, most popular social media entities out there at the moment, so it’s obvious it’s going to be targetted for scams, and it is often.  I get the feeling though that people just don’t associate facebook with scamming, why would you if you’re just a user.

Well there are people out there that post scams and phishing material on facebook, and you need to be aware of it.

If you’re unsure of something in your facebook feed and wonder if it’s really true, then there are multiple locations on the net which can advise, a couple of sites I like to use are

http://www.snopes.com/computer/facebook/facebook.asp

http://www.hoax-slayer.com/facebook-related.html

These sites generally have a lot of information about scams, so you can check it out before you reshare a image or get rich quick scheme.

Check them both out and stay safe on Facebook.

Centos 7

I know it’s been said a thousand times before, and there are blog posts about it all over the internet, so why am I writing my own?

Well I just wanted to say well done to the CentOS team on yet another Stirling release.  A lot of people are there to criticize straight away if things go wrong, but not to give a hearty well done.

So let me just say it here.  Well done all, you rock.

Now, I wonder if it’s time to upgrade my CentOS 6.5 install to 7 or just wait for the point release?

tatica – Gimp – Patreon

6781705859_2c3f826e9dBeing a Linux user means I’m having to learn lots myself, also being a photographer means that I don’t have access to the latest and greatest apps like Photoshop. What I do have however, is GIMP. While this open source editing app, isn’t as powerful, it works just as well for me. But, I wouldn’t have been able to grasp half of the features within the app, if it wasn’t for friends and other members of the Fedora Community. One of these people is Tatica – tatica.org. She’s been producing gimp videos for ages, and while she’s not done one for awhile, she wants that to change, and here’s how she wants to do it…..in fact don’t listen to me, go check this page out.

http://tatica.org/en/yo-quiero-un-podcast/

It might be Spanish, as she’s from Venezuela, but you can convert the site to English and the video she’s done has English subtitles.

You also might want to check her patreon page here too – http://www.patreon.com/tatica Patreon? yes it’s simple, you pay for content they produce, for example, I’ll pay Tatica $1 for every video she produces, you can set a max per month so you don’t end up owing a lot, but it’s like a crowd sourcing solution. The more she gets the better and more often the content she’ll produce. I for one, am excited about the content she’ll produce, and if it’s all in Spanish, well I better start learning Spanish :)

CentOS – Nic Bonding

I have a Dell R200 and it comes with 2 network ports, so I thought I’d play with a little NIC bonding, why not, it might improve networking a little bit. Here’s how I did it.

First I created a file called bonding.conf in /etc/modprobe.d with the following in it

alias bond0 bonding
options bond0 miimon=80 mode=5

I set it to mode 5 which is this

5 — Sets a Transmit Load Balancing (TLB) policy for fault tolerance and load balancing. The outgoing traffic is distributed according to the current load on each slave interface. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed slave.

I then created a file in /etc/sysconfig/network-scripts called ifcfg-bond0 with this in it


DEVICE=bond0
IPADDR=x.x.x.x
NETMASK=x.x.x.x
NETWORK=x.x.x.x
BROADCAST=x.x.x.x
GATEWAY=x.x.x.x
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

Obviously replace the x’s with your networks IP’s

In the same folder ifcfg-eth0 was replaced with this


DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes

and ifcfg-eth1 was replaced with this


DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes

You can then restart networking or reboot the server and check that all is working with this

cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

Bonding Mode: transmit load balancing
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 80
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr:
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr:
Slave queue ID: 0

Result :)

Don’t get caught out – Spam

I’ve been watching spam delivered to my spam folder in my mail client for years now, and it just starts to become second nature that I’m going to get them. But I received one the other day, that for the uninitiated, might be one that’s quite believable.

Dear Customer,

Your Apple ID, was just used to purchase “Party Songs Collection / ($49,99)” by Collin Farrel from the iTunes Store on a computer or device that had not previously been associated with that Apple ID.

If you made this purchase, you can disregard this email. It was only sent to alert you in case you did not make the purchase yourself.

If you did not make this purchase, we recommend that you go to http://apple.com/support/cancel_pending_transaction to cancel the transaction, Confirm that you’re the owner of the account and then follow the instructions.

Thanks,
iTunes Store

Seems valid doesn’t it. Now to me, it’s just spam, I know it and the person sending it knows it. But, what about the normal non tech user, would this fool you if you didn’t know? Especially seeing if you had an itunes account?

The first thing I’d do is hover over the link that it’s asking you to click, does it look ok? Is it an Apple url?

In this case no – http://www.lemagazinedelart.com/wp-admin/js/appid.webauth.apple.com/

Simple and quick to check, in this case DELETE DELETE DELETE.

All Change

Almost 8 years ago I had an interview for a 1st Line tech support job, went well and I got the job. Fast forward almost 8 years and I’ve handed in my notice to move onto another role [system administrator]. Seems only yesterday and to be honest I’m quite sad I’m leaving, but a decision had to be made and I took it. I’ll miss certainly people terribly and to be honest won’t loose contact as we’re also facebook friends but it doesn’t stop the little pangs of guilt/heartache when you’ve worked with people for so long.

Having said that, I’m super stoked to be moving to where I’m going, I’m not going to say where just yet. The opportunities are boundless and I know I’m going to enjoy it immensely.

So for all my current friends and colleagues I salute you, your the best.

To all my new colleagues, watch out I’m coming, and I can’t wait to meet you all, it’s going to be a blast.

Fedora – NEF to JPG

Being a photographer I tend to work in RAW format, but sometimes I just don’t need to edit the images and can upload them straight from the camera. Places like flickr and facebook tend not to like raw, so I like to convert them to jpg when ever I can. This is all well and good if you’ve got 2 / images as you can open them up in darktables [or any other raw editor] then export them as a JPG. OK so what if you have 500+ images you want to make JPG? Well that’s easy if you have installed ufraw.

Install ufraw
yum install ufraw

Batch covert raw [in my case it's NEF as I'm a nikon shooter]
ufraw-batch --out-type=jpeg --out-path=./jpg ./*.NEF

With this command I did get an error as the outpath didn’t exist, but if you create it, you’re good to go.