Professional Documents
Culture Documents
Unit 1
Unit 1
1
Practical :- 1
AIM :- List and Practice various “net” commands on DOS & Linux.
Below is a listing of the various network related commands used in MS-DOS, Windows, Linux, Unix, and other
operating systems. Each command includes additional information to what the command does, the command's syntax,
and miscellaneous information.
Note: If you are not the root or admin of a computer, these commands may not work.
1) Arp
About ARP
Short for Address Resolution Protocol, ARP is a used with the IP for mapping a 32-bit
Internet Protocol address to a MAC address that is recognized in the local network specified
in RFC 826. Once recognized, the server or networking device returns a response containing
the required address.
Availability
The arp.exe command is an external command accessed through the C:\Windows or
C:\Winnt\System32 directory and is available in the below Microsoft operating systems.
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8
ARP syntax
Displays current ARP entries by interrogating the current protocol data. If inet_addr is
-a specified, the IP and physical addresses for only the specified computer are displayed. If
more than one network interface uses ARP, entries for each ARP table are displayed.
-g Same as -a
inet_addr Specifies an Internet address.
-N if
Displays the ARP entries for the network interface specified by if_addr.
addr
-d Deletes the host specified by inet_addr.
2
Adds the host and associates the Internet address inet_addr with the physical address
-s eth_addr. The physical address is given as 6 hexadecimal bytes separated by hyphens. The
entry is permanent.
eth_addr Specifies a physical address
If present, this specifies the Internet address of the interface whose address translation table
if_addr
should be modified. If not present, the first applicable interface will be used.
ARP examples
arp -a
Interface 220.0.0.80
2) Finger
About Finger
The finger command available in Unix and Linux variants allows a user to find sometimes
personal information about a user. This information can include the last time the user logged
in, when they read their e-mail, etc. If the user creates a .PLAN or other related file the user
can also display additional information.
Syntax
displays the user's login name, real name, terminal name and write status (as a "*" after the terminal
name if write permission is denied), idle time, login time, office location and office phone number.
-s Login time is displayed as month, day, hours and minutes, unless more than six months ago, in which
case the year is displayed rather than the hours and minutes.
Unknown devices as well as nonexistent idle and login times are displayed as single asterisks.
Produces a multi-line format displaying all of the information described for the -s option as well as the
user's home directory, home phone number, login shell, mail status, and the contents of the files “.plan”,
“.project”, “.pgpkey” and “.forward” from the user's home directory.
-l
Phone numbers specified as eleven digits are printed as "+N-NNN-NNN-NNNN". Numbers specified as
ten or seven digits are printed as the appropriate subset of that string. Numbers specified as five digits are
printed as "xN-NNNN". Numbers specified as four digits are printed as "xNNNN".
3
If write permission is denied to the device, the phrase "(messages off)" is appended to the line containing
the device name. One entry per user is displayed with the -l option; if a user is logged on multiple times,
terminal information is repeated once per login.
Mail status is shown as "No Mail." if there is no mail at all, "Mail last read DDD MMM ## HH:MM
YYYY (TZ)" if the person has looked at their mailbox since new mail arriving, or "New mail
received ...", " Unread since ..." if they have new mail.
Prevents the -l option of finger from displaying the contents of the “.plan”, “.project” and “.pgpkey”
-p
files.
Prevent matching of user names. user is usually a login name; however, matching will also be done on
-
the users' real names, unless the -m option is supplied. All name matching performed by finger is case
m
insensitive.
Examples
finger -p ch
Display information about the user ch. Output will appear similar to the following:
Login name: admin
In real life: Computer Hope
On since Feb 11 23:37:16 on pts/7 from domain.computerhope.com
28 seconds Idle Time
Unread mail since Mon Feb 12 00:22:52 2001
3) Hostname
About Hostname
The hostname command displays the host name of the Windows XP computer currently
logged into.
Availability
The hostname command is an external command and is available in the below Microsoft
operating systems.
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8
Hostname syntax
hostname
sethostname: Use the Network Control Panel Applet to set hostname.
hostname -s is not supported.
Hostname examples
hostname
Running the command would display the hostname for the computer.
4) IPCONFIG
4
About IPconfig
IPconfig is an MS-DOS utility that can be used from MS-DOS and an MS-DOS shell to
display the network settings currently assigned and given by a network. This command can
be utilized to verify a network connection as well as to verify your network settings.
Availability
The ipconfig.exe command is an external command and is available in the below Microsoft
operating systems.
Windows 95
Windows 98
Windows ME
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8
ipconfig [/? | /all | /release [adapter] | /renew [adapter] | /flushdns | /registerdns | /showclassid
adapter | /setclassid adapter [classidtoset] ]
5
ipconfig /displaydns :: Running this command would display all the DNS information.
ipconfig /flushdns :: Delete all DNS entries.
5) Ping
About Ping
Ping is one of the most commonly used and known commands. Ping allows a user to ping
another network IP address. This can help determine if the network card can communicate
within the local network or outside network.
Windows XP and lower syntax
ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k
host-list]] [-w timeout] destination-list
Options:
Pings the localhost, which helps determine if the computer can send information out and
receive the information back from itself.
6) NBTSTAT
About Ping
The nbtstat MS-DOS utility that displays protocol statistics and current TCP/IP connections
using NBT.
Availability
The nbtstat command is an external command that is available in the below Microsoft
operating systems.
Windows 98
Windows XP
Windows Vista
Windows 7
Windows 8
Nbtstat syntax
NBTSTAT [ [-a RemoteName] [-A IP address] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [interval] ]
-a (adapter status) Lists the remote machine's name table given its name
-A (Adapter status) Lists the remote machine's name table given its IP address.
-c (cache) Lists NBT's cache of remote [machine] names and their IP addresses
-n (names) Lists local NetBIOS names.
-r (resolved) Lists names resolved by broadcast and via WINS
-R (Reload) Purges and reloads the remote cache name table
-S (Sessions) Lists sessions table with the destination IP addresses
-s (sessions) Lists sessions table converting destination IP addresses to computer NETBIOS
names.
-RR (ReleaseRefresh) Sends Name Release packets to WINs and then, starts Refresh
RemoteName Remote host machine name.
IP address Dotted decimal representation of the IP address.
interval Redisplays selected statistics, pausing interval seconds between each display. Press Ctrl+C
to stop redisplaying statistics.
7
Nbtstat examples
nbtstat -A 204.224.150.3
The above command would run nbtstat on 204.224.150.3, a remote IP address.
7) NSLOOKUP
About NSLOOKUP
MS-DOS utility that enables a user to look up an IP address of a domain or host on a network.
Users who are using earlier versions of Microsoft Windows 95, Windows 98, or Windows
ME and need the options available with the nslookup command need to download an
alternative, third-party program.
Nlslookup syntax
nslookup [-opt ...] # interactive mode using default server
nslookup [-opt ...] - server # interactive mode using 'server'
nslookup [-opt ...] host # just look up 'host' using default server
nslookup [-opt ...] host server # just look up 'host' using 'server'
Nslookup examples
This command is often used to perform a reverse lookup on an IP address as shown in the
example below. The first section specifies the server and address of that server that provided
you with the domain name and IP address displayed in the second section.
nslookup 204.228.150.3
Server: ns.computerhope.com
Address: 1.1.1.1
Name: www.computerhope.com
Address: 204.228.150.3
nslookup
Running nslookup without specifying an IP address or domain name displays your routers
server and address. To get out of the > prompt type exit and press enter
Route
Tracert and Traceroute
Whois
Winipcfg
8
Practical :- 2
AIM :- Configure Web browser security setting.
9
Practical :- 3
Backdoor :-
10
Trap door :-
11
Practical :- 4
AIM :- Draw diagram for Confidentiality , Integrity , Availability.
1. Confidentiality :-
2. Integrity :-
12
3. Availability :-
13