Sunteți pe pagina 1din 57

Laboratory Exercise

LAB MANUAL
Routing & Switching

Faculty Name: Kashif Bashir

Routing & Switching

KASHIF BASHIR

Laboratory Exercise

TABLE OF CONTENTS
S.NO

Description

Lab-1

Date

Page

T.A Signature

a) Detailed information of OSI model

b) Symptoms of Layers Problem


Lab-2
a) Basic Configuration of Router
b) Connecting Ethernet Interfaces
Physically.

Lab-3
a) Configure Static Route.
b) Configuring Defaul Route.

c) Configuring Recursive Table Lookup


Lab-4
Configuring Dynamic Routing Protocol
RIP(Routing information Protocol).

Lab-5
a) Configuring Dynamic Routing
Protocol Rip Version 2
b) Configuring Passive Interface on
Router using Rip

Lab-6
a) Design a topology for DHCP server
through which PC would be able to
Get IPS Dynamically.

b) Design a topology for 2 router

having DHCP server implemented.


PC would be able to assign the IP
Dynamically according to the DHCP
range.

Lab-7
a) Configring EIGRP

b) Manipulating Bandwidth, Delay,


Relibility, Cost Values.

Lab-8

a) Configuring OSPF &


troubleshooing.
b) Configure loopback Interfaces
with respect to OSPF
Routing & Switching

KASHIF BASHIR

Laboratory Exercise

c)

Configure Ospf NSSA and Stub


Area.

Lab-9
a) Redistribution Between same
Routing Protocols with different
Autonomous system number.
b) Redistribution Between Different
Routing protocols

10

Lab-10

a) Switching & a Brief introduction to


Inter V-LAN routing.
b) Port Security on Layer 2
manageable Switches

Routing & Switching

KASHIF BASHIR

Laboratory Exercise

Lab-1
Objective:
a) Detailed Introduction of OSI Model
b) Symptoms of Each Layer Problems
a) Detailed Introduction of OSI Model

OSI REFERENCE MODEL


The category of OSI Reference Model is defined by its seven layers:
7) Application (Provides the means for end-to-end connectivity between individuals in the human network
using data network).

6) Presentation (provides for common representation of the data transferred between application layer
services.

5) Session

(Provides services to the presentation layer to organize its dialogue to manage data

exchange).

4) Transport

(defines services to segment, transfer and reassembled the data for individual
communication between the end devices). The Transport layer uses an addressing scheme called a port
number. Port numbers identify applications and Application layer services that are the source and
destination of data

3) Network

(Provides services to exchange the individual pieces of data over the network between
identified End devices).

2) Data Link

(Protocols describe methods for exchanging data frames between devices over a common

media.

1) Physical

(Protocols describe the mechanical, electrical, functional procedural means to activate,


maintain & de-activate physical connection for bit transmission to end from a network device.

Routing & Switching

KASHIF BASHIR

Laboratory Exercise

TCP

Routing & Switching

KASHIF BASHIR

Laboratory Exercise

Working of Each layer

Routing & Switching

KASHIF BASHIR

Laboratory Exercise

It also provides services to the network Layer of OSI model

The Ethernet MAC sub layer has two primary responsibilities:

Data Encapsulation
Media Access Control
Data Encapsulation provides three primary functions:
Frame delimiting
Addressing
Error detection

Media Access Control


Control of frames placement ON and OFF the media
Media Recovery.

Routing & Switching

KASHIF BASHIR

Laboratory Exercise

Routing & Switching

KASHIF BASHIR

Laboratory Exercise

Routing & Switching

KASHIF BASHIR

Laboratory Exercise

Routing & Switching

KASHIF BASHIR

10

Laboratory Exercise

LAB-1B
Objective: Symptoms of each Layer Problem

Routing & Switching

KASHIF BASHIR

11

Laboratory Exercise

Routing & Switching

KASHIF BASHIR

12

Laboratory Exercise

Lab-2
Objective:
a) Basic Configuration of a Router
b) Connecting Ethernet interfaces & Verifying Connectivity

LAB 2-A

User EXEC Mode:


When you are connected to the router, you are started in user EXEC mode. The user EXEC commands are a subset
of the privileged EXEC commands.

Privileged EXEC Mode:


Privileged commands include the following:
Configure Changes the software configuration.
Debug Display process and hardware event messages.
Setup Enter configuration information at the prompts.
Enter the command disable to exit from the privileged EXEC mode and return to
user EXEC mode.

Routing & Switching

KASHIF BASHIR

13

Laboratory Exercise
Configuration Mode
Configuration mode has a set of submodes that you use for modifying interface
settings, routing protocol settings, line settings, and so forth. Use caution with
configuration mode because all changes you enter take effect immediately.
To enter configuration mode, enter the command configure terminal and exit by
pressing Ctrl-Z.
Note:
Almost every configuration command also has a no form. In general, use the no
form to disable a feature or function. Use the command without the keyword no
to re-enable a disabled feature or to enable a feature that is disabled by default.
For example, IP routing is enabled by default. To disable IP routing, enter the no
ip routing command and enter ip routing to re-enable it.

Getting Help
In any command mode, you can get a list of available commands by entering a
question mark (?).
Router>?
To obtain a list of commands that begin with a particular character sequence,
type in those characters followed immediately by the question mark (?).

Router#co?
configure connect copy
To list keywords or arguments, enter a question mark in place of a keyword or
argument. Include a space before the question mark.
Router#configure ?
memory
Configure from NV memory
network
Configure from a TFTP network host
terminal
Configure from the terminal
You can also abbreviate commands and keywords by entering just enough
characters to make the command unique from other commands. For example,
you can abbreviate the show command to sh.

Configuration Files
Any time you make changes to the router configuration, you must save the
changes to memory because if you do not they will be lost if there is a system
reload or power outage. There are two types of configuration files: the running
(current operating) configuration and the startup configuration.

Routing & Switching

KASHIF BASHIR

14

Laboratory Exercise
Following privileged mode commands to work with configuration files.
Router#configure terminal modify the running configuration manually from the terminal.
Router#show running-config display the running configuration.
Router#show startup-config display the startup configuration.
Router#copy running-config startup-config copy the running
configuration to the startup configuration.
Router#copy startup-config running-config copy the startup
configuration to the running configuration.
Router#erase startup-config erase the startup-configuration in NVRAM.
Router#copy tftp running-config load a configuration file stored on a Trivial File Transfer Protocol (TFTP)
server into the running configuration.
Router#copy running-config tftp store the running configuration on a
TFTP server.

Routing & Switching

KASHIF BASHIR

15

Laboratory Exercise

LAB 2-B
Objective: Configuring Ethernet interfaces
Take the following steps to configure the IP address of an interface.
Step 1: Enter privileged EXEC mode:
Router>enable password
Step 2: Enter the configure terminal command to enter global configuration
mode.
Router#config terminal
Step 3: Enter the interface type slot/port (for Cisco 7000 series) or interface
type port (for Cisco 2500 series) to enter the interface configuration mode.
Example:
Router (config)#interface fast ethernet 0/1
Step 4: Enter the IP address and subnet mask of the interface using the ip
address ipaddress subnetmask command.
Example,
Router (config-if)#ip address 192.168.10.1 255.255.255.0
Step 5: Exit the configuration mode by pressing Ctrl-Z
Router(config-if)#[Ctrl-Z]
Configuring PC for Connectivity

Right Click on My Network Places situated on the Desktop

Click Properties

Right Click on The LOCAL AREA NETWORK and


Click properties.

Select Internet Protocol Version 4 & click Properties button

Routing & Switching

KASHIF BASHIR

16

Laboratory Exercise

When you enter the IP address on the PC Relevant to their Subnet.


Finally Go to Start > RUN> cmd
C:\> ping 192.168.10.1
Ping Result should be

Routing & Switching

KASHIF BASHIR

17

Laboratory Exercise

LAB-3
Objective:
a) Configuring Static Route
b) Alternative Route Configuration

a) Configuring Static Route

Task-1
Configure ip address on the three router
Router1>enable
Router1#configure Terminal
Router1(Config)# interface se0/0/0
Router1(Config-if)# ip address 10.0.0.1 255.0.0.0
Router1(Config-if)# clock rate 64000
Router1(Config-if)# no shutdown
Router2>enable
Router2#configure Terminal
Router2(Config)# interface se0/0/0
Router2(Config-if)# ip address 10.0.0.2 255.0.0.0
Router2(Config-if)# no shutdown
Router2(Config-if)#end
Router2>enable
Router2#configure Terminal
Router2(Config)# interface se0/0/1
Router2(Config-if)# ip address 192.168.2.1 255.255.255.0
Router2(Config-if)# clockrate 64000
Router2(Config-if)# no shutdown

Routing & Switching

KASHIF BASHIR

18

Laboratory Exercise
Router3>enable
Router3#configure terminal
Router3(Config)#interface se0/0/1
Router3(Config-if)#ip address 192.168.2.2 255.255.255.0
Router3(Config-if)#no shutdown
Router3(Config-if)#end
Router3>enable
Router3#configure terminal
Router3(Config)#interface fa0/0
Router3(Config-if)#Ip address 172.16.1.1 255.255.255.0
Router3(Config-if)#no shutdown
Router3(Config-if)#end

Configuring Static Route


Router1>enable
Router1# Configure terminal
Router1(Config)# ip route 172.16.1.0 255.255.255.0 10.0.0.2
(Where 172.16.1.0= Destination Address 255.255.255.0= Subnet mask, 10.0.0.2= Next Hop Address)
Router1(Config)# ip route 192.168.2.0 255.255.255.0 10.0.0.2

Router2>enable
Router2#configure Terminal
Router2(Config)# ip route 172.16.1.0 255.255.255.0 192.168.2.2

Router3>Enable
Router3#configure terminal
Router3(Config)# ip route 10.0.0.0 255.0.0.0 192.168.2.1

Routing & Switching

KASHIF BASHIR

19

Laboratory Exercise

b) Configuring Default Route


Default Network: Default Network or Default Route are configure when the destination is unknown or
not known by the user

Task 1
Configure ip address on the three router
Router1>enable
Router1#configure Terminal
Router1(Config)# interface se0/0/0
Router1(Config-if)# ip address 10.0.0.1 255.0.0.0
Router1(Config-if)# clock rate 64000
Router1(Config-if)# no shutdown
Router2>enable
Router2#configure Terminal
Router2(Config)# interface se0/0/0
Router2(Config-if)# ip address 10.0.0.2 255.0.0.0
Router2(Config-if)# no shutdown
Router2(Config-if)#end
Router2>enable
Router2#configure Terminal
Router2(Config)# interface se0/0/1
Router2(Config-if)# ip address 192.168.2.1 255.255.255.0
Router2(Config-if)# clockrate 64000
Router2(Config-if)# no shutdown
Router3>enable
Router3#configure terminal
Router3(Config)#interface se0/0/1
Router3(Config-if)#ip address 192.168.2.2 255.255.255.0
Router3(Config-if)#no shutdown
Router3(Config-if)#end
Router3>enable
Router3#configure terminal
Router3(Config)#interface fa0/0
Router3(Config-if)#Ip address 172.16.1.1 255.255.255.0
Router3(Config-if)#no shutdown
Router3(Config-if)#end

Routing & Switching

KASHIF BASHIR

20

Laboratory Exercise
Configuring Default Route
Router1>enable
Router1# configure terminal
Router1(Config)#ip route 0.0.0.0 0.0.0.0 10.0.0.2
(Where 0.0.0.0= Destination, Subnet=0.0.0.0, Next Hop=10.0.0.2)

Router2>enable
Router2# configure terminal
Router2(Config)#ip route 0.0.0.0 0.0.0.0 192.168.2.2
Router3>enable
Router3# configure terminal
Router3(Config)#ip route 0.0.0.0 0.0.0.0 192.168.2.1

C) Configuring Recursive Table Lookup

Task-1
Configure IP Address on the three router
Router1>enable
Router1#configure Terminal
Router1(Config)# interface se0/0/0
Router1(Config-if)# ip address 10.0.0.1 255.0.0.0
Router1(Config-if)# clock rate 64000
Router1(Config-if)# no shutdown
Router2>enable
Router2#configure Terminal
Router2(Config)# interface se0/0/0
Router2(Config-if)# ip address 10.0.0.2 255.0.0.0
Router2(Config-if)# no shutdown
Router2(Config-if)#end
Router2>enable
Router2#configure Terminal
Router2(Config)# interface se0/0/1
Router2(Config-if)# ip address 192.168.2.1 255.255.255.0
Router2(Config-if)# clockrate 64000
Router2(Config-if)# no shutdown

Routing & Switching

KASHIF BASHIR

21

Laboratory Exercise

Router3>enable
Router3#configure terminal
Router3(Config)#interface se0/0/1
Router3(Config-if)#ip address 192.168.2.2 255.255.255.0
Router3(Config-if)#no shutdown
Router3(Config-if)#end
Router3>enable
Router3#configure terminal
Router3(Config)#interface fa0/0
Router3(Config-if)#Ip address 172.16.1.1 255.255.255.0
Router3(Config-if)#no shutdown
Router3(Config-if)#end

Configuring Recursive Table


Router1>enable
Router1# configure terminal
Router1(Config)#ip route 172.16.1.0 255.255.255.0 192.168.2..2
(Where 172.16.1.0= Destination, Subnet=255.255.255.0, Previous Hop=192.168.2.2)

Router1>enable
Router1# configure terminal
Router1(Config)#ip route 192.168.2.0 255.255.255.0 10.0.0.2
Router2>enable
Router2# configure terminal
Router2(Config)#ip route 172.16.1.0 255.255.255.0 192.168.2.2
Router3>enable
Router3# configure terminal
Router3(Config)#ip route 10.0.0.0 255.0.0.0 192.168.2.1

Routing & Switching

KASHIF BASHIR

22

Laboratory Exercise

LAB-4
Objective: Configuring Dynamic Routing Protocol RIP
All dynamic routing protocols are built around an algorithm. Generally, an algorithm is a step-by-step procedure for solving a
problem. A routing algorithm must, at a minimum, specify the following:

A procedure for passing reach ability information about networks to other routers
A procedure for receiving reachability information from other routers
A procedure for determining optimal routes based on the reachability information it has and for recording this
information in a route table
A procedure for reacting to, compensating for, and advertising topology changes in an internetwork

Task-1

Router>enable
Router#configure t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname pooh
pooh(config)#interface se0/0/0
pooh(config-if)#ip address 192.168.1.1 255.255.255.0
pooh(config-if)#clock rate 64000
pooh(config-if)#no shutdown
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Piglet
Piglet(config)#interface se0/0/0
Piglet (config-if)#ip address 192.168.1.2 255.255.255.0
Piglet (config-if)#no shutdown
Piglet (config-if)#exit
Piglet (config)#interface se0/0/1
Piglet (config-if)#ip address 172.16.1.1 255.255.255.0
Piglet (config-if)#clock rate 64000
Piglet (config-if)#no shutdown

Routing & Switching

KASHIF BASHIR

23

Laboratory Exercise
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#Hostname Newman
Router(config)#interface se0/0/0
Newman(config-if)#ip address 172.16.1.2 255.255.255.0
Newman(config-if)#no shutdown

Task-2

Configuring Rip v1
pooh(config)#router rip
pooh(config-router)#network 192.168.1.0
pooh(config-router)#exit
pooh(config)#end
Piglet(config)#router rip
Piglet(config-router)#network 192.168.1.0
Piglet(Config-router)#network 172.16.0.0
Piglet(config-router)#exit
Piglet(config)#end
Newman>enable
Newman#configure terminal
Newman(config)#router rip
Newman(config-router)#network 172.16.0.0
Newman(config-router)#exit

Finally verify the Connectivity from End to End


Ping From Newman to pooh
Newman# ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 49/59/63 ms

Routing & Switching

KASHIF BASHIR

24

Laboratory Exercise

LAB-5
Objective: Configuring RIP Version 2

Task-1
Router>enable
Router#configure t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname pooh
pooh(config)#interface se0/0/0
pooh(config-if)#ip address 192.168.1.1 255.255.255.0
pooh(config-if)#clock rate 64000
pooh(config-if)#no shutdown
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Piglet
Piglet(config)#interface se0/0/0
Piglet (config-if)#ip address 192.168.1.2 255.255.255.0
Piglet (config-if)#no shutdown
Piglet (config-if)#exit
Piglet (config)#interface se0/0/1
Piglet (config-if)#ip address 172.16.1.1 255.255.255.0
Piglet (config-if)#clock rate 64000
Piglet (config-if)#no shutdown

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#Hostname Newman
Router(config)#interface se0/0/0
Newman(config-if)#ip address 172.16.1.2 255.255.255.0
Newman(config-if)#no shutdown
Routing & Switching

KASHIF BASHIR

25

Laboratory Exercise
Task-2

Configuring Rip v2
pooh(config)#router rip
pooh(config-router)#version 2
pooh(config-router)#network 192.168.1.0
pooh(config-router)#exit
pooh(config)#end
Piglet(config)#router rip
Piglet(config-router)#version 2
Piglet(config-router)#network 192.168.1.0
Piglet(Config-router)#network 172.16.0.0
Piglet(config-router)#exit
Piglet(config)#end
Newman>enable
Newman#configure terminal
Newman(config)#router rip
Newman(config-router)#version 2
Newman(config-router)#network 172.16.0.0
Newman(config-router)#exit

Finally verify the Connectivity from End to End


Ping From Newman to pooh
Newman# ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 49/59/63 ms

Routing & Switching

KASHIF BASHIR

26

Laboratory Exercise

LAB 5-B
Objective:
Configuring Passive Interface on the given topology using RIP

Task-1
R1>enable
R1#configure terminal
R1(config)#router rip
R1(config-router)#network 30.0.0.0
R1(config-router)#network 192.168.1.0
R1(config-router)#network 12.0.0.0
R1(config-router)#exit
R2>enable
R2#configure terminal
R2(config)#router rip
R2(config-router)#network 192.168.1.0
R2(config-router)#network 11.0.0.0
R2(config-router)#network 172.16.0.0
R2(config-router)#exit
R3>enable
R3#configure terminal
R3(config)#router rip
R3(config-router)#network 172.16.0.0
R3(config-router)#network 20.0.0.0
R3(config-router)#network 10.0.0.0
R3(config-router)#exit

Routing & Switching

KASHIF BASHIR

27

Laboratory Exercise
R4>enable
R4#configure terminal
R4(config)#router rip
R4(config-router)#network 10.0.0.0
R4(config-router)#network 11.0.0.0
R4(config-router)#network 12.0.0.0
R4(config-router)#exit
Configuring Passive Interface on R4 & R3
R3>enable
R3#configure terminal
R3(config)#router rip
R3(Config-router)#passive-interface se0/0/1
R3(Config-router)#exit
R4>enable
R4#configure terminal
R4(config)#router rip
R4(Config-router)#passive-interface se0/0/0
R4(Config-router)#exit

Where se0/0/1 is the interface that is directly connected with R4

Where se0/0/1 is the interface that is directly connected with R3

In order to verify the Passive Interface configured properly enter the following command on R4
R4>enable
R4# show ip protocols
Routing Protocol is "rip"
Sending updates every 30 seconds, next due in 12 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Redistributing: rip
Default version control: send version 1, receive any version
Interface
Send Recv Triggered RIP Key-chain
FastEthernet0/0
1 21
Serial0/0/1
1 21
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
10.0.0.0
11.0.0.0
12.0.0.0
Passive Interface(s):
Serial0/0/0
Routing Information Sources:
Gateway
Distance Last Update
11.0.0.1
120 00:00:01
12.0.0.1
120 00:00:08
Distance: (default is 120)

Note: As Routing information Source does not contain the information of 10.0.0.0/8 network. This
means that passive interface is in process
Routing & Switching

KASHIF BASHIR

28

Laboratory Exercise

LAB 6
Objective:
a) Design a topology for DHCP server Through which PC would be able to Get IPS Dynamically
b) Design a topology for 2 router having DHCP server implemented. PC would be able to assign
the IP Dynamically according to the DHCP range.
a) Design a topology for DHCP server Through which PC would be able to Get IPS Dynamically

Task-1
Configure the interface of a router with a correct IP address
Router>en
Router#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int fastEthernet 0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Routing & Switching

KASHIF BASHIR

29

Laboratory Exercise
Task-3 Configuring DHCP

Router(config)#ip dhcp excluded-address 192.168.1.2 192.168.1.10


Router(config)#ip dhcp pool Network1
Router(dhcp-config)#network 192.168.1.0 255.255.255.0
Router(dhcp-config)#default-router 192.168.1.1
Router(dhcp-config)#exit
Task-4
When electing the IP address to the PC. The pc would be able to get the IP assigned automatically

Task 5 (Troubleshooting)
If a pc has assigned the IP statically then it would not be able to get acknowledgement from other PCS

Routing & Switching

KASHIF BASHIR

30

Laboratory Exercise
In the end the Activity should be 100% and pc would be able to get IPS from DHCP Server

b) Design a topology for 2 router having DHCP server implemented. PC would be able to
assign the IP Dynamically according to the DHCP range.

Scenario

Task 1
R1>enable
R1# config t
R1(config)#interface se0/0/0
R1-(config-if)# ip address 209.165.200.225 255.255.255.0
R1-(config-if)#clock rate 64000
R1-(config-if)#no shutdown
R2>enable
R2#config t
R2(config)# interface se0/0/0
R2-(config-if)# ip address 209.165.200.226 255.255.255.0
R2-(config-if)#no shutdown

After configuring serial interfaces our next step is to configure Fast Ethernet interfaces

Routing & Switching

KASHIF BASHIR

31

Laboratory Exercise

Task 2
R1#config t
R1(config)# interface fa0/0
R1(config-if)#ip address 12.0.0.1 255.255.255.0
R1(config-if)#no shutdown
R2>enable
R2#config t
R2(config)# interface fa0/0
R2(config-if)# ip address 192.168.10.1 255.255.255.0
R2(config-if)# no shutdown

Task 3
Now we implement the DHCP scenario

Range of Addresses

R1(config)#ip dhcp excluded-address 12.0.0.2 12.0.0.10


R1(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.10
R1(config)#ip dhcp pool Router1
R1(dhcp-config)#network 12.0.0.0 255.255.255.0
R1(dhcp-config)#dns-server 12.0.0.3
R1(dhcp-config)#default-router 12.0.0.1
R1(dhcp-config)#exit

Name of pool

R1(config)#ip dhcp pool Router2


R1(dhcp-config)#network 192.168.10.0 255.255.255.0
R1(dhcp-config)#dns-server 192.168.10.3
R1(dhcp-config)#default-router 192.168.10.1
R1(dhcp-config)#exit

Task 4
In router 2 we need a helper address as an agent to get information about DHCP addresses for that
purpose we issue the command on Fast Ethernet interface
R2#config t
R2(config)# interface fa0/0
R2(config-if)ip helper-address 209.165.200.225
R2(config-if)#exit
Now Both PCs that are connected to the routers can be assigned an IP address automatically.

Routing & Switching

KASHIF BASHIR

32

Laboratory Exercise

LAB-7
Objective: Configuring EIGRP(Enhanced Interior Gateway routing Protocol) &
manipulating Bandwidth
Enhanced Interior Gateway Routing Protocol (EIGRP) is a distance vector, classless routing protocol.
EIGRP includes several features that are not commonly found in other distance vector routing protocols like RIP
(RIPv1 and RIPv2) and IGRP.
Reliable Transport Protocol (RTP)
Bounded Updates
Diffusing Update Algorithm (DUAL)
Establishing Adjacencies
Neighbor and Topology Tables

Task-1
Router>enable
Router#configure t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname pooh
pooh(config)#interface se0/0/0
pooh(config-if)#ip address 192.168.1.1 255.255.255.0
pooh(config-if)#clock rate 64000
pooh(config-if)#no shutdown
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Piglet
Piglet(config)#interface se0/0/0
Piglet (config-if)#ip address 192.168.1.2 255.255.255.0
Piglet (config-if)#no shutdown
Piglet (config-if)#exit
Piglet (config)#interface se0/0/1
Piglet (config-if)#ip address 172.16.1.1 255.255.255.0
Piglet (config-if)#clock rate 64000
Piglet (config-if)#no shutdown

Routing & Switching

KASHIF BASHIR

33

Laboratory Exercise
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#Hostname Newman
Router(config)#interface se0/0/0
Newman(config-if)#ip address 172.16.1.2 255.255.255.0
Newman(config-if)#no shutdown

Task-2

Configuring EIGRP
pooh(config)#router eigrp 1
pooh(config-router)#network 192.168.1.0 0.0.0.255
pooh(config-router)#no auto-summary
pooh(config-router)#exit
pooh(config)#
%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 192.168.1.2 (Serial0/0/0) is up: new adjacency
piglet(config)#router eigrp 1
piglet(config-router)#network 192.168.1.0 0.0.0.255
piglet(config-router)#network 172.16.1.0 0.0.0.255
piglet(config-router)#no auto-summary
%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 192.168.1.1 (Serial0/0/0) is up: new adjacency
%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 172.16.1.2 (Serial0/0/1) is up: new adjacency
Newman(config)#router eigrp 1
Newman(config-router)#network 172.16.1.0 0.0.0.255
Newman(config-router)#no auto-summary
%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 172.16.1.1 (Serial0/0/0) is up: new adjacency

b) Manipulating Bandwidth, Delay, Reliability, Cost Values


Pooh#configure terminal
pooh(config)#interface se0/0/0
pooh(config-if)#bandwidth 2048
%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 192.168.1.2 (Serial0/0/0) is up: new adjacency
piglet#configure terminal
piglet(config)#interface se0/0/0
piglet(config-if)#bandwidth 2048
%DUAL-5-NBRCHANGE: IP-EIGRP 1: Neighbor 192.168.1.1 (Serial0/0/0) is up: new adjacency

Routing & Switching

KASHIF BASHIR

34

Laboratory Exercise

LAB 8

Objective
a) Configuring OSPF (Open Shortest path First)
OSPF (Open Shortest Path First) and IS-IS (Intermediate-System-to-Intermediate-System) are the Link Stat
Routing protocols.
Dijkstra's algorithm is commonly referred to as the shortest path first (SPF) algorithm. This algorithm accumulates
costs along each path, from source to destination.

Task-1

Router>enable
Router#configure t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname pooh
pooh(config)#interface se0/0/0
pooh(config-if)#ip address 192.168.1.1 255.255.255.0
pooh(config-if)#clock rate 64000
pooh(config-if)#no shutdown
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Piglet
Piglet(config)#interface se0/0/0
Piglet (config-if)#ip address 192.168.1.2 255.255.255.0
Piglet (config-if)#no shutdown
Piglet (config-if)#exit
Piglet (config)#interface se0/0/1
Piglet (config-if)#ip address 172.16.1.1 255.255.255.0
Piglet (config-if)#clock rate 64000
Piglet (config-if)#no shutdown

Routing & Switching

KASHIF BASHIR

35

Laboratory Exercise
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#Hostname Newman
Router(config)#interface se0/0/0
Newman(config-if)#ip address 172.16.1.2 255.255.255.0
Newman(config-if)#no shutdown

Task-2

Configuring OSPF
pooh(config)#router ospf 1
pooh(config-router)#network 192.168.1.0 0.0.0.255 area 0
pooh(config-router)#exit
pooh(config)#
02:06:00: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.2 on Serial0/0/0 from LOADING to FULL, Loading Done
piglet(config)#router ospf 1
piglet(config-router)#network 192.168.1.0 0.0.0.255 area 0
piglet(config-router)#network 172.16.1.0 0.0.0.255 area 0
piglet(config-router)#exit
02:05:52: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.1 on Serial0/0/0 from LOADING to FULL, Loading Done
02:06:21: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.1.2 on Serial0/0/1 from LOADING to FULL, Loading Done
Newman(config)#router ospf 1
Newman(config-router)#network 172.16.1.0 0.0.0.255 area 0
Newman(config-router)#exit
02:06:12: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.2 on Serial0/0/0 from LOADING to FULL, Loading Done

Routing & Switching

KASHIF BASHIR

36

Laboratory Exercise

LAB 8

Objective
b) Configure Loop-back interfaces in OSPF environment

Task 1
Configuring Loop-Back Interfaces
R1>enable
R1#configure terminal
R1(config)#interface loopback 0
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R1 (config-if)#ip address 31.0.0.1 255.0.0.0


R1(config-if)#exit
R2>enable
R2#configure terminal
R2(config)#interface loopback 0
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R2 (config-if)#ip address 32.0.0.1 255.0.0.0


R2(config-if)#exit
R3>enable
R3#configure terminal
R3(config)#int loopback 0
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R3 (config-if)#ip address 33.0.0.1 255.0.0.0


R3(config-if)#exit
R4>enable
R4#configure terminal
R4(config)#interface loopback 0
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R4 (config-if)#ip address 34.0.0.1 255.0.0.0


Routing & Switching

KASHIF BASHIR

37

Laboratory Exercise
R4(config-if)#exit
R4>enable
R4#configure terminal
R4(config)#interface loopback 0
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R4 (config-if)#ip address 35.0.0.1 255.0.0.0


R4(config-if)#exit
Task-2
Configuring OSPF on the routers with loop back addresses
R1(config)#router ospf 1
R1(config-router)#network 31.0.0.0 0.255.255.255 area 0
R1(config-router)#network 30.0.0.0 0.255.255.255 area 0
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#network 12.0.0.0 0.255.255.255 area 0
R1(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#network 32.0.0.0 0.255.255.255 area 0
R2(config-router)#network 172.16.1.0 0.0.0.255 area 0
R2(config-router)#network 192.168.1.0 0.0.0.255 area 0
R2(config-router)#network 11.0.0.0 0.255.255.255 area 0
R2(config-router)#exit
R3(config)#router ospf 1
R3(config-router)#network 33.0.0.0 0.255.255.255 area 0
R3(config-router)#network 172.16.1.0 0.0.0.255 area 0
R3(config-router)#network 10.0.0.0 0.255.255.255 area 0
R3(config-router)#network 20.0.0.0 0.255.255.255 area 0
R3(config-router)#exit

R4(config)#router ospf 1
R4(config-router)#network 34.0.0.0 0.255.255.255 area 0
R4(config-router)#network 35.0.0.0 0.255.255.255 area 0
R4(config-router)#network 10.0.0.0 0.255.255.255 area 0
R4(config-router)#network 11.0.0.0 0.255.255.255 area 0
R4(config-router)#network 12.0.0.0 0.255.255.255 area 0
R4(config-router)#exit

Routing & Switching

(Adding Loop-back interface address)

(Adding Loop-back interface address)

(Adding Loop-back interface address)

(Adding Loop-back interface address)


(Adding Loop-back interface address)

KASHIF BASHIR

38

Laboratory Exercise
Task-3
Verifying Loop back interfaces
R1#show interfaces loopback 0
Loopback0 is up, line protocol is up (connected)
Hardware is Loopback
Internet address is 31.0.0.1/8
MTU 1500 bytes, BW 8000000 Kbit, DLY 5000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation LOOPBACK, loopback not set
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Queueing strategy: fifo
Output queue 0/0, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out

Routing & Switching

KASHIF BASHIR

39

Laboratory Exercise
LAB-8
c) Configure NSSA and Stub area on OSPF

Task-1
Configure IP Addressing As given in the above diagram
Task 2
R1(config)#router ospf 1
R1(config-router)#network 31.0.0.0 0.255.255.255 area 0
R1(config-router)#network 30.0.0.0 0.255.255.255 area 0
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#network 12.0.0.0 0.255.255.255 area 0
R1(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#network 32.0.0.0 0.255.255.255 area 0
R2(config-router)#network 172.16.1.0 0.0.0.255 area 0
R2(config-router)#network 192.168.1.0 0.0.0.255 area 0
R2(config-router)#network 11.0.0.0 0.255.255.255 area 0
R2(config-router)#exit
R3(config)#router ospf 1
R3(config-router)#network 33.0.0.0 0.255.255.255 area 0
R3(config-router)#network 172.16.1.0 0.0.0.255 area 0
R3(config-router)#network 10.0.0.0 0.255.255.255 area 0
R3(config-router)#network 20.0.0.0 0.255.255.255 area 0
R3(config-router)#exit

R4(config)#router ospf 1
R4(config-router)#network 34.0.0.0 0.255.255.255 area 0
R4(config-router)#network 35.0.0.0 0.255.255.255 area 0
R4(config-router)#network 10.0.0.0 0.255.255.255 area 0
R4(config-router)#network 11.0.0.0 0.255.255.255 area 0
R4(config-router)#network 12.0.0.0 0.255.255.255 area 0
R4(config-router)#exit
Routing & Switching

(Adding Loop-back interface address)

(Adding Loop-back interface address)

(Adding Loop-back interface address)

(Adding Loop-back interface address)


(Adding Loop-back interface address)

KASHIF BASHIR

40

Laboratory Exercise

Task 3
Configuring Stub Area on R3
R3(config)#router ospf 1
R3(config-router)#area 1 stub no-summary
Task 4
Varifying Stub Area Connectivity
R3#show ip ospf
Routing Process "ospf 1" with ID 33.0.0.1
Supports only single TOS(TOS0) routes
Supports opaque LSA
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 0 normal 1 stub 0 nssa
External flood list length 0
Area 1
Number of interfaces in this area is 3
It is a stub area
Area has no authentication
SPF algorithm executed 10 times
Area ranges are
Number of LSA 21. Checksum Sum 0x09540e
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0

Routing & Switching

KASHIF BASHIR

41

Laboratory Exercise
LAB-8
Configure NSSA on OSPF

Task-1
Configure IP Addressing As given in the above diagram
Task 2
R1(config)#router ospf 1
R1(config-router)#network 31.0.0.0 0.255.255.255 area 0
R1(config-router)#network 30.0.0.0 0.255.255.255 area 0
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#network 12.0.0.0 0.255.255.255 area 0
R1(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#network 32.0.0.0 0.255.255.255 area 0
R2(config-router)#network 172.16.1.0 0.0.0.255 area 0
R2(config-router)#network 192.168.1.0 0.0.0.255 area 0
R2(config-router)#network 11.0.0.0 0.255.255.255 area 0
R2(config-router)#exit
R3(config)#router ospf 1
R3(config-router)#network 33.0.0.0 0.255.255.255 area 0
R3(config-router)#network 172.16.1.0 0.0.0.255 area 0
R3(config-router)#network 10.0.0.0 0.255.255.255 area 0
R3(config-router)#network 20.0.0.0 0.255.255.255 area 0
R3(config-router)#exit

R4(config)#router ospf 1
R4(config-router)#network 34.0.0.0 0.255.255.255 area 0
R4(config-router)#network 35.0.0.0 0.255.255.255 area 0
R4(config-router)#network 10.0.0.0 0.255.255.255 area 0
R4(config-router)#network 11.0.0.0 0.255.255.255 area 0
R4(config-router)#network 12.0.0.0 0.255.255.255 area 0
R4(config-router)#exit
Routing & Switching

(Adding Loop-back interface address)

(Adding Loop-back interface address)

(Adding Loop-back interface address)

(Adding Loop-back interface address)


(Adding Loop-back interface address)

KASHIF BASHIR

42

Laboratory Exercise
Task 3
Configuring Stub Area on R3
R3(config)#router ospf 1
R3(config-router)#area 1 nssa no-summary
R4(Config)#router ospf 1
R4(Config-router)# area 1 nssa no-summary
Task 4
Varifying Not so stubby area connectivity
R3#show ip ospf
Router#show ip ospf
Routing Process "ospf 1" with ID 33.0.0.1
Supports only single TOS(TOS0) routes
Supports opaque LSA
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 0 normal 0 stub 1 nssa
External flood list length 0
Area 1
Number of interfaces in this area is 3
It is a NSSA area
Perform type-7/type-5 LSA translation
Area has no authentication
SPF algorithm executed 14 times
Area ranges are
Number of LSA 13. Checksum Sum 0x060d57
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0

Routing & Switching

KASHIF BASHIR

43

Laboratory Exercise
LAB-9
a) Objective: Redistribution Between Different Routing Protocols
Redistribution: In Networking Redistribution is a process in which different routing Protocols Communicate with each other
with a little negotiation, Exchanging of Routing Table, Selection of Best path are also occur in Redistribution.

Router0 is configured with RIP Version 2

Router1 is configured with EIGRP


In order to communicate RIP with EIGRP a redistribution among both routers are required.
Router2 is working as the Redistributed Router Following are the step that Router2 Required in order to
do redistribution.
Task-1
Configure the topology as shown in the above figure with IP addressing and Routing protocols
Task-2
In The Center Router we will configure both routing protocols
Router2>enable
Router2#configure terminal
Router2(Config)#router eigrp 1
Router2(Config-router)#network 192.168.1.4 0..0.0.3
Router2(Config-Router)#redistribute rip metric 5 1 255 50 100
Router2(Config-Router)#no auto-summary
Note: (Here 5= Bandwidth, 1=Delay, 255=Reliability, 50=Cost, 100=MTU)

Task-2
Routing & Switching

KASHIF BASHIR

44

Laboratory Exercise
Router2>enable
Router2#configure terminal
Router2(Config)#router rip
Router2(Config-router)#version 2
Router2(Config-router)#network 192.168.1.0
Router2(Config-Router)#redistribute eigrp 1 metric 5
Note: (Here 1= Autonomous system number, 5= Metric value of Eigrp)

Finally ping from PC0 To PC1 and your result should be 100 % at the end.

Routing & Switching

KASHIF BASHIR

45

Laboratory Exercise
LAB-9
a) Objective: Redistribution Between Different Routing Protocols

Router0 is configured with EIGRP 1

Router1 is configured with EIGRP 2


In order to communicate (EIGRP 1) with (EIGRP 2) redistribution among both routers are required.
Router2 is working, as the Redistributed Router Following are the step that Router2 Required in order to
do redistribution.
Task-1
Configure the topology as shown in the above figure with IP addressing and Routing protocols
Task-2
In The Center Router we will configure both routing protocols
Router2>enable
Router2#configure terminal
Router2(Config)#router eigrp 1
Router2(Config-router)#network 192.168.1.0
Router2(Config-router)#redistribute eigrp 2 metric 100 1 255 10 5
Router2(Config-Router)#no auto-summary
Note: (Here 2= Autonomous system number, 100=EIGRP bandwidth, 1=delay, 255=reliability, 10=cost, 5=MTU)

Routing & Switching

KASHIF BASHIR

46

Laboratory Exercise
Task-2
Router2>enable
Router2#configure terminal
Router2(Config)#router eigrp 2
Router2(Config-router)#network 192.168.1.4
Router2(Config-router)#redistribute eigrp 1 metric 100 1 255 10 5
Router2(Config-Router)#no auto-summary
Note: (Here 1= Autonomous system number, 100=EIGRP bandwidth, 1=delay, 255=reliability, 10=cost, 5=MTU)

Finally ping from PC0 To PC1 and your result should be 100 % at the end.

Routing & Switching

KASHIF BASHIR

47

Laboratory Exercise
LAB-10
a) Objective: Switching and a brief introduction to inter V-LAN routing

Configuring Inter V-LAN Routing

Task-1
Configuring Names on different V-LANS
S1>enable
S1#configure terminal
S1(Config)#vlan 10
S1(Config-vlan)#name Student
S1(Config-vlan)#exit
S1(Config)#vlan 20
S1(Config-vlan)#name Faculty
S1(Config-vlan)#exit

S2>enable
S2#configure terminal
S2(Config)#vlan 10
S2(Config-vlan)#name Student
S2(Config-vlan)#exit
S2(Config)#vlan 20
S2(Config-vlan)#name Faculty
S2(Config-vlan)#exit

S3>enable
S3#configure terminal
S3(Config)#vlan 10
S3(Config-vlan)#name Student
S3(Config-vlan)#exit
S3(Config)#vlan 20
S3(Config-vlan)#name Faculty
S3(Config-vlan)#exit

Routing & Switching

KASHIF BASHIR

48

Laboratory Exercise
Task 2
Assigning IP to VLAN-99
S1>enable
S1#configure terminal
S1(Config)# interface vlan99
S1(Config-if) ip address 10.0.0.1 255.0.0.0
S1(Config-if) exit
S2>enable
S2#configure terminal
S2(Config)# interface vlan99
S2(Config-if) ip address 10.0.0.2 255.0.0.0
S2(Config-if) exit
S3>enable
S3#configure terminal
S3(Config)# interface vlan99
S3(Config-if) ip address 10.0.0.1 255.0.0.0
S3(Config-if) exit

Task-3
Configuring Access mode and Trunk Mode
S1>enable
S1#configure terminal
S1(Config)# interface range fa0/1-2
S1(Config-if) switchport mode trunk
S1(Config-if) exit
S1(Config)# interface range fa0/5-10
S1(Config-if) switchport mode acess
S1(Config-if) switchport access vlan 10
S1(Config-if) exit
S1(Config)# interface range fa0/11-15
S1(Config-if) switchport mode acess
S1(Config-if) switchport access vlan 20
S1(Config-if) exit

S2>enable
S2#configure terminal
S2(Config)# interface range fa0/1-2
S2(Config-if) switchport mode trunk
S2(Config-if) exit
S2(Config)# interface range fa0/5-10
S2(Config-if) switchport mode acess
S2(Config-if) switchport access vlan 10
S2(Config-if) exit
S2(Config)# interface range fa0/11-15
S2(Config-if) switchport mode acess
S2(Config-if) switchport access vlan 20
S2(Config-if) exit

Routing & Switching

KASHIF BASHIR

49

Laboratory Exercise
S3>enable
S3#configure terminal
S3(Config)# interface range fa0/1-2
S3(Config-if) switchport mode trunk
S3(Config-if) exit
S3(Config)# interface range fa0/5-10
S3(Config-if) switchport mode acess
S3(Config-if) switchport access vlan 10
S3(Config-if) exit
S3(Config)# interface range fa0/11-15
S3(Config-if) switchport mode acess
S3(Config-if) switchport access vlan 20
S3(Config-if) exit

Note:

Student PCs are connected to fast Ethernet port of switch from 5 to 10


Faculty PCs are connected to fast Ethernet port of switch from 11 to 15
Assign one Subnet address to PCS that is:

When we attempt to PING from PC1 to sys1 the ping will be successful but if we PING from PC1 to PC2 or Sys2 then
ping will be unsuccessful
The key point is that, assigning different V-LANS on different ports are able to communicate within the same V-LAN(s)

Routing & Switching

KASHIF BASHIR

50

Laboratory Exercise
LAB-10
b) Objective: configuring Port security on Layer 2 manageable switches
In this lab, you will examine and configure a standalone LAN switch. Although a switch performs basic functions in
its default out-of-the-box condition, there are a number of parameters that a network administrator should modify to
ensure a secure and optimized LAN. This lab introduces you to the basics of switch configuration.

Task-1
Switch>enable
Switch# configure terminal
Swtich(Config)# interface range fa0/1-5
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security maximum 1
Switch(config-if)#switchport port-security mac-address sticky
Switch(config-if)#switchport port-security violation protect
Switch(config-if)#end

Task-2
Switch>enable
Switch# configure terminal
Swtich(Config)# interface range fa0/6-10
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security maximum 1
Switch(config-if)#switchport port-security mac-address sticky
Switch(config-if)#end

Task-3
Switch>enable
Switch# configure terminal
Swtich(Config)# interface range fa0/11-20
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security maximum 1
Switch(config-if)#switchport port-security mac-address sticky
Switch(config-if)#switchport port-security violation shutdown
Switch(config-if)#end

Routing & Switching

KASHIF BASHIR

51

Laboratory Exercise
LAB-11
Objective: CONFIGURE IP ACLs TO MITIGATE ATTACKS

Running Configuration of Router 1


R1#sh running-config
Building configuration...
Current configuration : 1281 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
enable password ciscoenpa55
!
!
!
!
username SSHadmin
!
!
!
Routing & Switching

KASHIF BASHIR

52

Laboratory Exercise
!
!
ip name-server 0.0.0.0
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0/0
ip address 10.1.1.1 255.255.255.0
ip access-group 120 in
clock rate 64000
!
interface Serial0/0/1
no ip address
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0/0/0
!
!
access-list 10 permit host 192.168.3.3
access-list 120 permit udp any host 192.168.1.3 eq domain
access-list 120 permit tcp any host 192.168.1.3 eq smtp
access-list 120 permit tcp any host 192.168.1.3 eq ftp
access-list 120 deny tcp any host 192.168.1.3 eq 443
access-list 120 permit tcp host 192.168.3.3 host 10.1.1.1 eq 22
access-list 120 permit icmp any any echo-reply
access-list 120 permit icmp any any unreachable
access-list 120 deny icmp any any
access-list 120 permit ip any any
!
!
!
Routing & Switching

KASHIF BASHIR

53

Laboratory Exercise
!
!
!
!
line con 0
password ciscoconpa55
login
line vty 0 4
access-class 10 in
password ciscosshpa55
login
!
!
!
End

Running configuration of R2
R2#sh running-config
Building configuration...
Current configuration : 927 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
!
!
enable password ciscoenpa55
!
!
!
!
username SSHadmin
!
!
!
!
!
ip name-server 0.0.0.0
!
!
!
!
!
!
Routing & Switching

KASHIF BASHIR

54

Laboratory Exercise
interface Loopback0
ip address 192.168.2.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/0/0
ip address 10.1.1.2 255.255.255.252
!
interface Serial0/0/1
ip address 10.2.2.2 255.255.255.252
clock rate 64000
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 192.168.1.0 255.255.255.0 Serial0/0/0
ip route 192.168.3.0 255.255.255.0 Serial0/0/1
!
!
access-list 10 permit host 192.168.3.3
!
!
!
!
!
!
!
line con 0
password ciscoconpa55
login
line vty 0 4
access-class 10 in
password ciscosshpa55
login
!
!
!
End
Routing & Switching

KASHIF BASHIR

55

Laboratory Exercise

Running Configuration of R3
R3#sh running-config
Building configuration...
Current configuration : 1186 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R3
!
!
!
enable password ciscoenpa55
!
!
!
!
username SSHadmin
!
!
!
!
!
ip name-server 0.0.0.0
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet0/1
ip address 192.168.3.1 255.255.255.0
ip access-group 110 in
duplex auto
speed auto
!
interface Serial0/0/0
no ip address
shutdown
Routing & Switching

KASHIF BASHIR

56

Laboratory Exercise
!
interface Serial0/0/1
ip address 10.2.2.1 255.255.255.252
ip access-group 100 in
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0/0/1
!
!
access-list 10 permit host 192.168.3.3
access-list 100 deny ip 10.0.0.0 0.255.255.255 any
access-list 100 deny ip 172.16.0.0 0.15.255.255 any
access-list 100 deny ip 192.168.0.0 0.0.255.255 any
access-list 100 deny ip 127.0.0.0 0.255.255.255 any
access-list 100 deny ip 224.0.0.0 15.255.255.255 any
access-list 100 permit ip any any
access-list 110 permit ip 192.168.3.0 0.0.0.255 any
!
!
!
!
!
!
!
line con 0
password ciscoconpa55
login
line vty 0 4
access-class 10 in
password ciscosshpa55
login
!
!
!
End

Routing & Switching

KASHIF BASHIR

57

S-ar putea să vă placă și