Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 25

DOS.

(Command Prompt).
1. . Start -> All Programs -> Accessories -> Command Prompt.
2. . Start -> Run cmd -> Ok.
3. . Run windows () + R.

Windows
, , ..

IPCONFIG
Ipconfig e DOS MS-DOS MS-DOS shell
.

.

Ipconfig

/all
/release
/renew
/flushdns
/registerdns
/displaydns
/
showclassid
/setclassid

[/? | /all | /release [adapter] | /renew [adapter] | /flushdns | /registerdns |


/showclassid adapter | /setclassid adapter [classidtoset] ]
Display full configuration information
Release the IP address for the specified adapter
Renew the IP address for the specified adapter
Purges the DNS Resolver cache
Refreshes all DHCP leases and re-registers DNS names
Display the contents of the DNS Resolver Cache
Displays all the dhcp class IDs allowed for adapter
Modifies the dhcp class id.

IP , subnet mask, default gateway


ipconfig . local network
.
ipconfig
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : hsd1.ut.comcast.net.
IP Address. . . . . . . . . . . . : 192.168.201.245
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.201.1
/all
.
ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . : COMPUTERH1
DNS Servers . . . . . . . . : 123.45.67.8
111.111.111.1
111.111.111.1
Node Type . . . . . . . . . : Broadcast
NetBIOS Scope ID. . . . . . :
IP Routing Enabled. . . . . : No
WINS Proxy Enabled. . . . . : No
NetBIOS Resolution Uses DNS : No
0 Ethernet adapter :
Description . . . . . . . . : PPP Adapter.
Physical Address. . . . . . : 44-44-44-54-00-00
DHCP Enabled. . . . . . . . : Yes
IP Address. . . . . . . . . : 123.45.67.802
Subnet Mask . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . : 123.45.67.801
DHCP Server . . . . . . . . : 255.255.255.255
ipconfig /displaydns

DNS .
ipconfig /flushdns
DNS .
:
1. .
: ipconfig

2. DNS server, DHCP server ?


: ipconfig /all

3. MAC Ethernet ?
: ipconfig /all

:
1. MAC Ethernet ?
: MAC Ethernet 00-25-D3-29-FB-27

2. ipconfig /release?
: IP .

3. ipconfig / renew?
: IP .

4. ipconfig /flushdns
ipconfig /displaydns ?

: .

PING
TCP/IP IP ,
.

ping

-t
-

-n count
-l size
-f
-i TTL
-v TOS
- r count
-s count
-j host-list
-k host-list
-w timeout

[-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
Pings the specified host until stopped. To see statistics and continue - type Control-Break;
To stop - type Control-C.
Resolve addresses to hostnames
Determines the number of echo requests to send. The default is 4 requests
Enables you to adjust the size of the ping packet. The default size is 32 bytes
Sets the Do Not Fragment bit on the ping packet. By default, the ping packet allows
fragmentation
Time To Live
Type Of Service
- Record route for count hops
Timestamp for count hops
Loose source route along host-list
Strict source route along host-list
Enables you to adjust the time-out (in milliseconds). The default is 1,000 (a 1-second
time-out).

ping localhost
,
.

.
127.0.0.x loopback OSI .
ping xxx.xxx.xxx.xxx
. x IP
.

,
, ,
, ..
C:\Documents and Settings\dusan>ping www.google.com
Pinging www.l.google.com [209.85.135.106] with 32 bytes of data:
Reply from 209.85.135.106: bytes=32 time=61ms TTL=51
Reply from 209.85.135.106: bytes=32 time=62ms TTL=51
Reply from 209.85.135.106: bytes=32 time=64ms TTL=51
Reply from 209.85.135.106: bytes=32 time=60ms TTL=51
Ping statistics for 209.85.135.106:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 60ms, Maximum = 64ms, Average = 61ms
C:\Documents and Settings\dusan>ping www.google.com -n 3
Pinging www.l.google.com [209.85.135.106] with 32 bytes of data:
Reply from 209.85.135.106: bytes=32 time=62ms TTL=51
Reply from 209.85.135.106: bytes=32 time=63ms TTL=51
Reply from 209.85.135.106: bytes=32 time=61ms TTL=51
Ping statistics for 209.85.135.106:
Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 61ms, Maximum = 63ms, Average = 62ms

:
1. , 10
.

:
C:\Documents and Settings\----------->ping localhost -n 10
Pinging b282109dbb64469 [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

2. Gateway- 10 , 2267
.
:

C:\Documents and Settings\----------->ping 192.168.10.1 -n 10 -l 2267

Pinging 192.168.10.1 with 2267 bytes of data:


Reply from 192.168.10.1: bytes=2267 time=2ms TTL=64
Reply from 192.168.10.1: bytes=2267 time=3ms TTL=64
Reply from 192.168.10.1: bytes=2267 time=2ms TTL=64
Reply from 192.168.10.1: bytes=2267 time=2ms TTL=64
Reply from 192.168.10.1: bytes=2267 time=3ms TTL=64
Reply from 192.168.10.1: bytes=2267 time=2ms TTL=64
Reply from 192.168.10.1: bytes=2267 time=2ms TTL=64
Reply from 192.168.10.1: bytes=2267 time=2ms TTL=64
Reply from 192.168.10.1: bytes=2267 time=2ms TTL=64
Reply from 192.168.10.1: bytes=2267 time=2ms TTL=64

Ping statistics for 192.168.10.1:


Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 3ms, Average = 2ms

3. 10 google 1245 .
: C:\Documents and Settings\-------->ping www.google.com -n 10 -l 1245
Pinging www.google.com [173.194.39.144] with 1245 bytes of data:

Reply from 173.194.39.144: bytes=1245 time=53ms TTL=56


Reply from 173.194.39.144: bytes=1245 time=76ms TTL=56
Reply from 173.194.39.144: bytes=1245 time=58ms TTL=56
Reply from 173.194.39.144: bytes=1245 time=60ms TTL=56
Reply from 173.194.39.144: bytes=1245 time=74ms TTL=56
Reply from 173.194.39.144: bytes=1245 time=56ms TTL=56
Reply from 173.194.39.144: bytes=1245 time=56ms TTL=56
Reply from 173.194.39.144: bytes=1245 time=59ms TTL=56
Reply from 173.194.39.144: bytes=1245 time=50ms TTL=56
Reply from 173.194.39.144: bytes=1245 time=50ms TTL=56
Ping statistics for 173.194.39.144:
Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 76ms, Average = 59ms

4. 10 www.ugd.edu.mk 1245
.
:
C:\Documents and Settings\---------->ping www.ugd.edu.mk -n 10 -l 1245
Pinging senjak1.ugd.edu.mk [79.99.56.3] with 1245 bytes of data:
Reply from 79.99.56.3: bytes=1245 time=32ms TTL=57
Reply from 79.99.56.3: bytes=1245 time=29ms TTL=57
Reply from 79.99.56.3: bytes=1245 time=29ms TTL=57
Reply from 79.99.56.3: bytes=1245 time=69ms TTL=57
Reply from 79.99.56.3: bytes=1245 time=29ms TTL=57

Reply from 79.99.56.3: bytes=1245 time=49ms TTL=57


Reply from 79.99.56.3: bytes=1245 time=49ms TTL=57
Reply from 79.99.56.3: bytes=1245 time=33ms TTL=57
Reply from 79.99.56.3: bytes=1245 time=33ms TTL=57
Reply from 79.99.56.3: bytes=1245 time=50ms TTL=57
Ping statistics for 79.99.56.3:
Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 29ms, Maximum = 69ms, Average = 40ms

1. ( ) 2 3
?
: , google
Approximate round trip times in milli-seconds: Minimum = 50ms,
Maximum = 76ms, Average = 59ms , ugd
Approximate round trip times in milli-seconds: Minimum = 29ms, Maximum =
69ms, Average = 40ms. google e 59
ms , ugd 40 ms. host ugd
google .

2. ja
?
: ( ) .

3. ping localhost ping 127.0.0.x ?


: 127.0.0.x localhost.

4. ?
http://www.his.com/cgi-bin/ping?
http://www.theworldsend.net/php-ping.php
http://www.spfld.com/ping.html
http://network-tools.com/
: .

5.
( )?
: .
http://network-tools.com/ .

NSLOOKUP
MS-DOS IP
(host) .

Nslookup

NAME
NAME1 NAME2
help or ?
set OPTION

print info about the host/domain NAME using default server


as above, but use NAME2 as server
print info on common commands
set an option
All
print options, current server and host
[no]debug
print debugging information
[no]d2
print exhaustive debugging information
[no]defname
append domain name to each query
[no]recurse
ask for recursive answer to query
[no]search
use domain search list
[no]vc
always use a virtual circuit
domain=NAME
set default domain name to NAME
srchlist=N1[/N2/.../N6]set domain to N1 and search list to N1,N2, etc.
root=NAME
set root server to NAME
retry=X
set number of retries to X
timeout=X
set initial time-out interval to X seconds
type=X
set query type (ex.
10

server NAME
lserver NAME
finger [USER]
Root
ls [opt] DOMAIN [>
FILE]

view FILE
xit


A,ANY,CNAME,MX,NS,PTR,SOA,SRV)
Querytype=X
same as type
class=X
set query class (ex. IN (Internet), ANY)
[no]msxfr
use MS fast zone transfer
ixfrver=X
current version to use in IXFR transfer request
set default server to NAME, using current default server
set default server to NAME, using initial server
finger the optional NAME at the current default host
set current default server to the root
list addresses in DOMAIN (optional: output to FILE)
-a
list canonical names and aliases
-d
list all records
-t TYPE list records of the given type (e.g. A,CNAME,MX,NS,PTR etc.)
sort an 'ls' output file and view it with pg
exit the program

IP
.
IP.
nslookup 204.228.150.3
Server: ns.computerhope.com
Address: 1.1.1.1
Name: www.computerhope.com
Address: 204.228.150.3
Nslookup
nslookup IP
. exit
Enter.
C:\Documents and Settings\dusan>nslookup
Default Server: isar.ugd.edu.mk
Address: 10.0.0.5
>
:
1. .
11

: C:\Documents and Settings\---------->nslookup


Default Server: Markov
Address: 192.168.10.1

2.

www.google.com.

3.

IP address: 74.125.227.115
Host name: www.google.com

www.ugd.edu.mk

: IP address: 79.99.56.3
Host name: www.ugd.edu.mk

:
1. ( ) 2 3
?
: ,
.

2. nslookup ?
: nslookup :
C:\Documents and Settings\---------->nslookup www.skype.com
Server: Markov
Address: 192.168.10.1
Non-authoritative answer:
Name:

www.skype.akadns.net

Address: 91.190.216.12
Aliases: www.skype.com

12

nslookup :
C:\Documents and Settings\-------->nslookup 80.77.144.10
*** Can't find server name for address 95.86.27.225: Non-existent domain
Server: ns1.neotel.com.mk
Address: 80.77.144.10

Name:

ns1.neotel.com.mk

Address: 80.77.144.10

3. 8.8.8.8?
: Google DNS ( Domain Name System) 3
2009 , Google
. Google, 2013 google DNS
DNS , 130
.
Name:

google-public-dns-a.google.com

Address: 8.8.8.8

NETSTAT
netstat TCP / IP
.

Netstat

a
-e
-n
-p
-r

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


Displays all connections and listening ports
Displays Ethernet statistics. This may be combined with the -s option.
Displays addresses and port numbers in numerical form.
proto Shows connections for the protocol specified by proto; proto may be TCP
or UDP. If used with the -s option to display per-protocol statistics, proto may be
TCP, UDP, or IP.
Displays the routing table.

13


-s

Displays per-protocol statistics. By default, statistics are shown for TCP, UDP
and IP; the -p option may be used to specify a subset of the default.
Redisplays selected statistics, pausing interval seconds between each display.
Press CTRL+C to stop redisplaying statistics. If omitted, netstat will print the
current configuration information once.

interval

netstat
.
Proto
TCP
TCP
TCP

Local Address
hope:4409
hope:3708
hope:4750

Foreign Address
www.computerhope.com:telnet
multicity.com:80
www.google.com:80

State
ESTABLISHED
CLOSE_WAIT
CLOSE_WAIT

netstat 5
netstat
. netstat 5 .
CTRL + C.
: ,

"netstat" "netstat -a" .
.
.
:
1. Ethernet .
: netstat.

2. TCP IPv4.
: netstat s
C:\Documents and Settings\-------->netstat s
IPv4 Statistics
Packets Received
Received Header Errors

= 51432
=0

14

Received Address Errors

=9

Datagrams Forwarded

=0

Unknown Protocols Received

=0

Received Packets Discarded

= 90

Received Packets Delivered

= 51333

Output Requests

= 28159

Routing Discards

=0

Discarded Output Packets

=2

Output Packet No Route

=0

Reassembly Required

= 18

Reassembly Successful

=9

Reassembly Failures

=0

Datagrams Successfully Fragmented = 10


Datagrams Failing Fragmentation
Fragments Created

=0

= 20

3. routing .
: netstat r.

:
1. http://www.iana.org/assignments/port-numbers ?
: ,
, .

2. 4750 netstat ?

15

: 4750 www.google.com .

3. State netstat?
: (
, , ).

ARP
ARP (Address Resolution Protocol),
IP 32-bit Internet Protocol MAC address
RFC 826.
.

ARP
-sinet_addr eth_adr [if_addr]ARP -a [inet_addr] [-N if_addr]ARP -dinet_addr
[if_addr]

-a
Displays current ARP entries by interrogating the current protocol data. If inet_addr is
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 addr Displays the ARP entries for the network interface specified by if_addr.
-d
Deletes the host specified by inet_addr.
-s
Adds the host and associates the Internet address inet_addr with the Physical address
eth_addr. The Physical address is given as 6 hexadecimal bytes seperated by hyphens.
The entry is permanent.
eth_addr
Specifies a physical address
if_addr
If present, this specifies the Internet address of the interface whose address translation
table should be modified. If not present, the first applicable interface will be used.

arp -a
Interface 220.0.0.80
Internet

Address Physical

Type

220.0.0.160

00-50-04-62-F7-23

static

16

MAC aa-bb-cc-ddee-ff . .
IP address 220.0.0.160 220.0.0.161
:
arp -s 220.0.0.161 00-50-04-62-F7-23

.
:
1. Ethernet .
: rp a .
C:\Documents and Settings\-------->arp -a

Interface: 192.168.10.101 --- 0x2


Internet Address
192.168.10.1

Physical Address

Type

00-14-d1-d5-35-78

dynamic

2. eth_addr arp.
: eth_addr . MAC ,
MAC .
rp a :
C:\Documents and Settings\--------->arp -a
Interface: 192.168.10.101 --- 0x2
Internet Address
192.168.10.1

Physical Address
00-14-d1-d5-35-78

Type
dynamic

3.
?

17

: IP LAN
arp a IP ( IP ).

:
1. d -s?
: d inet_addr.
s inet_addr
eth_addr. 6
. .

2. eth_addr .
: MAC ,
IP ,
.
.
C:\Documents and Settings\--------->arp -s 192.168.10.1 00-0e-08-eb-b1-d7

3. arp -?
:
. inet_addr , IP
. ,
.

TRACERT

18

tracert
hops .
.

Tracert
[-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name

-d
Do not resolve addresses to hostnames
-h maximum_hops
Maximum number of hops to search for target.
-j host-list
-w

Loose source route along host-list


timeoutWait timeout milliseconds for each reply

tracert www.computerhope.com.
tracert computerhope.com
1
2
3

169 ms190 ms160 msslc1-tc.xmission.com [166.70.1.20]


159 ms160 ms190 mscisco0-tc.xmission.com [166.70.1.1]
165 ms189 ms159 mswww.computerhope.com [166.70.10.23]

:
1. www.google.com

:
C:\Documents and Settings\--------->tracert www.google.com
Tracing route to www.google.com [173.194.39.148]
over a maximum of 30 hops:
1

14 ms

17 ms

18 ms 95.86.23.1

39 ms

13 ms

56 ms 10.4.23.3

41 ms

44 ms

36 ms 95.128.188.153

58 ms

34 ms

54 ms xe-9-0-0-114.vie20.ip4.tinet.net [77.67.75.45]

19

48 ms

44 ms

50 ms xe-9-0-1.fra23.ip4.tinet.net [89.149.181.205]

73 ms

92 ms

93 ms 72.14.221.74

54 ms

56 ms

52 ms 209.85.248.12

8 165 ms 167 ms 165 ms 72.14.236.68


9

55 ms

52 ms 116 ms 209.85.241.213

10

55 ms 154 ms

76 ms 72.14.234.253

11

49 ms

49 ms bud02s03-in-f20.1e100.net [173.194.39.148]

86 ms

Trace complete. 11 .

2. www.ugd.edu.mk

:
C:\Documents and Settings\-------->tracert www.ugd.edu.mk
Tracing route to senjak1.ugd.edu.mk [79.99.56.3]
over a maximum of 30 hops:
1

14 ms

16 ms

14 ms 95.86.23.1

17 ms

16 ms

13 ms 10.4.23.3

40 ms

42 ms

36 ms 95.128.188.153

28 ms

29 ms

29 ms 95.128.184.234

47 ms

25 ms

25 ms 79.99.56.3

Trace complete. 5 .

:
1. 1 2.
: a
localhost. Google 11 , ugd
5.

20

1,
http://tracert.com/trace_exe.html
http://www.tracert.org/traceroute/
http://www.yougetsignal.com/tools/visual-tracert/
: . Traceroute (
tracert)
IP .
,
.

.
.
(
).
NBTSTAT
:
C:\Documents and Settings\------->nbtstat -n
Wireless Network Connection:
Node IpAddress: [192.168.10.101] Scope Id: []
NetBIOS Local Name Table
Name
Type
Status
--------------------------------------------B282109DBB64469<00> UNIQUE Registered
WORKGROUP
<00> GROUP
Registered
B282109DBB64469<20> UNIQUE Registered
WORKGROUP
<1E> GROUP
Registered
WORKGROUP
<1D> UNIQUE
Registered
..__MSBROWSE__.<01> GROUP
Registered
NET
:
C:\Documents and Settings\---------->net user
User accounts for \\B282109DBB64469
------------------------------------------------------Administrator
Markov
Guest
HelpAssistant
SUPPORT_388945a0
The command completed successfully.

21

TELNET
:
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet>
NETSH
:
C:\Documents and Settings\Dragi Markov>netsh show
The following commands are available:
Commands in this context:
show alias - Lists all defined aliases.
show helper - Lists all the top-level helpers.
:
1. .
http://www.computerhope.com/cgi-bin/systeminfo.cgi
: ( IP
,hostname , , , cookies , screen resolution) .
2.
.
http://www.6diss.org/
http://www.6diss.org/e-learning/
: . IPv6
. ,

,
R & D.

3. www.ripe.com,
.
:
, 1990 .

22

4. Cisco .
http://www.cisco.com/
http://www.cisco.com/web/learning/netacad/index.html
http://www.cisco.com/web/learning/le3/learning_career_certifications_and_learning_paths_hom
e.html
: Cisco
. ( , , ,
).

Nmap - Zenmap GUI ("Network Mapper")
Nmap ("Network Mapper") ,
.
, ,
.. Nmap IP
, (
) , filters/firewalls
.
, .
Nmap GUI (Zenmap),
, , (Ncat),
(Ndiff).
Nmap (
.. Linux Windows)
http://www.youtube.com/watch?v=AHEt0mUZH_0
Nmap - Zenmap GUI
http://www.youtube.com/watch?v=FoIkmPg0IXo
http://www.youtube.com/watch?v=cJvRJJL2Vks

1. Nmap - Zenmap GUI ( ,


..) ?

23

: Zenmap Nmap GUI. (Linux, Windows, Mac OS X, BSD, )


Nmap
Nmap.
K () Nmap
. .

.
.

2. nmap
Windows?
: , nmap Windows
.
:
1. nmap
.
:
C:\Documents and Settings\-------->nmap -T4 -F www.yahoo.com
Starting Nmap 6.25 ( http://nmap.org ) at 2013-04-25 14:13 Central European Stan
dard Time
Nmap scan report for www.yahoo.com (87.248.122.122)
Host is up (0.10s latency).
Other addresses for www.yahoo.com (not scanned): 87.248.112.181
rDNS record for 87.248.122.122: ir1.fp.vip.ch1.yahoo.com
Not shown: 98 filtered ports
PORT

STATE SERVICE

80/tcp

open

http

443/tcp

open

https

24

Nmap done: 1 IP address (1 host up) scanned in 5.52 seconds

25

You might also like