Hardware, Software, Technology

How-to: Network Settings [Guest Post]


New Network settings on Linux KDENetwork Settings by Jan Mussche originally appeared in Full Circle Magazine Issue 72.

When you connect your desktop, laptop, printer/scanner, tablet, cellphone or whatever other device you might have, to a network, you need to set a few things straight in order to get connected.

The first choice you make is whether you use a wired or a wireless connection. For the tablet and the cellphone, this choice is easy: only a wireless connection is possible.

For the laptop and printer you can, almost always, choose between the two, and for desktops the choice is probably made already, with the presence of the Ethernet port and the missing wireless card.

The second choice is how do you want your device to be connect to your network. Do you use the devices (cellphone, tablet, laptop) also on other networks, wi-fi at the office, school, mall or maybe even in the train, or is it (desktop, printer/scanner) connected to only your own private network? When using other networks as well, the choice, if there is even a choice, is simple: you will use DHCP to set all parameters automatically for a working connection.

DHCP stands for: Dynamic Host Configuration Protocol (See http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol for more info about DHCP). Here a DHCP server handles all requests for a connection, it hands out the IP address, sets the gateway, and takes care of the correct DNS addresses.

Routers have a DHCP server on board so you can use it very easily. Using DHCP, the router will give your connected device the first free address in the range of addresses it can use, meaning it might use a different address each time it is connected.

For a desktop, which is placed under or on your table and which will be there till it falls apart, you can also use the manual “fixed address” settings. This way, you are in control: you decide which address the computer uses, and you know it always uses that one same address.

Both ways have advantages.

When using DHCP, your device will almost automatically be connected to a network when it
comes in range AND you have permission to connect to it. You just need to chose the security used by the network (if any) and probably type in a password.

When using a fixed address, you always know which address it is and you can use this in scripts to address the computer.

What do you have to do to setup a connection?

New Network settings on Linux KDEI will explain this using a Kubuntu system. For other systems, there will be differences in setting it up, but they will be minor.

When you open the Network connection settings, you see what is shown in the picture above. I use a wired connection, since this is the only connection the computer has.

The connection is called: “Wired connection 1”. Now this is just a name, you can use anything you want here. You can make more than one connection if you need to, each using its own settings. Each time the computer is booted, the connection is switched on automatically – which makes
life easy.

As you can see, I use the Automatic (DHCP) method of connecting to my router. In the
middle of the screen I chose DHCP, and now the other fields for setting IP address, Subnet mask and Gateway are greyed out. They don’t need to be filled out since the DHCP router takes care of them.
In the second picture, I chose the manual settings and typed the values of IP address, Subnet Mask and Gateway.

A few explanations:

  • IP address is the address your device gets. It is like your home address. In a network it is used to find the device.
  • The subnet mask is used to organize your network. It tells which addresses can be used by
  • means of a filter. In my case the value is set to 255.255.255.0. This means when placing this filter on top of the address, the DHCP server can use only the addresses 192.168.1.0 until 192.168.1.255.
  • Only the part after the last decimal point can change. This is caused by the value “0” in the mask. Mind you, in this range there are a few addresses which will not be used for connected devices since they are used by the network itself.
  • The Gateway is the door which connects your local private network to the Internet. It is the address for the “inside” part of the router, the local LAN side of the router.
  • On the other side, the WAN side of the router, the address is the IP address your Internet Service Provider gave you, either by means of a fixed or a DHCP address.

New Network settings on Linux KDEUsing DHCP (on a private network) has the big advantage that you don’t need to know anything about the network, or about somebody else’s network, when you want to connect to it. It is not important which address you get, it is not important to know which addresses the network uses. Local networks can use one of a couple of address ranges, either the 192.168.x.x series or the 10.10.x.x series. Your device receives an IP address and that’s it: you’re connected. It is not important to know which address it is, what the gateway is – it all works automatically.

But what if you want to have the ease of use of the DHCP server, and still want a fixed address so you can use that address in scripts when connecting to that device?

There is a way, but it depends on your router whether it is possible to use it.

Some routers can be told that when device X is trying to connect, it always gets the same address, no matter how few or how many devices are connected to the router already.

This is done by means of the MAC address. MAC stands for Media Access Control. See http://en.wikipedia.org/wiki/MAC_address for more info. The MAC address is a unique address for each network card/chip, and is stored in the read only memory of the card, or in the chip which handles network traffic. There are no two chips/cards in the world with the same MAC address. This makes them unique (however, on most network hardware, you can spoof a MAC address, tell it to use an address you specify, not what is on the chip).

Now, how to use the MAC address? This depends on your router, if it is possible, and, if so, how to do that. My router, a Cisco Linksys E4200, has the ability of combining the MAC address of a connected device to a handed-out IP address.

New Network settings on Linux KDEIn the Setup tab you find the settings for your Internet connection. As can be seen here, I have a DHCP address from my provider. This means, whenever the modem shuts down, I could get a different IP address from my ISP. Since we are connected 24/7 it will not happen frequently. Below that you see the local network set-up.

The router has the address 192.168.1.1, with a subnet mask of 255.255.255.0, meaning addresses 192.168.1.1 – 192.168.1.255 can be used. DHCP Server is enabled, because I want to make it easy for devices to connect to the network. DHCP is using the addresses 192.168.1.100 – 192.168.1.199 (100 addresses, this should be enough for my wife and me).

In this section of the set-up, you find the button DHCP Reservation. This is the one to use if you want to combine DHCP with fixed addresses. When clicking the button you will see the next picture, which is a part of the total screen which shows up. In here you see a table with connected devices, their assigned IP address, their MAC addresses and buttons to remove them from the list.

Give your device a name which is easy to remember, choose an IP address, find the MAC address the device uses, and add it here on this page. (This is done in another part of the page, which is not shown here.) Save your settings. Reboot your device and check the IP address it received. It should match the entry in the table. Now you have the best of both worlds, and the ease of using a DHCP server, and the fact your devices always use the same fixed IP addresses. JM

Related: How-to: Avoid Common Security Mistakes On-line Part2

Discussion

3 thoughts on “How-to: Network Settings [Guest Post]

  1. As a newbie, I am always browsing online for articles that can help me. Thank you.

    Posted by Joko | May 7, 2013, 6:53 pm
  2. liked it so much, thank you.

    Posted by cintia sanches | May 8, 2013, 5:53 pm

Trackbacks/Pingbacks

  1. Pingback: Review: Google Drive and Docs [Guest Post] | Everything Express - September 11, 2013

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Twitter Updates

Follow us on Twitter @EverythingExpre

Find Us on Facebook

Enter your email address to follow this blog and receive notifications of new posts by email.

Categories

Library

BBC World News

BBC World News
Opens the BBC World News page.
%d bloggers like this: