0% found this document useful (0 votes)
55 views

Tutorial 4

This document discusses IP subnetting and DNS queries. It contains examples of calculating the maximum number of subnets and interfaces supported by different IP networks and subnet masks. It also describes the process a DNS server would go through to resolve the IP address of a domain name from another domain.

Uploaded by

s18k03z25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Tutorial 4

This document discusses IP subnetting and DNS queries. It contains examples of calculating the maximum number of subnets and interfaces supported by different IP networks and subnet masks. It also describes the process a DNS server would go through to resolve the IP address of a domain name from another domain.

Uploaded by

s18k03z25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

ENG 2003: INFORMATION TECHNOLOGY

Tutorial 4: IP Subnetting

1) Calculate the maximum number of subnets supported by the following


networks.
a. 192.168.1.0/26
b. 172.17.0.0/20

a) Number of subnet bits = 2, max. number of subnets = 22 -2= 2.


b) Number of subnet bits = 4, max. number of subnets = 24-2=14.

2) Continue from question 1, calculate the maximum number of interfaces


supported by each subnet.

a) Number of host bits = 32 – 26 = 6, max. number of supported


interfaces = 26 -2 = 62
b) Number of host bits = 32 – 20 = 12, max. number of supported
interfaces = 212 -2 = 4094

3) (a) Calculate the maximum number of interfaces that can be


accommodated in the IP network 68.0.0.0 (excluding all reserved IP
addresses).

This is a class A network, which can accommodate 224-2=16777214


interfaces

(b) Given the following IP networks.

For each of the networks, design a subnet mask to divide the network into
exactly 14 subnets of equal sizes. From your answer, calculate the number
of interfaces that can be accommodated in EACH of these subnets.
Hints: You should NOT use the all-zeros and all-ones subnets. All reserved
IP addresses should be excluded.

(i) 160.18.0.0

This is a class B network. It has a network ID of 16 bits long.


To divide the network into 14 equal-size subnets, a subnet ID
of 4 bits long is needed as 16-2=14.

Therefore, the subnet mask should be designed as follow


11111111 11111111 11110000 00000000 (255.255.240.0)

It has a host ID of 12 bits long. Therefore, each subnet can


accommodate 212-2=4094 interfaces.
(ii) 204.17.5.0

This is a class C network. It has a network ID of 24 bits long.


To divide the network into 14 equal-size subnets, a subnet ID
of 4 bits long is needed as 16-2=14.

Therefore, the subnet mask should be designed as follow


11111111 11111111 11111111 11110000 (255.255.255.240)

It has a host ID of 4 bits long. Therefore, each subnet can


accommodate 16-2=14 interfaces.

(c) Consider a router with the following routing table.

Destination IP Address Range Interface

From 10100000 00000000 00000000 00000000


To 10100000 00111111 11111111 11111111 0

From 10100000 01000000 00000000 00000000


To 10100000 01000000 11111111 11111111 1

From 10100000 01000001 00000000 00000000


To 10100001 01111111 11111111 11111111 2

Otherwise 3

Suppose the following packets have arrived at the router, which


interfaces will the packets be forwarded? Justify your answers.
(i) Packet A with a destination IP address 160.32.65.1

Packet A will be forwarded to interface 0, since


160.32.65.1 is in between 160.0.0.0 and
160.63.255.255.

(ii) Packet B with a destination IP address 161.130.0.5

Packet B will be forwarded to interface 3, since


161.130.0.5 is not covered by the other ranges.
(d) Consider the following scenario.

A client from eng2003.com is looking for the IP address of www.pear.hk.


Describe the corresponding DNS query process.

1) The client consults the DNS server of eng2003.com for the IP


address of www.pear.hk.

2) DNS server of eng2003.com does not have the information. It then


consults the DNS server of .hk for the IP of the DNS server of pear.hk
on behalf of the client.

3) DNS server of .hk returns the IP address of the DNS server of


pear.hk. to the DNS server of eng2003.com.

4) DNS server of eng2003.com consults the DNS server of pear.hk for


the IP of www.pear.hk on behalf of the client.

5) DNS server of pear.hk returns the IP of www.pear.hk to DNS


server of eng2003.com.

6) DNS server of eng2003.com returns the IP address of


www.pear.hk to the client.
4) Give the subnet mask for dividing Network 158.132.0.0 into 30 equal-size
subnets (excluding the all-one and all-zero subnets).

158.132.0.0 is a class B network.

Let n be the number of bits required to represent 30 subnets, we can obtain

2n-2 = 30

n=5

Therefore, the subnet mask should be 255.255.248.0/21

You might also like