Review: RHCSA/RHCE Red Hat Linux Certification Study Guide (Exams EX200 & EX300), 6th Edition

After I decided to add some reviews to the site, the first item I decided to pick was a no-brainer. It’s the RHCSA/RHCE Red Hat Linux Certification Study Guide (Exams EX200 & EX300), 6th Edition by Michael Jang. If you’re even considering trying to take the RHCSA or RHCE exam, I can’t recommend this book highly enough.

Michael Jang has written a number of Linux-focused books, a number of which cover other professional certifications including the now deprecated Red Hat Certified Technician (RHCT). However, the 6th edition of the Study Guide has been completely revised to cover the new objectives of the RHCSA certification.

The book starts out with preparing the reader with what to expect during the exam (from a general perspective) as well as what is required in order to proceed with completing the home study and sample questions which accompany each chapter in the book.

Jang then moves on in the first nine chapters to cover all of the objectives that are specified by Red Hat as included in the RHCSA exam criteria. These include: basic and intermediate command line tools, virtual machines (KVM), system log management, basic network services like FTP and HTTP, disk management and security.

The latter portion of the book (chapters 10 to 17) covers preparation for the RHCE exam. However, it would be a mistake to only review those chapters for RHCE as many of the topics and sample exercises that Jang presents build upon topics that he addresses in chapters 1 through 9.

What I liked:
Coming from a Solaris background, and as someone who has used Linux off and on for a number of years, but not seriously until the past year or so, I found this book to be an ideal tool to immerse myself back into the Linux pool, and, specifically, Red Hat/CentOS. I especially found the lab exercises at the end of each chapter and the sample exams to be of particular value. The inclusion of a CD-ROM containing the book in PDF format was also a nice addition.

What I didn’t like:
Not much really. The only criticism I have is that some of the topics that Jang covers, he covers a little lightly. In other words, I got the feeling that I knew just enough to get by in the exam and nothing more. To be fair, however, he didn’t write this book to serve as a desktop reference for RHEL 6. It’s a study guide and it performs that task very well.

Finally, if you’re interested in reading more about the RHCE Study Guide, go to www.linuxtarget.com for other linux tips, tricks and howtos.

Network Channel Bonding for Load Balancing in Red Hat Linux

Previously, I looked at Linux network bonding for failover. In this example, we will using bonding mode 0, or balance-rr which sets a round-robin policy for fault tolerance and load balancing.

Both of the physical interface configuration files, /etc/sysconfig/network-scripts/ifcfg-eth0 and ifcfg-eth1, remain the same as in the previously discussed configuration. The only difference is the set of parameters set in the BONDING_OPTS variable /etc/sysconfig/network-scripts/ifcfg-bond0 file. See below:

DEVICE="bond0"
BOOTPROTO="static"
GATEWAY="192.168.2.1"
IPADDR="192.168.2.1"
NETMASK="255.255.255.0"
NM_CONTROLLED="yes"
ONBOOT="yes"
BONDING_OPTS="miimon=1000 mode=balance-rr"

Again, ensure that the ensure that the kernel module is loaded when the bonding interface is enabled. To do this, we populate a file called /etc/modprobe.d/.conf with the following line:

alias bondN bonding

where N is replaced with the numeric value of our bond (e.g. bond0).

At this point, we will enable the bond by restarting the network service.

[root@santa network-scripts]# service network restart
Shutting down interface bond0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface bond0: [ OK ]

Let’s see our configuration.

[root@santa network-scripts]# ifconfig -a
bond0 Link encap:Ethernet HWaddr 78:AC:C0:FC:F1:64
inet addr:192.168.2.5 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::7aac:c0ff:fefc:f164/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:1167299 errors:0 dropped:3878 overruns:0 frame:0
TX packets:1955 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:131732633 (125.6 MiB) TX bytes:277796 (271.2 KiB)

eth0 Link encap:Ethernet HWaddr 78:AC:C0:FC:F1:64
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:586476 errors:0 dropped:3878 overruns:0 frame:0
TX packets:1798 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:66196428 (63.1 MiB) TX bytes:258930 (252.8 KiB)

eth1 Link encap:Ethernet HWaddr 78:AC:C0:FC:F1:64
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:580823 errors:0 dropped:0 overruns:0 frame:0
TX packets:157 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:65536205 (62.5 MiB) TX bytes:18866 (18.4 KiB)

Transmissions are received and sent out sequentially on each bonded slave interface beginning with the first one available.

References:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Using_Channel_Bonding.html
http://www.linuxtopia.org/online_books/rhel6/rhel_6_deployment/rhel_6_deployment_s2-networkscripts-interfaces-chan.html

Network Channel Bonding for Failover in Red Hat Linux

Channel bonding in Linux enables two or more physical network interfaces to act as a single interface on a system. There are several bonding modes available which can simultaneously provide increased bandwidth and/or redundancy. For this entry, we will be looking at a simple fault-tolerant configuration. A load-balanced configuration will be covered in a later entry.

As mentioned above, there are 6 channel bonding modes. The mode we want to look at right now is mode 1, or active-backup. Here, we will bond eth0 and eth1 to a single mode 1 channel. In this mode, all
transmissions are received and sent out via the first available bonded slave interface. The other bonded slave interface is only used if the active bonded slave interface fails.

1. Create a network script file for the bond device. We’ll call the device bond0.

[root@santa ~]# cd /etc/sysconfig/network-scripts/
[root@santa network-scripts]# vi ifcfg-bond0
DEVICE="bond0"
BOOTPROTO="static"
GATEWAY="192.168.2.1"
IPADDR="192.168.2.5"
NETMASK="255.255.255.0"
NM_CONTROLLED="yes"
ONBOOT="yes"
BONDING_OPTS="miimon=1000 mode=active-backup"

There are a number of parameters that can be assigned to the BONDING_OPTS variable. However, in this case, we are only concerned with the mode (active-backup) and the miimon which specifies (in milliseconds) how often MII link monitoring occurs. This is useful if high availability is required because MII is used to verify that the NIC is active.

2. Modify the network configuration files for each of the interfaces assigned to the channel bond.

[root@santa network-scripts]# vi ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

[root@santa network-scripts]# vi ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

3. We also need to ensure that the kernel module is loaded when the bonding interface is enabled. To do this, we populate a file called /etc/modprobe.d/.conf with the following line:

alias bondN bonding

This file can have any name you like as long as it is appended with the .conf suffix. Note that you must replace N with the interface number, such as 0. So in our case, the contents of the file will be:

[root@santa network-scripts]# cat /etc/modprobe.d/bonding.conf
alias bond0 bonding

Note that for each configured channel bonding interface, there must be a corresponding entry in the
/etc/modprobe.d/.conf file. So, if we had multiple bonds, the config file would have multiple lines.

4. Now, we will restart the networking service. It is best to do this from the console in order to diagnose and repair any potential problems with the network configuration.

[root@santa network-scripts]# service network restart
[root@santa network-scripts]# ifconfig -a
bond0 Link encap:Ethernet HWaddr 78:AC:C0:FC:F1:64
inet addr:192.168.2.5 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::7aac:c0ff:fefc:f164/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:20462 errors:0 dropped:3878 overruns:0 frame:0
TX packets:883 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2217821 (2.1 MiB) TX bytes:103195 (100.7 KiB)

eth0 Link encap:Ethernet HWaddr 78:AC:C0:FC:F1:64
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:12678 errors:0 dropped:3878 overruns:0 frame:0
TX packets:883 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1376813 (1.3 MiB) TX bytes:103195 (100.7 KiB)

eth1 Link encap:Ethernet HWaddr 78:AC:C0:FC:F1:64
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:7784 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:841008 (821.2 KiB) TX bytes:0 (0.0 b)

Now, we’ll test the failover.

[root@santa network-scripts]# ifconfig eth0 down

We see in the syslog that the bond has failed over to eth1.

Nov 30 13:03:00 santa kernel: bonding: bond0: link status definitely down for interface eth0, disabling it
Nov 30 13:03:00 santa kernel: bonding: bond0: making interface eth1 the new active one.

Now we bring back eth0.

[root@santa network-scripts]# ifconfig eth0 up

From syslog, we can see that the bond has failed back to the primary interface.

Nov 30 13:03:17 santa kernel: eth0: Link up
Nov 30 13:03:17 santa kernel: bonding: bond0: link status definitely up for interface eth0.

Connecting to Red Hat Network Through a Proxy

In order to download system patches and updates from Red Hat repositories, you need to register your system with Red Hat Network (RHN).  Typically, this is a straightforward exercise.  However, if your system is behind a corporate proxy, you will have to make the registration process route through the proxy to reach RHN.

[root@santa]# rhn_register -vv --proxy=<PROXY:PORT>  --proxyUser=<LAN_UserID> \
--proxyPassword=<LAN_Password> --nox

Note that the -vv switch is not required;  it just provides you with a more detailed output of the registration process.

After the system has been registered, you can modify your proxy settings at a later date by manually editing the file /etc/sysconfig/rhn/up2date.

Follow

Get every new post delivered to your Inbox.