Network Interfaces

In this brief article I will describe how Ethernet devices are managed in Red Hat and the options associated with their configuration files.

Ethernet Interfaces
Configuration files are stored in /etc/sysconfig/network-scripts , into files named ifcfg-ethX ,
where X is an unique number that identifies the interface.

Common option in ifcfg-ethX :

BOOTPROTO={ none | bootp | dhcp }
Specifies the boot protocol
BROADCAST=<address>/dt>

Deprecated
DEVICE=<name>
name of the physical device
DHCP_HOSTNAME
the client will send the hostname to the DHCP server if this requires it
DNS{1,2}=<address>
If PEERDNS=yes , DNS1 and DNS2 are placed in /etc/resolv.conf
GATEWAY=<address>
Specifies the IP address of network gateway

Linux File systems Overview

Linux support a huge number of different filesystems, each one of them with strenghts, weaknesses, performance.
The capability to support several filesystems is achieved through the use of the Virtual File System (VFS, aka virtual filesystem switch). It is an generic layer on top of each specific file system and allows programs to use the same API to interact with the concrete filesystem in use.

The first concrete filesystem introduced in Linux was the Ext File System (aka Extended File System), created by Remy Card specifically for Linux to overcome limitation of the Minix file system.
To raise Ext limitations and add new features (please, read http://e2fsprogs.sourceforge.net/ext2intro.html), the same Remy Card developed the Ext2 File System (aka Second Exendend File System), that become the standard Linux filesystem for several years.

Partition table

A block device is a device that can be accessed in unit of fixed-size blocks, and it is normally represented as a randomly addressable device.
Examples of block devices are IDE hard drive (/dev/hdX) or SCSI hard drive (/dev/sdX).

In some block devices it is possible to logically divide (or partition) the space available into smaller block devices called partitions.
The idea behind the partitioning of an hard drive is to have different block devices with different size and different filesystem.

Each disk contains a partition table in its Master Boot Record. In a standard MSDOS partition table, only four partitions are available. To override this limitation, it is possible to mark one of these partitions as Extended, and create more partition inside this one.
In this way, three type of partitions can exist:
1) primary partition: mapped inside the MBR
2) extended partition: it is a special primary partition that became a container for logical partition
3) logical partition: partition created inside an extended partition.

BOFH: Being root

2007-07-23, working environment ...
S: At home, do you normally login as root?
R: Of course, I am the administrator!

For more informations:
http://www.theregister.co.uk/2006/02/24/bofh_2006_episode_8/

iodine - IP over DNS is now easy (a practical example)

Ok, I know, someone will complaint, iodine means something else.
Well, it isn't completely false. Sometime the casuality looks like it is waiting behind your back to make you some strange joke.
And this is what happen to programmers of iodine, that start writing IOD (IP over DNS) but then ... wait, DNS works on port 53, and iodine has atomic number 53! Funny coincidence.

But was is iodine? A tool that make easy IP over DNS!
From iodine README.txt:
This is a piece of software that lets you tunnel IPv4 data through a DNS server. This can be usable in different situations where internet access is firewalled, but DNS queries are allowed.
IP over DNS is an hack that allows tunnelling IPv4 data into DNS requests what will be handle by a fake DNS server.

A real example.
That we need is a client, a server, and a DNS server (it can be in the same host as iodine client, or somewhere else).
On both client and server:
$ wget -c http://code.kryo.se/iodine/iodine-0.4.0.tar.gz

Syndicate content