In general, one of the hardest things about Linux is learning is the command-line interface (CLI). Linux servers aren't usually equipped with click and go menus like Windows. But this allows you to have a more robust and tailor-made system when using RHEL servers. With the knowledge and ability to effectively configure and customize a RHEL network service, you'll be able to order to start a network or prevent and/or lessen down-time. In this tip, you'll learn the basics of booting a Linux network and move on to turning one physical interface (NIC) into two logical interfaces, also referred to as called sub-interfacing.
Once the Linux machine has been successfully booted, the network service is usually already started. If not, it can be started by doing:
[TABLE]
This will launch the interface scripts that are held in /etc/sysconfig/network-scripts. You can view which interfaces are up or down, and some more statistics on each interface by typing:
[TABLE]
Additionally, the network service can be stopped (shutting down all interfaces) or reloaded (reloading the configuration files from /etc/sysconfig/network-scripts) by using:
[TABLE]
or
[TABLE]
All configuration files can be edited via script directory. You can edit them by with the command:
[TABLE]
Each interface has its own configuration file. For example, interface eth0's configuration file will be named ifcfg-eth0 under this directory. If you're modifying the eth0 interface, then do the following:
[TABLE]
An example of the file that you just opened is as follows:
# Broadcom Corporation|NetXtreme BCM5704 Gigabit Ethernet
[TABLE]
Note: Any line that begins with # is a comment in a configuration file -- this is standard with most scripts with Linux, not just the network scripts. This comment describes driver it's using to run this interface.
Backing up configuration files
Like any other
To continue reading for free, register below or login
To read more you must become a member of SearchEnterpriseLinux.com
');
// -->

configuration files stored on your Linux system, the network configuration files need to be backed up. Therefore, if there are any problems your network connection can be restored shortly. I recommend making a backup right now, especially while practicing your network service skills.
You can make a backup with this by typing:
[TABLE]
To sum up the steps for making a backup:
To restore from a previous backup, do the following:
[TABLE]
To sum up the steps for restoring from a previous backup:
Sub-interfacing
For the rest of this tip, let's assume that we're working with the eth0 interface.
Have you ever needed one physical interface to have more than one IP address? Here's how! First, you'll need to go into the network-scripts directory (cd /etc/sysconfig/network-scripts) and create a backup. The instructions on how to do this is in the first part of backing up configuration files.
Once you've created a backup, type:
[TABLE]
This is simply creating a new configuration file for your sub-interface.
Then do:
[TABLE]
and make the changes as below:
Before:
After:
In order to make the changes, hit Insert on your keyboard and then modify what's needed. The changes made are with the device name (identifier) and with the IP address. Once the changes are made, you can then save the new configuration file by doing CTRL+C and then typing "wq."
Then simply restart, or reload the network service, and you should see that it also sees eth0:1 as a separate physical device now.
MAC address spoofing
With Linux, you are easily able to spoof your MAC address to whatever you'd like it to be, as long as it's a technically legal MAC address. You can't have a MAC address of XX:XX:XX:XX:XX:XX!
When your network service is started and the eth0 interface is up, do the following:
[TABLE]
Change the MAC address field to what you'd like the interface's new MAC address-to-be. Save the file by typing CTRL+C, "wq" and hitting Enter.
Example:
Before: HWADDR=00:01:23:45:67:89
After: HWADDR=00:CC:CC:CC:CC:CC
Once back at command prompt, do:
[TABLE]
Then do:
[TABLE]