You are on page 1of 27

NETWORKING

1)Run the following commands


 ipconfig
 ping
 fc
 chkdsk
 net accounts

ipconfig

ping
NETWORKING

fc

chkdsk
NETWORKING

net accounts
NETWORKING

2. arp command
NETWORKING

3) TCP/IP setting using netsh.exe


NETWORKING

4) Execute the following commands


 Cd
 Ls, ls-a, etc
 Cd .
 Pwd
 Cd ..
 La –al
 Cd –
 Chmod

[root @ localhost ~] #cd lab


# lab -> directory name
#cd -> change directory
output:
[root @ localhost /lab]

[root @ Localhost ~] #ls


output:
anaconda – KS .cfg Desktop Download install.log

[root @ Localhost ~] #ls -a


output:
. .bash_Profile
.. .bashrc
anaconda – KS .cfg .config

[root @ Localhost ~] #ls-1


output:
total 124.
-rwx------ 1 root root 1231 2007-08-22 17:33 anaconda – KS .cfg
-rw-r-r--- 1 root root 239 2007-11-04 22:05 avg
Drwxr-xr-x 2 root root 4896 2002-11-05 23:00 Desktop

[root @ Localhost ~] #ls –m


output:
anaconda – KS .cfg, avg, Desktop, Documents

[root @ Localhost ~] #pwd


#pwd -> present working directory
output:
/root

[root @ Localhost ~] #cd ..


output:
[root @ Localhost /]#

[root @ Localhost /] #ls –al


Total 164
drwxr _xr_x 23 root root 4096 2007-11-11 20:25 .
drwxr _xr_x 23 root root 4096 2007-11-11 20:35 ..
NETWORKING

-rw-r---r-- 1 root root 0 2007-11-11 20:25 .

[root @ Localhost ~] #cd –


output:
\root

[root@localhost ~]#chmod 777 si

5) Creating, moving and copying file


#creating file
[root @ localhost ~] #cat > ignou.txt
#copying
[root @ localhost ~] #cp ignou.txt lab/ignou1.txt
#moving
[root @ localhost ~] #mv ignou.txt lab/

6) Changing password
#changing password.for
[root @ localhost ~] #passwd
Changing password for user root
New UNIX password:
Retype new UNIX password
Passwd: all authentication token updated successfully

7)spell checking
[root @ localhost ~] #aspell ignou.txt
[root @ localhost ~] #tr `GNU is Not Unix` `Unix is not a GNU` ignou.txt

8) sending mail
#sending mail
[root @ localhost ~] #mail root
\subject : hai
Hello this is testing message
Cc:root

#displaying mail
[root @ localhost ~] #mail
Mail version 8.1 .6/6/93
~ 1 root@Localhost.local Sun Nov 11 20:50 16/674 “hai”
Hello this is testing Message
& reply
To: root@Localhost.localdomain root@localhost local domain
Subject:Re:\hai
This is reply test
NETWORKING

9) Finger and Who commands


[root @ localhost ~] #finger
Login Name Tty Idle Login Time Office Office Phone
Root root pts/0 32 NOV 11 20:27 (:0)
Root root *pts/1 NOV 11 20:39 (:0)
[root @ localhost ~] #who
root pts/0 2007-11-11 20:27 (:0)
root pts/1 2007-11-11 20:39 (:0)

10)Writing message to all users


[root @ Localhost ~] #wall
They should shutdown their machine after completing the lab exercises
Output:
Broadcast message from root (pts/3) (Sun Nov 11 21 :07:12 2007):
They should shutdown their machine after completing the lab exercise.

11) Write a shell script that prints a list of every unique word (exceeding 4 characters
in length) in a file in reverse alphabetical order.

echo Enter file name

read name

sort –r –u $name

Out put :

$cat file.txt

ABCDE

FGHIJ

KLMNO

PQRST

XYZAB

$bash reverse
NETWORKING

Enter file name

File.txt

Xyzab

PQRST

KLMNO

FGHIJ

ABCDE

12) i) What is the output of ls-lm and ls-ml? Which option takes procedure? What is
the result of ls-d?

$ ls –lm

file.txt, rev.sh, reverse.sh, str

$ls –ml

-rw-rw-r-- 1 user1 user1 27oct 15 01:18 file.txt

-rw-rw-r-- 1 user1 user1 27oct 15 01:18 rev.sh

Drwrxr-xr-x 2 user1 user1 20Feb 15 01:10 str

ls –lm : Example shows that both files and directories separated by comma.

ls –ml : Example shows that complete list of files and directories. The first column of the
output tells the file is directory or not. In the first column if the first field has a ‘d’ I it if the file
is a directory. The next a columns specify the file permissions.

$ls –d.

-d -> List of directory entries instead of contents, and do not dereference symbolic links.

(ii) How would you set the IP address of a LAN card in Linux?
NETWORKING

Command Line:

/sbin/ifconfig eth0 192.168.10.12 netmask 255.255.255.0 broadcast 192.168.10.255

GUI
NETWORKING

13) (i) Protect Data by using Encrypting File system (EFS) and Recover Encrypted
Data with a Data Recovery Agent. Show the result with the help of your own
examples
NETWORKING

(ii) Configure Window 2000 to have a remote access feature and show the result.
NETWORKING

14) Add different users and groups. Also configure their permissions

1. Logon to the computer as a user with local administrator rights (at first this will
probably be the local administrator account, but once a domain user/group is added
to the local administrators group this may be a domain account).
2. Open the Computer Management console (Start menu - Program Files -
Administrative Tools - Computer Management) and select the "Groups" section of
the "Local Users and Groups" item as shown below:

3. Double-click on the user


NETWORKING
NETWORKING

15) Set your printer on sharing and assign print permissions according to
different users, configure printer priorities for different groups.

4. Go to Start --> Settings --> Printers


5. Right click on your printer and choose 'sharing'

6. Note: This is the same way you share other files such as documents.

7. Click the check box next to 'shared as'


8. If you want to set a particular name for the printer, you can do it here. In our
example the printer is called 'My Printer' but I selected a different name to share it
as, 'Grace's Printer'. Note: Names with spaces, apostrophes and other non-standard
characters are bad if anyone using an older computer is going to be accessing this
printer.
NETWORKING

1. Click on the Security Tab

Here you can select who has access to the printer. Note: Only people with
usernames and passwords for this particular Windows Computer can access shared
items. When someone selects your shared printer they will need to enter a
username and password for your computer. If you have Everyone listed in the
sharing all accounts on your computer have access to the printer including an
anonymous or Guest account if you have those set up. Some people would rather
not have just anyone printing to their printer and so they would remove Everyone
from the Security list by clicking on 'Everyone' and then the 'Remove' button.
NETWORKING

Your control panel will likely look different from this one. Note that 'CLEFTLANDS' is
the name of the computer this picture was taken from.

2. You're done! Sometimes you will have to restart your computer before the sharing
takes effect.
NETWORKING

16) When you install modem, how to enable/disable call waiting on computer.

1. Configure Dialing Rules to disable Call Waiting:


1. Click the Start menu, then click “Settings,” then “Control Panel.” (In Windows
XP, “Control Panel” is listed directly on the Start menu.)

2. In the window that appears, double-click the icon labeled “Phone and
Modem Options.”

3. In the window that appears, click the button near the bottom labeled “Edit.”

4. In the box labeled “Area Code,” be sure to enter your actual area code.

5. Click the checkbox beside the option labeled “To disable call waiting, dial.”
Then select the correct code in the drop down list that appears to the right.

6. Click “OK,” then click “OK” again to save your settings.

7. Close all windows to return to the Desktop.

2. Enable the Dialing Properties Feature in the Connectoid:

1. Click the Start menu, then click “Settings,” then “Control Panel.” (In Windows
XP, “Control Panel” is listed directly on the Start menu.)

2. Double-click the icon labeled “Network and Dial-up Connections.” (In


Windows XP, it’s called “Network Connections.”)

3. In the window that appears, locate the icon for your Internet connection.
Right-click this icon, then select “Properties.”

4. In the window that appears, enable the option labeled “Use dialing rules.”
Please note that this does not necessarily mean that you are telling your
computer to dial the number as a long-distance call!

5. In the box labeled “Area Code,” be sure to enter the area code for the dial-up
access number you are using to connect to the Internet. In almost all cases,
this is the same area code as your own phone number.

6. Click “OK” to save your changes.

3. Now, whenever you connect to the Internet, Windows will first dial the code to
disable Call Waiting before dialing the Internet access number.

17) When you attempt to view a web page and receive an error message “Not
accepting cookies”, how will you resolve it?.

Enable the option to accept cookies in Internet Explorer. To do so, follow these steps:
NETWORKING

1. In Internet Explorer, click Internet Options on the Tools menu (or View menu
in Internet Explorer version 4.x).
2. In Internet Explorer 5, click the Security tab, and then click Custom Level.
Click Enable or Prompt under Allow cookies that are stored on your
computer.In Internet Explorer 4.x, click the Advanced tab, and then click
Prompt Before Accepting Cookies or Always Accept Cookies.

3. Click OK until you return to Internet Explorer.

4. Connect to the Web address from which you received the "Not accepting
cookies" error message to verify that you are able to gain access to the Web
page.

Ping:- Ping command is used primarily to find out if a computer is reachable. Ping
accomplishes this task by sending out a special packet called the Internet Control Message
Protocol (ICMP) echo request packet. ICMP packets are special IP messages that are used
to send network information between two hosts. When a machine receives an echo
request, it responds with an echo reply.
NETWORKING

Traceroute (tracert):- Traceroute works by sending a packet to an open UDP port on a


destination machine. The tracert utility checks the responsiveness as well as trace the path
a packet takes to get from one host to the other. Tracert tracks the route packets take
across an IP network on their way to a given host. It utilizes an IP protocol’s time to
leave(TTL) field and attempts to elicit an ICMP Time_Exceeded response from each
gateway along the path to the host.
NETWORKING

Pathping:- pathping is a command line route tracing tool that combines features of the
tools ping and tracert with additional information that neither provides. Pathping sends
packets to each router on the way to a final destination over a period of time and then
computes results based on the packets returned from each hop. It shows the degree of
packet loss at any specified router of link. We can pinpoint which routers or links might be
causing network problems.
NETWORKING

Netstat:- netstat is a useful tool for checking the network configuration and activity. It is
collection of several tools lumped together. It is used to display the TCP/IP network protocol
statistics and information.

Netstat [-a] [-e] [-n] [-s] [-p proto] [-r] [interval]

Netdiag:- netdiag is a command line diagnostic tool that helps isolate networking and
connectivity problems by performing a series of tests to determine the state of our network,
client and whether it is functional. These tests and the network status information they
expose help network administrators to identify and isolate network problems.
NETWORKING

Ipconfig:- ipconfig is a command line tool that displays the current configuration of the
installed IP stack on a networked computer using TCP/IP.

IPSecurityMonitor(IPSecMon):- It is a window based tool used to confirm whether our


secured IP based communications are successful by displaying the active security
association on local or remote computers. We can use IPSecMon to determine whether
there has been a pattern of authentication or security association failures, possibly
indicating incompatible security policy settings.
NETWORKING

telnet:- The telnet command is used to communicate with another host using the Telnet
protocol. If telnet is invoked without the host arguments it enters the command mode,
indicated by its prompt (telnet>). In this mode it attempts and executes various commands.

Rsh:- It executes the specified command at the remote host or logs into remote host using
remote terminal session.

{rsh} remotehost [-a] [-n] [-l user] [-f] [-F] [-s] [-u] [command].

It is used to run a command on another computer.


NETWORKING

ftp:- It transfers files to and from a computer running a File Transfer Protocol(FTP) server
service such as Internet Information Services. FTP can be used interactively or in batch
mode by processing ASCII text files.

ftp [-v] [-d] [-i] [-n] [-g]

diskperf:- This is the command used to start and stop Diskperf service that is utilized by
Disk Performance Counter.

Diskperf [-Y [D | V] ] [ -N [ D | V]] [ \\COMPUTERNAME]

C:\>diskperf

Both Logical and Physical Disk Performance counters on this system

are automatically enabled on demand.

For legacy applications using IOCTL_DISK_PERFORMANCE to retrieve raw counters,

you can use -Y or -N to forcibly enable or disable. No reboot is required.

C:\>

Chkdsk:- The chkdsk command is a recovery console command used to check a specified
disk and repair and recover date on the drive if necessary. It also marks any damaged or
malfunctioning sectors on the hard drive or disk as “bad” and recovers any information still
intact.

Chkdsk [ drive:] [/p] [/r]


NETWORKING

sfc (System File Checker) :- sfc is a command line tool that scans protected system files
and replaces files overwritten with the correct system files provided by Microsoft. It is part of
windows file protection feature of windows- 2000. It checks and repopulates the DLL cache
folder. SFC also checks all catalog files used to track correct file versions. If any catalog
files are missing or damaged WFP renames the affected catalog files and retrieves a
cached version of that file from the DLL cache folder.

Sfc [/scannow] [/scanonce] [/scanboot] [/cancle] [/enable] [/purgecache]

Drivers:- Drivers is a command line tool that lists all of the drivers currently running on the
computer from the %system root% \system32\Drivers folder.

Driver verifier:- Driver verifier is a window based tool that runs a series of checks in the
windows 2000 kernel to expose error in kernel mode drivers. It can gather statistics from
the kernel which are displayed by the GUI or logged in a file.

The command line syntax for Driver verifier is

Verifier /all

Verifier/driver

Lpq:- It displays the state of a remote lpd queue. The lpq commands reports the status of
the specified job associated with the specified username and job number variables. Job
number variable specifies the number of the job in the spool queue that we want to view.
NETWORKING

You might also like