0% found this document useful (0 votes)
15 views127 pages

#Network Manual - Eng Elham

Uploaded by

m777880808
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)
15 views127 pages

#Network Manual - Eng Elham

Uploaded by

m777880808
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/ 127

Contents

LAB 1 Introduction ............................................ 6


1.1 Cabling .......................................................................................... 6
1.2 Addressing .................................................................................. 6
1.3 Subnetting and VLSM ............................................................... 6
1.4 Basic Configurations .................................................................. 6
1.5 Switching ..................................................................................... 7
1.6 Static Routing ............................................................................ 7
1.7 Dynamic Routing ......................................................................... 7
1.8 Servers and Protocols ............................................................... 7
1.9 Designing a Network ................................................................. 7
1.10 Instructions .............................................................................. 7
LAB 2 Cabling .................................................. 9
2.1 Transmission Media ................................................................... 9
2.2 Colors ......................................................................................... 10
2.3 Types of Cabling ...................................................................... 11
Exercises ......................................................................................... 13
LAB 3 Addressing ........................................... 14
3.1 MAC (Media Access Control) Address ................................ 14
3.2 IP (Internet Protocol) ............................................................ 15
3.3 IP Addressing .......................................................................... 16
3.3.1 Class A.................................................................................. 17
3.3.2 Class B ................................................................................. 21
3.3.3 Class C ................................................................................. 24
3.4 Private IP Addresses ............................................................. 27
3.5 Broadcast Address ................................................................. 27
3.6 Issue to Solve .......................................................................... 28
Exercises ......................................................................................... 29
LAB 4 Subnetting and VLSM ............................... 31
4.1 Basics ......................................................................................... 31
4.2 Subnetting Class C Addresses ............................................. 34
4.3 Subnetting Class B Addresses ............................................. 41
4.4 Subnetting Class A Addresses ............................................. 43
4.5 Variable Length Subnet Masks (VLSMs) ............................ 44
Exercises ......................................................................................... 50
LAB 5 Basic Configurations ................................. 55
5.1 Router Interfaces ................................................................... 55
5.2 Implementing a Topology Using Packet Tracer................. 56
5.2.1 Some of Router Modes ..................................................... 58
5.2.2 Explain The Configurations ............................................. 60
5.2.3 Verification Commands .................................................... 62
5.3 What Will Happen If?! ........................................................... 63
Exercises ......................................................................................... 64
LAB 6 Switching ............................................. 66
6.1 Configuring VLANs .................................................................. 67
6.2 Routing between VLANs ........................................................ 71
6.3 Verification Commands .......................................................... 73
6.4 Issue to Solve ......................................................................... 75
LAB 7 Static Routing ....................................... 77
7.1 Pros and Cons of Static Routing ........................................... 78
7.2 WAN Components ................................................................... 78
7.3 The Scenario ............................................................................ 80
7.3.1 Explain The Configurations .............................................. 81
7.3.2 Verification Commands .................................................... 84
7.4 What Will Happen If?! ........................................................... 85
Exercises ......................................................................................... 87
LAB 8 Dynamic Routing ..................................... 89
8.1 Pros and Cons of Dynamic Routing........................................ 89
8.2 The Configurations ................................................................. 90
8.2.1 RIP (Routing Information Protocol) ............................... 90
8.2.2 EIGRP (Enhanced Interior Gateway Routing Protocol)
........................................................................................................ 95
8.2.3 OSPF (Open Shortest Path First) ............................... 100
Exercises ....................................................................................... 106
LAB 9 Servers and Protocols .............................. 107
9.1 HTTP (Hypertext Transfer Protocol) .............................................. 109
9.2 DNS (Domain Name Service)............................................................. 110
9.3 DHCP (Dynamic Host Configuration Protocol) ................................ 110
9.4 Email ....................................................................................................... 111
9.5 TFTP (Trivial File Transfer Protocol) .............................................. 112
9.5.1 Backing Up and Restoring Cisco IOS ......................................... 113
9.5.2 Backing Up and Restoring the Router Configurations ............ 115
9.6 Servers Testing ................................................................................... 117
9.7 Making a Router Works as DHCP Server ........................................ 119
9.7.1 What Will Happen If?!.................................................................. 119
9.7.2 Router as DHCP Server ................................................................ 119
9.8 Telnet ..................................................................................................... 121
9.8.1 Telnet Configurations ................................................................... 122
9.9 Useful Command ................................................................................... 123
Conclusion ............................................................ 124
References .......................................................... 124
LAB 1 Introduction

Objective:
- A quick view about what we will learn in network lab.

Years ago, sharing information was not something easy to do. It needs effort, time
and money. But these days the situation is completely changed. A huge data every
millisecond travels around the world in easy and fast way.
Date communications are the transfer of data from one device to another via
some form of transmission medium.
During this course you will learn some basic concepts about network.

1.1 Cabling
It will be a good chance to recognize cable colors and types of cables.

1.2 Addressing
Well information will be get about MAC address and IP address. Also getting
familiar with network classes.

1.3 Subnetting and VLSM


Practicing is our way to understand how to divide a network into sub networks
and use IP addresses efficiently.

1.4 Basic Configurations


You will be familiar with packet tracer simulation. Some basic commands will be
good starting to deal with this program.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 6


Lab 1 Introduction Network Manual

1.5 Switching
You will be able to learn how to create VLANs and make connectivity between
them something possible.

1.6 Static Routing


To communicate with other remote networks static routing will be used to add
these networks to the router table.

1.7 Dynamic Routing


The configurations that you will learn continue growing up because you will be
able to use dynamic routing using RIP v1, RIP v2, EIGRP and OSPF protocols.

1.8 Servers and Protocols


Getting knowledge about some services that can be provide by using HTTP, DNS,
DHCP, Email, TFTP and Telnet will be a great thing.

1.9 Designing a Network


All information that is collected during labs will be your feedback in designing a
network in practical life.
I like to show you our journey in this course how it looks like in the figure (1.1).

1.10 Instructions
I want you to follow some instructions during studying this lab:
1- Every work that you do in labs must be saved and always bring it with you in
lab times.
2- You will practice using this manual so, be sure to be with you all the time.
3- Ask about anything that you don’t understand before you be asked at the
final exam.
4- Any duties you asked for must be prepared before deadline.

I wish you nice labs with a lot of fun.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 7


Lab 1 Introduction Network Manual

- Cabling.
- Addressing.
- Subnetting and VLSM.

- Basic configurations.
- Switching.
- Static routing.
- Dynamic routing.
- Servers and protocols.

you are halfway there.


- Designing a network.

Believe you can and

Figure (1.1) Our journey

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 8


LAB 2 Cabling

Objectives:
- Recognize transmission media kinds.
- Get familiar with colors standards.
- Understand cabling types and when can use them.

2.1 Transmission Media


To connect two devices A and B we need transmission media.
But what kind of transmission media in telecommunication do we have?
1- Guided (wired) like twisted-par, coaxial cable and fiber-optic cable.
2- Unguided (wireless) like radio wave, microwave and infrared.

B
A
Transmission media

Guided (wired) Unguided (wireless)

Twisted-pair Radio waves

Coaxial cable Microwaves

Fiber-optic cable Infrared


Figure (2.1) Transmission media

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 9


Lab 2 Cabling Network Manual

We will use twisted-pair cable to connect A and B devices. We have to mention that
there are two types of twisted-pair cable:
1- Unshielded twisted-pair (UTP).
2- Shielded twisted-pair (STP).

UTP is the one that will be used in our lab.

2.2 Colors
In UTP cable there are eight wires with different colors. The following figure
shows the two standards of colors.

Figure (2.2) Colors standards

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 10


Lab 2 Cabling Network Manual

2.3 Types of Cabling


1- Straight Through cabling.

2- Cross over cabling.

3- Rolled over cabling.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 11


Lab 2 Cabling Network Manual

When do we use every one of these cabling types?!

Now, we are ready to make our cables.


Materials needed:
1- Category 5 (UTP) cable (you can read more about categories of UTP cable).

If it is important to you, you will find a way. If not, you will find an excuse.
2- Two RJ-45 connectors.
3- Crimping tool.
4- Cable tester.

This is very simple information about cabling. If you need to know more you have
to read more.
After making our cables and connecting A and B devices can we say that A and B
can communicate with each other?!
The answer not yet, A and B are connected with each other but not
communicate. To share information between these two devices we need to set
up IP addresses for A and B, so what is the IP address? This is what we will know
in the next lab.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 12


Exercises

2.1 Fill the following table with the suitable cable.


Device Cable Device
-------------------------------
Switch Router
-------------------------------
-------------------------------
PC PC
-------------------------------
-------------------------------
Hub Switch
-------------------------------
-------------------------------
PC Hub
-------------------------------
-------------------------------
PC Router
-------------------------------

2.2 Mention the cables that used in the topology.

Console
port

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 13


LAB 3 Addressing

Objectives:
- Understand the MAC address and IP address.
- Get familiar with network classes.
- Understand Distinguish between network, broadcast and host
addresses.
-
In the OSI (Open Systems Interconnection) model 7 layers. Physical address is
added in Data link layer (layer2) while logical address is added in Network layer
(layer 3) as shown in figure (3.1).

IP address Application Layer Layer 7


(IPv4 – 32- bit address) Presentation Layer Layer 6
(IPv6 – 128- bit address) Session Layer Layer 5
Transport Layer Layer 4
Network Layer Layer 3
MAC address Data Link Layer Layer 2
(48 bit address) Physical Layer Layer 1

Figure (3.1) OSI model

3.1 MAC (Media Access Control) Address


Ethernet at the Data Link layer is responsible for Ethernet addressing or MAC
addressing. Here some information about MAC address:
- It is called hardware address or physical address.
- MAC address burned into each and every Ethernet network interface card
(NIC).

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 14


Lab 3 Addressing Network Manual

- It is a 48 bits (6 bytes) address written in a hexadecimal format and usually


written in one of the following formats:
07:01:02:01:2C:4B or 07-01-02-01-0C-4B
- The 48 bits are divided into two parts. The high-order (24 bits or 3 bytes) for
the Organizationally Unique Identifier (OUI) and the lower-order (24 bits or
3 bytes) for vendor.
- MAC is a unique address.

48 bits

Organizationally Unique Identifier


(OUI) Vendor Assigned
(Assigned by IEEE)

24 bits 24 bits

Figure (3.2) MAC address

You can see your MAC address on your windows machine using ipconfig/all
command.

3.2 IP (Internet Protocol)


Internet protocol is one of the major protocols in the TCP/IP protocols suite. This
protocol works at the network layer of OSI model and at the Internet layer of the
TCP/IP model. Thus this protocol has the responsibility of identifying hosts based
upon their logical addresses and to route data among them over the network.

Depending on the version of IP addressing being used, the IP address can be 32


bits long (IPv4) or 128 bits long (IPv6).
Table (3.1) shows the major differences between IPv4 and IPv6.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 15


Lab 3 Addressing Network Manual

Internet Protocol Version 4 Internet Protocol Version 6


(IPv4) (IPv6)
Deployed 1981 1999
Address
32 bits number 128 bits number
Size
Hexadecimal Notation:
Address Dotted Decimal Notation:
3FFE:F200:0234:AB00:0123:4567
Format 192.149.252.76
:8901:ABCD
Prefix 3FFE:F200:0234:AB00:0123:4567
192.149.0.0 / 24
Notation :8901:ABCD / 48
Number 2128 =~
of 232 = ~ 4294967296 34028236692093846346337460
Addresses 7431768211456
Table (3.1) IPv4 VS IPv6

3.3 IP Addressing
An IP address version 4 consists of 32 bits of information. These bits are divided
into four sections, referred to as octets or bytes, each containing one byte (8 bits).

172.16.30.56 is an example for 32 bit IP address (IPv4).


172 . 16 . 30 . 56

Octet Octets are separated by dots

Read about ARP and RARP

What you have to know that every IP address has two portions:
1- Network portion.
2- Host portion.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 16


Lab 3 Addressing Network Manual

The designers of the Internet decided to create classes of networks based on


network size. There are five classes A, B, C, D and E. The first octet in the IP address
will determine the class of the network as in table (3.2)
Class First octet in the IP address
Class A 0 through 127
Class B 128 through 191
Class C 192 through 223
Class D 224 through 239
Class E 240 through 255
Table (3.2) Network address range
Class D is used for multicast address. Class E is used for scientific purposes. We
will not going into these types of addresses. Our focusing will be on class A, B and
C.

3.3.1 Class A

IP address in class 10 . 128 . 11 . 253


A
8 bits 8 bits 8 bits 8 bits
Network Host Host Host

Network Host portion


portion
Figure (3.3) Class A

The designers of the IP address scheme said that the first bit of the first
byte in class A network address must always be off, or 0. This means class A
address must be between 0 and 127 in the first byte.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 17


Lab 3 Addressing Network Manual

0XXXXXXX
0 00000000 Reserved to designate the
1 00000001 default route
2 00000010
Class A . . Used for network
(0 through 127) . . addresses in class A
. .
126 01111110
127 01111111 Reserved for diagnostics

First bit must be 0

Figure (3.4) Class A: network address range

How many networks do we have in class A?


In class A network portion is 8 bits long and as we said the first bit must be
zero, so 7 bits are remaining. Every bit of these 7 bits can be (1) or (0)
therefore 27 = 128
But as we see in figure (3.4) the network address of all 0s (0000 0000) is
reserved to designate the default route. Additionally, the address 127, which
is reserved for diagnostics, can’t be used either, which means that you can
usually only use the number 1 to 126 to designate class A network address.
This means the actual number of usable class A network address is:

28-1 - 2 = 27 – 2 = 128 – 2 = 126 network addresses

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 18


Lab 3 Addressing Network Manual

How many host addresses do we have in class A?


Each address in class A has 3 bytes (24-bit positions) for the node address of
a machine. This means there are 224 = 16777216 unique node address for each class
A network. Because the node addresses with the two patterns 0s all 0s and all 1s
are reserved. The actual maximum usable number of nodes for class A network is:

224- 2 = 16777216 - 2 = 16777214 host addresses

Network Broadcast
address address

To make it more clear consider that we have this network:

10.0.0.0 Network IP address


10.0.0.1
10.0.0.2
………….. These IP addresses are
………….. valid for hosts
10.255.255.254
10.255.255.255 Broadcast IP address

(10.0.0.0) and (10.255.255.255) cannot be used for hosts. We will mention what
is the meaning of broadcast later.
Let us take an example. We have this topology, how many networks do we have?

device E
11.0.0.1

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 19


Lab 3 Addressing Network Manual

The answer
In class A we will check the first octet to know how many networks are there.

device E
11.0.0.1

Network address:
Network address: Network address: 113.0.0.0
10.0.0.0 11.0.0.0 A: 113.0.19.255
B: 10.4.1.0 E: 11.0.0.1 F: 113.0.19.244
C: 10.0.1.0
D:10.2.1.3

We have three networks (113.0.0.0/ 10.0.0.0 / 11.0.0.0). All of them from class A
because (113/ 10/ 11) are in the range (0 – 127).
Note that I cannot use for example 113.0.0.0 or 113.255.255.255 as an IP address
for device A or F (Not allowed), also A and f cannot take the same IP address
because they are in the same network.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 20


Lab 3 Addressing Network Manual

3.3.2 Class B

IP address in class B 172 . 16 . 1 . 117

8 bits 8 bits 8 bits 8 bits


Network Network Host Host

Network portion Host portion

Figure (3.5) Class B

In class B network, the first bit of the first byte must always be turned on, but the
second bit must always be turned off.

10XXXXXX
128 10000000
129 10000001
130 10000010
Class B . . Used for network
(128 through 191) . . addresses in class B
. .
190 10111110
191 10111111

Always must be (1 0)

Figure (3.6) Class B: network address range

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 21


Lab 3 Addressing Network Manual

How many networks do we have in class B?


In class B network address, the first 2 bytes (16 bits) are assigned to the network
address; there would be 216 unique combinations. But because all class B network
addresses should start with the binary digit 1, then 0. This leaves 14 bit positions to
manipulate, therefore:

216 - 2 = 214 = 16384 network addresses

How many host addresses do we have in class B?


Class B address uses 2 bytes (16 bits) for node addresses, so 216 minus the two
reserved patterns (all 0s and all 1s).

216- 2 = 65536 - 2 = 65534 host addresses

Network Broadcast
address address

If we have the following network:

172.18.0.0 Network IP address


172.18.0.1
172.18.0.2
………….. These IP addresses are
………….. valid for hosts
172.18.255.254
172.18.255.255 Broadcast IP address

As in class A here (172.18.0.0 and 172.18.255.255) can’t be used as host


addresses.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 22


Lab 3 Addressing Network Manual

Example: Guess how many networks in this topology.

device A
172.20.17.1 device F
172.20.1.1

device B device C device E


device D
190.3.1.1 190.4.1.1 188.4.3.0
188.4.3.3

The answer
Remember that in class B you need to see the first two octets to know the networks.

device A device F
172.20.17.1 172.20.1.1

device B device C device E


190.3.1.1 device D 188.4.3.0
190.4.1.1
188.4.3.3

Network address:
Network address: Network address: 172.20.0.0
190.3.0.0 188.4.0.0 A: 172.20.17.1
B: 190.3.1.1 D: 188.4.3.3 F: 172.20.1.1
E: 188.4.3.0

Network address:
190.4.0.0
C: 190.4.1.1

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 23


Lab 3 Addressing Network Manual

You have 4 networks (190.3.0.0/ 190.4.0.0/ 188.4.0.0/ 172.20.0.0). First octet of


these networks which are (172/ 188/ 190) in the range (128 through 191), so these
are class B networks.

3.3.3 Class C

IP address in class C 192 . 168 . 1 . 70

8 bits 8 bits 8 bits 8 bits


Network Network Network Host

Network portion Host portion

Figure (3.7) Class C


For class C networks the first 2 bits of the first octet is turned on, but the third bit
is turned off. In figure (3.8) we will explain the range of network address as we did
in the previous classes.

110XXXXX
192 11000000
193 11000001
194 11000010
Class C . . Used for network
(192 through 223) . . addresses in class C
. .
222 11011110
223 11011111

Always must be (11 0)


Figure (3.8) Class C: network address range

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 24


Lab 3 Addressing Network Manual

How many networks do we have in class C?


As we learned that network portion of the address takes the first 3 bytes (24 bits)
of class C. The first three bit positions are always (110) so, the calculation will be:

224 - 3 = 221 = 2097152 network addresses

How many host addresses do we have in class C?


(8 bits) are remaining for node address and the same way of calculation in class A
and B 28 will minus the two reserved patterns of all 0s and all 1s.

28 - 2 = 256 - 2 = 254 host addresses

Network Broadcast
address address

Here an example for network in class C


192.168.11.0 Network IP address
192.168.11.1
192.168.11.2
………….. These IP addresses are
………….. valid for hosts
192.168.11.254
192.168.11.255 Broadcast IP address

Example: Using the same way in the two previous examples can you guess how
many networks here.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 25


Lab 3 Addressing Network Manual

device A device F
192.168.3.7 222.1.6.6

device B device C device E


200.5.0.1 200.5.1.1 device D
192.168.3.12
192.168.3.251
The answer
To answer correctly you have to focus on the first three octets in the IP address.

device A device F
192.168.3.7 222.1.6.6

device B device E
device C
200.5.0.1 device D 192.168.3.12
200.5.1.1
192.168.3.251

Network address:
Network address: Network address: 222.1.6.0
200.5.0.0 192.168.3.0 F: 222.1.6.6
B: 200.5.0.1 A: 192.168.3.7
D: 192.168.3.251
E: 192.168.3.12
Network address:
200.5.1.0
C: 200.5.1.1

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 26


Lab 3 Addressing Network Manual

There are 4 networks (192.168.3.0/ 200.5.0.0/ 200.5.1.0/ 192.168.3.0). To know


that we are in class C networks see first octet (192/ 200 / 222). They still in the
range (192 through 223).

3.4 Private IP Addresses


The people who created the IP addressing scheme also created what we call
private IP addresses. These addresses can be used on a private network, but they
are not routable through the Internet.

Class Private IP addresses


Class A 10.0.0.0 through 10.255.255.255
Class B 172.16.0.0 through 172.31.255.255
Class C 192.168.0.0 through 192.168.255.255

Table (3.3) Private IP addresses

All other IP addresses are public IP addresses.

- Why we need private IP addresses?!


- What is NAT (Network Address Translation)?!
- How we can setup the IP address in our devices?!

3.5 Broadcast Address


During the previous topics we mentioned the term “broadcast” a lot of times.
Now is the time to know what is it?
We have these 3 terms:
Broadcast: This sends form one device to all other devices that connected with
(one to all).
Multicast: This sends form one device to many devices that connected with (one
to many).

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 27


Lab 3 Addressing Network Manual

Unicast: This sends form one device to another device that connected with (one
to one).

3.6 Issue to Solve


At the end of this lab let us to imagine that we have two departments (H.R and
IT). In IT department there are 2 employees while 4 employees are in H.R
department. We need every department in separate network.

H.R 1 IT 2
192.168.1.1 192.168.12.2

Do your best today. Time is point of no return.


H.R 2 H.R 3 IT 1
192.168.1.2 192.168.1.3 H.R 4
192.168.12.1
192.168.1.4

IT Department
H.R Department Network
Network 192.168.12.0
192.168.1.0

Figure (3.9) H.R and IT Departments

In network 192.168.1.0 we used 4 addresses and lost 250 addresses without


benefit. The same thing in IT department we lost 252 addresses. Losing IP addresses
without use them is a big problem.
“Subnetting and VLSM” are the solution, so we are going to discuss them in the
next lab.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 28


Exercises

3.1 Write the IP addresses in the table:

192.11.0.3 - 13.7.0.1 - 15.15.15.15 - 143.1.1.0


201.7.3.13 - 100.5.50.1 - 223.9.8.14 - 192.1.1.1

Class A Class B Class C

3.2 Divide the following IP addresses according to their networks.

11.3.7.7 - 18.1.1.7 - 105.3.7.14 - 133.100.1.3


18.100.0.0 - 133.10.2.1 - 192.5.1.1 - 192.5.1.100
133.100.2.2 - 192.5.1.3 - 11.0.0.8 - 133.100.7.1

For example:
11.3.7.7 and 11.0.0.8 are IP addresses in the same network (11.0.0.0).

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 29


Lab 3 Exercises Network Manual

3.3 Fill the following table by these IP addresses:

99.0.3.0 - 205.13.0.0 - 192.168.1.255 - 172.1.1.0


33.1.0.0 - 200.10.0.7 - 223.254.255.255 - 11.255.255.255
124.2.255.254 - 100.0.0.0 - 14.255.254.255 - 10.30.7.0
70.0.0.0 - 192.1.10.0 - 172.5.255.255 - 5.1.1.4

Network IP Address Broadcast IP Address Host IP Address

3.4 The following network is made to make all devices connected with each
other, but it doesn’t happen. Discover where the problems are and correct
them.

A
H
192.168.1.7
192.168.1.0

B G
192.168.2.4 192.168.1.8

C D E F
192.168.1.225 192.168.1.7 192.168.1.200 192.168.1.100

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 30


LAB 4 Subnetting and VLSM

Objectives:
- Understand the IP subnetting.
- Learn how to design and implement simple VLSM networks.

Subnetting takes one larger network and breaks it into a bunch of smaller
networks (called subnets). Let’s start this lab.

4.1 Basics
If we have this IP address

192.168.7.9 / 24
or
192.168.7.9 255.255.255.0

1- This IP is class C IP address because first octet is (192).


2- It is a node (host) IP address.
3- The network address will be 192.168.7.0.
4- The broadcast address will be 192.168.7.255.

But, what are the meaning of /24 and 255.255.255.0?


Well, class C as we know contains 3 octets for network and one octet for node so;
the default subnet mask is 255.255.255.0
For the subnet address scheme to work, every machine on the network must
know which part of the host address will be used as the subnet address. This is
accomplished by assigning a subnet mask to each machine.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 31


Lab 4 Subnetting and VLSM Network Manual

A subnet mask is a 32-bit value that allows the recipient of IP packets to


distinguish the network ID portion of the IP address form the host ID portion of the
IP address.
The network administrator creates a 32-bit subnet mask composed of 1s and 0s.
The 1s in the subnet mask represent the positions that refer to the network or
subnet addresses.

Class C: Network . Network . Network . Node


11111111 . 11111111 . 11111111 . 00000000

27+26+25+24+23+22+21+20 =128+64+32+16+8+4+2+1 = 255


So,
The subnet mask is 255 .255 . 255 .0

The same way for class A and B. The default subnet mask in the following table:
Class Format Default Subnet Mask Slash Notation
A Network.Node.Node.Node 255.0.0.0 /8
B Network.Network.Node.Node 255.255.0.0 /16
C Network.Network.Network.Node 255.255.255.0 /24
Table (4.1) Default Subnet Mask

/24 is classless Inter-Domain Routing (CIDR) value. When we have address like
this: 192.168.7.9/24. This is telling us what our subnet mask is. The slash notation
(/) means how many bits are turned on (1s). Here 24 bits are turned on.
To ensure that you get it, let us have these 3 addresses:
1- 192.168.10.15/28
2- 150.14.1.3/21
3- 11.200.4.2/15

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 32


Lab 4 Subnetting and VLSM Network Manual

192.168.10.15/28
Class C
IP address
The default slash notation (CIDR) is /24, so there is increment by 4 bits.
By representing it in binary.
11111111 . 11111111 . 11111111 . 11110000

24 + 4 = / 28

27+26+25+24=128+64+32+16= 240

The subnet mask is 255 .255 . 255 .240

150.14.1.3/21
Class B
IP address
The default slash notation (CIDR) is /16, so there is increment by 5 bits.
By representing it in binary.
11111111
11111111 .. 11111111
11111111 .. 11111000
11111000 .. 00000000
00000000

16 + 5 = / 21

So,
27+26+25+24+23=128+64+32+16+8= 248
The subnet mask is 255 .255 . 248 .0
The subnet mask is 255 .255 . 248 .0

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 33


Lab 4 Subnetting and VLSM Network Manual

By using the same way of the previous addresses. The subnet mask of 11.20.4.2 /
15 is 255.254.0.0

A byte is 8 bits and there are 4 bytes in the IP address (4 x 8 = 32). However,
the largest subnet mask available can only be a /30.
Why?

4.2 Subnetting Class C Addresses


In a class C address, only 8 bits are available for defining the hosts. The idea is
we will take the bits that we need from host portion and add it to network
portion like this:

11111111 . 11111111 . 11111111 . 00000000

Network portion 24 bits Turned on the bits


that we will take

Binary Decimal CIDR


00000000 0 /24
10000000 128 /25
11000000 192 /26 Note:
11100000 224 /27 Remember that subnet
11110000 240 /28 bits start at the left and
11111000 248 /29 go to the right.
11111100 252 /30

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 34


Lab 4 Subnetting and VLSM Network Manual

The following examples will give use a good understanding about subnetting in
class C.

Example 1:
If a host on a network has the address 195.18.3.7/28, what is the network
that this host belongs to then determine the broadcast address, first host address
and last one in this network.

Solution:
1-Network address:
We have 195.18.3.7, so the binary representation of it is:
11000011.00010010.00000011.00000111
To find the network address we have to set the rightmost [32 – n] bits to zeros.
Where n is CIDR value or slash notation or prefix notation.

32 – 28 = 4 bits

Because the IP address is 32

195.18.3.7  11000011.00010010.00000011.00000111 Change


it to
11000011.00010010.00000011.00000000 zeros

This is the network address and the representation of it in decimal is:


195.18.3.0

Another way to find the network address by using AND. We will add the given
address with the subnet mask using AND. If the two bits are (1s) the result will be
1, else the result will be zero.
The slash notation here is /28, so 28 bits will be turned on to get the mask.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 35


Lab 4 Subnetting and VLSM Network Manual

Given Address  11000011.00010010.00000011.00000111


AND
Subnet Mask  11111111.11111111.11111111.11110000
Network Address  11000011.00010010.00000011.00000000

Network address in decimal is: 195.18.3.0


2-Broadcast address:
We will set the rightmost [32 – n] bits to ones (1s).

32 – 28 = 4 bits
Broadcast
address  11000011.00010010.00000011.00001111

Broadcast address in decimal is: 195.18.3.15


ORing the giving address with the complement of the mask is another way to get
the broadcast address. The result of using OR is (0) if both bits are (0s) otherwise;
the result is (1).

Given Address  11000011.00010010.00000011.00000111


OR
Mask Complement  00000000.00000000.00000000.00001111
Broadcast Address  11000011.00010010.00000011.00001111

The same result: 195.18.3.15


3-First host address:

Add to the network address one, so the first host address here is:
195.18.3.1

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 36


Lab 4 Subnetting and VLSM Network Manual

4-Last host address:


Minus the broadcast address by one. The last address is: 195.18.3.14

Example 2:
According to this IP 221.16.140.0/26 answer the following questions:
1- How many subnets does the chosen subnet mask produce?
2- How many valid hosts per subnet are available?
3- What are the valid subnets?
4- What’s the broadcast address of each subnet?
5- What are the valid hosts in each subnet?

What are the first and last hosts in each subnet?

Solution:
1- How many subnets does the chosen mask produce?

The slash notation is /26 and the default subnet in class C is /24, so 26-24=2
bits.

26 – 24 = 2 bits

Number of subnets = 22 = 4 subnets

2- How many valid hosts per subnet are available?

2 bits are taken form host portion to network portion this is why the
remaining bits in host portion are (8 - 2) = 6 bits.

Valid hosts per subnet = 26 – 2 = 64 – 2 = 62 hosts.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 37


Lab 4 Subnetting and VLSM Network Manual

3- What are the valid subnets?

We have this formula:

256 – subnet mask = block size (increment number)

The subnet mask is:

11111111.11111111.11111111.11000000 255.255.255.192

27 + 26 = 128 + 64 = 192
Now, 256 – 192 = 64

Subnets 0 0+64 64+64 128+64 192


64 128

Subnets are (0, 64, 128, 192). We add the block size (64) to 0 to get the
second subnet (network) then add the second one to 64 to find the third
subnet and so on for the rest.
4- What’s the broadcast address of each subnet?

To get the broadcast in a subnet we have to take the value of the next
subnet minus one.
Subnets 0 64 128 192

Broadcast 63 127 191 255

Broadcasts are (63, 127, 191, 255).

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 38


Lab 4 Subnetting and VLSM Network Manual

5- What are the valid hosts in each subnet?

The remaining host bits are 6 so,


26 – 2 = 64 – 2 = 62 hosts in every subnet.

6- What are the first and last hosts in each subnet?


Subnet 1: Subnet 2:
First host: 221.16.140.1 First host: 221.16.140.65
Last host: 221.16.140.62 Last host: 221.16.140.126
Subnet 3: Subnet 4:
First host: 221.16.140.129 First host: 221.16.140.193
Last host: 221.16.140.190 Last host: 221.16.140.254
At the end we will summary all this together.
Subnets 221.16.140.0 221.16.140.64 221.16.140.128 221.16.140.192
First host 221.16.140.1 221.16.140.65 221.16.140.129 221.16.140.193
…. …. …. …. ….
…. …. …. …. ….
Last host 221.16.140.62 221.16.140.126 221.16.140.190 221.16.140.254
Broadcast 221.16.140.63 221.16.140.127 221.16.140.191 221.16.140.255
We can represent this by using box method. Just see this.

0 0 64

63 127
128 192

255 191 255


Default subnet mask New subnet mask
255.255.255.0 or /24 255.255.255.192 or /26

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 39


Lab 4 Subnetting and VLSM Network Manual

Example 3:
A given network address 200.10.5.0/24. We need to get 5 networks then
determine:
1- The valid networks.
2- The broadcast address of each subnet.
3- The valid hosts in each subnet.

Solution:
1- The valid networks.
2? will give us 5 or bigger than it a little 23 = 8 will be the answer, so 3 bits
will be added to prefix notation /27.
Another way to do this by converting 5 into binary (00000101) we need 3
bits. The new subnet mask is:
11111111.11111111.11111111.1110000
255.255.255.224
To find the block size 256 – 224 = 32.
The valid networks (0, 32, 64, 96, 128, 160, 192, 224).

2- The broadcast address of each subnet.


The broadcast addresses (31, 63, 95, 127, 159, 191, 223, 255).

3- The valid hosts in each subnet.


25 – 2 = 32 – 2 = 30 hosts.

To summary all:
Network 1: 200.10.5.0 /27 Network 2: 200.10.5.32 /27
First host: 200.10.5.1 /27 First host: 200.10.5.33 /27
Last host: 200.10.5.31 / 27 Last host: 200.10.5.62 / 27
Broadcast: 200.10.5.31 /27 Broadcast: 200.10.5.63 /27

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 40


Lab 4 Subnetting and VLSM Network Manual

Network 3: 200.10.5.64 /27 Network 4: 200.10.5.96 /27


First host: 200.10.5.65 /27 First host: 200.10.5.97 /27
Last host: 200.10.5.94 / 27 Last host: 200.10.5.126 / 27
Broadcast: 200.10.5.95 /27 Broadcast: 200.10.5.127 /27

Network 5: 200.10.5.128 /27


First host: 200.10.5.129 /27
Last host: 200.10.5.158 / 27
Broadcast: 200.10.5.159 /27

Other networks are not used.


Box method

0 0 32 64 96

31 63 95 127
128 160 192 224

255 159 191 223 255


Default subnet mask New subnet mask
255.255.255.0 or /24 255.255.255.224 or /27

4.3 Subnetting Class B Addresses


The same as subnetting with class C will happen here, let’s solve this
example.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 41


Lab 4 Subnetting and VLSM Network Manual

Example:
We have 172.16.0.0 / 26. Determine:
1- The valid networks.
2- The valid broadcasts.
3- First and last node addresses in each subnet.
4- Hosts in each network.

Solution:
We know that the default of class B is / 16 and here 26 so, 26 – 16 = 10 bits we
increased the network portion by 10 bits, so we will take the whole third octet
(8bits) and (2 bits) from the fourth octet.
New subnet mask: 11111111.11111111.11111111.11000000
In decimal: 255.255.255.192

Valid networks are 210 = 1024 networks.

Third octet Block size = 256 – 255 = 1 (0, 1, 2, 3, 4,..… ,254, 255)

Fourth octet Block size = 256 – 192 = 64 (0, 64, 128, 192)

Network 1: 172.16.0.0 /26 Network 2: 172.16.0.64 /26


First address: 172.16.0.1 First address: 172.16.0.65
Last address: 172.16.0.62 Last address: 172.16.0.126
Broadcast: 172.16.0.63 Broadcast: 172.16.0.127

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 42


Lab 4 Subnetting and VLSM Network Manual

Network 3: 172.16.0.128 /26 Network 4: 172.16.0.192 /26


First address: 172.16.0.129 First address: 172.16.0.193
Last address: 172.16.0.190 Last address: 172.16.0.254
Broadcast: 172.16.0.191 Broadcast: 172.16.0.255

Network 5: 172.16.1.0 /26 Network 6: 172.16.1.64 /26


First address: 172.16.1.1 First address: 172.16.1.65
Last address: 172.16.1.62 Last address: 172.16.1.126
Broadcast: 172.16.1.63 Broadcast: 172.16.1.127

And so on until the last network which is 1024.


Network 1024: 172.16.255.192/26
First address: 172.16.255.193
Last address: 172.16.255.254
Broadcast: 172.16.255.255

Hosts in each network = 26 – 2 = 64 – 2 = 62 hosts.

4.4 Subnetting Class A Addresses

Class A is very easy to deal with it just like class C and B.

Example:
We have 10.0.0.0/10. Determine:
1- The valid networks.
2- The valid broadcast.
3- Hosts in each network.
4- First and last host addresses in each network.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 43


Lab 4 Subnetting and VLSM Network Manual

Solution:
1- The valid networks.

Default prefix notation /8, so 10 – 8 = 2 bits.


A new subnet mask is 255.192.0.0
Block size = 265 – 192 = 64.
Valid networks = 22 = 4 networks which are (0, 64, 128, 192).
2- The valid broadcast

The broadcast addresses are (63, 127, 191, 255).


3- Hosts in each network.

Hosts = 222 – 2 = 4194302 hosts in each network.


4- First and last hosts addresses in each network.

Network 1: 10.0.0.0 / 10 Network 2: 10.64.0.0 / 10


First address: 10.0.0.1 First address: 10.64.0.1
Last address: 10.63.255.254 Last address: 10.127.255.254
Broadcast: 10.63.255.255 Broadcast: 10.127.255.255

Network 3: 10.128.0.0 / 10 Network 4: 10.192.0.0 / 10


First address: 10.128.0.1 First address: 10.192.0.1
Last address: 10.191.255.254 Last address: 10.255.255.254
Broadcast: 10.191.255.255 Broadcast: 10.255.255.255

4.5 Variable Length Subnet Masks (VLSMs)


We get a good information about subnetting this why the following
network can be understood quickly and clearly.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 44


Lab 4 Subnetting and VLSM Network Manual

70 hosts
2 hosts

... …
...
6 hosts

...
20 hosts 192.168.10.128 /26

192.168.10.0 /26
192.168.10.192 /26

192.168.10.64 /26
Figure (4.1) Classful networks

Our subnet mask is 255.255.255.192 and in every network we will get


26 – 2 = 64 – 2 = 62 hosts available. It seems that everything is good, but
actually is not. We have two problems here:
1- One of our networks in the figure needs 70 host IP addresses while this
subnetting provides 62 hosts for each network (not enough).
2- Some networks have a small number of hosts and this is wasting
valuable IP address space.

All hosts and router interfaces have the same subnet mask, this is called
classful routing.
To solve these problems, we need to learn VLSM. By using VLSM we can
use different size masks. This is called classless routing.
We want to design the previous network in figure (4.1) using VLSM before
we start remember that class C is suitable, the summation of all hosts (6 + 2
+ 20 +70) is 98 and as we learned before that class C can provide 254 host
addresses.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 45


Lab 4 Subnetting and VLSM Network Manual

First thing that we have to do is listing the networks according to the number of
the hosts from the largest to smallest one.
Network Hosts number
Network 1 70
Network 2 20
Network 3 6
Network 4 2

Now start with the first network (70 hosts). The representation of (70) in binary
is (01000110), so we have 7 bits for host portion. In another meaning we used one
bit of host portion to include it in network portion this is why the new subnet mask
will be:

Binary  11111111.11111111.11111111.10000000
Decimal  255.255.255.128 or /25
The increment number (block size) = 256 – 128 = 128.

0 128

Network 1: 192.168.10.0 /25


First address: 192.168.10.1 Box method
Last address: 192.168.10.126
Broadcast: 192.168.10.127

127 255

We will move to the second network which has (20 hosts). 20 is represented in
binary by 5 bits (00010100). It is clearly that 3 bits of host portion are used for
network portion. Old subnet mask was 255.255.255.128 and the new one is:

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 46


Lab 4 Subnetting and VLSM Network Manual

Binary  11111111.11111111.11111111.11100000
Decimal  255.255.255.224 or /27

Block size = 256 – 224 = 32.


0 128

159
Network 2: 192.168.10.128 /27
First address: 192.168.10.129 Box method
160
Last address: 192.168.10.158
Broadcast: 192.168.10.159

127 255

In third network we have (6 hosts). The representation of 6 in binary is


(00000110). The old subnet mask was 255.255.255.224 and now the new mask is:

Binary  11111111.11111111.11111111.11111000
Decimal  255.255.255.248 or /29

Block size = 256 – 248 = 8.


0 128

159
Network 3: 192.168.10.160 /29 160 168
First address: 192.168.10.161 Box method
160
Last address: 192.168.10.166
Broadcast: 192.168.10.167

127 167 255

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 47


Lab 4 Subnetting and VLSM Network Manual

The last network (WAN) has (2 hosts). 2 takes 2 bits in binary (00000010). The
new mask is:

Binary  11111111.11111111.11111111.11111100
Decimal  255.255.255.252 or /30
Block size = 256 – 252 = 4.
0 128

159
Network 4: 192.168.10.168/30 160 168 171
First address: 192.168.10.169 Box method 172
160
Last address: 192.168.10.170
Broadcast: 192.168.10.171

127 167 255

70 hosts
2 hosts

... …
...
6 hosts

...
20 hosts 192.168.10.168 /30

192.168.10.160 /29
192.168.10.0 /25

192.168.10.128 /27
Figure (4.2) Classless network design

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 48


Lab 4 Subnetting and VLSM Network Manual

Now, remember that we can use different size masks on each router interface. By
using VLSM not only can we get just the right amount of hosts on each LAN, we still
have chance to add more WANs and LANs using the same network.
After all these examples it is obviously that the /8 through /15 can only be used
with class A network addresses. /16 through /23 can be used by class A and B
network addresses. /24 through /30 can be used by class A, B and C network
addresses.

We still have this note at the end of this lab:


Classful routing means that all hosts (all nodes) in the network use the exact same
subnet mask.
Classless routing means that each network segment can use a different subnet
mask.

Well, while we are waiting for the next lab time read about
hub, switch and router (which are network devices). All the
Stay positive, work hard, make it happen.

information that you will collect we will need and discuss in


lab 5, so read well because you will be asked.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 49


Exercises

4.1 Write the subnet, broadcast address and valid host range for:
a- 192.168.100.25 / 30
b- 165.100.3.155 / 26

4.2 You have sub-netted your class C network 192.168.1.0 with a subnet mask of
255.255.255.240. Please list the following:
a- Number of networks.
b- Number of hosts per network.
c- The full range of the first three networks
d- The usable address range from these first three networks.

4.3 Assume that you have been assigned the 200.35.1.0 / 24 network block.
a- Define an extended network prefix that allows the creation of 20 hosts on
each subnet.
b- What is the maximum number of hosts that can be assigned to each
subnet?
c- What is the maximum number of subnets that can be defined?

4.4 Assume that you have been assigned the 132.45.0.0 / 16 network block. You
need to establish 8 subnets.
Determine:
a- The subnet mask.
b- Valid network addresses.
c- Broadcast IP address in each network.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 50


Lab 4 Exercises Network Manual

d- First and last IP addresses in each network.


e- Number of hosts in each subnet.

4.5 Fill in the blank according to the information that you have.

Number of needed subnets 14


Number of needed usable hosts 14
Network Address 192.10.10.0

Address class -----------------------------------------------

Default subnet mask -----------------------------------------------

New (Custom) subnet mask -----------------------------------------------

Total number of subnets -----------------------------------------------

Number of valid hosts -----------------------------------------------

What is the 4th subnet range? -----------------------------------------------

What is the subnet number for the -----------------------------------------------


8th subnet? -----------------------------------------------
What is the subnet broadcast -----------------------------------------------
address for the 13th subnet? -----------------------------------------------
What are the assignable addresses -----------------------------------------------
for the 9th subnet? -----------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 51


Lab 4 Exercises Network Manual

4.6 Fill in the blank places according the information that you have.

Number of needed usable hosts 6


Network Address 126.0.0.0

Address class -----------------------------------------------

Default subnet mask -----------------------------------------------

New (Custom) subnet mask -----------------------------------------------

Total number of subnets -----------------------------------------------

Number of valid hosts -----------------------------------------------

What is the 2nd subnet range? -----------------------------------------------

What is the subnet number for the -----------------------------------------------


5th subnet? -----------------------------------------------
What is the subnet broadcast -----------------------------------------------
address for the 7th subnet? -----------------------------------------------
What are the assignable addresses -----------------------------------------------
for the 10th subnet? -----------------------------------------------

4.7 Based on the information in the graphic shown, design a network addressing
scheme that will supply the minimum number of hosts per subnet, and allow
enough extra subnets and hosts for 30% growth in all areas. Circle each subnet on
the graphic and answer the questions below.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 52


Lab 4 Exercises Network Manual

Address class -----------------------------------------------

Custom subnet mask -----------------------------------------------

Minimum number of subnets needed -----------------------------------------------

Extra subnets required for 30% growth -----------------------------------------------

Total number of subnets needed -----------------------------------------------


Number of host addresses in the
-----------------------------------------------
largest subnet group
Number of addresses needed for 30% -----------------------------------------------
growth in the largest subnet -----------------------------------------------
Total number of address needed for -----------------------------------------------
the largest subnet -----------------------------------------------
-----------------------------------------------
IP address range for Tech Ed
-----------------------------------------------
-----------------------------------------------
IP address range for English
-----------------------------------------------
-----------------------------------------------
IP address range for Science
-----------------------------------------------
IP address range for Router A to -----------------------------------------------
Router B serial connection -----------------------------------------------
IP address range for Router A to -----------------------------------------------
Router B serial connection -----------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 53


Lab 4 Exercises Network Manual

4.8 Design a network addressing scheme according to the following table and
figure:

Department Number of hosts


A 20
B 50
C 180
D 30

WAN 1

C D

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 54


LAB 5 Basic Configurations

Objectives:
- Understand router interface.
- Get familiar with packet tracer simulation.
- Understand some router modes.
- Start with basic configurations.

All previous labs were a good starting to get knowledge about some basic
concepts that will help us during the practical work.

Your job in lab 4 was reading about hub, switch and router that means you got
the major differences between these devices.

Router is called “Layer 3 device” while some switches are called “layer 2 devices”.
Let me guess that you know why they called by this according to your search.

5.1 Router Interfaces

The figure mentions the interfaces of the router that we will deal with during
labs.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 55


Lab 5 Basic Configurations Network Manual

LAN Interface WAN Interface Administration Interface

Serial Interface
Ethernet
10 Mbps Local
Smart Interface “Console Port”
Fast Ethernet 10 / 100
100 Mbps Remote
“Auxiliary Port” is not used
Gigabit Ethernet 10 / 100 / 1000 these days
1000 Mbps “Telnet or SSH” Protocol

Note: Mbps is Megabits per second.

Figure (5.1) Router interfaces

5.2 Implementing a Topology Using Packet Tracer


Packet tracer is a simulation program that will be used in the rest of our labs to
implement the networks.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 56


Lab 5 Basic Configurations Network Manual

Network
192.168.1.0 / 24

Figure (5.2) LAN network

Steps:
1- Select 3 PCs, one switch and a router. Put them in the work space.
2- Set up the IP addresses of the PCs.
3- Connect switch with PCs through Ethernet ports.
4- Test that PCs can communicate with each other. To do that open the
command prompt then write the command ping followed by the IP address
of the PC that we want to test the connectivity with.
5- Connect router with the switch through Ethernet port.
6- Connect one of the PCs with the router through (console port) then from the
terminal window of the PC we will write the router configuration in
Command-Line Interface (CLI).

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 57


Lab 5 Basic Configurations Network Manual

Configurations
Router>enable
Router#configure terminal
Router(config)#hostname LAB5
LAB5(config)#banner motd %This is my router don't enter%
LAB5(config)#interface f0/0
LAB5(config-if)#ip address 192.168.1.1 255.255.255.0
LAB5(config-if)#no shutdown
LAB5(config-if)#exit
LAB5(config)#enable secret FirstP1
LAB5(config)#line console 0
LAB5(config-line)#password 456@ps
LAB5(config-line)#login
LAB5(config-line)#exec-timeout 5 0
LAB5(config-line)#end
LAB5#wr

5.2.1 Some of Router Modes


Before we start explaining the configurations that we made, we should to know
some information about router modes.
User exec mode ( user mode)
After the interface status appear and we press no then enter, the Router> prompt
will appear. This is called user exec mode (user mode), it’s limited to basic
monitoring commands and it’s also a stepping stone to logging in to privileged
mode.
Privileged exec mode (privileged mode)
We can enter with the enable command then press enter.
Router>enable
Router#

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 58


Lab 5 Basic Configurations Network Manual

We now end up with a Router# prompt, which indicates that we’re in privileged
mode, where we can both view and change the router’s configurations.

Global configuration mode

We can make global changes to the router by typing configure terminal (or config
t for short), which puts us in global configuration mode and changes what’s known
as the running-config. A global command (a command run from global config)
affects the entire router (system).
Router# configure terminal
Router(config)#

Specific configuration mode

Commands in this mode will affect the interface or processes that we are in only
for example, to change an interface we use the interface command from global
configuration mode:
Router(config)#interface fastEthernet 0/0
Router(config-if)#

The prompt changed to Router(config-if)# and this tell us that we are in interface
configuration mode.

As a summary see the table (5.1).

Mode Definition
User exec mode Limited to basic monitoring commands.
Privileged exec mode Provides access to all other router commands.
Global configuration mode Commands that affect the entire system.
Specific configuration mode Commands that affect interfaces/ processes only.

Table (5.1) Some router modes

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 59


Lab 5 Basic Configurations Network Manual

5.2.2 Explain The Configurations


Here we will explain the commands that we wrote in the router.
The default host name of the router is “Router” to change it use the command:

The name that you want


Router(config)#hostname LAB5

Message of the day (MOTD) gives a message to every person dialing into or
connecting to the router via Telnet or an auxiliary port or even through a console
port as seen here:

LAB5(config)#banner motd %This is my router don't enter%

The message that we will write must be between the same character for example
we start with # then the text message after that must be # not any another
character.
To configure the router interface with IP address first we must to enter to the
interface that we will set up the IP address for.

LAB5(config)#interface f0/0
Note that the interface can be (f0/0, f0/0/0, g0/0, e0/1, …) depending on the
router model.
Now, we will write the IP with its subnet mask.

LAB5(config-if)#ip address 192.168.1.1 255.255.255.0


Turning on the interface will be done by this command:
LAB5(config-if)#no shutdown
Getting out of interface configuration mode and back into global configuration
mode using:
LAB5(config-if)#exit

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 60


Lab 5 Basic Configurations Network Manual

As a kind of security we can:

1- Set up a password that will be asked before entering privileged mode just as
follows:
Any password
LAB5(config)#enable secret FirstP1

Secret word changes our password “FirstP1” into encrypted one.

1- A user will be asked about password when she/he enters to the router using
console port through rolled over cable because the following commands:

LAB5(config)#line console 0 Any password


LAB5(config-line)#password 456@ps
LAB5(config-line)#login

The difference between using password and secret is that password will take the
text that we wrote as it is while secret will encrypt it as we mentioned before. This
password will not activate unless we write login command.

2- To limit the line execution timeout to specific time and after this period if we
don’t write anything in CLI we will get out of the section.

LAB5(config-line)#exec-timeout 5 0 Seconds

Minutes

We said that exit is used to let us go back to the previous mode.

LAB5(config-line)#end
Is similar to exit but with a tiny difference that we will jump to privileged mode
directly.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 61


Lab 5 Basic Configurations Network Manual

A lot of commands we wrote in the router, but I have a little secret for you that if
we close the CLI window everything that we did will disappear as it was not there.

To keep our work, we need to save it use.

LAB5#wr

5.2.3 Verification Commands

LAB5#show ip interface brief


LAB5#show running-config

Try these commands and discover for what they are used.

LAB5#show ip interface brief


-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

LAB5#show running-config
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 62


Lab 5 Basic Configurations Network Manual

We can use the cisco advanced editing feature to help us configure


our router. If we type in a question mark (?) at any prompt, we’ll be
given a list of all the commands available from that prompt. For
I’m not telling you it’s going to be easy, I’m telling you it’s going to be worth it.

example:
LAB5(config)#?

5.3 What Will Happen If?!


During our practicing now, let’s try the following:

What will happen if?!

1- Change the IP address of device C into 192.168.100.3


------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
2- Change the IP address of device B into 192.168.1.255
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
3- Change the IP address of device A into 192.168.1.3
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
4- Change the IP address of device A into 192.168.1.0
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
5- From device B make ping 192.168.1.255
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 63


Exercises

5.1 Implement the following network using 192.168.10.0 / 24.

5.2 You have:


3 LANs.
2 Switches.
1 Router.
10 PCs.
LAN 1 and LAN 2 contain 4 PC’s in each while LAN 3 takes 2 PCs. Design and
implement the network using VLSM then fill the following table:

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 64


Lab 5 Exercises Network Manual

PC 1 IP ------------------------------------------
Network address PC 2 IP ------------------------------------------
LAN 1
------------------------- PC 3 IP ------------------------------------------
PC 4 IP ------------------------------------------
PC 1 IP ------------------------------------------
Network address PC 2 IP ------------------------------------------
LAN 2
------------------------- PC 3 IP ------------------------------------------
PC 4 IP ------------------------------------------
Network address PC 1 IP ------------------------------------------
LAN 3
------------------------- PC 2 IP ------------------------------------------
Between switch and PCs -----------------------------------------------
Cables Between switch and router -------------------------------------------
Between router and PC for configurations -------------------------
Between LAN 1 and LAN 2-----------------------------------------------
Connectivity Between LAN 1 and LAN 3-----------------------------------------------
Between LAN 2 and LAN 3-----------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 65


LAB 6 Switching

Objectives:
- Understand how to create VLANs.
- Trunk ports and access ports.
- Use routing between VLANs.
- Get familiar with VLAN identification.

A VLAN (Virtual Local Area Network) is a logical grouping of network users and
resources connected to administratively defined ports on a switch.

When you create VLANs, you’re given the ability to create smaller broadcast
domains within a layer 2 switched internetwork by assigning different ports on the
switch to different sub networks. A VLAN is treated like its own subnet or broadcast
domain, meaning that frames broadcast onto the network are only switched
between the ports logically grouped within the same VLAN.

sw1 sw2
f0/1 f0/1

VLAN VLAN VLAN


VLAN 20
Sales department 10 10
20
192.168.10.0/24
5 hosts Management Sales department Management
Ports: department 192.168.10.0/24 department
f0/2 , f0/3 192.168.20.0/24 3 hosts 192.168.20.0/24
f0/4 , f0/5 3 hosts Ports: 2 hosts
f0/6 Ports: f0/2 , f0/3 , f0/4 Ports:
f0/10 , f0/11 , f0/12 f0/8 , f0/9

Figure (6.1) VLANs

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 66


Lab 6 Switching Network Manual

6.1 Configuring VLANs

sw1
Switch>enable
Switch#configure terminal
Switch(config)#hostname sw1
sw1(config)#enable secret 123*a
sw1(config)#line console 0
sw1(config-line)#password SL6
sw1(config-line)#login
sw1(config-line)#exit
sw1(config)#vlan 10
sw1(config-vlan)#name Sales
sw1(config-vlan)#end
sw1#vlan database
sw1(vlan)#vlan 12 name Management
sw1(vlan)#exit
sw1#configure terminal
sw1(config)#int f0/10
sw1(config-if)#switchport mode access
sw1(config-if)#switchport access vlan 12
sw1(config-if)#int f0/11
sw1(config-if)#switchport mode access
sw1(config-if)#switchport access vlan 12
sw1(config-if)#int f0/12
sw1(config-if)#switchport mode access
sw1(config-if)#switchport access vlan 12
sw1(config-if)#exit
sw1(config)#int range f0/2-6
sw1(config-if-range)#switchport mode access
sw1(config-if-range)#switchport access vlan 10
sw1(config-if-range)#exit
sw1(config)#int f0/1
sw1(config-if)#switchport mode trunk
sw1(config-if)#switchport trunk allowed vlan all
sw1(config-if)#end
sw1#wr

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 67


Lab 6 Switching Network Manual

Before we start with the configurations I want you to know that there are two
different types of links in a switched environment:

1- Access ports.
2- Trunk ports.
Switch port can belong only to one VLAN if it is an access port or all VLANs if it is
a trunk port.

To configure VLANs we will use the global config vlan command as follows:
VLAN ID from 2 to 1001
sw1(config)#vlan 10
Remember that VLAN 1 is the native and administrative VLAN by default.

We will give a name for this VLAN using:

sw1(config-vlan)#name Sales

Another way to create VLAN and give it a name by entering privileged mode and
write the following:

sw1#vlan database
sw1(vlan)#vlan 12 name Management

VLAN ID VLAN name

Know we will assign switch ports to VLANs. We can configure each port on a
switch to be in a specific VLAN (access port) by using the interface switchport
command.

sw1(config)#int f0/10
sw1(config-if)#switchport mode access
sw1(config-if)#switchport access vlan 12

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 68


Lab 6 Switching Network Manual

We will do the same thing for all ports that belong to the same VLAN which are
(f0/11, f0/12). Now, the switch knows that ports (10, 11, and 12) are in the same
VLAN (VLAN 12).

There is another way to assign switch ports to VLANs using interface range
command.

sw1(config)#int range f0/2-6 All ports that


sw1(config-if-range)#switchport mode access belong to
sw1(config-if-range)#switchport access vlan 10 VALN 10

Interface range command allows us to configure multiple ports at the same time.

To let sales department in switch (sw1) communicates with sales department in


switch (sw2) and the same thing for management department we have to set up
trunk ports for switches.

sw1(config)#int f0/1 All VALNs


sw1(config-if)#switchport mode trunk Sales and
sw1(config-if)#switchport trunk allowed vlan all Management

After understanding the commands, it is your time now to configure switch (sw2).

sw2

------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 69


Lab 6 Switching Network Manual

sw2

-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------

Everything is ready. you will test the connectivity between devices and fill the
following table:

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 70


Lab 6 Switching Network Manual

Devices Communication
Two devices in sales department in sw1.
Two devices in management department in
sw2.
Device in sw1 with another in sw2 belong to
sales department.
Device in sw1 with another in sw2 belong to
management department.
Sales department’s device with management
department’s device both in sw1.
Sales department’s device in sw1 with
management department’s device in sw2.

Only hosts that are members of the same VLAN can communicate. To change this
and allow inter-VLAN communication, you need a router or layer 3 switch.

6.2 Routing between VLANs

F0/24
sw1 Sw2

192.168.10.0 / 24 192.168.20.0 / 24
192.168.10.0 / 24 192.168.20.0 / 24
VLAN 10 VLAN 12
VLAN 10 VLAN 12

Figure (6.2) Routing between VLANs

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 71


Lab 6 Switching Network Manual

The router
Router>enable
Router#configure terminal
Router(config)#hostname R
R(config)#interface f0/0
R(config-if)#no shutdown
R(config-if)#no ip address
R(config-if)#int f0/0.10
R(config-subif)#encapsulation dot1Q 10
R(config-subif)#ip address 192.168.10.1 255.255.255.0
R(config-subif)#interface f0/0.20
R(config-subif)#encapsulation dot1Q 12
R(config-subif)#ip address 192.168.20.1 255.255.255.0
R(config-subif)#end

Switch (sw1) is connected with router (R) through f0/0 port. You have to notice
that we use router for routing between different VLANs that is why we need to
have number of ports equal to number of VLANs. But usually routers don’t have a
lot of ports. However, the router’s interface is divided into logical interfaces. These
are called sub interface.

Frist step will be by removing any IP address that were set up for router physical
port (f0/0) because if there is any the router will not accept sub interfaces. We will
use the following command:

R(config-if)#no ip address

Now, we will use sub interfaces one for each VLAN. The following command for
VLAN 10:

R(config-if)#int f0/0.10 Any number

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 72


Lab 6 Switching Network Manual

The same thing for VLAN 12 by using:

R(config-if)#int f0/0.12 Any number

VLAN identification is how switches identify which frames belong to which


VLANs, and there are two trunking methods:

1- Inter-Switch Link (ISL).


2- IEEE 802.1Q.
To support ISL or 802.1Q on a fast Ethernet interface we can set the
interface to trunk with the encapsulation command:

R(config-subif)#encapsulation dot1Q 10 The number of VLAN 10

Now, we will add an IP address for the logical interface f0/0.10. Just as
follows:

R(config-subif)#ip address 192.168.10.1 255.255.255.0

Here there is no need to write no shutdown command anymore because


we are dealing with logical interfaces not physical ones.

We need to add these commands in (sw1):


sw1(config)#ip default-gateway 192.168.10.1
sw1(config)#interface f0/24
sw1(config-if)#switchport mode trunk
The same thing for (sw2):

sw2(config)#ip default-gateway 192.168.20.1

6.3 Verification Commands

sw1#show vlan brief


sw1#show interface f0/24 switchport
sw1#show ip route brief

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 73


Lab 6 Switching Network Manual

Try these commands and write what are they for:

sw1#show vlan brief


------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------

sw1#show interface f0/24 switchport


------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------

sw1#show ip route brief


------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 74


Lab 6 Switching Network Manual

6.4 Issue to Solve

See the following figure:

11.0.0.1 / 8 11.0.0.2 / 8

192.168.1.1 / 24 172.17.0.1 / 16

192.168.1.2 / 24 192.168.1.3 / 24 172.17.0.2 / 16 172.17.0.3 / 16


Figure (6.3) LANs and WAN

1- How many LANs and WANs do we have?


2 LANs which are:
LAN1 192.168.1.0 / 24
LAN2 172.17.0.0 / 16
1 WAN 11.0.0.0 / 8
2- These networks can communicate with each other or not?
Well, LAN1 can communicate with WAN and the same thing for LAN2 with
WAN. Unfortunately, LAN1 cannot communicate with LAN2.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 75


Lab 6 Switching Network Manual

Why this happen!?


The router cannot recognize remote networks. The only networks
that it knows which are connected directly with the router. According
to configurations that we learned until now we cannot solve this
problem but I promise you after taking static routing in the next lab
you will be able to communicate between LAN1 and LAN2. Just wait
and see.

Sometimes you win, sometimes you learn.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 76


LAB 7 Static Routing

Objectives:
- Describe routing basics.
- Advantages and disadvantages of static routing.
- Get a quick look on WAN components.
- Understand the static routing configurations.
-

Once we create an internetwork by connecting our WANs and LANs to a router,


we’ll need to configure logical network addresses, such as IP addresses, to all hosts
on the internetwork so that they can communicate across that internetwork.

The term routing is used for taking a packet from one device and sending it
through the network to another device on a different network. Routers don’t really
care about hosts they only care about networks and the best path to each network.
The logical network address of the destination host is used to get packets to a
network through a routed network, and then the hardware address of the host is
used to deliver the packet from a router to the correct destination host.

If our network has no routers, then it should be apparent that we are not routing.
Routers route traffic to all the networks in our internetwork. To be able to route
packets, a router must know, at a minimum, the following:
1- Destination address.
2- Neighbor routers from which it can learn about remote networks.
3- Possible routes to all remote networks.
4- The best route to each remote network.
5- How to maintain and verify routing information.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 77


Lab 7 Static Routing Network Manual

The router learns about remote networks from neighbor routers or from an
administrator.
The router then builds a routing table (a map of the internetwork) that describes
how to find the remote networks. If a network is directly connected, then the
router already knows how to get to it.

If a network isn’t directly connected to the router, the router must use one of two
ways to learn how to get to the remote networks:
1- Static routing.
2- Dynamic routing (our topic in the next lab).

Static routing means that someone must hand-type all network locations into the
routing table.

7.1 Pros and Cons of Static Routing


Static routing has the following benefits:
1- There is no overhead on the router CPU.
2- There is no bandwidth usage between routers.
3- It adds security because the administrator can choose to allow routing access
to certain networks only.

While the disadvantages are:


1- The administrator must really understand the internetwork and how each
router is connected in order to configure routes correctly.
2- If a network is added to the internetwork, the administrator has to add a
router to it on all routers by hand.
3- It’s not feasible in large networks because maintaining it would be a full-time
job in itself.

7.2 WAN Components


In packet tracer simulation to represent WANs we use serial cable called (back
to back cable). This cable is used instead of the components that must be

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 78


Lab 7 Static Routing Network Manual

between two routers. In the real life the serial cable that is used in our
simulation is shown in figure (7.1).

a- In packet tracer

DTE DCE Service DCE DTE


provider
CSU/DSU CO CSU/DSU
CO
Service provider
CPE
CPE Equipment

Demarc
Demarc
b- In real life
DTE: Data Terminal Equipment.
DCE: Data Communication Equipment.
CSU/DSU: Channel Service Unit/Date Service Unit.
CO: Central Office.
Demarc: Demarcation location.
CPE: Customer Premises Equipment.
Figure (7.1) WAN components

By default, router interfaces are DTE, and they connect into data DCE like
(CSU/DSU). The CSU/DSU then plugs into a demarc and is the service provider’s last
responsibility. Most of the time, the demarc is a jack that has an RJ-45 (8-pin
modular) female connector located in a telecommunications closet.
Demarcation location is a location that separating between the customer place
responsibilities and the service provider responsibilities.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 79


Lab 7 Static Routing Network Manual

The network’s DCE device (CSU/DSU) provides clocking to the DTE-connected


interface (the router’s serial interface).

7.3 The Scenario


You are able to implement this topology by yourself. Go ahead and connect it now
to be ready for our new configuration.

10.0.0.0 / 8
A B

S0/0 S0/0

Figure (7.2) Static routing scenario

Configurations in router A

Router>enable
Router#configure terminal
Router(config)#hostname A
A(config)#interface f0/0
A(config-if)#ip address 192.168.20.1 255.255.255.0
A(config-if)#no shutdown
A(config-if)#exit
A(config)#interface s0/0

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 80


Lab 7 Static Routing Network Manual

Configurations in router A
A(config-if)#ip address 10.0.0.1 255.0.0.0
A(config-if)#no shutdown
A(config-if)#clock rate 64000
A(config-if)#exit
A(config)#ip route 192.168.10.0 255.255.255.0 10.0.0.2
A(config)#end
A#wr

7.3.1 Explain The Configurations

According to the (serial or smart) interface that we used; the interface can be
(s0/0, s0/0/1, ……) here we used:

A(config)#interface s0/0
As we mentioned before that clocking provided by DCE to routers. Here in
simulation program one router will be DCE and the another one will be DTE, so the
router that will be DCE must provide clocking this why we must use this command:

A(config-if)#clock rate 64000


While 64000 is the speed of transmission. To know the available speeds just do
the following:
A(config-if)#clock rate ?

After pressing enter we will see all the speeds that we can use.

No need to write this command in DTE router because it will not effect.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 81


Lab 7 Static Routing Network Manual

The main point in this lab is static routing. Let me explain something before write
the command of that.

The purpose of using static routing in this topology is making communication


between remote networks possible.

There are two ways to write this command:

1- Using next-hop-IP.
2- Using exit interface.
According to figure 7.2 in case that we are making the configurations in A, so the
next hop IP is 10.0.0.2 while the exit interface is s0/0. I think it is clear now. Your
turn to write if you are writing the B configurations:

The next hop IP is -------------------------


The exit interface is -----------------------

If we take the command in router A:

- Next hop IP

A(config)#ip route 192.168.10.0 255.255.255.0 10.0.0.2

Destination network Mask Next-hop-ip


address
- Exit interface

A(config)#ip route 192.168.10.0 255.255.255.0 s0/0

Destination network Mask Exit interface


address

Now, you are ready to write the configurations for router B.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 82


Lab 7 Static Routing Network Manual

Configurations in router B

-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 83


Lab 7 Static Routing Network Manual

7.3.2 Verification Commands

A#show ip interface brief


A#show controllers s0/0
A#show ip route

Tell me what do commands do?

A#show ip interface brief


------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
A#show controllers s0/0
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
A#show ip route
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 84


Lab 7 Static Routing Network Manual

All show commands are run form privileged mode if we try to write
them in configuration mode for example:
A(config)# show run
This is will cause an error, so to do that we have to write:
A(config)# do show run
So basically, we can run any command from any configuration prompt
using do.

After adding all configurations that we need. Now we can check the connectivity
between remote networks. Can you imagine that remote networks will not
communicate with each other?!!!!!!!

7.4 What Will Happen If?!


Answer the following questions according to what you will see in your practicing.

What will happen if?!

1- Write clock rate command in DTE router.


-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
2- Type “show ip route” in router B.
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 85


Lab 7 Static Routing Network Manual

Look for something positive in each day, even if some days you have to look a little harder.
What will happen if?!

3- After answering question 2, what is the meaning of S and C.


---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------

Static routing is a big headache for the administrator because it causes more
works as long as the networks get bigger.

Dynamic routing will help the admin to save efforts. Our study in the next lab will
be about it.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 86


Exercises

7.1 According to the following routing table design a network:

7.2 Configure this network in case A, B and C can communicate with each other
and fill the table:

RA RB
RC

A B
C

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 87


Lab 7 Exercises Network Manual

Device IP address
A ---------------------------
B ---------------------------
C ---------------------------
---------------------------
RA
---------------------------
---------------------------
RB
---------------------------
---------------------------
RC
---------------------------

How many LANs and WANs do you have?

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 88


LAB 8 Dynamic Routing

Objectives:
- Understand “Dynamic routing” concept.
- Pros and cons of dynamic routing.
- Learning the configurations of (RIP, EIGRP and OSPF).
- Understand wildcard mask.
-

Dynamic routing is when protocols are used to find networks and update routing
tables on routers.

The routing protocols that we will use in our lab are:

- RIP (Routing Information Protocol) version 1 and 2.


- EIGRP (Enhanced Interior Gateway Routing Protocol).
- OSPF (Open Shortest Path First).

8.1 Pros and Cons of Dynamic Routing


Dynamic routing advantages:

- For administrator dynamic routing is easier than using static routing.


- It is suitable for large networks.

Dynamic routing disadvantages:

- Less secure than static routing.


- All the work will be on the CPU because the CPU processes will be more.
- More usage of bandwidth on the network links.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 89


Lab 8 Dynamic Routing Network Manual

8.2 The Configurations


We will use some scenarios to implement RIP, EIGRP and OSPF protocols.

8.2.1 RIP (Routing Information Protocol)


We have two versions of RIP:

- RIP version 1.
- RIP version 2.

R1 R2 S 0/0 R3
S 0/0 S 0/0 S 0/1

192.168.1.0 / 24 192.168.2.0 / 24 192.168.3.0 / 24

10.0.0.0 / 8 11.0.0.0 / 8

Figure (8.1) Implementing RIP

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 90


Lab 8 Dynamic Routing Network Manual

a) RIP (v1) configurations

Configurations in router R1

Router>enable
Router#configure terminal
Router(config)#hostname R1
R1(config)#interface f0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#interface s0/0
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#clock rate 64000
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#network 192.168.1.0
R1(config-router)#network 10.0.0.0
R1(config-router)#passive-interface f0/0
R1(config-router)#end
R1#wr

First we will choose the protocol.


R1(config)#router rip

When we press enter we will be in router mode.


R1(config-router)#network 192.168.1.0 Network address

This command does two things together:


1- Makes activation for RIP protocol in the interface f0/0.
2- Makes an advertisement for the router network which is 192.168.1.0
network.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 91


Lab 8 Dynamic Routing Network Manual

The same thing as previous command but the activation will be in interface s0/0
and the advertisement for 10.0.0.0 network.

R1(config-router)#network 10.0.0.0 Network address

In another meaning every router will advertise its own networks that connected
directly to it.

When the RIP protocol is activated the updates will be send to other networks
every 30 seconds. These updates are important for serial interfaces to update
routing table, but it doesn’t necessary for Ethernet ports because there is no router
inside there. The following command is very useful one:

R1(config-router)#passive-interface f0/0

This command will tell the router that makes an advertisement about my network
but doesn’t send any updates to this interface because there is no need for that.

Your turn now to add the configurations for R2 and R3.

Configurations in router R2

----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 92


Lab 8 Dynamic Routing Network Manual

Configurations in router R2

----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------

Configurations in router R3

-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 93


Lab 8 Dynamic Routing Network Manual

b) RIP (v2) configurations


Nothing will change except the following commands:

Configurations in router R1

R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary

This last command is used to tell the router takes the subnet that we wrote even
if it is classless one. If we don’t write this command the router will accept just
classful subnetting and in that time will not be a big different between using RIP
(v1) or RIP (v2).

- RIP (v1) is classful routing protocol.


- RIP (v2) is classless routing protocol.
Verification commands

R1#show ip protocols
R1#debug ip rip

Explain the benefit of these commands after trying them.

R1#show ip protocols
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 94


Lab 8 Dynamic Routing Network Manual

R1#debug ip rip
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
------------------------------------------------

8.2.2 EIGRP (Enhanced Interior Gateway Routing Protocol)

R1

R3
R2

192.168.1.0 /24

192.168.1.0 /24 192.168.1.0 /24

Figure (8.2) Implementing EIGRP

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 95


Lab 8 Dynamic Routing Network Manual

Configurations in router R1

Router>enable
Router#configure terminal
Router(config)#hostname R1
R1(config)#interface f0/0
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int s0/0
R1(config-if)#ip address 172.16.1.2 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#int s0/1
R1(config-if)#ip address 172.17.1.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#clock rate 64000
R1(config-if)#exit
R1(config)#router eigrp 10
R1(config-router)#network 172.16.1.0
R1(config-router)#network 172.17.1.0
R1(config-router)#network 192.168.2.0
R1(config-router)#end
R1#wr

R1(config)#router eigrp 10 Autonomous System number

To start an EIGRP session on a router, use the router EIGRP command followed
by the Autonomous System (AS) number of our network. We can use any number
from 1 to 65535 for the autonomous system number. EIGRP uses autonomous
system numbers to identify the collection of routers that share route information.
Only routers that have the same autonomous system numbers share routes.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 96


Lab 8 Dynamic Routing Network Manual

Verification commands

R1#debug eigrp packets


R1#show ip route
R1#show ip route eigrp

You will show me how much these commands are useful.

R1#debug eigrp packets


------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
R1#show ip route
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
R1#show ip route eigrp
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 97


Lab 8 Dynamic Routing Network Manual

Now, write the configurations for R2 and R3.

Configurations in router R2

-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 98


Lab 8 Dynamic Routing Network Manual

Configurations in router R3

-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 99


Lab 8 Dynamic Routing Network Manual

8.2.3 OSPF (Open Shortest Path First)


The same network in figure (8.2) will be used here to implement OSPF.

Configurations in router R2

Router>enable
Router#configure terminal
Router(config)#hostname R2
R2(config)#interface f0/0
R2(config-if)#ip address 192.168.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#int s0/0
R2(config-if)#ip address 172.16.1.1 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#clock rate 64000
R2(config-if)#exit
R2(config)#router ospf 100
R2(config-router)#network 172.16.1.0 0.0.0.3 area 0
R2(config-router)#network 192.168.1.0 0.0.0.255 area 0
R2(config-router)#end
R2#wr

The easiest also least scalable way to configure OSPF is to just use a single area.
Doing this requires a minimum of two commands. The command you use to
activate the OSPF routing process is as follows:

R2(config)#router ospf 100 Process ID

A value in the range 1 – 65535 identifies the OSPF process ID. It’s a unique number
on this router that groups a series of OSPF configuration commands under a specific
running process. Different OSPF routers don’t have to use the same process ID in
order to communicate.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 100


Lab 8 Dynamic Routing Network Manual

We will cover here signal-area OSPF with each router running a single OSPF
process. Now, we need to identify the interfaces that we want to activate OSPF
communications on as well as the area in which each resides.

R2(config-router)#network 172.16.1.0 0.0.0.3 area 0

A number from 0
Network address Wildcard mask
to 4294967295
The areas can be any number from 0 to 4.2 billion. Don’t get these numbers
confused with the process ID, which is from 1 to 65535.

Wildcard mask

To get the wildcard mask let us take the network address that we used in our
topology 172.16.1.0 / 30 .

Well, it is easy now to say that this IP in class B and because of /30 the subnet
mask is 255.255.255.252. All this information we know from previous labs.

What we are going to do is the following:

255.255.255.255
_
Subnet mask 255.255.255.252

0 . 0. 0 . 3 Wildcard mask

Your turn, we have this IP 192.168.2.0 /2.

255.255.255.255
_
Subnet mask
Wildcard mask

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 101


Lab 8 Dynamic Routing Network Manual

Configurations in router R1

-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 102


Lab 8 Dynamic Routing Network Manual

Configurations in router R3

-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 103


Lab 8 Dynamic Routing Network Manual

Verification commands

R1#show ip ospf
R1#show ip ospf neighbors
R1#show ip ospf database
R1#show interface s0/0
R1#routing information sources

We cannot finish this lab without asking you about the usage of these commands.

R1#show ip ospf
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
R1#show ip ospf neighbors
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
R1#show ip ospf database
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 104


Lab 8 Dynamic Routing Network Manual

R1#show interface s0/0


----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
The minute you think of giving up, think of the reason why you held on so long.

----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
R1#routing information sources
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 105


Exercises

8.1 You have: 2 routers, 2 switches, 4 PCs, 1 WAN and 2 LANs.


Design the network according to the information that you have.

8.2

12 hosts 14 hosts

45 hosts

1- How many LANs and WANs do you have?


2- Configure this topology using RIP.
3- Configure this topology using EIGRP (use subnetting).
4- Configure this topology using OSPF (use VLSM).

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 106


LAB 9 Servers and Protocols

Objectives:
- Understand how to use HTTP, DNS, DHCP, Email and TFTP.
- Learn the configurations to make a router works as DHCP server.
- Understand the benefit of Telnet protocol.

In this lab we will try some protocols like TFTP, DHCP, DNS, HTTP, Email and
Telnet. The following scenario will be applied to use these protocols.

12.0.0.0 /8

R2
R1 S2/0 F0/0
F0/0 .2
.2 S2/0 .1
.1

.10
.6 .2 .3
.8

192.168.0.0 /24
.9 .7

10.0.0.0 /8
Figure (9.1) Servers topology

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 107


Lab 9 Servers and Protocols Network Manual

You are the one who will start the work today by connecting the devices of the
topology then setup the configurations of the routers also put IP addresses for PCs
in LAN 192.168.0.0 / 24. The following space is left for your configurations that you
will make.

Configurations in router R1

-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 108


Lab 9 Servers and Protocols Network Manual

Configurations in router R2

-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------

Now, we are ready for servers trip let’s go through it.

9.1 HTTP (Hypertext Transfer Protocol)


First we will setup the IP address configuration for HTTP server. We can edit the
html page to ensure that the page which the user will enter is our page.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 109


Lab 9 Servers and Protocols Network Manual

9.2 DNS (Domain Name Service)

As in HTTP we will write the IP address then from config select services after that
we will choose DNS. Now you have to fill the blocks as in figure (8.2).

Step 2
Step 1
Write the name of the web site

10.0.0.9

Step 5
Step 3
Step 4
IP address of HTTP server

Figure (9.2) DNS service

9.3 DHCP (Dynamic Host Configuration Protocol)

What we do normally in all previous labs is writing the IP addresses of the devices
manually but imagine that we have hundreds of devices that are waiting for us to
write the IP addresses for them. It will be a punishment isn’t it?!

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 110


Lab 9 Servers and Protocols Network Manual

Good news that is no need to worry about that because DHCP will be responsible
for giving these devices their IP addresses dynamically.

After setting the IP address of DHCP of course manually, open DHCP from services
and follow the steps in the figure (9.3).

Step 1

Step 2

Step 3

Step 5

Step 7
Step 4
The network that the
DHCP will use to give
devices IP addresses
from its range

Step 6
Step 8 Step 9 Maximum number of IP
addresses can DHCP give
to devices

Figure (9.3) DHCP service

9.4 Email

We will write the IP address of Email server which is 10.0.0.6 / 8. Now, we will do
as in the figure (9.4).

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 111


Lab 9 Servers and Protocols Network Manual

Step 1

Step 2

Step 3
Add the user name Step 4
and password To add it to the
database

Figure (9.4) Email service

We will do step 3 and step 4 as much as we have users.

9.5 TFTP (Trivial File Transfer Protocol)


We will use TFTP server to make a backup for:
- IOS (Internetwork Operating System).
- Router’s configurations.
And restore them again to the router.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 112


Lab 9 Servers and Protocols Network Manual

First step is to ensure that we can access the TFTP server by using ping command.
Usually backup is used to get copy of existing file of IOS, in case the new image
crashes and burns.

Two things we need to know before start making a buck up:


1- Flash memory: before we attempt to upgrade the cisco IOS on our router
with a new IOS file, it’s good idea to verify that your flash memory has
enough room to hold the new image.
2- Name of the file that is stored in the flash because we need it when we will
make the backup.
We verify the amount of flash memory and the file or files being stored in flash
memory by using:

Router#show flash

Copy the name of the file because we will need it later. We can use another
command which is:
Router#show version

The main difference in the output of the show flash and show version commands
is that show flash command displays all files in flash and the show version
command shows the actual name of the file that the router is using to run the
router.

9.5.1 Backing Up and Restoring Cisco IOS

In this section we will learn how to make a backup for a router IOS then how to
restore this backup. It is done with very easy steps. Follow me then see.

Backing up the cisco IOS

To back up the cisco IOS to a TFTP server, we will use:


Router#copy flash tftp

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 113


Lab 9 Servers and Protocols Network Manual

After press enter we will be asked the following:


Source filename []? pt1000-i-mz.122-28.bin

Here we will write the name of the file in flash memory


that we got when we used show flash command.

Address or name of remote host []? 10.0.0.7

We will write the IP address of the TFTP host.

Destination filename [pt1000-i-mz.122-28.bin]?

We will write any name we want for the file, but if we


don’t write anything and press enter it will take the
name between [ ].

Now, we can say that the contents of flash memory were copied successfully to
the TFTP server. Go and check our backup file inside the server you will find it there.

Restoring the cisco router IOS

For any reason if we need to restore the IOS to flash memory. This command will
be used:

Router#copy tftp flash


Address or name of remote host []? 10.0.0.7

IP address of TFTP server

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 114


Lab 9 Servers and Protocols Network Manual

Source filename []? pt1000-i-mz.122-28.bin

Name that we wrote it for the file which we stored in TFTP server

Destination filename [pt1000-i-mz.122-28.bin]?

Enter

If the file name which is in TFTP server and in flash memory are the same, so the
router will ask us if we want to overwrite it.
In case that we are loading a new file and we don’t have enough room in flash
memory to store both the new and existing copies, the router will ask to erase the
contents of flash memory before writing the new file into flash memory.

9.5.2 Backing Up and Restoring the Router Configurations

Any change that we make to the router configurations are stored in the running-
config file. We want to make a backup of the configuration information just in case
the router or switch completely dies. Even if this doesn’t happen it’s good to have
for reference and documentation reasons.
Now, we will describe how to copy the configurations of a router to a TFTP server
and how to restore that configurations.
Backing up the router configurations
To copy the router’s configurations from a router to a TFTP server, we can use
either the copy running-config tftp or the copy startup-config tftp command. Either
one will back up the router configurations that’s currently running in DRAM or
that’s stored in NVRAM.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 115


Lab 9 Servers and Protocols Network Manual

Router#copy running-config tftp


Address or name of remote host []?

IP address of TFTP server

Destination filename[router-confg]?

Any name we want. If we don’t write a name and press enter it will
take the name between [ ].

If we have a hostname already configured, the command will automatically use


the hostname plus the extension –confg as the name of the file.

Restoring the router configurations

I guess that you know what will be the command that we will use.

Router#copy tftp running-config


Address or name of remote host []?

IP address of TFTP server

Source filename []?

The name that we used to make the backup

Destination filename [running-config]?

Enter

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 116


Lab 9 Servers and Protocols Network Manual

I will leave for you to copying the current configurations to NVRAM and to
restore it too.

9.6 Servers Testing


HTTP, DNS, DHCP, Email and TFTP are ready now. We have to ensure that every
server is working correctly. With a big smile let me tell you that your mission is
testing everything and goes as supposed to be. Do the following then write your
notice.

DHCP server testing


Change the IP address configuration of PCs that in LAN 10.0.0.0 /8 to DHCP
instead of static.

------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

HTTP and DNS servers testing


Open a pc in each LAN and check the web browser, if we can get our web page
that we modified.

-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 117


Lab 9 Servers and Protocols Network Manual

TFTP server testing


In the beginning make a backup for the router configurations then change the
name of the router and save this changing after that make a restore for the
configurations.

------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

Email server testing


Open desktop of a pc then choose configure mail. Fill in the blank the required
then save them. Do this for another PC.

Users’ names and passwords that you will write in the configure mail window
must match the names and passwords that are saved in the Email server in section
(9.4). Now, go to mail browser and send a message and see if the other PC receives
it then you can replay by a message.

------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 118


Lab 9 Servers and Protocols Network Manual

9.7 Making a Router Works as DHCP Server

We will go through making a router as DHCP server in a few minutes, but first I
want you to do the following:

9.7.1 What Will Happen If?!

Just try these things and tell me what you will get.

What will happen if?!

1- We don’t write an IP address for DHCP server.

---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
2- If the available range for DHCP server is 3 IP addresses only.

---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------

9.7.2 Router as DHCP Server


To make a router acts as DHCP server we need some configurations. For this
purpose, we will use the scenario in the figure.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 119


Lab 9 Servers and Protocols Network Manual

R-DHCP

F0/0
192.168.1.1
Network address
192.168.1.0 0 /24

Figure (9.5) Router as DHCP

I will not write the configurations of changing router’s name and setting IP
address of the router. All this will be done by you because you don’t need me any
more to configure that for you.

Configurations in router R-DHCP

---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 120


Lab 9 Servers and Protocols Network Manual

Now, we will add the following configurations to what you did.

Configurations in router R-DHCP

R-DHCP(config)#ip dhcp pool DHCP_LAB Any name

R-DHCP(dhcp-config)#network 192.168.1.0 255.255.255.0

The network that IP addresses of PCs will belong to

R-DHCP(dhcp-config)#default-router 192.168.1.1

To send the gateway IP address to all PCs

R-DHCP(dhcp-config)#end
R-DHCP#wr

If we decided to keep some IP addresses for example (192.168.1.3 and


192.168.1.5) for any purpose and we don’t want DHCP gives them to any host. To
do that we will use the following command:

R-DHCP (config)#ip dhcp excluded-address 192.168.1.3 192.168.1.5

The IP addresses that DHCP not allowed to use

9.8 Telnet
Telnet is a virtual terminal protocol that allows us. To make connections to
remote devices, gather information, and run programs.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 121


Lab 9 Servers and Protocols Network Manual

After our routers and switches are configured, we can use the Telnet to
reconfigure and / or check up on our routers and switches without using a console
cable.

9.8.1 Telnet Configurations


We will use the topology in figure (9.1) to make the telnet configurations. We
have two ways to setup the configurations.

a) First way

R1(config)#line vty 0 4 Number from 1 to 807

R1(config-line)#password network Any password you want

R1(config-line)# login

If we don’t write it the password will not be activated as it


isn’t written

b) Second way

R2(config)#username Elham password E&4


R2(config)#line vty 0 4
R2(config-line)# login local

This command to compare between what is in the router database


and what will the user write when she/he wants to enter remotely

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 122


Lab 9 Servers and Protocols Network Manual

9.9 Useful Command


Security is very important thing that all people looking for. In this course we will
not go deep in network security however in lab5 we discussed some commands
which are provided security. Here I will add one more command and you will tell
me what it used for after using it.

R1(config)#service password-encryption
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
The worst mistake is to not make any.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 123


Conclusion

A network is a set of communication devices connected by media links.

You start the labs by learning hardware. You recognize the colors of the cable and
its types to connect network devices together. IP addressing is an important step
to be ready for understanding subnetting and VLSM.

All these concepts are your stone that you use to climb to the next stage
“configurations”.

Implement a very simple network with writing basic commands is your beginning
in configurations. Network becomes more organized after using VLANs. Then the
network gets bigger and bigger. This is why you start to deal with WANs. This
improvement opens a new window for you to learn how to use static and dynamic
routing. Ending with using some useful services and protocols.

And designing a network is good chance to organize and practice all what you get.

This is everything in network?! Of course not. What you just have learned is a tiny
spot of light to start discover a very amazing world called “Network”. A lot of
information is waiting for you. Reading, asking and practicing are the way to be
good in this field.

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 124


Conclusion Network Manual

I believe that network will be something easy for you just for one reason “You can
do it”.
At the end of the journey I would like to thank every person who helps me to
finish this manual. I will not mention names but from deep of my heart “Thank you
so much”.
For you my dearly students I hope that this course was interesting and useful

Finally, I wish you all the best future engineers.

Eng. Elham Abdulrhman Al-Maqtari

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 125


References

1- CCNA: cisco certified network associate – Student guide – Sixth edition –


Todd Lammle.
2- Data communications and networking – Fifth edition – Behrouz A.Forouzan.
3- MAC address issues in IEEE802.1 – Don Pannell – Principal systems architect
– November 2014.
4- IP addressing and subnetting workbook – Version 1.5 – Produced by Robb
Jones – Cisco network academy.
5- www.ritambhara-in/dfference-between-mac-address-and-ipaddress.
6- www.arin.net.
7- www.routerallery.com

ENG. ELHAM ABDULRAHMAN AL-MAQTARI 126

You might also like