0% found this document useful (0 votes)
6 views7 pages

Configuration

This document provides configuration examples for basic router and switch configurations including changing the hostname, setting passwords, configuring interfaces, routing protocols like RIP, EIGRP, OSPF, VLAN configuration, DHCP, and subinterfaces. The configurations cover topics such as interface IP addresses, routing protocols, VLAN creation, switchport modes, and more.

Uploaded by

elias ferhan
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)
6 views7 pages

Configuration

This document provides configuration examples for basic router and switch configurations including changing the hostname, setting passwords, configuring interfaces, routing protocols like RIP, EIGRP, OSPF, VLAN configuration, DHCP, and subinterfaces. The configurations cover topics such as interface IP addresses, routing protocols, VLAN creation, switchport modes, and more.

Uploaded by

elias ferhan
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

///////Change hostname

Router(config)#hostname IT

///////Save running configuration


IT#copy run start

Router#copy running-config startup-config

///////To restart
IT#reload

///Create enable password


Router(config)#enable password it

///////To remove enable secret password


Router(config)#no enable password

///////To enable secret password


Router(config)#enable secret cs

///////Protect console port


Router(config)#line console 0

Router(config-line)#password csit

Router(config-line)#login
///////Interface configuration
R1(config)#interface fastethernet 0/0

R1(config-if)#ip address [Link] [Link]

R1(config-if)#no shutdown

///////Serial interface configuration


Router(config)#int se0/0/0

Router(config-if)#ip address [Link] [Link]

Router(config-if)#clock rate 64000

Router(config-if)#no sh

/////// DHCP configuration


Router(config)#ip dhcp pool it

Router(dhcp-config)#network [Link] [Link]

Router(dhcp-config)#default-router [Link]

///////Exclud IP
Router(config)#ip dhcp excluded-address [Link] [Link]

///////Static route
router1(config)#ip route [Link] [Link] [Link]

or

Router(config)#ip route [Link] [Link] se0/0/0 ---current router interface

///////Remove static route config


Router(config)#no ip route [Link] [Link] se0/0/0

or
Router(config)#no ip route [Link] [Link] [Link]

///////Default route
Router(config)#ip route [Link] [Link] [Link]

or

Router(config)#ip route [Link] [Link] se0/0/0

///////Telnet
router1(config)#enable secret 123

router1(config)#line vty 0 4

router1(config-line)#password 111

router1(config-line)#login

///////ssh
Router(config)# hostname it

Router(config)#ip domain-name [Link]

Router(config)#username it password [Link]

Router(config)#crypto key generate rsa

it(config)#crypto key generate rsa

it(config)#line vty 0 10

it(config-line)#login local

it(config-line)#transport input ssh

pc: ssh -l username ip


///////RIP configuration
router1(config)#router rip

router1(config-router)#network [Link]

router1(config-router)#network [Link]

///////RIP V2
Router(config)#router rip

Router(config-router)#version 2

Router(config-router)#network [Link]

Router(config-router)#network [Link]

///remove rip
router1(config)#no route rip

or

router1(config)#no route rip [Link]

///////EIGRP configuration//////

Router(config)#router eigrp 1

Router(config-router)#network [Link] [Link]

Router(config-router)#network [Link] [Link]

Router(config-router)#no auto-summary

Router(config-router)#redistribute eigrp 1

Router(config)#ip route [Link] [Link] se0/0/1

///////To remove EIGRP routing


Router(config)#router eigrp 1

Router(config-router)#no route eigrp 1


///////OSPF configuration
Router(config)#router ospf 1

Router(config-router)#network [Link] [Link] area 0

Router(config-router)#network [Link] [Link] area 0

Router(config-router)#network [Link] [Link] area 0

///////vlan ceration
Switch(config)#vlan 2

Switch(config-vlan)#name it

///////join intrface to vlan

Switch(config)#int fa0/2

Switch(config-if)#switchport access vlan 2

Switch(config)#interface range fa0/5-fa0/10

///////remove intrface from vlan


Switch(config)#int fa0/2

Switch(config-if)#no switchport access vlan 2

///////remove vlan
Switch(config)#no vlan 2

///////router intface configuration and dhcp


Router(config)#int fa0/0

Router(config-if)#ip address [Link] [Link]

Router(config-if)#no sh

Router(config)#int fa0/0

Router(config-if)#ip address [Link] [Link]


Router(config)#ip dhcp pool it

Router(dhcp-config)#network [Link] [Link]

Router(dhcp-config)#default-router [Link]

Router(config)#ip dhcp pool cs

Router(dhcp-config)#network [Link] [Link]

Router(dhcp-config)#default-router [Link]

///////switch config accass port


Switch(config-vlan)#int fa0/4...to computer

Switch(config-if)#switchport access vlan 2

Switch(config-vlan)#int fa0/3...to router

Switch(config-if)#switchport access vlan 2

Switch(config)#vlan 3

Switch(config-vlan)#int fa0/5...to computer

Switch(config-if)#switchport access vlan 3

Switch(config)#int fa0/2----to router

Switch(config-if)#switchport access vlan 3

/////// Trunk port


Switch(config-if)#switchport mode trunk

Router(config)#int fa0/0

Router(config-if)#no ip address
Router(config-if)#no sh

Router(config)#int fa0/0.10

Router(config-subif)#encapsulation dot1q 10

Router(config-subif)#ip address [Link] [Link]

Router(config)#int fa0/0.20

Router(config-subif)#encapsulation dot1q 20

Router(config-subif)#ip address [Link] [Link]

You might also like