y: In this mode, only one slave in the bond is active. The other one will become active, only when the active slave fails. The bond’s MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance.
Transmit the traffic based on [(source MAC address XOR’d with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.
Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance.
Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.
mode=5 (balance-tlb) – Adaptive transmit load balancing
channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.
mode=6 (balance-alb) – Adaptive load balancing
It includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation.
Important Configuration Files involved :
/etc/sysconfig/network-scripts/ifcfg-bond0 /etc/modprobe.d/bonding.conf /etc/sysconfig/network-scripts/ifcfg-eth[0-4] /proc/net/bonding/bond0
Ques 3. Explain briefly the procedure for re-installing Grub in Linux ?
Ans – 1) Download Ubuntu Installation / Live cd
2) Boot from Ubuntu Installation / Live cd – usb, burned cd etc.
3) During boot select “Try Ubuntu” , Don’t select install !
4) Mount your Linux root partition
sudo mount /dev/sda6 /mnt
( Assuming /dev/sda6 is the Linux root partition)
5) Install / reinstall grub
$ sudo grub-install --root-directory=/mnt/ /dev/sda
( where /dev/sda is your primary disk)
Installation finished. No error reported.
6) Reboot your system, remove bootable CD and we should have the boot menu ready when the system starts.
Note : There would be slight difference when using with other distros.
Ques 4. Explain the fields in /etc/passwd and /etc/shadow ?
Ans – The /etc/shadow file stores actual password in encrypted format with some additional properties related to user password.It mainly holds athe account aging parameters. All fields are separated by a colon (:) symbol. It contains one entry per line for each user listed in /etc/passwd file Generally, shadow file entry looks as below.
Here is the explanation of each field.
User name : Your login name
Password: Your encrypted password.
Last password change : Days since Jan 1, 1970 that password was last changed
Minimum: The minimum number of days required between password changes.
Maximum: The maximum number of days the password is valid.
Warn : The number of days before password is to expire that user is warned that his/her password must be changed
Inactive : The number of days after password expires that account is disabled
Expire : days since Jan 1, 1970 that account is disabled. It indicates an absolute date specifying when the login may no longer be used
The /etc/passwd file stores essential information, which is required during login /etc/passwd is a text file, that contains a list of user account related parameters like user ID, group ID, home directory, shell, etc.
Here is the sample entry from /etc/passwd file
Username: User’s login name.
Password: An x character indicates that encrypted password is stored in /etc/shadow file.
User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root.
Group ID (GID): The primary group ID
User Info: The comment field. It allow you to add extra information about the user.
Home directory: The absolute path to the directory the user will be in when they log in.
Command/shell: The absolute path of a command or shell (/bin/bash).
Ques 5. How do you boot your system into the following 