Telnet Explained
Telnet
Telnet is a protocol that allows you to connect to remote computers
over a TCP/IP network in command line. Using telnet client software
on your computer, you can make a connection to a telnet server (i.e., the
remote host). Once your telnet client establishes a connection to the remote
host, your client becomes a virtual terminal, allowing you to communicate with
the remote host from your computer. In most cases, you'll need to log into the
remote host, which requires that you have an account on that system.
Note Two Serveice 1. Telnet Server: for giving telnet to
others
2. Telnet
client : with this you can access telnet server
LAB for Telnet
How to install telnet server on pc1
1. open server
manager →add role and
feature→ next4
2. put check on
telnet server (or both telnet client and telnet server)
3. next → install
4. now open run→
services.msc → double click on
telnet → Set the Startup Type to Automatic
5. apply→ start→ ok
Now Go on pc2 to access telnet server
1. open run→
appwiz.cpl→ Turn window features on or off→ put check on telnet client
2. ok→ after
installing telnet client close all wizard
3. open cmd→ telnet ɸ 192.168.1.93 (pc1 ip) →type N
It will ask
for user name and password
Give user
name administrator password 123@iiht (pc1 username and pc1 passowrd)
Beacause we
are accessing telnet of pc1
4. now you
can do everything on pc1 from cmd but you should know all commands
Example of
basic command
Q. how to see file and folder in cmd?
Ans. Dir
Q. How to
see hidden file and folder
Ans . dir ɸ
/ah
Q. how to create folder in cmd?
Ans. Mkdir ɸ
new folder name
Q. how to create file ?
Ans. Copy ɸ
con ɸ ab ? (ab is new file
name)
Write any thing
Press
Ctrl+z to save the file
Q. How to read the file?
Ans. Type ɸ
file name
Q. How to change Directory?
Ans . cd ɸ directory name
Q. How to change Drive ?
Ans.
D: (if u r in c drive and want
to go in d drive)
Q. How to delete the file?
Ans. Del
file name
Here
is a list of useful DEL combinations
that is worth mentioning:
DEL *.DOC -
delete all files with the DOC extension(you can use any file extension
necessary, DOC is the
example I used);
DEL Test*.* -
delete all files beginning with Test;
DEL *.* -
delete ALL files from the current directory.
Q. How to delete directory?
Ans. Rmdir ɸ
directory name
Q. How to delete directory forcly ?
Ans: rmdir ɸ
/S ɸ /Q directory name
Q. how to rename file and folder?
Ans. Ren ɸ
old name ɸ new name
Q. How to copy file from one location to another
location
Ans . copy → a.txt → d: (a.txt is the file and d drive is
the destination drive )
Q. To copy a folder and its content from a
location to another ?
Ans. Xcopy ɸ /s
ɸ /i ɸ d:\7tutorials ɸ c:\backup_7tutorials
(The '/s' parameter will ensure that all the directories and
subdirectories will be copied, except the ones that are empty. The '/i'parameter will create a new directory
if the destination folder doesn't exist and you copy multiple files.)
Q. How to see Window version ?
Ans. Ver
Q. hot compare two files ?
Ans. Fc ɸ file1 ɸ
file2
Q. How to clear screen ?
Ans. Cls
Q. how to hide the file ?
Ans . attrib ɸ +h ɸ
file name
Q. How make read only file ?
Ans. Attrib ɸ
+r ɸ filename
Q. how to make system file ?
Ans . attrib ɸ +s ɸ filename
Q. how to make archive file ?
Ans. Attrib ɸ
+a ɸ filename
(Note: if you want
unhide and remove all attribute then put –with attribute like –h –r –s
–a )
Q.how to
shutdown the system ?
Ans. Shutdown ɸ
/s
Q. how to
restart the system ?
Ans. Shutdown ɸ
/r
Q. hot to
logoff the system ?
Ans.
Shutdown ɸ /l
Q. shutdown
multiple computer
Ans . shutdown -i
Q. shutdown
system by time
Ans. Shutdown ɸ /s ɸ /t 60
Q. restart
system by time
Ans. Shutdown ɸ /r ɸ /t 60
Q.How to
see running task
Ans. Tasklist
Q. how to
kill task
Ans .taskill ɸ /f ɸ /im ɸ notepad.exe (/f means forcely and /im mean image
name)
Q. kill
task by pid ?
Ans.taskkill ɸ /pid 9764
Q. to kill
multiple process you have to give more /pid
Ans.
taskkill ɸ /pid ɸ 9764 /pidɸ2112
Q. to stop
remote process type taskkill ?
Ans. Taskkill ɸ/s:192.168.1.93 ɸ
/u:deploy\administrator ɸ /p 123#iiht ɸ /pid 1232
Q. To list
all remote process type tasklist ?
Ans .tasklist ɸ/s:192.168.1.93 ɸ
/u:deploy\administrator ɸ /p 123#iiht
Q.how to format the drive ?
Ans .format ɸ d:
Q. How to convert fat partition into ntfs without
data loss ?
Ans. Convert ɸ d: ɸ /fs:ntfs
Q. how to see who is connected to your system by
telnet ?
Ans. Tlntadmin -s
Q.how to see ip address from command line ?
Ans. Ipconfig
Q. how to change ip address from command line?
Ans. netsh ɸ interface ɸ ip ɸ set ɸ address ɸ
name=”Ethernet” ɸ static 192.168.0.1 ɸ
255.255.255.0 ɸ 192.168.0.254
This assumes the following:
• The name of the interface you want to change the IP
address for is Local Area Network
• You want to statically assign an IP address of 192.168.0.1
• You want to set a subnet mask of 255.255.255.0
• You want to set a default gateway of 192.168.0.254
To create a partition:
At a command prompt, type: Diskpart.exe
1. LIST ɸ DISK
2. Select ɸ Disk 0
CREATE ɸ PARTITION ɸ
PRIMARY SIZE=10000 (it will create
primarypartition10gb)
or
CREATE ɸ PARTITION ɸ
EXTENDED (it
will create extended partition)
or
3. CREATE ɸ PARTITION ɸ LOGICAL SIZE=10000 (it will create logicalpartition10gb)
(In this we are creating logical partition)
4. ASSIGN ɸ LETTER=D
To delete a partition in Windows with Diskpart: (Note: You cannot delete an active
system or boot partition or a partition with an active page file.)
• At a command prompt, type: Diskpart.exe
• At the DISKPART prompt, type: Select Disk 1
• At the DISKPART prompt, type: Select Partition 1
• At the DISKPART prompt, type: DELETE partition
• At the DISKPART prompt, type: Exit
How create
pen drive bootable
1. open cmd
2. diskpart
3. list disk
4. select disk 1
5. create partition primary
6. format fs=ntfs quick
7. active
Now copy all window file like win7 ,win8
,2012r2
Troubleshooting with TCP/IP Utilities
After you have TCP/IP installed and
configured and you have your TCP/IP network running, you need to be able to
troubleshoot the network. When problems arise on a Windows network, you can use
some of the following commands to do your troubleshooting:
•
IPCONFIG
•
PING
•
TRACERT
•
NBTSTAT
•
NETSTAT
•
PATHPING
•
NSLOOKUP
•
NET commands
•
Route
ipconfig /all
To display all your
IP information for all adapters. With ipconfig /all you can also find out your
DNS Server and MAC Address. This will show your full TCP/IP configuration for
all adapters on your Windows machine.
ipconfig /release
To release your current IP information and obtain a new IP Address from the
DHCP server.
ipconfig /renew
Used to renew your IP Address if you have it set to obtain IP Address
automatically.
ipconfig /displaydns
This shows your current DNS Resolver Cache Logs.
ipconfig /flushdns
This flushes or clears your current DNS Resolver Cache Logs.
ipconfig /registerdns
The register DNS command updates the DNS settings on the Windows computer. It
doesn't just access the local DNS cache, it initiates communication with the
DNS server and the DHCP server so it can re-register the network address. You
can use this for troubleshooting problems with connection to the ISP (Internet
Service Provider), like failing to obtain a dynamic IP address from the DHCP
Server or failing to connect to the ISP DNS server.
Ping Command
Switches
You maybe use the switches together.
ping 192.168.1.1 -t
Continuous Ping - It will keep on pinging forever until you hit Ctrl + C to
stop it. This can be great for troubleshooting intermittent connections. Just
open up a Command Prompt(or 3) and run the continuous ping command on a site
like Google.com to see when you're dropping packets. I would also run one on
your router and on another site like site.com for a better data sample control
group.
ping 192.168.1.1 -n 10
Number of Pings - The N Switch is simply for setitng the number of pings. By
default the ping cmd sends out 4 packets at 32 bytes each.
ping 192.168.1.1 -l 1500
Size of Packet - By default the packets sent are a small 32 bytes. You can set
your own size up to the max 65500 bytes. This can really help for stress
tetsing your local network.
ping 192.168.1.1 -w 5000
Time Out - This is in milliseconds. The timeout by default is 4,000
milliseconds which amounts to 4 minutes. Just seeing if you were still paying
attention. It really is only 4 seconds.
ping -a 192.168.1.1
Resolves Hostanme Address - This is a great one if you are helping osmoen else
and need to find out what router model they are using. You an resolve the host
of an IP Adrress with this command. Try pinging your router or your local
computer with it. ping -a 127.0.0.1. Not this switch will only work in front of
the IP Address.
Ping Command Summary
The Ping command is a network tool used to
determine if you are able to send packets between your network computer on the
internet to another computer without losing packets along the way. By doing
this you can determine if you're online or if a website is down. It also
calculates round trip time and Time to Live. This can let you know if your NIC
card is working properly and if you're able to reach your router or modem. It
can also be used as a network tool for troubleshooting.
Networking
Basics Command Prompt
tracert site.com
With Trace route you can
trace the path your packets take across the internet from you to your
destination. Along the way you can determine the time from hop to hop. You can
identify server problems and latency with this tool. It really helps see where
the failure is between you and a destination.
nslookup site.com
nslookup xxx.xxx.xxx.xxx
nslookup is a way to get the IP address for a domain name. You can also do a
reverse lookup from Domain Name to IP Address. It can be a way to find out if
your DNS is properly working or if the site is having problems. You can obtain
an IP from a site and try to visit the IP directly, bypassing the Domain Name
Servers that would usually resolve the Domain name to IP name.
netstat
netstat can be used to view your active network connections and TCP/IP
connections. You can determine what ports are open and being used, what
programs are using your ports and what kind of TCP and UDP connections are
present. Looking in here for the first time may scare the hell out of you.
netstat
Switches
netstat -a Displays all active TCP connections. And TCP / UDP ports.
netstat -e Displays ethernet statistics.
netstat -b Displays all active programs that are listening.
netsh winsock reset winsock reset
netsh int ip reset resetlog.txt TCP/IP reset
netsh is used to reset or rebuild the Windows TCP/IP IP Stack. This can be done
if you have a problem with DNS. Say you are able to browse to a sites IP
address but not to it's Domain Name. You can find the sites IP by using nslookup
mentioned above.
You may need to run this command as an administrator by right clicking, run as
admin for elevated permissions.
getmac
How do I find my MAC Address you might ask?
If you open up the command prompt you simply type getmac.
arp -a
This command can be used to find out the MAC address of the device you are
connecting to.
Net command
Change administrator password
Net ɸ user ɸ administrator ɸ
123$iiht
delete network credential
Net ɸ use ɸ * ɸ /delete
add network credential
net ɸ use ɸ w: ɸ \\myserver\fileshare ɸ /user:MyID ɸ My Password
PathPing is a network
diagnostic utility that comes with Windows which combines the ping and tracert
command into one tool. PathPing will show you details of the path between two
hosts like tracert does and at the same time gives you ping statistics for each
node or hop that is used on the way to its destination.
Pathping ɸ www.yahoo.com
NBTSTAT :-MS-DOS utility that displays protocol statistics and
current TCP/IP connections using NBT (NetBIOS over TCP/IP), which allow the user to troubleshoot NetBIOS name
resolution issues.
Nbtstat ɸ -A ɸ
192.168.1.93
ROUTE:-
this is use to add route to destination network like static routing
Route ɸ add ɸ
172.16.0.0 ɸ mask ɸ 255.255.255.0 ɸ 192.168.1.93
Note: to
take help for command you shoud use /? Like ipconfig ɸ /?
Comments
Post a Comment