Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lab 6 IPv4 and NMAP - en

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

LAB 4

COURSE: COMPUTER NETWORK

IPV4 ADDRESS AND NMAP

Name: ID:

Objective
Part 1: Convert IPv4 Addresses from Dotted Decimal to Binary
Part 2: Use Bitwise ANDing Operation to Determine Network Addresses
Part 3: Identify IPv4 Addresses and Apply Network Address Calculations
Part 4: Identify IPv4 Address
Part 5: Classify IPv4 Addresses
Part 6: Use NMAP to identify the network

Part 1: Convert IPv4 Addresses from Dotted Decimal to Binary


Step 1: Convert decimal numbers to their binary equivalent.
Fill in the following table by converting the decimal number to an 8-bit binary number. The first
number has been completed for your reference. Recall that the eight binary bit values in an octet
are based on the powers of 2, and from left to right are 128, 64, 32, 16, 8, 4, 2, and 1.

Decimal Binary

192 11000000
168
10
255
2

Step 2: Convert the IPv4 addresses to their binary equivalent.


An IPv4 address can be converted using the same technique you used above. Fill in the table
below with the binary equivalent of the addresses provided. To make your answers easier to read,
separate the binary octets with a period.

1
Decimal Binary

192.168.10.10 11000000.10101000.00001010.00001010
172.16.18.183
10.86.252.17
255.255.255.12
8
255.255.192.0

Part 2: Use Bitwise ANDing Operation to Determine Network


Addresses
In Part 2, you will use the bitwise ANDing operation to calculate the network address for the
provided host addresses. You will first need to convert an IPv4 decimal address and subnet mask
to their binary equivalent. Once you have the binary form of the network address, convert it to its
decimal form.
Note: The ANDing process compares the binary value in each bit position of the 32-bit host IP
with the corresponding position in the 32-bit subnet mask. If there two 0s or a 0 and a 1, the
ANDing result is 0. If there are two 1s, the result is a 1, as shown in the example here.

Step 1: Determine the number of bits to use to calculate the network address.

Description Decimal Binary

IP Address 192.168.10.131 11000000.10101000.00001010.10000011


Subnet Mask 255.255.255.192 11111111.11111111.11111111.11000000
Network Address 192.168.10.128 11000000.10101000.00001010.10000000
In the example above, how many bits are used to calculate the network address?
______________

Step 2: Use the ANDing operation to determine the network address.


a. Enter the missing information into the table below:

Description Decimal Binary

IP Address 172.16.145.29
Subnet Mask 255.255.0.0
Network Address
b. Enter the missing information into the table below:

2
Description Decimal Binary

IP Address 192.168.10.10
Subnet Mask 255.255.255.0
Network Address

Part 3: Apply Network Address Calculations


Using command ipconfig to show the IP address of your computer and ask for IP address of your
friend’s computer.

What is IP address for your PC? _____________________________________________________

What is the network address for your PC? ______________________________________________

What is IP address for your friend’s PC? _______________________________________________

What is the network address for your friend’s PC? _______________________________________

Will these PCs be able to communicate directly with each other? ____________________________

What is the highest address that can be given to a PC that allows it to be on the same network as
your PC? _______________________________________________________________________

What is the default gateway address for your PC?________________________________________

Part 4: Identify IPv4 Addresses


Step 1: Analyze the table shown below and identify the network portion and host
portion of the given IPv4 addresses.
The first two rows show examples of how the table should be completed.
Key for table:
N = all 8 bits for an octet are in the network portion of the address
n = a bit in the network portion of the address
H = all 8 bits for an octet are in the host portion of the address
h = a bit in the host portion of the address

3
Network/Host
IP Address/Prefix N,n = Network, H,h = Host Subnet Mask Network Address

192.168.10.10/24 N.N.N.H 255.255.255.0 192.168.10.0


10.101.99.17/23 N.N.nnnnnnnh.H 255.255.254.0 10.101.98.0
209.165.200.227/27
172.31.45.252/24
10.1.8.200/26
172.16.117.77/20
10.1.1.101/25
209.165.202.140/27
192.168.28.45/28

Step 2: Analyze the table below and list the range of host and broadcast addresses
given a network/prefix mask pair.
The first row shows an example of how the table should be completed.

IP Address/Prefix First Host Address Last Host Address Broadcast Address

192.168.10.10/24 192.168.10.1 192.168.10.254 192.168.10.255


10.101.99.17/23
209.165.200.227/27
172.31.45.252/24
10.1.8.200/26
172.16.117.77/20
10.1.1.101/25
209.165.202.140/27
192.168.28.45/28

Part 5: Classify IPv4 Addresses


Step 1: Analyze the table shown below and identify the type of address (network,
host, multicast, or broadcast address).
The first row shows an example of how the table should be completed.

4
IP Address Subnet Mask Address Type

10.1.1.1 255.255.255.252 host


192.168.33.63 255.255.255.192
239.192.1.100 255.252.0.0
172.25.12.52 255.255.255.0
10.255.0.0 255.0.0.0
172.16.128.48 255.255.255.240
209.165.202.159 255.255.255.224
172.16.0.255 255.255.0.0

Step 2: Analyze the table shown below and identify the address as public or private.

IP Address/Prefix Public or Private

209.165.201.30/27
192.168.255.253/24
10.100.11.103/16
172.30.1.100/28
192.31.7.11/24

Step 3: Analyze the table shown below and identify whether the address/prefix pair
is a valid host address.

IP Address/Prefix Valid Host Address? Reason

127.1.0.10/24
172.16.255.0/16
241.19.10.100/24
192.168.0.254/24
192.31.7.255/24
64.102.255.255/14
224.0.0.5/16

Part 6: Use NMAP to identify the network (Bonus)


NMAP is a port-scanning tool. It is designed to scan the ports of a network host and determine
which ports are “open”. That is which ports have network services listening on them. Download
NMAP official page and install it on your machine, you might want to install ZENMAP too, it’s a

5
graphical tool bundled with NMAP. You need to refer to NMAP webpage documents for scanning
basics www.nmap.org.

Step 1: Identify the network address that your computer is connected (Part 3)

Step 2: Do a scan to determine all running hosts in your network.


Choosing the Profile Quick scan
How many hosts are running?
Please list all the IP addresses.

Step 3: Identify the operating system of all running host.


Using the command “nmap -O 192.168.1.0/24”.
List the Operating system corresponding to the IP address

IP address Operating system

Step 4: Identify the IP address of the default gateway. Find out what ports and
corresponding services are open on the default gateway?

Port Service

You might also like