Adding additional IP Address to ethernet interface

network card

Scenario: You have several devices within your network, you’ve changed the address range for the network but you’ve forgotten to change one in particular. It’s easier to log into the device than to physically attend to it (it may be headless, it may not be in your immediate vicinity, or you’re just to lazy to get out of your chair to do it.

Q. How do you log into a network device that isn’t on your subnet?

A. You create an alias IP address for your current interface within the scope of the IP address you need to hit.

In this example we’ve moved a network from a 192.168.0.1 to 10.0.0.1.

The router has been configured, all the devices have been configured and you’re up and running but realised you forgot the file server in the garage. Your whole network is now setup on the 10.0.0.1 network, but the file server is sitting patiently waiting for you back on the 192.168.0.1 network.

Here’s how you would do it in linux (Ubuntu):

>$ ifconfig
enp6s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
 inet 10.0.0.5 netmask 255.255.255.0 broadcast 10.0.0.255
 RX packets 6406862 bytes 7485766742 (7.4 GB)
 RX errors 0 dropped 0 overruns 0 frame 0
 TX packets 3920089 bytes 1566938600 (1.5 GB)
 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

The old server is at 192.168.0.100, our computer was at 192.168.0.77. You can use any IP address that is not the device you want to connect to, and that is still within the same subnet range.

$ ifconfig enp6s0:0 192.168.0.77 up

Confirm it worked:

enp6s0: flags=4163  mtu 1500
        inet 10.0.0.5  netmask 255.255.255.0  broadcast 10.0.0.255
        ether 11:22:dd:99:4e:ee  txqueuelen 1000  (Ethernet)
        RX packets 6413204  bytes 7488178719 (7.4 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3925411  bytes 1568449079 (1.5 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp6s0:0: flags=4163  mtu 1500
        inet 192.168.0.77  netmask 255.255.255.0  broadcast 192.168.0.255
        ether 11:22:dd:99:4e:ee  txqueuelen 1000  (Ethernet)

note: this won’t survive a reboot. But for most intents and purposes, this will suffice. You can log into the file server and change the IP address and jump back out.

To make it permanent we will need to edit

/etc/network/interfaces

from: https://askubuntu.com/questions/585468/how-do-i-add-an-additional-ip-address-to-an-interface-in-ubuntu-14 (modified only to match the example above)

# vi /etc/network/interfaces

Append the following to the file (This is in addition to existing information, not a replacement for it)

auto enp6s0:0
iface enp6s0:0 inet static
name Ethernet alias LAN card
address 192.168.0.77
netmask 255.255.255.0
broadcast 192.168.0.255
network 192.168.0.0

Save and close the file. Restart the network:

# /etc/init.d/networking restart

Kicking back to Console

ctrl-alt-backspace should kill your Xwindows and kick you back to a prompt.
ctrl-alt-del will shutdown your computer gracefully

ctr-alt-F1 will send you to the first console without killing your X server so you can check errors or perhaps do some console work
ctrl-alt-F9 should return you to your Xwindows

The Pioneer

The Pioneer, Frederick McCubbin, 1904

I’m not really into art, but I find this piece amazing. Mesmerising.

I don’t even know when I first saw this piece, but when I did it blew me away. It is an amazing story told in just 3 images.

I was walking the streets of my local area a few days ago and came across an interesting house. Garden ornaments upside down, numerous pieces of dowel in trees, a tripod of sticks with a rock hanging at the end of a cord, and more. As I walked past I noticed an old gentleman in the garage working. I couldn’t help myself, I approached and began talking to him and about his house and what I had seen in his yard.

Mid sentence I looked around the garage and I saw a reproduction of this painting on the wall.

It is the only painting ever that I explicitly went to the National Art Gallery of NSW to see when it was on tour in Sydney many years ago. Beautiful. Powerful.

I’m reminded of it again tonight as I listen to Apple Music and Dire Straits’ Telegraph Road comes on. Immediately this image comes flooding into my head.

It doesn’t matter which enters my mind first, Telegraph Road and The Pioneer. I am automagically reminded of the other. The stories they share are in very similar styles.

Click on the thumbnail to view a larger version of the image. It is reproduced from the Frederick McCubbin’s—The Pioneer—Google Art Project page and can be viewed in fine detail there.

Be sure to check out the Wikipedia entry of Frederick McCubbin.

Three puzzles, three pieces missing

We have spent the last hour, probably longer, doing these three puzzles. Putting them together has been simple (I’ve been doing it for them).

However, the problem has been finding the pieces scattered between play locations, boxes, under beds, behind lounges etc. 
How crazy is it that in exactly three puzzles there are exactly one piece missing from each? 

Or is it by design? Did someone purposefully hide those single pieces?

I could be easily convinced to believe in conspiracy theories, however on this occasion, I would just say that they’re lost. 

Doh!

กรุงเทพมหานคร

I know I have. I was aware of some of these, I thought I was aware of most types available in Thailand after having spent a lot of time there. But after reading this, how could anyone know the ins and outs of all these?

in short:

  • taxi’s are yellow with either black (cars), green (tub tub) or red (inter-province) writing
  • rentals are green with white text
  • private cars are white with black text
  • private vans are white with blue text
  • private pick-ups are white with green text
  • private motorised tuk-tuks are white with red text
  • special trade plates are red with black text
  • hired buses and trucks are yellow with black text
  • private buses and trucks are white with black text

Confused yet? There’s more:

  • police are maroon with white text
  • military combat vehicles are white with red text
  • military non-combat are black with white text
  • diplomatic agents are white with black text
  • honorary consuls are grey with black text
  • other diplomatic are light blue with white text

Check out the full report here:

Thai number plates explained

Displaying images from a USB stick on a Sony Bravia KDL-55HX750

Sony Bravia LCD TV

This is apparently a common problem for the Sony Bravia’s and JPEG support isn’t the best. A little research has found a few pages referencing the spec DCF2.0/EXIF2.1, but what does that really mean?

Apparently it’s a limitation when using JPEGs of a high quality with Chroma Subsampling 4:4:4. I had read elsewhere that images needed to use sampling 4:2:2 or 4:2:0 but I was having varying problems trying to convert what I had using GIMP. Either it (or I) wasn’t up to the challenge.

In the end I found ImageMagick’s “mogrify” the solution to my problems.

I’m running OSX El Capitan. I used MacPorts to install:

sudo port install ImageMagick

After a few minutes installation it is as simple as running “mogrify” over the images:

mogrify -sampling-factor 2x1 /Volumes/USBKEY/*.jpg

I found my solution thanks to Wouter of Belgium who had the same problem saving files from Adobe’s Lightroom 2. He has Homebrew installation instructions on his site if you’d like to pay him a visit.