Computer Network Practical
Computer Network Practical
Computer Network Practical
IPv4 Addressing and Subnetting Given an IP address and network mask, determine other
information about the IP address such as:
• Network address • Network broadcast address • Total number of host bits • Number of hosts
To find: Network address :-First address = (any address) AND (network mask)
= 70.12.100.128
Network broadcast address :-Last address = (any address) OR [NOT (network mask)]
= 70.12.100.132 OR 0.0.0.63
= 70.12.100.191
Number of hosts :-N= 232-n which n is the prefix length and N is the number of addresses in the block.
= 26= 64 hosts
Q 1 B. Given an IP address, network mask, and subnetwork mask, determine other information about
the IP address such as:
• The subnet address of this subnet • The broadcast address of this subnet • The range of host
addresses for this subnet • The maximum number of subnets for this subnet mask • The number of
hosts for each subnet • The number of subnet bits • The number of this subnet
Example:--
Consider class a ip address 10.0.0.0 the its default subnet mask is 255.0.0.0 which means we can
represent it by 10.0.0.0/8 the “/” factor indicates the CIDR value
If we decide to block some of the bits to minimize no of host in any given subnet then that technique is
called as variable length subnet masking (VLSM)
Let us see the example where we borrow some bits from host part and minimize the count to an extent
and create small independent N/W’s of big N/W .Or even we can say that we want 8 N/W out of 1 big
n/w then we will observer following N/W created with their VLSM 255.224.0.0 and no of hosts per
subnet 221=2097152 - 2=2097150
Diagnostic commands help you detect TCP/IP networking problems. Some of the diagnostic
commandsarearp, hostname,ipconfig,,netstat, ping, route, and tracert .
i) arp
This diagnostic command displays and modifies the IP-to-Ethernet or Token Ring physical address
translation tables used by the Address Resolution Protocol (ARP).
Syntax
ii) hostname
This diagnostic command prints the name of the host on which the command is used.
Syntax
iii) ipconfig
This diagnostic command displays all current TCP/IP network configuration values. This command is
useful on computers running DHCP because it enables users to determine which TCP/IP configuration
values have been configured by DHCP. If you enter only ipconfigwithout parameters, the response is a
display of all of the current TCP/IP configuration values, including IP address, subnet mask, and default
gateway.
Syntax
iv) netstat
This diagnostic command displays protocol statistics and current TCP/IP network connections.
Syntax
v) ping
Syntax
ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w
timeout] destination-list
vi) route
Syntax
vii ) tracert
This diagnostic utility determines the route taken to a destination by sending Internet Control Message
Protocol (ICMP) echo packets with varying time-to-live (TTL) values to the destination. Each router along
the path is required to decrement the TTL on a packet by at least 1 before forwarding it, so the TTL is
effectively a hop count. When the TTL on a packet reaches 0, the router is supposed to send back an
ICMP Time Exceeded message to the source computer.
Tracert determines the route by sending the first echo packet with a TTL of 1 and incrementing the TTL
by 1 on each subsequent transmission until the target responds or the maximum TTL is reached. The
route is determined by examining the ICMP Time Exceeded messages sent back by intermediate routers.
Notice that some routers silently drop packets with expired TTLs and will be invisible to tracert.
Syntax