Basic of UNIX System and Linux system

UNIX SYSTEM
UNIX is earliest and most widely used network Operation system.
It is available is many versions like Sun Solaris, HP, UNIX, AIX UNIX, and BSD. Though developed for different hardware platforms they all have similar networking features.
LINUX SYSTEM
Linux is an open Source networking Operation System based on UNIX architecture.
Linux provide flexibility to users for altering it according to there individual requirements.


Feature of Linux / UNIX
Security: it supports different levels of access permission for each user file and directory. So unauthorized user can not access a file beyond a certain specified level.
Linux/Unix it treaded all the device treated as files.
It is provide Internet based service like mail, web browsing and transfer
Different protocol has been support FTP, SMTP, HTTP,HTTPS

Cellular Topology Network Topologies | Advantage vs Disadvantage

This is a wireless topology where geographical area is divided into cells or regions.
Advantage
Each cell is the center processes an individual device, which can move from one cell to another cell and receive signal.
So it does not need any reconfiguration,
Hence it is so flexible.
It is easy to install it only requires a central location with strong signals.
Disadvantage
It is very expansive to set up as it requires a central station and require satellite communication links for each cell.
When the central station is fail communication within the cell and other cells is disrupted completely. But other cell not affected.

Mesh Topologies Network Topologies | Advantage vs Disadvantage

These topologies consist of point –to-point connection between all the devices on the network.
Advantage
Mesh topology provides increased Network stability and connectivity.
So it is providing flexibility.
It is highly suitable for large network connections as it allows multiple sites on the network.
These topologies provide high speed data transmission between source and destination device
Disadvantage
This is complex topology that often results in an increased amount of cabling.
This cost to install and is unsuitable for smaller organization.
It involve high maintains and is not easily manages.

Ring Topologies Network Topologies through Point-to-point | Token Ring | Advantage Disadvantage

Ring topology is connected through a point-to-point connection.
Devices are connected as a ring and data passes the ring in one direction like bidirectional and regenerated signal can be accessed by the next device.
Advantage
It prevents collisions and traffic by using what is called as the token-ring method.
Disadvantage
It is high risk failure as the devices are connected point-to-point and even if a single device malfunctions it stops the functioning of the entire network.
There cables are costliest cable network to setup.
Ring topology is easy to maintain and troubleshooting is simple as location of faults is very easy.

Star Topologies Network Topologies using Hub Advantage Disadvantage

Start topology connecting to the device over a network using hub.
Advantages
Star topology has the higher scalability,
Newer device can be added to the start-based network by attaching them to the hub.
Star topology is also easily maintained and the working of the hub is not affected If the device become defective
Disadvantage
However star topologies require a lot of cabling and as the hubs.
They are very expansive these have a high installation cost.

Bus Topologies Network Topologies CSMA/CD Advantage Disadvantage

Here the all the device connected through a shared cable often called the backbone.
The data packet sent to the all the device on the network through bus.
If the designation address on the packet matches it is own address the device read the data else it is ignore it.
The device knows as terminator that is attached to the end of the bus.
If the multiple devices transmit signals at the same time it may lead to a collision.
To avoid collision bus topology uses mechanism called as carrier sense Multiple Access (CSMA/CD)

Advantage
It is easy to install
It is requires minimum cabling
Low cost for setting up
Disadvantage
It is difficult to add more devices to a bus network that is already established.
An administrator difficulty in maintain and trouble-shooting such a topology



Networking Concept Computer Network | Network Topologies | Network Transmission Medium

Computer Network Concept
In computer Terminology a network is defined as a group of integrated that shares services, data, Information and interact with each other by means of communicating link.

Network Transmission Medium Concept
Network thus requires at least two devices connected through a physical medium called as the transmission medium. A transmission medium determines the speed and connectivity of the network


Network Topologies Concept
Different network arrangement known as topologies
In another words schematic representation of the arrangement of the device a network is called network topology. There are five categories in there topologies
Bus
Star
Ring
Mesh
Cellular

Network Components NIC Repeaters Hubs Switches Modem Gateway Router Brouters

Network Interface card
Internal component of the device that helps in connecting each device to the network and operate the Data link layer in OSI model. This is called Network Interface card
Repeater
Every medium has a limited range of reliable data transfer after the signal get it will become weak. Hence repeater is used to amplify and regenerate the signal from one device to another device over network.
Hubs
Hub is the center point of the network.
Hubs allow multiple device to be attached at the same time .
Hubs are of three types
Passive hubs, Active hubs, Intelligent Hubs
Switches
Switches forward the packets only to the intended recipients of the packets preventing the wastage of the network bandwidth and optimizing efficiency
Modem
Modem it can be classified in to two types
Modulator and Demodulator
Modulator
It converts the digital signals of the computer to the analog signal and can be transmitted through telephone line.
Demodulator
It converts the analog signals to the digital signal.
Gateway
Gateway is the device that acts as an interconnection for network device.
Routers
Router maintain routing table of the information about routing of the data packet. There are hardware device that provide connectivity with different topologies or network with different standard.
Router depends on protocol for their functionality.
Brouters
Brouters are hardware devices that can function as router and bridges.
There are also protocol dependants.
Brouter acts as a router when it recognizes the associated network protocol.
If it does not the brouter acts as a bridge and forward the data packet to the adjacent Network segment.




NIS Network Information Service configuration important files and directory in Red Hat Linux

Install NIS
#rpm –q yp*
Set the domain
/etc/sysconfig/network
Line4: NISDOMAIN =linuxclient

Edit variable directory /var/yp/Makefile
Line 109 add # before host
Add the user to NIS
/usr/lib/yp/ypinit –m

-m option means this is for the Master server.

Start the service
Service yppasswdd start
Add the user
Update the user database through make command

Go to the client system
Setup NIS client
Set NISDOMAIN as linuxclient

NFS Network File Sharing Configuration Important Files Directory in Red Hat Linux

Before you install the NFS you must stop the ipatables
#service iptables stop
Or
#chkconfig iptables off

Install the NFS files
#yum install nfs*
ADD the shared files in the NFS configuration file
/etc/exports
Start the portmap
#service portmap start

Client Side
Mount the share file
#mount ipaddress:/sharefolder

Samba Server Configuration Important Files Directory in Red Hat Linux

Samba server installation command
Yum install samba*
Edit the smb.conf configuration file
/etc/samba/smb.conf
Add the user to samba
smbpasswd –a username


And give the full permission for shared directory

using chmod command Linux

Apache Web Server Configuration Important Files Directory in Red Hat Linux

Web server installation command
Yum install httpd*
Create Home file for the web server variable directory
/var/www/html

Create the web server configuration file httpd.conf file in configuration directory
/etc/httpd/conf


And edit the file httpd.conf
Restart the service
Service httpd restart

RNDC Command Syntax Various Option in DNS Configuration /etc/rndc.conf

RNDC command syntax
rndc <option><command><command-option>

Use rndc Domain Name System Prevent Unauthorized Users

Most use rndc it matching configuration of /etc/named.conf and /etc/rndc.conf the use of secret key name and key value prevent unauthorized users from accessing server. Using the key administrator can access the server and use rndc command to make the changes necessary for management even for remote machine.

DNS rndc utility /etc/named.conf in Red Hat Linux OS

RNDC is the bind utility enables secure and remote management of running name server. It is earlier name is Daemon Control utility (ndc).rndc is also called by remote BIND, or DHCP server to dynamically “update” the local server’s configuration. It is not daemon but utility called by named to verify keys. It used 953 port .rndc is used key specified in /etc/named.conf three statement are essential with option statement you can set the default server and key for rndc
Options
{
default-server localhost;
default-key “”;
};


Server localhost

{
Key “”;
};


Key “

{
};

and should exactly match their setting /etc/named.conf

To test this command you can run
rndc reload
rndc:relod command successfully.




DNS Configuration Important Files Directory Red Hat Linux

DNS installation command
Yum install bind* cachi*
Create the named.conf file in the configuration directory
/var/named/chroot/etc
Create Forward.zone and Reverse.zone file in the
/var/named/chroot/var/named directory

Set the IP address
/etc/sysconfig/network
Or use command to set the IP address
system-config-nework


Specify the IP address and host name DNS client system
/etc/hosts

Specify the DNS server name and IP address in the client System
/etc/resolve.conf

YUM Server Configuration Important Directory Files REDHAT Linux

Copy of the Linux OS like RED HAT package
/var/ftp/pub- copy the data from CD or DVD to /var/ftp/pub
Create repo file
rpm –ivh createrepo.
List out the repo file
createrepo /var/ftp/pub/Server/

Edit the yum server configuration file
/etc/yum.repos.d directory

/etc/passwd user account database Linux

How to view User account database /etc/passwd in Linux
Linux maintain the user account database in /etc/passwd directory. It will provide one-line information about every user on the system. /etc/passwd has the permission 644 these permission provide non-root user they will see the information but they don’t have any privilege to add the data to that file.
The file has seven fields
Student:x:500:500:studentwebsite:/home/student:/bin/bash
First filed: student
It is student it is user named id
Second field: X
X refers to the shadow password
Third filed: 500
It is user id (when you add new user the user id it is star with 500)
Fourth Field: 500
Group id
Fifth Field:studentwebsite
It is full name of the specified user
Six Field:/home/student
User home directory
Seventh field:/bin/bash
It is executed by login that is often a shell /bin/bash is the final command executed by login


/etc/passwd user account database Linux

How to Maintain the dual OS between Linux and Windows | Install Linux and windows in the system

If you like to install the windows and Linux in the same system.
Then first you install windows then you can install Linux. In this method only you can install these two OS. Because Linux support both windows boot loader and Linux. But windows support only windows boot loader it does not support Linux boot loader. Which Os you install last these OS occupy the boot laoder. As per my first method if you first you install the window then install Linux in these way Linux support both boot loader so there is no problem. But if you install like that Linux first windows second then window does not support Linux boot partition so windows it boot only windows.How install  DualOS Linux windows system

Basic things about Swap partition | command swap swapon swapoff Ram Size

Swap is the extension of the physical memory of the computer. Swap partition is creating during the initial Linux setup. Swap twice as large as the physical (silicon) memory-RAM but not less than 64 MB. Otherwise e swap space at least 1.5 times the amount of the physical memory on the system. Swanon command is used to enable swap partition for example swapon /dev/hda4. Swap enabled automatically at boot up at the proper entry in /etc/fstab by the following line /dev/hda4 swap swap defaults 0 0. Swapoff used to disable the partition example swapoff /dev/hda2
Swap partition swapon swapoff /etc/fstab Ram

ICMP destination unreachable code with their description

Destination host unreachable messages are sent by ICMP only. There are several reason for destination unreachable error message it contains the function codes.
These function codes are related to IP, TCP, UDP
ICMP destination unreachable code with their description Network Unreachable Host Protocol  Port Fragment Needed but DF set

Network Unreachable
Code value: 0
If there is no match found in the routing table for the packet’s destination the it will sent Network Unreachable message.
Host Unreachable
Code value: 1
The user sent the packet to the server and router R1 has a route to R2.
The packet is delivered to router R2. And Router R2 it is unable to get the MAC address of server it may occur in some problem with server or if it is down then.
It send ICMP Destination Unreachable message with host unreachable message to the user.
Protocol Unreachable
Code value: 2
Protocol Unreachable: User sent the packet to the server. It reaches the server and it is finding TCP or UDP.If TCP/UDP is not available on the server it send the user ICMP Designations Unreachable with code Protocols Unreachable
Port Unreachable: Code value: 3
User sent the packet to the server.
The server is up but web server software is not running. The packet will reach the server but cannot be delivered to the web server software. Hence it will send user the ICMP Designation Unreachable code with code Port Unreachable
Fragment Needed but DF set: Code value: 4
It the packet is too big then router R1 and R2 need the fragment the packet. There is a packet header field call Do Not Fragment in the Ip header. If the bit is set then the router cannot fragment the packet and hence sends ICMP Destination Unreachable message to user with the code Can’t Fragment

Troubleshooting IP Routing IP Routing traffic in Forward table

IP routing is the core of networking
It contains set of protocols that determine path of traffic that flow in order to multiple network across different routers. It gives router data flow from source to destination. This routing protocol will help the router to create forwarding table.
By using these forwarding table it will correlates final destination with forward table. If the router is unable to forward a packet then troubleshooting is required to find the cause.
Trouble shouting is related to network maintenance. Quick resolution of the problem leads to reduction in network downtime.

Switch run level init command| how to switch the current run level

By default most red server there default run level is 3
Red hat work station default run level is 5
By through init command we can switch run level form one level to another level.
#init 3
The above command switch the system from current run level to run level 3
1:345:respawn:/sbin/mingetty tty2 in /sbin/init
The above line directs /sbin/init to run the mingetty program on tty2 in run levels 3 through 5

Linux six runlevel general name and there description

Runlevel 0
General name: HALT
These run level halts or stop the system
Rulevel 1
SINGLE USER MODE
This run level is single user mode and offer root bash shell with no other software is running.
Runlevel 2
MULTIUSER MODE
Perform Multi User mode without NFS (Network File System)
Runlevel 3
EXTENDED MULTI USER MODE
Offer extended full multi user mode with text login
Run level 4
NOT USED
Run level 5
GRAPHICAL MODE
Level 5 off full Multi-user mode with graphical Xll login
Run level 6
REBOOT
Performing Rebooting in the Linux system
These are the red hat Linux run level and there application
These run level and there application is not same for all Linux distribution.
Example: Red hat Linux run level 0 is shut down but in the sun’s Solaris OS shutdown function is performed by run level 5

Linux six run levels |system initialization with three steps Boot hardware, boot loader, Boot kernel

Linux system initializing it perform their process whenever system boots. Linux every system can be made to be in a pre-defined working condition called run levels. Linux it has six run levels.
System Initialization
When ever system boot up in Linux the following three steps happen.
Boot Hardware
On the basic information in the system store in read only memory
Example: BIOS the system examines and startup the hardware.
Some of that information will direct the computer to examine the devices for locating the bootable operating system,
Start Boot loader
Then there control passes to the start boot loader. The boot loader will be started and permits to select to boot Linux or any other operating system
Boot the kernel
Finally there control passes to kernel.
In that time Linux kernel will be loaded.
That kernel mount main file system and passes control to the init process.

Kickstart Installation overview | what is kickstart installation in Linux

Linux has been installed automatic just like automation method of installation called KICKSTART.This type of installation is help administrator to install Linux in the no of the system. These methods involve creating a configuration file and copying that file on to the machine in which Linux has to be installed and performing installation.

Referring kernel source structure-I| memory management, inter process communication, kernel ,PCI

Referring kernel source structure related to source tree with respect to a particular topic.
System Startup initialization
View /arch/i386/kernel/head.s it is make some architecture specific setup and proceed the main() routine in /init/main.c
Memory Management
/arch/*/mm it is directory for memory management.
Page fault handling code is in /mm/memory.c
Memory maping cache code in /mm/filemap.c
Swap cache is applied in /mm/swap.c
And buffer cache is applied in /mm/buffer.c
Kernel
/arch/*/kernel::it is directory
/kernel/sched.c ::kernel scheduler directory
/kernel/fork.c::fork codedirectory
/include/linux/interrupt.h::Bottom half handling code directory
/include/linux/sched.h::task_struct date structure directory
PCI
/drivers/pci/pci,c::PCI pseudo driver directory
/include/linux/pci.h::system wide definition directory
Interposes Communication

System V IPC object s has an ipc_term data structure present in /include/linux/ipc.h
ipc/msg.c:: system v messages are present
/ipc/shm.c::shared memory and semaphore directory
/ipc/pipes.c:: pipes are applied

Linux kernel Management | Thin layer of Linux system | Linux kernel modules

The innermost layer of the Linux operating system is the kernel.
This is the thin layer between hardware and software
When the system boot up the bios setting passes the control to the kernel
Then kernel manages all task of the system.
Kernel modules it contains chunks of codes that have to be linked to the kernel dynamically for use. In the modeling it perform two process
Loading modules
Unloading modules

Linux Kernel source structure | Linux kernel important directories

Linux Kernel has many directories and the structure of the Linux kernel source.
Linux kernel source structure generally it present in the /user/src/linux directory
There important directories are
Documentation-> these consists of documentation of all the data
Arch-> This directory has the all kernel codes particularly related to architecture and it is further divided into subdirectory like
alpha,arm,1386,m68k,mipc,ppc,sparc,and sparc64,it has
boot code, interrupt, trap handling,fp emulation and optimized utility routines.
mm subdirectories for platform-specific memory.
Drivers- this directory contains all the system’s device driver
fs-it contain file system code
Example: vfs,vfat,ext3,proc,etc
include-<most of the include files required to building kernel codes
init-These directory contain initialization code.
ipc- the kernel has inter process communication code
kernel-these directory contain main kernel code. And the architecture specific kernel is in /arch/*/kernel
lib- lib directory contains library code of the kernel and architecture specific library in /arch/*/lib
mm-mm directory has memory management code and directory /arch/*/mm
net-net directory contain networking code of the kernel
script-script directory used to configure the kernel
modules-All built modules are contain in these directory.

Important directories LILO BOOT Loader and hard driver | sbin, lilo, boot,lilo.conf,/dev/hda,hdb,sda,sdb

The following files are significant to LILO and generated at the time of initial installation
/sbin/lilo map installer directory present in /sbin/lilo
/boot/boot.b boot loader directory are present in /boot/boot.b
/boot/map Boot map has the location of the kernel /boot/map
/etc/lilo.conf is the configuration of lilo directory /etc/lilo.conf

Linux hard driver referred as device files that will be present in /dev directory
If the system have one or more IDE drive then there file are /dev/hda and /dev/hdb
If the system have one or more SCSI drive then there files are /dev/sda and /dev/sda



Installing Configuring LILO MBR | how to configure LILO boot loader in MBR-Master BOOT RECORD

LILO can be installed as the MBR-(MASTER BOOT RECORD) of the boot drive. System has one operating system or it contains two operating system windows and Linux.If the system has the two operating system OS/2 then LILO can be installed on the root partition of the hard drive. If the window Os is install then windows will overwrite MBR at the time of installation and then MBR of windows can be overwritten by LILO.
LILO boot loader installed in the following three ways.

1. From the Master boot record of the hard drive.
2. from the superblock of root partition on the hard drive
3. From the CD-Rom or Floppy disk


LILO can be installed for the first time using shell script named QuickInst
If LlLo is not installed at the time of installing Linux without using quickinst.
The user can still install LILO in two steps
File /etc/lilo.conf is created and configured
/sbin/lilo is run to install LILO and LILO will be made active


LILO Boot loader | LILO Loading in two stages.

LILO is the flexible boot loader for Linux, which is independent of the file system. Using LILO it is possible to select one of sixteen different images at boot time.
LILO can be use MASTER BOOT RECORD (MBR).
MBR-Master boot record it is first sector of the hard disk.
LILO loads it self into the computer memory in two stages.
STAGE1: This stage is know as primary BOOT loader

It is read from the memory by the BIOS from the master boot record.
This stage1 will exist on less than 512 bytes of disk space with MBR and MBR will load stage 2 boot loader.
STAGE2: it is known as secondary boot loader is read into the memory and display the red hat Linux initial screen. These screen the option to select the operating system. After selecting the operating system. It will load into memory and transfers control of the computer to that operating system.
If the users want to have command prompt to key in a command to LILO pressing ctrl XLILO will display a LILO prompt on the screen.
The list of available boot targets is displayed by pressing the key.


Linux Boot Loader |LILO and GRUB Grand Unified Boot Loader

Boot loader is a small program that presents in the system and load the operating system into to the system memory at system boot. When the system is started, the boot loader that loads operating system and passes the control to the kernel. These module it is done deals with two most popular boot loader of Linux,
That is
LILO and GRUB
LILO has the two stages
GRUB has the three stages.

Cron submission of tasks | cron important configure files and directory

/var/spool/corn/username file it contain each user regulates his distinguished file and this is used in the UNIX system five
/etc/crontab file. These file it is accessible only by the root. crontab file from BSD Unix and it is derivatives.
/etc/cron.d directory. It is similar to crontab file. Only root user has permission to access the files.
/etc/cron.hourly
/etc/cron.daily
/etc/cron.weekly
/etc/cron.monthly
these are the directory all these files are shell script which run time indicated in /etc/crontab file. Only root use has permission to access the files.

Cron daemon Linux task scheduling |cron tables fields | /etc/cron.allow and /etc/cron.deny

Cron command similar to the task scheduling “at” Linux command. Cron it performs the task can scheduled to run without being attended. It is component of vixiecron rpm packages and it permits more flexibility in automation of execution in command. If the user who did not perform the task automation then it face error message or output are emailed to the user.
Cron Access control files
/etc/cron.allow->list of user access submitting task
/etc/cron.deny->list of user deny submitting task
Cron tables
Cron daemon is suited for recurring task as it will use configuration files called cron tables.
It contains six fields. Five fields are times for running the command and the sixth field is the complete the path name to the shell script.