Sie sind auf Seite 1von 5

CS331 Dr.

Lamia Berriche

Computer Networks

NETWORK LABORATORY
In this laboratory, you will use some of windows network related commands. You will use the
windows command prompt.

Hostname
Displays the host name portion of the full computer name of the computer.

Syntax
hostname

IPconfig
Displays all current TCP/IP network configuration values. Used without parameters, ipconfig
displays the IP address, subnet mask, and default gateway for all adapters.

With /all : Displays the full TCP/IP configuration for all adapters. Adapters can represent
physical interfaces, such as installed network adapters, or logical interfaces, such as dial-up
connections.
CS331 Dr.Lamia Berriche

Computer Networks
Tracert
Traceroute (also known as tracert) is a computer network tool used to determine the route taken
by packets across an IP network. Traceroute is often used for network troubleshooting. By
showing a list of routers traversed, it allows the user to identify the path taken to reach a
particular destination on the network.

Each of the 3 columns are a response from that router, and how long it took (each hop is tested 3
times). For example, in line 2, the first try took 240ms (240 milliseconds), the second took
421 ms, and the third took 70ms.

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 statistics.

-a : Displays all active TCP connections and the TCP and UDP ports on which the computer is
listening.

-b : Displays the binary (executable) program's name involved in creating each connection or
listening port.

-e : Displays Ethernet statistics, such as the number of bytes and packets sent and received. This
parameter can be combined with -s.
CS331 Dr.Lamia Berriche

Computer Networks
-n : Displays active TCP connections, however, addresses and port numbers are expressed
numerically and no attempt is made to determine names.

-p Shows connections for the protocol specified by Protocol. In this case, the Protocol can be tcp,
udp, tcpv6, or udpv6. If this parameter is used with -s to display statistics by protocol, Protocol
can be tcp, udp, icmp, ip, tcpv6, udpv6, icmpv6, or ipv6.

-r : Displays the contents of the IP routing table.

-s : Displays statistics by protocol. By default, statistics are shown for the TCP, UDP, ICMP, and
IP protocols. If the IPv6 protocol for Windows XP is installed, statistics are shown for the TCP
over IPv6, UDP over IPv6, ICMPv6, and IPv6 protocols.

-r : Displays the contents of the IP routing table. (This is equivalent to the route print command
under Windows.)

C:\>netstat –r
Route Table
=================================================================
======
Interface List
0x1 ......................... MS TCP Loopback interface
0x20005 ...00 16 76 ac a7 6a Intel(R) 82562V 10/100 Network
Connection
=================================================================
======
=================================================================
======
Active Routes:
Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 172.16.255.254 172.16.1.2 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
172.16.0.0 255.255.0.0 172.16.1.2 172.16.1.2 20
172.16.1.2 255.255.255.255 127.0.0.1 127.0.0.1 20
172.16.255.255 255.255.255.255 172.16.1.2 172.16.1.2 20
255.255.255.255 255.255.255.255 172.16.1.2 172.16.1.2 1
Default Gateway: 172.16.255.254
=================================================================
======
Persistent Routes:
None

The ”quad-zero” Network Destination and Netmask


values, 0.0.0.0 and 0.0.0.0, refer to any network not specifically known. For any non-local
network, this computer will use 172.16.255.254 as the default gateway. More specific networks
are reached through other gateway addresses. A local interface, called the loopback interface, is
automatically assigned to the 127.0.0.0 network.
CS331 Dr.Lamia Berriche

Computer Networks
Finally, any device on network 172.16.0.0 is accessed through gateway 172.16.1.2, the IP address
for this Ethernet interface.

Ping
Ping is a basic Internet program that allows a user to verify that a particular IP address exists and
can accept requests.

Ping is used diagnostically to ensure that a host computer the user is trying to reach is actually
operating. Ping works by sending an Internet Control Message Protocol (ICMP) Echo Request to
a specified interface on the network and waiting for a reply. Ping can be used for troubleshooting
to test connectivity and determine response time.

The following is a sample output of pinging en.wikipedia.org

admin@localhost# ping en.wikipedia.org


PING rr.pmtpa.wikimedia.org (66.230.200.100) 56(84) bytes of data.
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=1 ttl=52 time=87.7 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=2 ttl=52 time=95.6 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=3 ttl=52 time=85.4 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=4 ttl=52 time=95.8 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=5 ttl=52 time=87.0 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=6 ttl=52 time=97.6 ms
--- rr.pmtpa.wikimedia.org ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 8998ms
rtt min/avg/max/mdev = 78.162/89.213/97.695/6.836 ms

The output shows the results of 10 pings to 66.230.200.100 with the results summarized at the
end. The program is stopped by pressing Ctrl-C.

• shortest round trip time was 78.162 milliseconds


• average round trip time was 89.213 milliseconds
• maximum round trip time was 97.695 milliseconds
• Standard deviation of the round-trip time was 6.836 milliseconds

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
To display the ARP cache tables for all interfaces, type:
arp –a

Some definitions:
CS331 Dr.Lamia Berriche

Computer Networks
Gateway:

A gateway is a network point that acts as an entrance to another network. On the Internet, a node
or stopping point can be either a gateway node or a host (end-point) node. Both the computers of
Internet users and the computers that serve pages to users are host nodes. The computers that
control traffic within your company's network or at your local Internet service provider (ISP) are
gateway nodes.

Network adapter
A network adapter interfaces a computer to a network. The term "adapter" was popularized
originally by Ethernet add-in cards for PCs. Modern network adapter hardware exists in several
forms. Besides traditional PCI Ethernet cards, some network adapters are PCMCIA devices (also
know as "credit card" or "PC Card" adapters) or USB devices

Das könnte Ihnen auch gefallen