You are on page 1of 25

Contents

Sl No

Topics

 

Page No

1

Cable Structure and symbols

2-2

2

Command Line Interface (CLI)

3-4

3

Static Routing Topology

5-7

4

RIP and RIP V2

8-10

5

IGRP

11-11

6

EIGTP

12-13

7

OSPF

14

- 16

8

Telnet

17-17

9

Access Control list (ACL)

18

- 19

10

Network Address Translation (NAT)

20

- 22

11

Switching

23

- 26

1

Types of twisted pair Cables to be used to connect the Network Devices.

Host – to – Host

Cross Over Cable

Host –to – Router

Cross Over Cable

Host – to – Switch

Host – to – Hub

Switch – to – Router

Switch –to – Switch

Straight Through Cable

Straight Through Cable

Straight Through Cable

Cross Over Cable

Switch – to – Hub

Cross Over Cable

Router - to – Router

Cross Over Cable

Router – to – Hub

Straight Through Cable

Hub – to – Hub

 

Cross Over Cable

 
 

Symbols used in this book

Switch

Switch Router Serial connections Web Cloud Host Ethernet

Router

Switch Router Serial connections Web Cloud Host Ethernet

Serial connections

Switch Router Serial connections Web Cloud Host Ethernet

Web Cloud

Switch Router Serial connections Web Cloud Host Ethernet

Host

Switch Router Serial connections Web Cloud Host Ethernet

Ethernet

Types of twisted pair Cables to be used to connect the Network Devices. Host – to

Entering Command Line Interface

2

Switch on the Network devices (Router or Switch)

Physically connect the Network Devices to the system through console port.

Login to the windows

Enter to the Hyperterminal.

o

Programs

o

Accessories

o

Communication

o

Hyperterminal

Quit the initial configuration menu

Press enter to get into the CLI.

Now you are in Command Line Interface in user mode and this mode is prompted as

Router>

Type Enable or en to login to privilege mode/ enable mode.

Router > en

Now type conf t (configure Terminal) to enter to the configuration Mode.

Router #conf t

Router (config) #

Now type interface e0 /s0 / fa0.0 to enter to interface mode

Router (config)# int fa 0/0

Router (config – if)#

Type exit to come back one mode

Router (config – if)# exit

Router (config )#

Type end at any point of time to come to privilege mode

Roter (conf-if)# end

Router #

3

Setting user mode password

Router (config )# line console0

Router (config – line)# passwork cisco

Router (config – line)# login

Setting username and password for the user mode

Router (config)#username cisco password cisco123

Router (config)# line console 0

Router (router-line)#login local

Router(config )# ho Aminno

Aminno(config)#

Change the Host Name

Encrypt all the password

Router(config)# service password-encryption

Set password for the Privilege mode

Router(config)# enable password cisco123

Router(config)#enable secret cisco123

4

STATIC ROUTING

STATIC ROUTING Router 0 Interface IP Address Subnet Mask F1/0 10.0.0.1 255.0.0.0 F0/0 20.0.0.1 255.0.0.0 Router

Router 0

Interface

IP Address

Subnet Mask

F1/0

10.0.0.1

255.0.0.0

F0/0

20.0.0.1

255.0.0.0

Router 1

Interface

IP Address

Subnet Mask

F1/0

30.0.0.1

255.0.0.0

F0/0

20.0.0.2

255.0.0.0

Lab Object

Task 1

Configure Static rout on both the routers

Router0

Router 1

Router 0(config)# int fa1/0

Router 1(config)# int fa1/0

Router 0(config – if )# ip add 20.0.0.1

Router 1(config – if )# ip add 20.0.0.2

255.0.0.0

255.0.0.0

Router 0(config – if )# no sh

Router 1(config – if )# no sh

Router 0(config – if)#int 0/0 Router 0(config – if)# ip add 10.0.0.1 255.0.0.0 Router 0(config – if)#no sh

Router 1(config – if)#int 0/0 Router 1(config – if)# ip add 30.0.0.1 255.0.0.0 Router 1(config – if)#no sh

Router 0 (config)# ip route 30.0.0.1 255.0.0.0 20.0.0.2

Router 1 (config)# ip route 10.0.0.1 255.0.0.0 20.0.0.1

5

To check the static rout from Router0 type the following command on Router0.

Router0(config)#do sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

  • D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2

  • i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route Gateway of last resort is not set

C

20.0.0.0/8 is directly connected, FastEthernet0/0

C

10.0.0.0/8 is directly connected, FastEthernet1/0

S

30.0.0.0/8 [1/0] via 20.0.0.2

To check the static rout from Router1 type the following command on Router1.

Router1(config)#do sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

  • D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2

  • i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR

P - periodic downloaded static route Gateway of last resort is not set

C

20.0.0.0/8 is directly connected, FastEthernet0/0

S

10.0.0.0/8 [1/0] via 20.0.0.1

C

30.0.0.0/8 is directly connected, FastEthernet1/0

6

Other commands to be checked

Router0(config)#do sh ip int brief

Interface

IP-Address

OK? Method

Status

Protocol

FastEthernet0/0

20.0.0.1

YES manual

up

up

FastEthernet1/0

10.0.0.1

YES manual

up

up

Virtual-Access1

unassigned

YES unset

up

up

Router0(config)#sh controllers fa0/0

Roter0(config)# sh int fa0/0

RIP / RIP V2

7

Router 1 Interface IP Address Subnet Mask F1/0 10.0.0.1 255.0.0.0 F0/0 20.0.0.1 255.0.0.0 Router 2 Interface

Router 1

Interface

IP Address

Subnet Mask

F1/0

10.0.0.1

255.0.0.0

F0/0

20.0.0.1

255.0.0.0

Router 2

Interface

IP Address

Subnet Mask

F1/0

30.0.0.1

255.0.0.0

F0/0

20.0.0.2

255.0.0.0

Router 3

Interface

IP Address

Subnet Mask

F1/0

40.0.0.1

255.0.0.0

F0/0

30.0.0.2

255.0.0.0

Lab Object

Task 1

Configure RIP on both the routers

8

Router 0

Router 1

Router1(config-if)#int fa0/0

Router2(config)#int fa0/0

Router3(config)#int fa0/0

Router1(config-if)#ip add

Router2(config-if)#ip add 20.0.0.2

Router3(config-if)#ip add 30.0.0.2

20.0.0.1

255.0.0.0

255.0.0.0

255.0.0.0

Router1(config-if)#no sh Router1(config-if)#int fa1/0 Router1(config-if)#ip add

10.0.0.1

255.0.0.0

Router2(config-if)#no sh Router2(config-if)#int fa1/0

Router3(config-if)#no sh Router3(config-if)#int fa1/0

Router2(config-if)#ip add 30.0.0.1

Router3(config-if)#ip add 40.0.0.1

Router1(config-if)#no sh

255.0.0.0

255.0.0.0

Router1(config-if)#router rip

Router2(config-if)#no sh

Router3(config-if)#no sh

Router1(config-router)#network

Router2(config-if)#router rip

Router3(config-if)#router rip

10.0.0.0

Router1(config-router)#network

20.0.0.0

Router1(config-router)#exit

Router2(config-router)#network

20.0.0.0

Router2(config-router)#network

Router3(config-router)#network

40.0.0.0

Router3(config-router)#network

30.0.0.0

30.0.0.0

Router2(config-router)#exit

Router3(config-router)#exit

To Check the rip

Router1#sh ip route rip

R

10.0.0.0/8 [120/1] via 20.0.0.1, 00:00:25, FastEthernet0/0

To check the RIP database

Router1#sh ip rip database 10.0.0.0/8 auto-summary

10.0.0.0/8

[1] via 20.0.0.1, 00:00:02, FastEthernet0/0 20.0.0.0/8 auto-summary

20.0.0.0/8

directly connected, FastEthernet0/0

30.0.0.0/8 auto-summary

30.0.0.0/8

directly connected, FastEthernet1/0

Show the IP Routing

Router1#sh ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR

9

P - periodic downloaded static route

Gateway of last resort is not set

C

20.0.0.0/8 is directly connected, FastEthernet0/0

R

10.0.0.0/8 [120/1] via 20.0.0.1, 00:00:20, FastEthernet0/0

C

30.0.0.0/8 is directly connected, FastEthernet1/0

Configuring RIP V2

Lab Object

Task 1

Configure RIP on both the routers

Router 0

Router 1

Router0(config)#int fa0/0 Router0(config-if)#ip add 20.0.0.1 255.0.0.0 Router0(config-if)#no sh Router0(config-if)#int fa1/0 Router0(config-if)#ip add 10.0.0.1 255.0.0.0 Router0(config-if)#no sh Router0(config)#router rip Router0(config-router)#ver 2 Router0(config-router)#network 10.0.0.0 Router0(config-router)#network 20.0.0.0

Router1(config-if)#int fa0/0 Router1(config-if)#ip add 20.0.0.2 255.0.0.0 Router1(config-if)#no sh Router1(config-if)#int fa1/0 Router1(config-if)#ip add 30.0.0.1 255.0.0.0 Router1(config-if)#no sh Router1(config)#router rip Router1(config-router)#ver 2 Router1(config-router)#network 20.0.0.0

Router1(config-router)#exit

Router0(config-router)#exit

Router1(config-router)#network 30.0.0.0

Rest of all commands are similar to RIP

IGRP

Lab Object

Task 1

Configure IGRP on both the routers

Router 0

Router 1

Router0(config)#int fa0/0 Router0(config-if)#ip add 20.0.0.1 255.0.0.0

Router1(config-if)#int fa0/0 Router1(config-if)#ip add 20.0.0.2 255.0.0.0

10

Router0(config-if)#no sh Router0(config-if)#int fa1/0 Router0(config-if)#ip add 10.0.0.1 255.0.0.0 Router0(config-if)#no sh Router0(config)#router igrp 20 Router0(config-router)#network 10.0.0.0 Router0(config-router)#network 20.0.0.0

Router1(config-if)#no sh Router1(config-if)#int fa1/0 Router1(config-if)#ip add 30.0.0.1 255.0.0.0 Router1(config-if)#no sh Router1(config)#router igrp 20 Router1(config-router)#network 20.0.0.0

Router0(config-router)#exit

Router1(config-router)#network 30.0.0.0

Router1(config-router)#exit

Rest of all commands are similar to RIP and RIP V2

EIGRP

Router0(config-if)#no sh Router0(config-if)#int fa1/0 Router0(config-if)#ip add 10.0.0.1 255.0.0.0 Router0(config-if)#no sh Router0(config)#router igrp 20 Router0(config-router)#network 10.0.0.0 Router0(config-router)#network

Router 1

Interface

IP Address

Subnet Mask

F0/0

10.1.1.1

255.0.0.0

F1/0

20.1.1.1

255.0.0.0

Router 2

11

Interface

IP Address

Subnet Mask

F0/0

10.1.1.2

255.0.0.0

F1/0

30.1.1.1

255.0.0.0

Router 3

Interface

IP Address

Subnet Mask

F0/0

30.1.1.2

255.0.0.0

F1/0

40.1.1.1

255.0.0.0

Lab Object

Task 1

Configure EIGRP on both the routers

Router 0

Router 1

Router1(config)#int fa0/0

Router2(config)#int fa0/0

Router3(config)#int fa0/0

Router1(config-if)#ip add 10.1.1.1

Router2(config-if)#ip add 10.1.1.2

Router3(config-if)#ip add 30.1.1.2

  • 255.0.0.0 255.0.0.0

255.0.0.0

Router1(config-if)#no sh

Router2(config-if)#no sh

Router3(config-if)#no sh

Router1(config)#int fa1/0

Router2(config-if)#int fa1/0

Router3(config-if)#int fa1/0

Router1(config-if)#ip add 20.1.1.1

Router2(config-if)#ip add 30.1.1.1

Router3(config-if)#ip add 40.1.1.1

  • 255.0.0.0 255.0.0.0

255.0.0.0

Router1(config-if)#no sh

Router2(config-if)#no sh

Router3(config-if)#no sh

Router1(config-if)#exit

Router2(config-if)#exit

Router3(config-if)#exit

Router1(config)#router eigrp 10

Router2(config)#router eigrp 10

Router3(config)#router eigrp 10

Router1(config-router)#network

Router2(config-router)#network

Router3(config-router)#network

10.1.1.0

  • 10.1.1.0 40.1.1.0

Router1(config-router)#network

Router2(config-router)#network

Router3(config-router)#network

20.1.1.0

  • 30.1.1.0 30.1.1.0

Router1(config-router)#no auto- summary

Router2(config-router)#no auto- summary

Router3(config-router)#no auto- summary

Router1(config-router)#exit

Router1(config-router)#exit

Router1(config-router)#exit

To Check the EIGRP Neighbors

Router0#sh ip eigrp neighbors IP-EIGRP neighbors for process 10 H Address Interface Hold Uptime SRTT RTO
Router0#sh ip eigrp neighbors
IP-EIGRP neighbors for process 10
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec)
(ms)
Cnt Num
0
10.1.1.2
Fa0/0
11 00:17:37 1528
5000
0
4

To check the EIGRP route

Router1#sh ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

12

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route

Gateway of last resort is not set

  • D 20.0.0.0/8 [90/30720] via 10.1.1.1, 00:21:01, FastEthernet0/0

  • C 10.0.0.0/8 is directly connected, FastEthernet0/0

  • C 30.0.0.0/8 is directly connected, FastEthernet1/0

To check the EIGRP topology

Router1#sh ip eigrp topology IP-EIGRP Topology Table for AS(10)/ID(30.1.1.1)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply, r - reply Status, s - sia Status

P 10.0.0.0/8, 1 successors, FD is 28160 via Connected, FastEthernet0/0 P 20.0.0.0/8, 1 successors, FD is 30720 via 10.1.1.1 (30720/28160), FastEthernet0/0 P 30.0.0.0/8, 1 successors, FD is 28160 via Connected, FastEthernet1/0

OSPF

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1

Router 1

Interface

IP Address

Subnet Mask

F0/0

10.1.1.1

255.0.0.0

F1/0

20.1.1.1

255.0.0.0

Router 2

13

Interface

IP Address

Subnet Mask

F0/0

10.1.1.2

255.0.0.0

F1/0

30.1.1.1

255.0.0.0

Router 3

Interface

IP Address

Subnet Mask

F0/0

30.1.1.2

255.0.0.0

F1/0

40.1.1.1

255.0.0.0

Lab Object

Task 1

Configure OSPF on both the routers

Router1(config)#int fa0/0

Router2(config)#int fa0/0

Router3(config)#int fa0/0

Router1(config-if)#ip add 10.1.1.1

Router2(config-if)#ip add 10.1.1.2

Router3(config-if)#ip add 30.1.1.2

  • 255.0.0.0 255.0.0.0

255.0.0.0

Router1(config-if)#no sh

Router2(config-if)#no sh

Router3(config-if)#no sh

Router1(config-if)#int fa1/0

Router2(config-if)#int fa1/0

Router3(config-if)#int fa1/0

Router1(config-if)#ip add 20.1.1.1

Router2(config-if)#ip add 30.1.1.1

Router3(config-if)#ip add 40.1.1.1

  • 255.0.0.0 255.0.0.0

255.0.0.0

Router1(config-if)#no sh

Router2(config-if)#no sh

Router3(config-if)#no sh

Router1(config)#router ospf 100

Router2(config)#router ospf 100

Router3(config)#router ospf 100

Router1(config-router)#network

Router2(config-router)#network

Router3(config-router)#network

  • 10.1.1.0 255.0.0.0 area 0

  • 10.1.1.0 255.0.0.0 area 0

  • 40.1.1.0 255.0.0.0 area 0

Router1(config-router)#network

Router2(config-router)#network

Router3(config-router)#network

  • 20.1.1.0 255.0.0.0 area 0

  • 30.1.1.0 255.0.0.0 area 0

  • 30.1.1.0 255.0.0.0 area 0

To check the OSPF route

Router0#sh ip route Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route

Gateway of last resort is not set

C

20.0.0.0/8 is directly connected, FastEthernet1/0

C

10.0.0.0/8 is directly connected, FastEthernet0/0

O

30.0.0.0/8 [110/2] via 10.1.1.2, 00:00:35, FastEthernet0/0

14

To check the OSPF

Router0#sh ip ospf Routing Process "ospf 100" with ID 20.1.1.1 Supports only single TOS(TOS0) routes Supports opaque LSA Supports Link-local Signaling (LLS) Initial SPF schedule delay 5000 msecs Minimum hold time between two consecutive SPFs 10000 msecs Maximum wait time between two consecutive SPFs 10000 msecs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs LSA group pacing timer 240 secs Interface flood pacing timer 33 msecs Retransmission pacing timer 66 msecs 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. 1 normal 0 stub 0 nssa External flood list length 0 Area BACKBONE(0) Number of interfaces in this area is 2 Area has no authentication SPF algorithm last executed 00:01:44.776 ago SPF algorithm executed 4 times Area ranges are

To check the OSPF Database

Router0#sh ip ospf database OSPF Router with ID (20.1.1.1) (Process ID 100)

Router Link States (Area 0)

Link ID

ADV Router

Age

Seq#

Checksum Link count

20.1.1.1

20.1.1.1

583

0x80000003 0x00368D 2

30.1.1.1

30.1.1.1

583

0x80000003 0x00B9EA 2

Net Link States (Area 0)

Link ID

ADV Router

Age

Seq#

Checksum

10.1.1.1

20.1.1.1

583

0x80000001 0x004C91

To check the OSPF Neighbor

15

Router0#sh ip ospf neighbor

 

Neighbor ID

Pri

State

Dead Time

Address

Interface

30.1.1.1

1

FULL/BDR

00:00:32

10.1.1.2

FastEthernet0/0

 

TELNET

Router 0

Router 1

Router0(config)#line vty 0 4 Router0(config-line)#password cisco123

Router1(config)#line vty 0 4 Router1(config-line)#password cisco123

Router0(config-line)#login

Router1(config-line)#login

Router0(config-line)#exit

Router1(config-line)#exit

Router0(config)#enable password cisco123

Router1(config)#enable password cisco123

Ping to the destination network.

Router0#ping 30.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 30.1.1.1, timeout is 2 seconds:

!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 172/274/388 ms Router0#ping 30.1.1.2

16

ACCESS LIST

ACCESS LIST Standard ACL Router 1 Router 2 Router 3 Router1(config)#int fa0/1 Router2(config)#int fa0/0 Router3(config)#int fa0/0

Standard ACL

Router 1

Router 2

Router 3

Router1(config)#int fa0/1

Router2(config)#int fa0/0

Router3(config)#int fa0/0

Router1(config-if)#ip add 10.1.1.1

Router2(config-if)#ip add 20.1.1.2

Router3(config-if)#ip add 30.1.1.2

  • 255.0.0.0 255.0.0.0

255.0.0.0

Router1(config-if)#no sh Router1(config)#int fa0/0 Router1(config-if)#ip add 20.1.1.1

Router2(config-if)#no sh Router2(config)#int fa0/1 Router2(config-if)#ip add 30.1.1.1

Router3(config-if)#no sh Router3(config)#int 0/1 Router3(config-if)#ip add 40.1.1.1

  • 255.0.0.0 255.0.0.0

255.0.0.0

Router1(config-if)#no sh

Router2(config-if)#no sh

Router3(config-if)#no sh

Router1(config)#router ospf 10 Router1(config-router)#network 10.1.1.0

Router2(config)#router ospf 10 Router2(config-router)#network 20.1.1.0

Router3(config)#router ospf 10 Router3(config-router)#network 30.1.1.0

  • 255.0.0.0 255.0.0.0

area 0

area 0

255.0.0.0

area 0

Router1(config-router)#network 20.1.1.0

Router2(config-router)#network 30.1.1.0

Router3(config-router)#network 40.1.1.0

  • 255.0.0.0 255.0.0.0

area 0

area 0

255.0.0.0

area 0

Router1(config-router)#exit

Router2(config-router)#exit

Router3(config-router)#exit

17

 

Router2(config)#access-list 50 deny

 
  • 40.1.1.0 0.255.255.255

Router2(config)#access-list 50 permit any Router2(config-router)#distribute-list 50 in

fa0/0

Router2(config)#access-list 25 permit

  • 40.1.1.0 0.255.255.255

Router2(config)#access-list 25 deny any

To Check the connectivity before applying distribute-list at router2 fa0/0 interface

Router3#ping 10.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 480/598/684 ms

To Check the connectivity after applying distribute-list at router2 fa0/0 in interface

Router3#ping 10.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

U.U.U Success rate is 0 percent (0/5)

To Check the connectivity after applying permit command in distribute-list at router 2 fa0/0 in interface

Router2(config-router)#distribute-list 25 in fa0/0

Router3#ping 10.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 460/610/760 ms

Extended Access List

Router2(config)#access-list 101 deny ospf any 10.1.1.0 0.0.0.0 Router2(config)#router ospf 10 Router2(config-router)#distribute-list 101 in fa0/0

To Check the connectivity before applying distribute-list at router2 fa0/0 interface

Router3#ping 10.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

!!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 480/598/684 ms

18

To Check the connectivity after applying distribute-list at router2 fa0/0 in interface

Router3#ping 10.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:

U.U.U Success rate is 0 percent (0/5)

Static NAT

NAT

Router 0 Router 1 Router2
Router 0
Router 1
Router2

Router0(config)#int fa0/0

Router1(config)#int fa0/0

Router2(config)#int fa0/0

Router0(config-if)#ip add 10.1.1.1

Router1(config-if)#ip add 10.1.1.2

Router2(config-if)#ip add 40.1.1.1

255.0.0.0

  • 255.0.0.0 255.0.0.0

Router0(config-if)#no sh Router0(config)#int fa0/1 Router0(config-if)#ip add 30.1.1.1

Router1(config-if)#no sh Router1(config)#int fa0/1 Router1(config-if)#ip add 20.1.1.1

Router2(config-if)#no sh Router2(config)#int fa0/1 Router2(config-if)#ip add 20.1.1.2

255.0.0.0

  • 255.0.0.0 255.0.0.0

Router0(config-if)#no sh

Router1(config-if)#no sh

Router2(config-if)#no sh

Router0(config)#router ospf 10 Router0(config-router)#network 10.1.1.0

Router1(config)#router ospf 10 Router1(config-router)#network 10.1.1.0

Router2(config)#router ospf 10 Router2(config-router)#network 20.1.1.0

255.0.0.0

area 0

  • 255.0.0.0 255.0.0.0

area 0

area 0

Router0(config-router)#network 30.1.1.0

Router1(config-router)#network 20.1.1.0

Router2(config-router)#network 40.1.1.0

255.0.0.0

area 0

  • 255.0.0.0 255.0.0.0

area 0

area 0

Router0(config-router)#exit

Router1(config-router)#exit

Router2(config-router)#exit

Router0(config)#ip nat inside source static 30.1.1.1 10.1.1.3

19

To check the Static NAT

Router0#copy running-config startup-config Destination filename [startup-config]? Building configuration ... [OK] Router0#sh running-config Building configuration ...

Current configuration : 659 bytes ! version 12.4 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Router0 ! ! ! ! ! interface FastEthernet0/0 ip address 10.1.1.1 255.0.0.0 ip nat outside

interface FastEthernet0/1 ip address 30.1.1.1 255.0.0.0 ip nat inside

ip nat inside source static 30.1.1.1 10.1.1.3 ip classless

To check the IP Translation

Router0#sh ip nat translations Pro Inside global Inside local Outside local Outside global --- 10.1.1.3 30.1.1.1
Router0#sh ip nat translations
Pro Inside global
Inside local
Outside local
Outside global
--- 10.1.1.3 30.1.1.1
---
---

Dynamic Nating

Router 0

Router 1

Router2

Router0(config)#int fa0/0

Router1(config)#int fa0/0

Router2(config)#int fa0/0

Router0(config-if)#ip add 10.1.1.1

Router1(config-if)#ip add 10.1.1.2

Router2(config-if)#ip add 40.1.1.1

255.0.0.0

  • 255.0.0.0 255.0.0.0

Router0(config-if)#no sh Router0(config)#int fa0/1

Router1(config-if)#no sh Router1(config)#int fa0/1

Router2(config-if)#no sh Router2(config)#int fa0/1

Router0(config-if)#ip add 30.1.1.1

Router1(config-if)#ip add 20.1.1.1

Router2(config-if)#ip add 20.1.1.2

255.0.0.0

  • 255.0.0.0 255.0.0.0

Router0(config-if)#no sh Router0(config)#router ospf 10

Router1(config-if)#no sh Router1(config)#router ospf 10

Router2(config-if)#no sh Router2(config)#router ospf 10

Router0(config-router)#network 10.1.1.0

Router1(config-router)#network 10.1.1.0

Router2(config-router)#network 20.1.1.0

255.0.0.0

area 0

  • 255.0.0.0 area 0

255.0.0.0

area 0

20

Router0(config-router)#network 30.1.1.0

Router1(config-router)#network 20.1.1.0

Router2(config-router)#network 40.1.1.0

255.0.0.0

area 0

255.0.0.0 area 0

255.0.0.0 area 0

Router0(config-router)#exit

Router1(config-router)#exit

Router2(config-router)#exit

Router0(config)#access-list 15 deny host

30.1.1.1

Router0(config)#access-list 15 permit

30.1.1.0

0.0.0.255

Router0(config)#ip nat pool dynat 10.1.1.4

10.1.1.20

netmask 10.0.0.0

Router0(config)#ip nat inside source list 15 pool dynat

To check the Dynamic NAT

Router0#copy running-config startup-config Destination filename [startup-config]? Building configuration ... [OK] Router0#sh run Building configuration ...

Current configuration : 828 bytes ! version 12.4 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Router0 ! interface FastEthernet0/0 ip address 10.1.1.1 255.0.0.0 ip nat outside duplex auto speed auto

! interface FastEthernet0/1 ip address 30.1.1.1 255.0.0.0 ip nat inside duplex auto speed auto

! interface Vlan1 no ip address shutdown

! router ospf 10 log-adjacency-changes ip nat pool dynat 10.1.1.4 10.1.1.20 netmask 10.0.0.0 ip nat inside source list 15 pool dynat ip nat inside source static 30.1.1.1 10.1.1.3 ip classless ! !

21

access-list 15 deny host 30.1.1.1 access-list 15 permit 30.1.1.0 0.0.0.255 ! ! ! line con 0 line vty 0 4 login

!

SWITCHING

access-list 15 deny host 30.1.1.1 access-list 15 permit 30.1.1.0 0.0.0.255 ! ! ! line con 0

Switch1

Port

Assigned VLANs

PC

FA0/1

VLAN 2

PC1(10.1.1.2)

FA0/2

VLAN3

PC2(20.1.1.2)

FA0/3

VLAN2

PC3(10.1.1.3)

22

FA0/4

VLAN3

PC4(20.1.1.3)

Task

To create VLAN2 and VLAN3 and assign name SALES and FINANCE to each VLAN. Assign Port 1 and 3 to SALES and Port 2 and 4 to FINANCE

Switch1(config)#vlan 2 Switch1(config-vlan)#name SALES

Switch1(config-vlan)#exit

Switch1(config)#vlan 3 Switch1(config-vlan)#name FINANCE

Switch1(config-vlan)#exit

Switch1(config)#int f0/1 Switch1(config-if)#switchport access vlan2

Switch1(config-if)#exit

Switch1(config)#int f0/3 Switch1(config-if)#switchport access vlan2

Switch1(config-if)#exit

Switch1(config)#int f0/2 Switch1(config-if)#switchport access vlan3

Switch1(config-if)#exit

Switch1(config)#int f0/4 Switch1(config-if)#switchport access vlan3

Switch1(config-if)#exit

Check the Interface

Switch1#sh int fa0/1

23

Name Fa0/1 Switchport: Enabled Administrative Mode: Static access Operational Mode: Static access Administrative Trunking Encapsulation: negotiate Opetational Trunking Encapsulation:native Negotiation of Trunking:Off Access Mode VLAN: 1(default) Trunking Native Mode VLAN: 1(default)

Other commands to be checked

Switch1# sh vlan brief

Ping from one port to other port of same vlan – Result must be pinging

Ping from one port to other port of other vlan – Result must not ping.

Configure the Trunk Port

Switch1

Port

Assigned VLANs

PC

FA0/1

VLAN 2

PC1(10.1.1.2)

FA0/2

FA0/2

VLAN3

PC2(20.1.1.2)

FA0/24

 

Configured as Trunk Port

Switch2

Port

Assigned VLANs

PC

FA0/1

VLAN 2

PC1(10.1.1.3)

FA0/2

FA0/2

VLAN3

PC2(20.1.1.3)

FA0/24

 

Configured as Trunk Port

24

Task

To configure the port No24 as Trunk Port on both the switches.

Switch 1(config)#ing fa0/24

Switch1(config)#shutdown

Switch1(config)#switchport trunk encapsulation is1 Switch 1(config – if)#switchport mode trunk Switch 1(config – if)#exit

Switch 2(config)#int fa0/24

Switch2(config)#shutdown

Switch2(config)#switchport trunk encapsulation is1 Switch 2(config – if)#switchport mode trunk Switch 2(config – if)#exit

Verify the Trunking

Switch1# sh int trunk

Switch1#sh int fa0/24 switchport

25