Configuring a trunk network without native VLAN on Ubuntu

I had to deal with systemd nonsense today because I’m trying to deploy something cool under Ubuntu. Usually I don’t have to deal with systemd so I thought it may be worth documenting for me to remember.

So, first of all. Doing the first attempt on-the-fly to know networking actually works. In this case I will use vconfig to create the vlan interface, ip for adding the address to the new device and route for the gateway.

For this example I want to use the interface enp9s0f1, the VLAN 205, as IP address I want 10.200.205.22 and my gateway is 10.200.205.254.

# vconfig add enp9s0f1 205
# ip addr add 10.200.205.22/24 dev enp9s0f1.205
# route add default gw 10.200.205.254
# ip link set dev enp9s0f1 up
# ip link set dev enp9s0f1.205 up

Once this is done, you should be able to reach the server thru the network. You might want to setup your DNS too, go to resolved configuration and add the following lines (or modify if already there).

/etc/systemd/resolved.conf

[Resolve]
DNS=8.8.8.8
FallbackDNS=8.8.4.4

Restart systemd-resolved by doing systemctl restart systemd-resolved. Once everything works as it should time to make it persistent.

Go to /etc/systemd/network and you will have to create 3 files. One for the carrier and two for the VLAN interface.

/etc/systemd/network/enp9s0f1.network

[Match]
Name=enp9s0f1

[Network]
VLAN=enp9s0f1.205

Once we specify that we will use a VLAN using enp9s0f1.205 device, we will create enp9s0f1.205.netdev and enp9s0f1.205.network to configure that interface as it should. netdev will specify that it is a VLAN and the ID while the network file will provide the static configuration of the address.

/etc/systemd/network/enp9s0f1.205.netdev

[NetDev]
Name=enp9s0f1.205
Kind=vlan

[VLAN]
Id=205

/etc/systemd/network/enp9s0f1.205.network

[Match]
Name=enp9s0f1.205

[Network]
Description=”VLAN 205″
Address=10.200.205.22/24
Gateway=10.200.205.254

After doing this make sure to have systemd-networkd and systemd-resolved enabled for next boot (systemctl enable …), perform a reboot and everything should be good to go :).

And well this was my first and not pleasant approach to systemd-networkd and systemd-resolved and so far I hated how they work.

If you know a better way to fulfill this, feel free to leave a comment!

Recover files after shortcut USB-drive virus

Today I plugged my USB at school and noticed that I had a little but annoying virus that converted all my files into .lnk files. So when I came back home I plugged it to recover my files and format it but then I realised that Windows Defender put the virus in quarantine and made my files “invisible” (couldn’t see it even with show hidden files at Windows Explorer).

The good thing is that this can be easily fixed, but I don’t know if any common user actually knows how. So this is the main reason of this easy pie tutorial.

Open your My PC and see where your USB drive is located (or sdcard, whatever).

usb

Then, just open the Command Prompt and write this (change the drive letter to your own).

cmd

You should be able to see your files now, enjoy.

Why Windows 8.1 is the best desktop operating system

It’s been 18 months since the release of Windows 8 and 6 months since the release of Windows 8.1. But yet, many people are using outdated operating systems.

Windows XP and Windows 7 still have a big user base. The main reason is because they been told that the Windows 8 interface is not friendly.  Some of those people claim that they used it a little and that they didn’t like it. The main reason is the introduction of the “Start Screen” and the removal of the “Start Menu” that has been used from Windows 95 to Windows 7.

So, what are the reasons to upgrade to Windows 8?

Faster startup: Apparently Microsoft started to realize how important it is to get the desktop running as fast as possible.  It’s the first improvement that you notice when you update. They also added an easier way to disable some applications that run at boot from Task Manager. You can disable a few things to make it even faster. My start-up time currently is 7.8 seconds, which is awesome. The time used by Windows 7 can even be the double.

Starcraft looks as it should. It looked really bad on Windows 7. This also happens with other old applications that used to work fine on Windows XP and didn’t work as they were supposed to since Vista.

taed

Windows App Store, some applications may be so useless but we have to admit that some look neat, like Twitter and Netflix. If you have 2 screens or more you will be in love.

netflix-100010107-orig

PC settings is easier for computer illiterates that have used to have a bad time using Control Panel on older versions.

pc

Touch screens are a nice extra. Although this post is about desktop computers, most of the newest notebooks are shipping with a touch screen and Windows 8.1 support is awesome. Just use a Surface and you will know what I’m talking about.

There are lots of bad things about Windows and sometimes I wish I could be using an *NIX shell or using applications like LinkinusTransmit and Sequel Pro from OS X. But Linux and OS X are far from being usable on some work environments because of the lack of professional applications. (Solidworks and Proteus for example).

Installing Windows from a USB to a MacBook with optical drive

We all know that Apple is the kind of company that likes to push users to renew their computers by limiting them using proprietary and not well documented software and hardware that restricts people from upgrading their computers, even for the users that are supposed to want this as they are doing on almost the whole of their products as the MacBook Pro – with Retina, the iMac and the Mac Pro and although I’d like to talk more about how they limit their hardware much more lately, this post is about installing Windows using Boot Camp from a USB. To read more about this new horrible new computers, you should see this post made by DennisTT.

This feature is blocked (although it works) from not that old models, so you need to modify a configuration file to make it work as any other recent model. Follow the next steps:

Step 1
Verify if your computer needs this modification, you can see this by just opening Boot Camp and seeing that there is no choice other than optical drive.

Step 2
Modifying Info.plist from /Applications/Utilities/Boot Camp Assistant.app/Contents, this can be done using the terminal by writing:

terminal

When you open nano search for PreUSBBootSupportedModels and modify it to look like this by removing Pre from the tag

USB

Now continue with the rest of the terminal command, so you will sign this new Info.plist, otherwise Boot Camp Assistant will crash when you open it. It may ask you to install an XCode addition, just click yes is an small thing.

Step 3
Open Boot Camp Assistant and see, you have this new option and you are ready to create a Windows image from OS X and the option you had before will let you install from USB.

BootCampInstall