Sunteți pe pagina 1din 12

164602

COMMANDS IN WINDOWS
Ipconfig: ipconfig is a system administration utility in winows operating systems for
network interface configuration. It has features for configuring, controlling, and querying
TCP/IP network interface parameters.
C:\Users\Ravi>ipconfig
Wireless LAN adapter Wi-Fi:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : nitw.ac.in
Link-local IPv6 Address . . . . . : fe80::6dc3:94db:7fc9:9d5c%12
IPv4 Address. . . . . . . . . . . : 172.30.149.52
Subnet Mask . . . . . . . . . . . : 255.255.252.0
Default Gateway . . . . . . . . . : 172.30.148.1
Ethernet adapter VMware Network Adapter VMnet1:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::2038:b0b0:e522:3218%14
IPv4 Address. . . . . . . . . . . : 192.168.80.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter VMware Network Adapter VMnet8:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::4c4b:46b4:5bf5:143c%11
IPv4 Address. . . . . . . . . . . : 192.168.184.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Tunnel adapter isatap.nitw.ac.in:
1

164602

Media State . . . . . . . . . . . : Media disconnected


Connection-specific DNS Suffix . : nitw.ac.in
Tunnel adapter isatap.{E951B8C9-BAFB-4226-8C3F-FE8B29227FF7}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Tunnel adapter isatap.{C928E9BE-EDD5-4A40-B807-3774E0BC8503}:
Media State . . . . . . . . . . . : Media disconnected
:nitw.ac.in

Connection-specific DNS Suffix

Ipconfig/all: Displays all current TCP/IP network configuration values and refreshes
Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS)
settings. Used without parameters, ipconfig displays the IP address, subnet mask, and
default gateway for all adapters.
C:\Users\Ravi>ipconfig/all
Windows IP Configuration
Host Name . . . . . . . . . . . . : DESKTOP-6SI2SNN
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : nitw.ac.in
Wireless LAN adapter Wi-Fi:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Qualcomm Atheros AR956x Wireless Network Adapter
Physical Address. . . . . . . . . : 18-4F-32-1D-97-2B
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Wireless LAN adapter Local Area Connection* 3:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
2

164602

Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter


Physical Address. . . . . . . . . : 1A-4F-32-1D-97-2B
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : nitw.ac.in
Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
Physical Address. . . . . . . . . : F0-76-1C-CE-77-8C
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::6dc3:94db:7fc9:9d5c%12(Preferred)
IPv4 Address. . . . . . . . . . . : 172.30.149.52(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.252.0
Lease Obtained. . . . . . . . . . : Tuesday, November 22, 2016 11:59:08 AM
Lease Expires . . . . . . . . . . : Wednesday, November 30, 2016 11:59:06 AM
Default Gateway . . . . . . . . . : 172.30.148.1
DHCP Server . . . . . . . . . . . : 192.168.172.50
DHCPv6 IAID . . . . . . . . . . . : 133199388
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-44-5D-89-F0-76-1C-CE-77-8C
DNS Servers . . . . . . . . . . . : 218.248.240.181
218.248.240.23
14.139.5.5
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter VMware Network Adapter VMnet1:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet1
Physical Address. . . . . . . . . : 00-50-56-C0-00-01
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::2038:b0b0:e522:3218%14(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.80.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Tuesday, November 22, 2016 11:52:55 AM
Lease Expires . . . . . . . . . . : Tuesday, November 22, 2016 12:22:55 PM
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 192.168.80.254
DHCPv6 IAID . . . . . . . . . . . : 402673750
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-44-5D-89-F0-76-1C-CE-77-8C
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
3

164602

fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter VMware Network Adapter VMnet8:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet8
Physical Address. . . . . . . . . : 00-50-56-C0-00-08
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::4c4b:46b4:5bf5:143c%11(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.184.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Tuesday, November 22, 2016 11:52:55 AM
Lease Expires . . . . . . . . . . : Tuesday, November 22, 2016 12:22:55 PM
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 192.168.184.254
DHCPv6 IAID . . . . . . . . . . . : 436228182
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1F-44-5D-89-F0-76-1C-CE-77-8C
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
Primary WINS Server . . . . . . . : 192.168.184.2
NetBIOS over Tcpip. . . . . . . . : Enabled
Tunnel adapter isatap.nitw.ac.in:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : nitw.ac.in
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter isatap.{E951B8C9-BAFB-4226-8C3F-FE8B29227FF7}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
4

164602

Tunnel adapter isatap.{C928E9BE-EDD5-4A40-B807-3774E0BC8503}:


Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Nslookup: nslookup is a network administration command-line tool available for many
computer operating systems for querying the Domain Name System (DNS) to obtain
domain name or IP address mapping or for any other specific DNS record.
C:\Users\Ravi> nslookup www.google.com
Server: UnKnown
Address: 192.168.43.1
Non-authoritative answer:
Name: www.google.com
Addresses: 2404:6800:4009:801::2004
216.58.220.164
C:\Users\Ravi>nslookup gmail.com
Server: UnKnown
Address: 192.168.43.1
Non-authoritative answer:
Name: gmail.com
Addresses: 2404:6800:4009:801::2005
216.58.199.133
C:\Users\Ravi>nslookup 218.248.13.200
Server: UnKnown
Address: 218.248.240.181
Name: www.nitw.ac.in
Address: 218.248.13.200
Netstat: netstat ("network statistics") is a command-line tool that displays network
connections (both incoming and outgoing), routing tables, and a number of network
interface (network interface controller or software-defined network interface) and
network protocol statistics.
C:\Users\Ravi>netstat
5

164602

Active Connections
Proto
TCP
TCP
TCP
TCP
TCP
TCP
TCP
TCP

Local Address
Foreign Address
State
172.30.142.65:63877 172.30.0.22:3128
ESTABLISHED
192.168.43.81:63929 hk2sch130022129:https ESTABLISHED
192.168.43.81:63940 sc-in-f188:5228
ESTABLISHED
192.168.43.81:63963 hk2sch130022041:https ESTABLISHED
192.168.43.81:64007 191.239.81.204:https TIME_WAIT
192.168.43.81:64008 bom07s01-in-f142:https ESTABLISHED
[::1]:12372
Ravi:63765
ESTABLISHED
[::1]:63765
Ravi:12372
ESTABLISHED

Arp: Displays and modifies entries in the address Resolution Protocol (arp) cache, which
contains one or more tables that are used to store IP addresses and their resolved Ethernet
or Token Ring physical addresses. There is a separate table for each Ethernet or Token
Ring network adapter installed on your computer. Used without parameters, arp displays
help.
C:\Users\Ravi>arp -a
Interface: 192.168.43.81 --- 0x4
Internet Address Physical Address Type
192.168.43.1
9a-0c-a5-f9-6b-a7 dynamic
192.168.43.255
ff-ff-ff-ff-ff-ff static
224.0.0.22
01-00-5e-00-00-16 static
224.0.0.251
01-00-5e-00-00-fb static
224.0.0.252
01-00-5e-00-00-fc static
239.255.255.250
01-00-5e-7f-ff-fa static
255.255.255.255
ff-ff-ff-ff-ff-ff static
Interface: 192.168.184.1 --- 0xe
Internet Address Physical Address Type
192.168.184.254
00-50-56-f0-7c-ff dynamic
192.168.184.255
ff-ff-ff-ff-ff-ff static
224.0.0.22
01-00-5e-00-00-16 static
224.0.0.251
01-00-5e-00-00-fb static
224.0.0.252
01-00-5e-00-00-fc static
239.255.255.250
01-00-5e-7f-ff-fa static
255.255.255.255
ff-ff-ff-ff-ff-ff static
Interface: 192.168.92.1 --- 0xf
Internet Address Physical Address

Type
6

164602

192.168.92.254
00-50-56-ec-76-24 dynamic
192.168.92.255
ff-ff-ff-ff-ff-ff static
224.0.0.22
01-00-5e-00-00-16 static
224.0.0.251
01-00-5e-00-00-fb static
224.0.0.252
01-00-5e-00-00-fc static
239.255.255.250
01-00-5e-7f-ff-fa static
255.255.255.255
ff-ff-ff-ff-ff-ff static
Tracert: Tracert is a computer network diagnostic tool for displaying the route (path)
and measuring transit delays of packets across an Internet Protocol (IP) network.
C:\Users\Ravi>tracert 172.26.40.5
Tracing route to 172.26.40.5 over a maximum of 30 hops
1
2
3
4
5
6
7
8
9

1 ms 1 ms 1 ms 192.168.43.1
*
*
* Request timed out.
49 ms 38 ms 36 ms 10.72.1.162
33 ms 38 ms 29 ms 172.26.6.29
44 ms 28 ms 36 ms 172.26.30.154
34 ms 57 ms 31 ms 172.26.30.153
*
*
* Request timed out.
*
*
* Request timed out.
79 ms 73 ms 62 ms 172.26.40.5

Trace complete.
Ping: Ping is a computer network administration software utility used to test the
reachability of a host on an Internet Protocol (IP) network.
C:\Users\Ravi>ping 218.248.13.200
Pinging 218.248.13.200 with 32 bytes of data:
Request timed out.
Reply from 218.248.13.200: bytes=32 time=1354ms TTL=52
Reply from 218.248.13.200: bytes=32 time=1117ms TTL=52
Reply from 218.248.13.200: bytes=32 time=97ms TTL=52
Ping statistics for 218.248.13.200:
Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
Minimum = 97ms, Maximum = 1354ms, Average = 856ms

164602

COMMANDS IN LINUX
Ifconfig:ifconfig in short interface configuration utility for system/network
administration in Unix/Linux operating systems to configure, manage and query network
interface parameters via command line interface or in a system configuration scripts.
The ifconfig command is used for displaying current network configuration
information, setting up an ip address, netmask or broadcast address to an network
interface, creating an alias for network interface, setting up hardware address and enable
or disable network interfaces.
UbuntuRavi:~$ ifconfig
enp7s0 Link encap:Ethernet HWaddr 74:e6:e2:07:1e:53
UP 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)
lo

Link encap:Local Loopback


inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:629 errors:0 dropped:0 overruns:0 frame:0
TX packets:629 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:51023 (51.0 KB) TX bytes:51023 (51.0 KB)

wlp6s0 Link encap:Ethernet HWaddr b0:10:41:1b:32:d9


inet addr:192.168.43.81 Bcast:192.168.43.255 Mask:255.255.255.0
inet6 addr: fe80::fc19:36d:c00a:563f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5618 errors:0 dropped:0 overruns:0 frame:0
TX packets:3475 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
8

164602

RX bytes:6219486 (6.2 MB) TX bytes:447333 (447.3 KB)

Netstat: netstat (network statistics) is a command line tool for monitoring network
connections both incoming and outgoing as well as viewing routing tables, interface
statistics etc. netstat is available on all Unix-like Operating Systems and also available
on Windows OS as well. It is very useful in terms of network troubleshooting and
performance measurement. netstat is one of the most basic network service debugging
tools, telling you what ports are open and whether any programs are listening on ports.
UbuntuRavi:~$ netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address
Foreign Address
State
tcp
0 0 sandeep-Inspiron-:51680 bom07s01-in-f14.1:https ESTABLISHED
tcp
0 0 sandeep-Inspiron-:39402 sa-in-f189.1e100.:https ESTABLISHED
tcp
0 0 sandeep-Inspiron-:51690 bom07s01-in-f14.1:https ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags
Type
State
I-Node Path
unix 2 [ ]
DGRAM
23159 /run/user/1000/systemd/notify
unix 2 [ ]
DGRAM
21489 /run/wpa_supplicant/wlp6s0
unix 3 [ ]
DGRAM
10807 /run/systemd/notify
unix 7 [ ]
DGRAM
10822 /run/systemd/journal/socket
unix 2 [ ]
DGRAM
11824 /run/systemd/journal/syslog
unix 18 [ ]
DGRAM
11830 /run/systemd/journal/dev-log
unix 3 [ ]
STREAM CONNECTED 26248 @/tmp/dbus-iJhyaQpl1q
unix 3 [ ]
STREAM CONNECTED 32189
unix 3 [ ]
STREAM CONNECTED 28067
unix 3 [ ]
STREAM CONNECTED 26390
unix 3 [ ]
STREAM CONNECTED 24142 @/tmp/dbus-iJhyaQpl1q
unix 3 [ ]
STREAM CONNECTED 23859
unix 3 [ ]
STREAM CONNECTED 28884 @/tmp/dbus-iJhyaQpl1q
unix 2 [ ]
DGRAM
26144
unix 3 [ ]
STREAM CONNECTED 21874
unix 3 [ ]
STREAM CONNECTED 26197
unix 3 [ ]
STREAM CONNECTED 23351
unix 3 [ ]
STREAM CONNECTED 21082
/var/run/dbus/system_bus_socket
unix 3 [ ]
STREAM CONNECTED 26853 @sandeepcom.canonical.Unity.Master.Scope.files.T64735675650
unix 3 [ ]
STREAM CONNECTED 25326
unix 3 [ ]
STREAM CONNECTED 27813 @/tmp/dbus-H4IsP5MFJL
unix 3 [ ]
STREAM CONNECTED 25945 @/tmp/dbus-iJhyaQpl1q
9

164602

unix
unix
unix
unix
unix
unix
unix
unix
unix
unix
unix
unix
unix
unix
unix
unix
unix

2
3
3
2
3
3
3
3
3
3
3
3
3
3
2
3
3

[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]
[]

STREAM
STREAM
STREAM
DGRAM
STREAM
DGRAM
STREAM
STREAM
STREAM
STREAM
STREAM
STREAM
STREAM
STREAM
DGRAM
STREAM
DGRAM

CONNECTED
CONNECTED
CONNECTED
24074
CONNECTED
16160
CONNECTED
CONNECTED
CONNECTED
CONNECTED
CONNECTED
CONNECTED
CONNECTED
CONNECTED
23150
CONNECTED
24738

22412 /run/snapd.socket
32219 @/tmp/dbus-iJhyaQpl1q
26998
21430
24475
25867
25239
26470
25425
27760
24046
29071

@/tmp/dbus-H4IsP5MFJL
@/tmp/.X11-unix/X0
@/tmp/dbus-iJhyaQpl1q
@/tmp/dbus-iJhyaQpl1q
@/tmp/.X11-unix/X0
@/tmp/dbus-ctNAStWP

26161 /run/systemd/journal/stdout

Nslookup:The nslookup command is used to query internet name servers interactively


for information.
nslookup, which stands for "name server lookup", is a useful tool for finding out
information about a named domain.
UbuntuRavi:~$ nslookup 218.248.13.200
Server: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
200.13.248.218.in-addr.arpa name = www.shoutbox.nitw.ac.in.
200.13.248.218.in-addr.arpa name = www.nitw.ac.in.
Authoritative answers can be found from:
13.248.218.in-addr.arpa nameserver = ns11.bsnl.in.
13.248.218.in-addr.arpa nameserver = ns12.bsnl.in.
ns11.bsnl.in internet address = 218.248.240.178
ns12.bsnl.in internet address = 218.248.240.209
Ping:PING (Packet INternet Groper) command is the best way to test connectivity
between two nodes. Whether it is Local Area Network (LAN) or Wide Area Network
(WAN). Ping use ICMP (Internet Control Message Protocol) to communicate to other
devices. You can ping host name of ip address using below command.
10

164602

ping uses the ICMP protocols mandatory ECHO_REQUEST datagram to elicit an ICMP
ECHO_RESPONSE from a host or gateway. ECHO_REQUEST datagrams (pings)
have an IP and ICMP header, followed by a struct timeval and then an arbitrary number
of pad bytes used to fill out the packet.
UbuntuRavi:~$ ping 218.248.13.200
PING 218.248.13.200 (218.248.13.200) 56(84) bytes of data.
64 bytes from 218.248.13.200: icmp_seq=1 ttl=128 time=4954 ms
64 bytes from 218.248.13.200: icmp_seq=2 ttl=128 time=3946 ms
64 bytes from 218.248.13.200: icmp_seq=3 ttl=128 time=2937 ms
64 bytes from 218.248.13.200: icmp_seq=4 ttl=128 time=1938 ms
64 bytes from 218.248.13.200: icmp_seq=5 ttl=128 time=937 ms
64 bytes from 218.248.13.200: icmp_seq=6 ttl=128 time=140 ms
64 bytes from 218.248.13.200: icmp_seq=7 ttl=128 time=1179 ms
64 bytes from 218.248.13.200: icmp_seq=8 ttl=128 time=173 ms
64 bytes from 218.248.13.200: icmp_seq=9 ttl=128 time=2641 ms
64 bytes from 218.248.13.200: icmp_seq=10 ttl=128 time=1636 ms
64 bytes from 218.248.13.200: icmp_seq=11 ttl=128 time=628 ms
64 bytes from 218.248.13.200: icmp_seq=12 ttl=128 time=749 ms
64 bytes from 218.248.13.200: icmp_seq=13 ttl=128 time=768 ms
64 bytes from 218.248.13.200: icmp_seq=14 ttl=128 time=100 ms
64 bytes from 218.248.13.200: icmp_seq=15 ttl=128 time=195 ms
^C
--- 218.248.13.200 ping statistics --15 packets transmitted, 15 received, 0% packet loss, time 14055ms
rtt min/avg/max/mdev = 100.996/1528.587/4954.434/1438.368 ms, pipe 5
Nmap: The Nmap aka Network Mapper is an open source and a very versatile tool for
Linux system/network administrators. Nmap is used for exploring networks, perform
security scans, network audit and finding open ports on remote machine. It scans for Live
hosts, Operating systems, packet filters and open ports running on remote hosts.
UbuntuRavi:~$ nmap 218.248.13.200
Starting Nmap 6.40 ( http://nmap.org ) at 2016-11-16 20:15 PST
Nmap scan report for www.nitw.ac.in (218.248.13.200)
Host is up (0.12s latency).
Not shown: 991 filtered ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
11

164602

80/tcp open http


443/tcp open https
554/tcp open rtsp
1723/tcp open pptp
3389/tcp open ms-wbt-server
8008/tcp open http

12

S-ar putea să vă placă și