Você está na página 1de 9

Prepared by Farah Hossain

North South University


CSE 338 L: Data
Communication & Network Lab
Lab Class 6: Cisco Packet Tracer Subnet and Routers
_____________________________________________________________________________________

IP Address Classes
A classful network is a network addressing architecture used in the Internet from 1981 until
the introduction of Classless Inter-Domain Routing in 1993. The method divides the address
space for Internet Protocol Version 4 (IPv4) into five address classes by address range. All IP
addresses are placed in a particular class based on the decimal values of their first octets. In
the first octet, an IP address can start with a decimal value between 1 and 255.

Size of
Total
Class Leading network Size of rest Number Addresses addresses Start End address
bits number bit field of networks per network in class address
bit field

7
Class A 0 8 24 2 224 231 0.0.0.0 127.255.255.255

Class B 10 16 16 214 216 230 128.0.0.0 191.255.255.255


8
Class C 110 24 8 221 2 229 192.0.0.0 223.255.255.255
Class D not
(multicast) 1110 defined not defined not defined not defined 228 224.0.0.0 239.255.255.255

Class E not
(reserved) 1111 defined not defined not defined not defined 228 240.0.0.0 255.255.255.255

Classless Inter-Domain Routing


Classless Inter-Domain Routing (CIDR) is a method for allocating IP addresses and IP
routing.
IP addresses are described as consisting of two groups of bits in the address: the most significant bits
are the network address (or network prefix or network block), which identifies a whole network or subnet,
and the least significant set forms the host identifier, which specifies a particular interface of a host on
Prepared by Farah Hossain

that network. This division is used as the basis of traffic routing between IP networks and for
address allocation policies. Classful network design for IPv4 sized the network address as one or
more 8-bit groups, resulting in the blocks of Class A, B, or C addresses. Classless Inter-Domain
Routing allocates address space to Internet service providers and end users on any address bit
boundary, instead of on 8-bit segments. In IPv6, however, the interface identifier has a fixed size of
64 bits by convention, and smaller subnets are never allocated to end users.

Subnet Mask
A subnetwork or subnet is a logical subdivision of an IP network. The practice of dividing a
network into two or more networks is called subnetting.
Example:

Here network prefix 12.34.158 and host address is 5. Furthermore corresponding network has a subnet
mask 255.255.255.0 therefor this network can have IP addresses from 12.34.158.0 - 12.34.158.255. As
the subnet mas is of 24 bit any particular IP in this network can also be written as 12.34.158.XXX / 24.
To get the host address the logical AND operation is performed on IP address with subnet mask.

Exercise 1: Experiment with subnet


 Step 1: Make the physical connection

  Step 2: Use DHCP server to configure 2 networks


 Step 3: Connect the 2 switches for 2 sub network and use PDU tool to verify if they
are under same network or not.
 Step 4: Change one of the DCHP server to have the same network prefix and verify
if they are under same network or not.
Prepared by Farah Hossain

Routing:
A router is a networking device that forwards data packets between computer networks.
Routers perform the traffic directing functions on the Internet. A data packet is typically
forwarded from one router to another through the networks that constitute the internetwork
until it reaches its destination node.

Gateways:
In telecommunications, the term gateway refers to a piece of networking hardware that
has the following meaning:

 In a communications network, a network node equipped for interfacing with another


network that uses different protocols.
 A gateway may contain devices such as protocol translators, impedance matching
devices, rate converters, fault isolators, or signal translators as necessary to provide
system interoperability. It also requires the establishment of mutually acceptable
 administrative procedures between both networks.
 A protocol translation/mapping gateway interconnects networks with different network
protocol technologies by performing the required protocol conversions.
 Loosely, a computer or computer program configured to perform the tasks of a
gateway. For a specific case, see default gateway.

Exercise 2: Connecting two networks with a router
 Step 1: Make the physical connection like the below figure.

 Step 2: Configure the DHCP so that it assigns IPs to end devices leaving 2 IPs at
the beginning subnetwork IP block.
  Step 3: Configure the DHCP server to setup gateway IP
 Step 4: Configure Router’s 2 First Ethernet IP address same as the respective
subnetwork’s default gateway.
  Step 5: Turn on First Ethernet ports of router
 Step 6: Use PDU too to verify connection between to two subnetworks

Exercise 3: Connect two routers using serial connection and


configure a static routing table.
 Step 1: Add the necessary component “HWIC-2T interface card” in the router
for serial connection.
Prepared by Farah Hossain

 Step 2: Make the physical connection like the below figure.










  Step 3: Configure the 2 routers to have their neighboring device’s IP
  Step 4: Turn on all the used ports of routers
  Step 5: Add rules in the routing table
 Step 6: Use PDU to verify network


Exercise 4: Use CLI to configure routers and connect them
over Serial network.
  Step 1: Make a similar psychical configuration like exercise 3.
 Step 2: Configure 2 PCs like the exercise 3

  Step 3: Write the below command in router to configure them

In Router 1

//Interface Fastethernet0/0 [in global configuration mode]

Router>en
Router#conf t // configure terminal
Router(config)#hostname R1
R1(config)#interface fastethernet 0/0 [or, int f0/0]
R1(config-if)#ip address 10.0.0.1 255.0.0.0 [or, ip add 10.0.0.1 255.0.0.0]
R1(config-if)#no shutdown
R1(config-if)#exit

//Interface Serial 2/0


R1(config)#interface serial 2/0 […]
R1(config-if)#ip address 20.0.0.1 255.0.0.0 […]
R1(config-if)#clock rate 64000
R1(config-if)#encapsulation ppp
R1(config-if)#no shutdown
R1(config-if)#exit

In Router 2

//Interface Fastethernet 0/0

Router>en
Router#conf t
Router(config)#hostname R2
R2(config)#interface fastethernet 0/0 [….]
R2(config-if)#ip address 30.0.0.1 255.0.0.0 [….]
R2(config-if)#no shutdown
R2(config-if)#exit
Prepared by Farah Hossain

//Interface Serial 2/0


R2(config)#interface serial 2/0
R2(config-if)#ip address 20.0.0.2 255.0.0.0
R2(config-if)#encapsulation ppp
R2(config-if)#no shutdown
R2(config-if)#exit

 Step 4: Write the below command in routers to configure routing table

In Router R1
R1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2 //for static routing

OR,

R1(config)#router rip
R1(config)#network 10.0.0.0 //for RIP
router-config R1(config)#network 20.0.0.0
same R1(config)#exit
same
In Router R2
R2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1 //for static routing

OR,

R2(config)#router rip
same
R2(config)#network 20.0.0.0 //for RIP
R2(config)#network 30.0.0.0
same
R2(config)#exit
same

Step 5: Use PDU to verify the network

Exercise 5: Connect two networks over Fiber Optic Cable


 Step 1: Add “NM-1FE-FX” interface in the router and make the physical
connection like the below figure.

  Step 2: Configure DHCP server to create 2 separate network


  Step 3: Configure the 2 routers to have their neighboring device’s IP
  Step 4: Configure routing table of two routers
Prepared by Farah Hossain

  Step 5: Turn on all the used ports of the routers.


 Step 6: Use PDU to verify the network connection.

Lab Tasks:
 Complete all 5 exercise

Home task:
1. Write the CLI instructions to configure the two routers in exercise 3. Let’s assume left
and right network of the two routers has network prefixes respectively “192.168.1.0/8” 12.34.155.0/24
and “192.168.2.0/8”. 12.34.157.0/24
2. Suppose, an IP address is “192.168.1.0”. Subnet this in such a way that exactly 4 192.168.1.2/24
hosts are needed; no more, no less. What should be the subnet mask?

Reading References:
1. https://en.wikipedia.org/wiki/Subnetwork
2. https://en.wikipedia.org/wiki/Router_(computing)
3. https://en.wikipedia.org/wiki/Gateway_(telecommunications)
Prepared by Farah Hossain
Prepared by Farah Hossain
Prepared by Farah Hossain

Você também pode gostar