Windows and Linux Networking > Terminal Commands 2
Computer Networks
Windows and Linux Networking > Terminal Commands
Windows Commands
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\admin>ipconfig
Windows IP Configuration
Ethernet adapter VMware Network Adapter VMnet8:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.88.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter VMware Network Adapter VMnet1:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.66.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 172.20.101.46
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.20.101.1
C:\Documents and Settings\admin>ipconfig ?/
Error: unrecongnized or incomplete command line.
USAGE:
ipconfig [/? | /all | /renew [adapter] | /release [adapter] |
/flushdns | /displaydns | /registerdns |
/showclassid adapter |
/setclassid adapter [classid] ]
where
adapter Connection name
(wildcard characters * and ? allowed, see examples)
Options:
/? Display this help message
/all Display full configuration information.
/release Release the IP address for the specified adapter.
/renew Renew the IP address for the specified adapter.
/flushdns Purges the DNS Resolver cache.
/registerdns Refreshes all DHCP leases and re-registers DNS names
/displaydns Display the contents of the DNS Resolver Cache.
/showclassid Displays all the dhcp class IDs allowed for adapter.
/setclassid Modifies the dhcp class id.
The default is to display only the IP address, subnet mask and
default gateway for each adapter bound to TCP/IP.
For Release and Renew, if no adapter name is specified, then the IP address
leases for all adapters bound to TCP/IP will be released or renewed.
For Setclassid, if no ClassId is specified, then the ClassId is removed.
Examples:
> ipconfig ... Show information.
> ipconfig /all ... Show detailed information
> ipconfig /renew ... renew all adapters
> ipconfig /renew EL* ... renew any connection that has its
name starting with EL
> ipconfig /release *Con* ... release all matching connections,
eg. "Local Area Connection 1" or
"Local Area Connection 2"
C:\Documents and Settings\admin>ping 172.20.101.65
Pinging 172.20.101.65 with 32 bytes of data:
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Ping statistics for 172.20.101.65:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Documents and Settings\admin>ping 172.16.0.90
Pinging 172.16.0.90 with 32 bytes of data:
Reply from 172.16.0.90: bytes=32 time<1ms TTL=63
Reply from 172.16.0.90: bytes=32 time<1ms TTL=63
Reply from 172.16.0.90: bytes=32 time<1ms TTL=63
Reply from 172.16.0.90: bytes=32 time<1ms TTL=63
Ping statistics for 172.16.0.90:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Documents and Settings\admin>ping 172.20.101.1
Pinging 172.20.101.1 with 32 bytes of data:
Reply from 172.20.101.1: bytes=32 time<1ms TTL=64
Reply from 172.20.101.1: bytes=32 time<1ms TTL=64
Reply from 172.20.101.1: bytes=32 time<1ms TTL=64
Reply from 172.20.101.1: bytes=32 time<1ms TTL=64
Ping statistics for 172.20.101.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Documents and Settings\admin>ping
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] target_name
Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-j host-list Loose source route along host-list.
-k host-list Strict source route along host-list.
-w timeout Timeout in milliseconds to wait for each reply.
C:\Documents and Settings\admin>ping 172.20.101.65 -t
Pinging 172.20.101.65 with 32 bytes of data:
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Reply from 172.20.101.65: bytes=32 time<1ms TTL=128
Ping statistics for 172.20.101.65:
Packets: Sent = 8, Received = 8, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Control-C
^C
C:\Documents and Settings\admin>ping www.google.com
Pinging www.google.com [216.58.196.4] with 32 bytes of data:
Reply from 216.58.196.4: bytes=32 time=24ms TTL=58
Reply from 216.58.196.4: bytes=32 time=1ms TTL=58
Reply from 216.58.196.4: bytes=32 time=2ms TTL=58
Reply from 216.58.196.4: bytes=32 time=2ms TTL=58
Ping statistics for 216.58.196.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 24ms, Average = 7ms
C:\Documents and Settings\admin>tracert www.google.com
Tracing route to www.google.com [216.58.220.4]
over a maximum of 30 hops:
1 <1 ms <1 ms <1 ms 172.20.101.1
2 * 23 ms 22 ms 65-110-138-120.mysipl.com [120.138.110.65]
3 7 ms 16 ms * 10.10.229.225
4 1 ms 1 ms 1 ms 72.14.196.213
5 1 ms 1 ms 1 ms 209.85.142.228
6 2 ms 2 ms 1 ms 74.125.37.235
7 4 ms 2 ms 2 ms bom05s05-in-f4.1e100.net [216.58.220.4]
Trace complete.
C:\Documents and Settings\admin>ping www.google.com
Pinging www.google.com [216.58.220.4] with 32 bytes of data:
Reply from 216.58.220.4: bytes=32 time=1ms TTL=58
Reply from 216.58.220.4: bytes=32 time=388ms TTL=58
Reply from 216.58.220.4: bytes=32 time=1ms TTL=58
Reply from 216.58.220.4: bytes=32 time=48ms TTL=58
Ping statistics for 216.58.220.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 388ms, Average = 109ms
C:\Documents and Settings\admin>net user
User accounts for \\XIE-ROBOTICS-23
-------------------------------------------------------------------------------
admin Administrator Guest
HelpAssistant prat SUPPORT_388945a0
VUSR_XIE-ROBOTICS-14
The command completed successfully.
C:\Documents and Settings\admin>net view
Server Name Remark
-------------------------------------------------------------------------------
\\XIE-ROBOTICS-01 XIE-ROBOTICS-01
\\XIE-ROBOTICS-02
\\XIE-ROBOTICS-03
\\XIE-ROBOTICS-04
\\XIE-ROBOTICS-05
\\XIE-ROBOTICS-06
\\XIE-ROBOTICS-08
\\XIE-ROBOTICS-09
\\XIE-ROBOTICS-11
\\XIE-ROBOTICS-12
\\XIE-ROBOTICS-16
\\XIE-ROBOTICS-17
\\XIE-ROBOTICS-18
\\XIE-ROBOTICS-22
\\XIE-ROBOTICS-23
The command completed successfully.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\admin>telnet 172.20.101.65
Telnet server could not log you in using NTLM authentication.
Your password may have expired.
Login using username and password
Welcome to Microsoft Telnet Service
login: prat
password:
C:\Documents and Settings\prat>dir
Volume in drive C has no label.
Volume Serial Number is 1CB2-7364
Directory of C:\Documents and Settings\prat
07/28/2015 12:50 PM <DIR> .
07/28/2015 12:50 PM <DIR> ..
07/28/2015 12:50 PM 26 computer networks.txt
01/16/2013 04:21 PM <DIR> Desktop
01/16/2013 04:21 PM <DIR> Favorites
01/16/2013 04:21 PM <DIR> My Documents
01/16/2013 04:21 PM <DIR> Start Menu
1 File(s) 26 bytes
6 Dir(s) 9,791,119,360 bytes free
C:\Documents and Settings\prat>computer networks.txt
C:\Documents and Settings\prat>edit computer networks.txt
File Edit Search View Options Help
+---------------- C:\Documents and Settings\prat\computer -----------------+
Ã…
Ã… Ã…
Ã… cn is an awesome subject Ã…
Linux Commands
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1F:D0:E6:B4:94
inet addr:172.20.101.86 Bcast:172.20.101.255 Mask:255.255.255.0
inet6 addr: fe80::21f:d0ff:fee6:b494/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:215 errors:0 dropped:0 overruns:0 frame:0
TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32708 (31.9 KiB) TX bytes:10767 (10.5 KiB)
Interrupt:233 Base address:0xe000
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:16436 Metric:1
RX packets:1726 errors:0 dropped:0 overruns:0 frame:0
TX packets:1726 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5007708 (4.7 MiB) TX bytes:5007708 (4.7 MiB)
[root@localhost ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.20.101.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
172.30.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 172.20.101.1 0.0.0.0 UG 0 0 0 eth0
[root@localhost ~]# traceroute www.google.com
traceroute to www.google.com (216.58.196.4), 30 hops max, 40 byte packets
1 172.20.101.1 (172.20.101.1) 0.267 ms 0.279 ms 0.271 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
[root@localhost ~]# adduser prat
[root@localhost ~]# passwd prat
Changing password for user prat.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@localhost ~]# telnet 172.20.101.86
Trying 172.20.101.86...
Connected to 172.20.101.86 (172.20.101.86).
Escape character is '^]'.
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Kernel 2.6.18-194.el5 on an i686
login: prat
Password:
[prat@localhost ~]$ cls
-bash: cls: command not found
[prat@localhost ~]$ ls
[prat@localhost ~]$ su -
Password:
[root@localhost ~]# ls
\ abcd abc.txt Desktop file file3 file6 ifcfg-eth0 ns.tcl~ servers.txt TE
a abcd~ batchD.pcat example.txt file1 file4 file8 j2mewtk packet.pcap servers.txtclear TEcomps
abc abcd.txt dear f1 file2 file5 files NetBeansProjects pr server.txt test1
[root@localhost ~]# cat>PQR
This is my file wriiten in your computer.
[root@localhost ~]# exit
logout
[prat@localhost ~]$ exit
logout
[root@localhost ~]# ping -c4 www.google.com
PING www.google.com (216.58.196.4) 56(84) bytes of data.
64 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=1 ttl=58 time=1.74 ms
64 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=2 ttl=58 time=2.74 ms
64 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=3 ttl=58 time=1.84 ms
64 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=4 ttl=58 time=1.78 ms
--- www.google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 1.746/2.030/2.745/0.417 ms
[root@localhost ~]# ping -s 1000 www.google.com
PING www.google.com (216.58.196.4) 1000(1028) bytes of data.
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=1 ttl=58 (truncated)
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=2 ttl=58 (truncated)
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=3 ttl=58 (truncated)
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=4 ttl=58 (truncated)
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=5 ttl=58 (truncated)
--- www.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 2.314/23.055/30.112/10.487 ms
[root@localhost ~]# ping -s 1200 www.google.com
PING www.google.com (216.58.196.4) 1200(1228) bytes of data.
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=1 ttl=58 (truncated)
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=3 ttl=58 (truncated)
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=4 ttl=58 (truncated)
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=5 ttl=58 (truncated)
--- www.google.com ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 4003ms
rtt min/avg/max/mdev = 2.275/3.422/4.656/1.109 ms
[root@localhost ~]# ping -s 1500 www.google.com
PING www.google.com (216.58.196.4) 1500(1528) bytes of data.
--- www.google.com ping statistics ---
11 packets transmitted, 0 received, 100% packet loss, time 10000ms
[root@localhost ~]# ping -s 1472 www.google.com
PING www.google.com (216.58.196.4) 1472(1500) bytes of data.
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=1 ttl=58 (truncated)
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=2 ttl=58 (truncated)
72 bytes from bom03s05-in-f4.1e100.net (216.58.196.4): icmp_seq=3 ttl=58 (truncated)
--- www.google.com ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 3002ms
rtt min/avg/max/mdev = 30.509/30.746/30.967/0.275 ms
[root@localhost ~]#
[root@localhost ~]# ifconfig eth0 down
[root@localhost ~]# ifconfig
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:16436 Metric:1
RX packets:2010 errors:0 dropped:0 overruns:0 frame:0
TX packets:2010 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5031564 (4.7 MiB) TX bytes:5031564 (4.7 MiB)
[root@localhost ~]# ifconfig eth0 192.168.20.50
[root@localhost ~]# ifconfig eth0 192.168.20.50 netmask 255.255.255.0
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1F:D0:E6:B4:94
inet addr:192.168.20.50 Bcast:192.168.20.255 Mask:255.255.255.0
inet6 addr: fe80::21f:d0ff:fee6:b494/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4154 errors:0 dropped:0 overruns:0 frame:0
TX packets:2128 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1033648 (1009.4 KiB) TX bytes:454209 (443.5 KiB)
Interrupt:233 Base address:0xe000
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:16436 Metric:1
RX packets:2010 errors:0 dropped:0 overruns:0 frame:0
TX packets:2010 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5031564 (4.7 MiB) TX bytes:5031564 (4.7 MiB)
[root@localhost ~]# ifconfig eth0 down
[root@localhost ~]# ifconfig
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:16436 Metric:1
RX packets:2010 errors:0 dropped:0 overruns:0 frame:0
TX packets:2010 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5031564 (4.7 MiB) TX bytes:5031564 (4.7 MiB)
[root@localhost ~]# ifconfig eth0 192.168.20.50 netmask 255.255.0.0
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1F:D0:E6:B4:94
inet addr:192.168.20.50 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::21f:d0ff:fee6:b494/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4275 errors:0 dropped:0 overruns:0 frame:0
TX packets:2152 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1062003 (1.0 MiB) TX bytes:459069 (448.3 KiB)
Interrupt:233 Base address:0xe000
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:16436 Metric:1
RX packets:2010 errors:0 dropped:0 overruns:0 frame:0
TX packets:2010 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5031564 (4.7 MiB) TX bytes:5031564 (4.7 MiB)
[root@localhost ~]# ifconfig eth0 down
[root@localhost ~]# ifconfig
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:16436 Metric:1
RX packets:2010 errors:0 dropped:0 overruns:0 frame:0
TX packets:2010 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5031564 (4.7 MiB) TX bytes:5031564 (4.7 MiB)
[root@localhost ~]# ifconfig eth0 up
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1F:D0:E6:B4:94
inet addr:192.168.20.50 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::21f:d0ff:fee6:b494/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4482 errors:0 dropped:0 overruns:0 frame:0
TX packets:2176 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1112392 (1.0 MiB) TX bytes:463954 (453.0 KiB)
Interrupt:233 Base address:0xe000
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:16436 Metric:1
RX packets:2010 errors:0 dropped:0 overruns:0 frame:0
TX packets:2010 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5031564 (4.7 MiB) TX bytes:5031564 (4.7 MiB)
[root@localhost ~]# ifdown eth0
[root@localhost ~]# ifup eth0
Determining IP information for eth0... done.
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1F:D0:E6:B4:94
inet addr:172.20.101.86 Bcast:172.20.101.255 Mask:255.255.255.0
inet6 addr: fe80::21f:d0ff:fee6:b494/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4663 errors:0 dropped:0 overruns:0 frame:0
TX packets:2215 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1156776 (1.1 MiB) TX bytes:472326 (461.2 KiB)
Interrupt:233 Base address:0xe000
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:16436 Metric:1
RX packets:2010 errors:0 dropped:0 overruns:0 frame:0
TX packets:2010 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5031564 (4.7 MiB) TX bytes:5031564 (4.7 MiB)
Comments
Post a Comment