0% found this document useful (0 votes)
67 views75 pages

Kernel Configuration: To Install and Configure The Kernel in Linuxplatform

The document provides steps to install and configure Samba and CUPS on a Linux server. It involves installing Samba and CUPS packages, editing the smb.conf file to enable user authentication, creating a shared directory for all users, and adding a section to smb.conf to share the directory. The steps also include starting the Samba service and setting permissions on the shared folder.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views75 pages

Kernel Configuration: To Install and Configure The Kernel in Linuxplatform

The document provides steps to install and configure Samba and CUPS on a Linux server. It involves installing Samba and CUPS packages, editing the smb.conf file to enable user authentication, creating a shared directory for all users, and adding a section to smb.conf to share the directory. The steps also include starting the Samba service and setting permissions on the shared folder.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 75

Ex.

No
:1

KERNEL CONFIGURATION

Date:
AIM:
To install and configure the kernel in linuxplatform.
STEPS TO INSTALL KERNAL:
STPE 1:First check current working kernel version.
[fosslab@fosslab]$uname r
2.6.35.6-45.fc14.i686
STEP 2:Download latest kernel from www.kernel.org.
STEP 3:login to root user.
[fosslab@fossla
b]$su
Password:
[root@fosslab]
#
STEP 4:Extract the kernel source code.
[root@fosslab]#tar zxvf linux-2.6.39.2.tar.gz
STEP 5: change the directory to kernel source.
[root@fosslab]#cd linux-2.6.39.2
STEP 6: open the make file.
[root@fosslab linux-2.6.39.2]#vi makefile
Look fourth line it will be in following format.
EXTRAVERSION= .2
1

Now you can add mykernel at end of this line like this

EXTRAVERSION= .2-mykernel
Save and exit the file.
STEP 7: now make menu configuration.
[root@fosslab linux-2.6.39.2]#make menuconfig
Now following window is display to you.

Use down arrow to select File


system ---> Then the following
window is display to you.

Use down arrow to select DOS/FAT/NT File


systems ---> Now following window is
display to you.

Use down arrow and Tab to select NTFS file system

support.

Now extra two sub option is displayed to you, like this

Use Tab to select NTFS write


support. Exit and save the
kernel configuration.
STEP 8: now make bzImage file. This will take few minutes.
[root@fosslab linux-2.6.39.2]#make bzImage
STEP 9: Now copy this bzimage to /boot/vmlinuz-2.6.39.2mykernel.
[root@fosslab linux-2.6.39.2]#cp
arch/x86/boot/bzImage
/boot/vmlinuz-2.6.39.2mykernel
STEP 10: make modules. This will take few minutes.
[root@fosslab linux-2.6.39.2]#make modules

STEP 11: Now install the modules.


[root@fosslab linux-2.6.39.2]#make modules_install

STEP 12: change the directory to boot.


[root@fosslab boot]#cd boot
[root@fosslabboot]#chmod 755 vmlinuz-2.6.39.2mykernel
STEP 13: change the directory to grub.
STEP 14:now open grub.conf file.
[root@fosslab grub]#vi grub.conf
Insert following lines at end of the
grub.conf file. title Fedora (2.6.39.2mykernel)
root (hd0,0)
kernel /boot/rmlinuz-2.6.39.2-mykernel ro
root=UUID=1427721c-c499445d-9653-45czd365bb9b
rd_NO_LUKSrd_NO_LVMrd_NO_MDrd_NO_DM
LANG=en_US.UTF-8
SYSFONT=latarcyrheb-sun16
KEYTABLE=us rhgb quiet initrd
/boot/initramfs-2.6.39.2-mykernel.img
Now Save and exit the file.
STEP 15: reboot your system.
[root@fosslab grub]#reboot
STEP 16: Now check your current kernel version.
[fosslab@fosslab]$uname r

RESULT:
Thus the kernel was successfully installed and configured.

Ex.No:
2

VIRTUALIZATION

Date:
AIM
:
Virtualisation environment (e.g., xen, kqemu or lguest) to
test an
applications,new kernels and isolate applications.
STEPS FOR VIRTUALIZATION USING QEMU AND
FREEDOS:
STEP 1:Download the fdbasecd.iso from
www.freedos.org (or) from fosslab server.
The following steps should be followed from the
directory where fdbasecd.iso is stored.
STEP 2:create virtualdisk.
[fosslab@fosslab]$qemu-img create virtualdisk.img
100M
STEP 3: boot the disk.
[fosslab@fosslab]$qemu
-hdavirtualdisk.img -cdrom
fdbasecd.iso -boot d

Select 1to boot from CDROM

STEP 4:select 1 for Install to harddisk using FreeDOS


SETUP(Default).

STEP 5:select language-English(US).

STEP 6:now select Run FreeDOS from CD-ROM(return


to command prompt)

STEP 7:typefdisk in following window.

STEP 8:Enable Large disk support (Y).

STEP 9:select create DOS partition or logical DOS Driver.

STEP 10: select create primary DOS partition.

STEP 11:selectyes from following window.

STEP 12:primary DOS partition created.

RESULT:
The virtual hard disk primary DOS partition is successfully
created.

Ex.No:
3

COMPILING FROM SOURCE

Date:
AIM
:
To Installing webattery for compiling from source.
STEPS FOR INSTALLING WEBATTERY:
STEP 1:download webbattery from following link.
http://pkgs.org/contos-5-rhel-5/epeli386/webattery-1.26.e15.src.rpm/download/
STEP 2: Move downloaded file to /home/fosslab folder.
[fosslab@fosslab]$mv Downloads/webattery-1.26.e15.src.rpm /home/fosslab
STEP 3:change directory to /home/fosslab.
[fosslab@fosslab]$cd /home/fosslab
[fosslab@fosslab]$rpm ivh webatter-1.26.e15.src.rpm
The above command creates a directory
rbmbuildunder the home folder /home/fosslab/
Example:/home/fosslab/rpmbuild
STEP 4:change directory.
[fosslab@fosslab]$cd
/home/fosslab/rpmbuild/SOURCES/
STEP 5:Extract the source file using the command.
[fosslab@fosslab SOURCES]$tar zxvf webattery1.2.tar.gz

STEP 6: now following steps are perform by root


user.so,login to root user.

[fosslab@fossla
b]$su
Password:
[root@fosslab]
#
STEP 7: change the directory.
[root@fosslab]#cd
/home/fosslab/rpmbuild/SOURCES/
[root@fosslab SOURCES]#cd webattery-1.2/
STEP 8:check for the necessary tools/libraries for the
build environment and creates the makefile.
[root@fosslab webattery-1.2]#./configure
STEP 9:compile all the source files and create
the executable binaries using following
command.
[root@fosslab webattery-1.2]#make
STEP 10: now install webattery.
[root@fosslab webattery-1.2]#make install
STEP 11: now verify webattery is installed or not.
[root@fosslab]#which webattery
/usr/local/bin/webattery

RESU
LT:
The webattery is successfully installed in linux.

Ex.No:
4

INSTALLING ZIP PACKAGES IN LINUX

Date:
AIM
:
To install the zip packages (JOOMLA) in linux platform.
STEPS FOR INSTALLING JOOMLA ZIP PACKAGE:
STEP 1:First of all we need to make sure that php and
mysql is install on our system included our
webserver.
[fosslab@fosslab]$which phpmysqlhttpd
/usr/local/bin/php
/usr/bin/mysql
/usr/sbin/httpd
If php or mysql or apache server is not installed
you can install with following commands
[fosslab@fosslab]$sudo yum -y install
httpdphpmysqlmysql- server php-mysql
STEP 2: Now phpmysql and apache(httpd) server is
installed next we need to download Joomla from
its site.
[fosslab@fosslab]$wget
http://joomlacode.org/gf/download/frsrelease/
10785/42655/ Joomla_1.5.14-StableFull_Package.zip
Now Next steps are to be performed by root user
STEP 3:login to root user
[fosslab@fossla
b]$su
Password:
[root@fosslab]
#

STEP 4:Create a directory for install yourjoomla package.


[root@fosslab]#mkdir /var/www/html/mysite

STEP 5:Move downloaded file to new directorymysite.


[root@fosslab]#mv Downloads/
Joomla_1.5.14-StableFull_Package.zip/var/www/html/mysite/
STEP 6:change the directory.
[root@fosslab]#cd /var/www/html/mysite
STEP 7:unzip the moved zip package.
[root@localhostmysite]#unzip
Joomla_1.5.14-StableFull_Package.zip
STEP 8:Remove the zip file.
[root@localhostmysite]#rm
Joomla_1.5.14-StableFull_Package.zip
STEP 9:create a configuration file and make it read and write
able.
[root@localhostmysite]#vi configuration.php
[root@localhostmysite]# chmod 666
configuration.php
[root@localhostmysite]# firefox localhost/mysite&

Now configuring joomla:


STEP 10:open your browser and type localhost/mysite

Now start the installation


STEP 11:select your language.

Click next after selecting your language default is English.


STEP 12:

Click next again its telling you your stats about your
configuration.

STEP 13:accept the agreement statement.

Click next

first select database (Mysql) than tell your host name


most probably your will be also localhostNext select
username of mysql

server exampleroot and than entered the password


of your databaseserver of root and last box is of
database name example joomla.
STEP 14:select yes if you want FTP support on else select no it
is off.

Now enter your site configurations such as site


Name your Email address and your password for
administrator Admin password.

click next after filling site name , email , password


and confirm password and now click next pop up will

come click ok tocontinue.

STEP 15:Now delete one folder from following location.


/var/www/html/mysite/installation
[root@fosslab]#sudorm r
/var/www/html/mysite/installation/
After you have deleted installation folder just type
this url on your browser.
localhost/mysite
Now the following page is displayed on your browser.

get start working type following url on browser.


localhost/mysite/administrator

Enter user name as admin and password what you


choosed during installation.

Here you are done with installation and


configuration of Joomla andnow you can create
manage your joomla site.

RESULT:
The zip packages (JOOMLA) was successfully
installed in linux operating system (fedora).

Ex.No:
5

INSTALLING SAMBA AND CUPS

Date:

AIM
:

Installsamba and share files to


windows. Install Common Unix
Printing System(CUPS).

STEPS FOR INSTALLING SAMBA:


STEP 1: Connect to your server on the shell and
install the Samba packages.
[root@fosslab]#yum install cups-libs samba sambacommon
STEP 2:Edit the smb.conf file.
[root@fosslab]#vi /etc/samba/smb.conf
Make sure the following lines in the [global] section.
[...]
# ----------------------- Standalone Server Options
-----------------------#
# security = the mode Samba runs in. This can be
set to user,
share
# (deprecated), or server (deprecated).
#
# passdb backend = the backend used to store user
information
in.
# New installations should use either tdbsam or
ldapsam. No
# additional configuration is required for tdbsam.
The
"smbpasswd" # utility is available for backwards

# compatibility.
#
security = user
passdb backend = tdbsam

[...]
This enables Linux system users to log in to the Samba
server.

STEP 3:create the system startup links for Samba and start it.
[root@fosslab]#chkconfig --levels 235 smb
on /etc/init.d/smb start
STEP 4:Create the directory for sharing the files and
change the group to the users group.
[root@fosslab]#mkdir -p /home/shares/allusers
[root@fosslab]#chown -R root:users
/home/shares/allusers/ [root@fosslab]#chmod
-R ug+rwx,o+rx-w /home/shares/allusers/
At the end of the file /etc/samba/smb.conf add the
following
lines.
[root@fosslab]#vi /etc/samba/smb.conf

[...]
[alluse
rs]
comment = All Users
path = /home/shares/allusers
valid users =
@users force
group = users
create mask =
0660 directory
mask = 0771
writable = yes
If you want all users to be able to read and write
to their home directories via Samba, add the
following lines to
/etc/samba/smb.conf (make sure you comment out or
remove the other [homes] section in thesmb.conf
file!).

[...]
[home
s]
comment = Home Directories
browseable =
no valid users
= %S writable
= yes create
mask = 0700
directory mask = 0700
nowrestart Samba.
[root@fosslab]#/etc/init.d/smb restart
STEP 5:Adding and managing users.
Add new user sarath into samba.
[root@fosslab]#user add sarath -m -G users
Set a password for sarath in the Linux system user
database. [root@fosslab]#passwd sarath
-> Enter the password for user sarath.
Now add the user sarath to the Samba user database.
[root@fosslab]#smb passwd a sarath
-> Enter the samba password for user sarath.
Now you should be able to log in from your Windows
workstation with the file explorer (address is
\\192.168.0.100 or
\\192.168.0.100\sarath for sarath's home directory) using
the
username sarath and the chosen password and store
files on the Linux server either in tom's home
directory or in the public shared directory.

STEPS FOR INSTALLING CPUS(PRINTING SYSTEM):


STEP 1:Open your web browser and type
http://localhost:631/ Then the following
screen is displayed to you.

STEP 2:select Adding Printers and Classes form CUPS for


Administrators.

STEP 3:now select Add printer from Printers.

STEP 4:select serial port #1 from Add printers.

STEP 5:click continue.

STEP 6:Now fill printer name, description,


location and click continue.
The CUPS is successfully installed on your computer.

RESULT:
Thus the SAMBA and CUPS was successfully installed.

Ex.No:
6

USERSPACE DRIVER USING FUSE

Date:
AIM
:

To write userspace driver using FUSE.

STEPS TO INSTALL FUSE:


STEP 1: check whether FUSE development package is
installed on your computer or not.
[fosslab@fosslab]$rpm qa | grep fuse
STEP 2: if FUSE is installed in your computer then check
it is possible to implement a fully functional file
system in a userspace program or not.
[fosslab@fosslab]$rpm
qi

fuse

STEP

3:Now

download fuse from web. STEP


4:Extract the downloaded file.
STEP 5:change directory to fuse source directory.
[fosslab@fosslab]$cd Downloads
[fosslab@fosslab Downloads]$cd
fuse-tutorial [fosslab@fosslab
fuse-tutorial]$cd src
STEP 6: package configuration.
[fosslab@fosslab src]$pkgconfig fuse cflags
_D_FILE_OFFSET_BITS=64 I/usr/include/fuse
[fosslab@fosslab src]$pkg-config fuse libs
-pthread L/lib64 lfuse lrt ldl
[fosslab@fosslab src]$make

STEP 7: change directory to example.


[fosslab@fosslab src]$cd
../example/ [fosslab@fosslab
example]$cd rootdir
[fosslab@fosslab rootdir]
$touch myfile
[fosslab@fosslab rootdir]
$mkdir fusetest
[fosslab@fosslab rootdir]
$mkdir fusefile
[fosslab@fosslab rootdir]
$touch fusefile
[fosslab@fosslab rootdir]$cd
..
STEP 8: now you are currently in example directory.
[fosslab@fosslab example]$ls l
Total 36 files.
[fosslab@fosslab example]$ls l mountdir/
Total 0 file.
[fosslab@fosslab example]$ls l rootdir/
Total 12 files.
[fosslab@fosslab example]$../src/bbfs
rootdir/ mountdir/ [fosslab@fosslab
example]$ls l mountdir/
Total 12 files.
[fosslab@fosslab example]$mount
[fosslab@fosslab example]$ls l
mountdir/ [fosslab@fosslab example]

$fusemount u mountdir
[fosslab@fosslab example]$ls l
mountdir/ [fosslab@fosslab example]
$mount
[fosslab@fosslab example]$ls l rootdir/
Total 12 files.

[fosslab@fosslab example]$ls l
mountdir/ [fosslab@fosslab
example]$tail f bbfs.log

RESULT:
Thus the userspace driver using FUSE was successfully
executed.

Ex.No:
7

GUI PROGRAMMING

Date:
AIM
:

To create a simple GUI programs using gambas.

STEPS FOR CREATING SIMPLE


PROGRAMMING: STEP 1: open a
terminal and login to root user.
[fosslab@fossla
b]$su
Password:
[root@fosslab]
#
STEP 2:Now run the gambas.
[root@fosslab]#gambas
Now following window is displayed to you.select new
project from this window.

Click Next.

STEP 3:now select the type of the project.

Select create a graphical project and click next.


STEP 4: now select project title and name.

Click next.

STEP 5:now right click forms form following window then


select new
FORM.

DRAW A LINE.
STEP 6:create a simple form for draw a line. Select
button from tool box and draw it in form. select
drawing area from toolbox and draw
it in form like this.

STEP 7:Double click button1 and type following code.


PUBLIC SUB
Button1_Click()
Draw.Begin(DrawingAr
ea1) Draw.Line(1, 130,
500, 400) Draw.End
END
STEP 8:Now run the form and click button1 then the
output is displayed like this.

MOUSE TRACKING:
STEP 6:create a simple form for mouse tracking. Select
two textboxes from tool box and draw it in form.
select drawing area from toolbox and draw it in
form.
STEP 7:Double click the drawing area and type the following
codes.
PUBLIC SUB
Form1_MouseMove()
Textbox1.text = Mouse.X
Textbox2.text = Mouse.Y
END
STEP 8:now click mouse pointer in out of drawing
area the output is displayed like this.

RESULT:

The simple GUI program was successfully created and


executed.

Ex.No
:8

VERSION CONTROL SYSTEM

Date:
AIM
:

To setup version control system using RCS, CVS, SVN.

STEP TO INSTALL SUBVERSION EDGE:


STEP 1: First you will check subversion is installed on
your computer or not.
[fosslab@fosslab]$rpm qa | grep subversion
STEP 2: next you will check JAVA /JRE has to installed
along with apache web server or not for subversion
edge installation.
[fosslab@fosslab]$rpm qa | grep java
STEP 3: Now, download the collabnet subversion edge
software
from web.
STEP 4:Extract the downloaded file.it will create csvn folder.
STEP 5: login to root
user.
[fosslab@fossla
b]$su
Password:
[root@fosslab]
#
STEP 6: open the sudo file.
[root@fosslab]#vi sudo
Add a new line under defaults secure-path.
fosslab ALL=(ALL)

ALL

it is used to allow fosslab user to run any commands any


ware.
STEP 7: save the sudo file and exit the terminal.
STEP 8: open new terminal and set the JAVA_HOME
environment variable and point it to your JAVA /
JRE home.

[fosslab@fosslab]$export JAVA_HOME=/usr/
Test the variable.
[fosslab@fosslab]$$JAVA_HOME/bin java
version
STEP 9: change the directory to subversion edge source
file.
[fosslab@fosslab]$cd csvn
STEP 10: now install the subversion edge.
[fosslab@fosslab]$sudo E bin/csvn install
STEP 11: start the csvn.
[fosslab@fosslab]$bin/csvn start
STEP 12: start the csvnconsule.
[fosslab@fosslab]$bin/csvn console
Then the csvn console url is show to you copy this
url and past it into your web browser. Then the
following page is display to you.

STEP 13:login to collabnet subversion edge.

Note: User name and password is admin.

Now click Administrator tab then the following page


is display to you.

Now fill port address, Administrator and


Administrator Email. Click save button.
STEP 14:now click Status tab then the following page is
display to
you.

Click start button.


It will show the message subversion server is running.
Like this

RESULT:
Thus the version control system was successfully installed.

Ex.N
o:

CREATING DATABASE IN MySQL

Date
:
AIM
:

To create a database in MySQL.

STEPS FOR DATABASE CREATION:


STEP 1:login to the MySQL database.
STEP 2: create a new database called as college.
STEP 3: create one table (Student) in python database.
STEP 4:Insert some data into student table.
STEP 5:Display the student table.
DATABASE CREATION:
Mysql>CREATE DATABASE
college; Mysql>USE
college;
Mysql>CREATE TABLE student(ID varchar(5),NAME
varchar(20),DEPT
varchar(10));
Mysql>INSERT INTO student(ID,NAME,DEPT)
VALUES(1,sarath,CSE); Mysql>INSERT INTO
student(ID,NAME,DEPT) VALUES(2,kumar,CSE);
Mysql>INSERT INTO student(ID,NAME,DEPT)
VALUES(3,selva,CSE); Mysql>INSERT INTO
student(ID,NAME,DEPT) VALUES(4,karthik,CSE);

Mysql>SELECT *FROM student;


---------------------------------------| ID
|
NAME
| DEPT |
| 1
|
sarath
| CSE |
| 2
| kumar
| CSE |
| 3
|
selva
| CSE |
| 2
| karthik
| CSE |
---------------------------------------

RESULT:
The college database is successfully created in MySQL
database.

Ex.No:
9
Date:

MYSQL /DATABASE ACCESS PROGRAM


USING perl

AIM:
To fetch the data from MySQL database using perl
language in
Linux platform.
Databaseconnec
tion.pl use DBI;
my
$dbh=DBI>connect('DBI:mysql:database=college;host=localhost','root','admin123');

my $query='select * from student ';


my $sth=$dbh->prepare($query) or die "could not prepare
$query\n";
$sth->execute();
while (($id,$name,$age)=$sth->fetchrow_array())
{
print "ID=$ID Name=$NAMEDept=$DEPT\n";
}
$sth->finish();
$dbh->disconnect()

OUTPUT:
[root@fosslab]#Perl Databaseconnection.pl
ID=1 Name=sarath
Dept=CSE ID=2
Name=kumar
Dept=CSE ID=3
Name=selva Dept=CSE
ID=4 Name=karthik
Dept=CSE
[root@fosslab]#

RESULT:
Thus the above program for MySQL database
connection was successfully executed.

Ex.No:
10
Date:

RANDOM NUMBER GENERATION USING


PHP

AIM:
To write a simple program for generating random
numbers in web page using PHP.
input.html
<form method="post" action="forms.php">
<p>Range starting
<input type="text" name="begin"/>
</p>
<p>Range end
<input type="text name="end"/>
</p>
<p><input type="submit" value="generate">
</p>
</form>

Forms.php
<?phpimport_request_variable("pg","form-");?>
<html>
<boby>
<p>From Range
<?php
echo $ form_begin;
?>
To<?
php
echo $ form_end;
?>
<P>
I have selected Random number
<?php
echo rand($ form_begin,$form_end);
?>
</p>
</body>
</html>

OUTPUT:

Click Generate button

Click refresh button.

RESULT:
Thus the above program for generating random number
using PHP
was successfully executed.

Ex.No:
11
Date:

MYSQL /DATABASE ACCESS PROGRAM USING


PYTHON

AIM:
To fetch the data from MySQL database using python
language in
Linux platform.
Algorithm for Python Coding:
STEP 1:Include the python package.
STEP 2:import the MySQL database.
STEP 3:login to the database using
MySQLdb.connect() function . STEP 4:Select the
data from database table using select query. STEP
5:Print the rows andColumn data.
STEP 6:close the connection.

SOURCE CODE FOR


PYHTON:
Pythondbconnection.
py
#!/usr/bin/python
importMySQLdb
db= MySQLdb.connect(host="localhost",
user="root",
passwd="Pass12",db="college")
cursor = db.cursor()
stmt = "SELECT * from
student"
cursor.execute(stmt)
rows = cursor.fetchall ()
for row in rows:
print "Row:
" for col in
row :
print "Column: %s" % (col)
print "End of Row"
print "Number of rows returned: %d" %
cursor.rowcount cursor.close()
db.close()

OUTPUT:
[root@fosslab]#python pythondbconnection.py
Row:
Column
:1
Column:sar
ath
Column:CSE
Row:
Column:2
Column:Ku
mar
Column:CSE
Row:
Column:3
Column:sel
va
Column:CS
E Row:
Column:4
Column:karthik
Column:C
SE End of
row.

RESULT:
Thus the above program for MySQL database connection
using
Python language was successfully executed.

Ex.No:
12
Date:

SETTING UP NETWORK INTERFACES USING


ifconfig

AIM:
To set up the complete network interface using ifconfig
command.
STEPS FOR SETTING UP NETWORK INTERFACE:
STEP 1:To see how your network is configured on your
computer, use the ifconfigcommand.
NOTE:This command is in the /sbindirectory and
this directory is not in normal users's path and only
in root's path. So, as normal user, you will have to
use "/sbin/ifconfig" command on the command
prompt. As root just using "ifconfig" will do.
[fosslab@fosslab]$/sbin/ifconfig
eth0
Link encap:EthernetHWaddr 00:1D:92:AD:93:2B
inet addr:192.168.1.111 Bcast:192.168.1.255
Mask:255.255.255.0
inet6addr: fe80::21d:92f:fead:932b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
RX packets:9271 errors:0 dropped:0 overruns:0
frame:0
TX packets:1238 errors:0 dropped:0 overruns:0
carrier:0
collisions:0 txqueuelen:1000
RX bytes:1476737 (1.4 MiB) TX bytes:146421
(142.9 KiB)
Interrupt:42 Base
address:0xa000 lo
Link
encap:Local Loopback
inet addr:127.0.0.1
Mask:255.0.0.0
inet6addr: ::1/128
Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1


RX packets:5398 errors:0 dropped:0 overruns:0
frame:0
TX packets:5398 errors:0 dropped:0 overruns:0
carrier:0
collisions:0 txqueuelen:0
RX bytes:1464692 (1.3 MiB) TX bytes:1464692
(1.3 MiB)
STEP 2:if your computer have two NICs and works
as a router use following command.

[fosslab@fosslab ~]$ /sbin/ifconfig -a


eth0
Link encap:EthernetHWaddr 00:1D:92:AD:93:2B
inet addr:192.168.1.111 Bcast:192.168.1.255
Mask:255.255.255.0
inet6addr: fe80::21d:92f:fead:932b/64 Scope:Link
UP BROADCAST RUNNINGMULTICAST MTU:1500
Metric:1
RX packets:9287 errors:0 dropped:0
overruns:0 frame:0
TX packets:1239 errors:0 dropped:0
overruns:0 carrier:0 collisions:0
txqueuelen:1000
RX bytes:1478708 (1.4 MiB) TX
bytes:146698 (143.2 KiB) Interrupt:42
Base address:0xa000
lo Link encap:Local
Loopback
inetaddr:127.0.0.1
Mask:255.0.0.0 inet6
addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING
MTU:16436 Metric:1
RX packets:5419 errors:0 dropped:0 overruns:0
frame:0
TX packets:5419 errors:0 dropped:0
overruns:0 carrier:0 collisions:0
txqueuelen:0
RX bytes:1465868 (1.3 MiB) TX bytes:1465868 (1.3
MiB)
vboxnet0 Linkencap:EthernetHWaddr
0A:00:27:00:00:00
BROADCAST MULTICAST
MTU:1500 Metric:1
RX packets:0 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:0 (0.0 b) TX bytes:0 (0.0 b)

STEP 3:Use lspci commandto see ether net controllers.


[fosslab@fosslab ~]$ /sbin/lspci
00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL
Memory
Controller Hub (rev 02)
00:02.0 VGA compatible controller: Intel
Corporation 82945G/GZ Integrated Graphics
Controller (rev 02)

00:1b.0 Audio device: Intel Corporation N10/ICH 7


Family High
Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation N10/ICH 7
Family PCI Express Port
1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation N10/ICH 7
Family PCI Express Port
2 (rev 01)
00:1d.0 USB Controller: Intel Corporation N10/ICH
7 Family USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation N10/ICH
7 Family USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation N10/ICH
7 Family USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation N10/ICH
7 Family USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation N10/ICH
7 Family USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI
Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR
(ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801G
(ICH7 Family) IDE Controller (rev 01)
00:1f.2 IDE interface: Intel Corporation
N10/ICH7 Family SATA IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family
SMBus Controller
(rev 01)
55

RESULT:

Thus the complete network interface was successfully


configured.
5
6

5
7

You might also like