0% found this document useful (0 votes)
17 views10 pages

Cisco Switch Configuration

The document provides configuration steps and commands for Cisco switches and routers. It covers topics like VLAN configuration, trunking, routing protocols like RIP and OSPF, DHCP configuration, and more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views10 pages

Cisco Switch Configuration

The document provides configuration steps and commands for Cisco switches and routers. It covers topics like VLAN configuration, trunking, routing protocols like RIP and OSPF, DHCP configuration, and more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

169.254.1.

255.255.0.0

Show ip interface brief Status of all ports

No hostname Erasing configuration

Show interface f0/2 Show the interface details

Hostname sw1 hostname

Banner motd $ (let it ends with the same characters) banner

Enable password 1234 Enable Password

Show mac-address Show mac address table

Show int fa0/2 To see a status of an interface

Service password-encryption Encrypting Password

Line con 0 console

Password ###########

Login

Line vty 0 4 (number from 0-15, this tell the number of person telnet
that can telnet in to the switch simultaneously
Password ###########

Login

Show vlan (it shows vlans with their ports)

Vlan 67 Vlan creation

Name Mongar Vlan name

Interface fa0/3

Switchport access vlan 67 Adding port to vlan

Inter vlan 1

Ip address 10.1.1.1 255.255.0.0 Management Ip

Inter vlan 1 Gateway IP

Ip default-gateway 10.1.1.100 If the device does not exist on


the switch frame moves to the
gateway

Interface F0/2

Shutdown/no shutdown Port blocking and unblocking

SSH

Hostname sw1 hostname

Ip domain-name mongar.net Domain Name

Crypto key generates rsa Secure Key


How many bits wants in key

Ip interface version 2 SSH Version2

User mongar password 1234 Create Users

Line vty 0 15 Allowing SSH, telnet, all and none

Transport input ssh, telnet, all, and none

Login local

Ssh –l username ip-addreess This is user for security


password

Trunking Vlan

Switchport mode access/switchport mode trunk Making port trunk or access


Enter the interface used for trunk

Dynamic Trunking Protocol (DTP)

Switchport mode Dynamic Desirable Interfaces will decide to become trunk


Enter the interface used for trunk

Switchport mode Dynamic Auto If one interface is set as dynamic desirable, both
interfaces will become trunk.
Enter the interface used for trunk
If both interfaces are set to dynamic they will do
nothing.
Switchport nonegotiate It is not a trunk and not negotiating
Enter the interface used for trunk

VTP VLAN TRUNKING PROTOCOL IS NOT A TRUNKING PROTOCOL

Vtp version <1/2> If one switch is set is vtp server any vlan created
on that switch will be replicated to the ones
Vtp mode <server/client/transparent>
configure as vtp client
Vtp domain name <domain name>

Vtp password <password>

Show vtp status Vtp version

Configuration revision

Note: anytime a configuration is done on a switch


the configuration revision is increase. The switch
with the highest configuration revision replicate
its configuration throughout the network. The
added switch has to have the same domain name
and password

Vtp pruning Remove unused vlan from switch

Switchport trunk allow vlan 10 Sending only traffic for vlan 10

SETTING SPEED FOR A PORT OR INTERFACE

Interface f0/2 Setting port speed

Speed 100 /10

Configuration steps
Switch name

Banner

Console password

telnet password

Management IP on vlan I
Creating vlan

Adding switch port to vlan

Make interface to be trunk or access

Router
Service password-encryption Encrypting Cisco password

Show ip route See whether routing is configured

Show Ip interface brief See interfaces with their configuration

It also shows whether the port is up or down

Show Ip interface fa0/0 Seeing the config… on a specific interface

Int Fa0/0 Configuring IP address on one interface

Ip address 192.168.1.1 255.255.255.0

Ip route 192.168.1.0 255.255.255.0 192.168.10.1/fa0/1 Configuring static routing (Forward and


reverse) Network route

Send it to the IP address of the second router.

Ip route 192.168.1.23 255.255.255.0 192.168.10.1/fa0/1 Host route

Summery route can be used for backup

Router rip Dynamic routing

Ver2 Define all networks that are connect to the


router ports.
Network 192.168.10.1 (it should be classfull)

Network 192.168.14.1 (it should be classfull)

Default route

Ip route 0.0.0.0 0.0.0.0 192.168.0.1 Subnet should be zero and the neXt hop ip
address should be given

Router rip When you use rip with same subnet, it only
shows the classfull / default address
No auto-summary
Making sure all subnets are seen

Debug ip rip checki


Show routing protocol To see the protocol that are enable

Interface g0/0.10 Sub interface (400000000 sub int possible)

Ip address 192.168.10.1 255.255.255.0 This is done when a router is connected to a


trunk port
Encapsulation dot1q 10 (Vlan Number)

Interface g0/0.20

Ip address Ip address 192.168.20.5 255.255.255.0

Encapsulation dot1q 10 (Vlan Number)

Copy running-config startup-config Copying configuration from running to


startup (so as the device starts everything
configuration will take effects.)

Ip dhcp pool <name> Configuring DHCP.

Network <192.168.10.0> 255.255.255.0

Default-router <ip gateway>

Dns-server <dns ip>

Ip dhcp exclude-address 192.168.10.1 192.168.10.10 Exclude addresses inclusively

DHCP relay (RIP was use)

Enable rip routing

Int fa0/1 (interface from the dhcp client)

Ip helper-address 192.168.10.1 (the ip address of the


dhcp server)

OSPF
Router ospf 1 (ospf priority from 1 - 6000) Please not device sent there Link State
Advertisement (LSA) to the DR and the Dr
Network 192.168.10.0 0.0.0.255 area 0 (widecat mask)
broadcast it to all other routers in the area
Network 1.1.1.1 0.0.0.0 area 0 ( router ID)
The highest Router ID become the DR.

And DBR is there to take the place of DR


when it is down
For a router to become a DR, election is
done with the ospf priority follow by the
router ID.

Default-information Originate Telling a router about the default route

Done on other routers

Multiarea OSPF

Router ospf 1 (ospf priority from 1 - 6000) You have to configure each interface ip
address in a specific area.
Network 192.168.10.2 0.0.0.0 area 5 (widecat mask)

Router ospf 1 (ospf priority from 1 - 6000)

Network 192.168.6.5 0.0.0.0 area 0 (widecat mask)

Router ospf 1 Interfaces that have no router connectivity


and you don’t want it to create neighbor
Passive-interface g0/1
relationship. No hello message is even sent

Router ospf 1 Allowing a interfaces to be passive.

Passive-interface default

Two types of Routing Protocol

Internal Gateway Protocol (IGP) External Gateway Protocol


1. Local 2. Internet

● RIP (Distance Vector) ● BGP

● OSPF(Link state) ● EGP

● EIGRP

Routing Information Protocol


RIPv1 RIPV2
classfull classless

NO Authentication Authentication

Uses Brocasting Multicasting

After sixteen (16) hops count, Rip start


deleting the entire hop count

RIP Timer
Update timer 30 s Exchanging of routing table after 30 s

Invalid timer 180 s After 180 s network go in to hold down state

Hold down 180 s

Flush timer 240 s After 240s network is deleted frm routing table

RIP Counting to Infinity Problem


solution
Split Horrizon Route Poisoning

Do not sent RIP update for route on int which it was It the network breaks, increase the Hop
learned. count to 16, which means it is inaccessible.
(this is enable by default)
(this is enable by default)

Vlan 1 need to be up for Management Router Management


IP vlan 1 as in switch
and it should be
different form
service IP.

Static Routing

Any traffic going to network 4 should go through R2g0/0 (ip address) Router1
Any traffic going to network 4 should go through R3g0/0 (ip address) Router2
Any traffic going to network 1 should go through R2g0/1 (ip address) Router3
Any traffic going to network 1 should go through R1g0/1 (ip address) Router2

RIP
Define all the connected networks Router rip

Ver 2

Net.

OSPF (link state) all router have link state database


Classless, secure Form Neighbor, bd: LSDB,
routing table

When configuring a network with more than one area, there should be an 2
Area Boder Router that router should be in are areas.

Adjacent Database

Neighbor Tabel
Link State Database

Topology table (comma don’t work in packet tracer)

Forwarding Database

Routing Table

Troubleshooting Command
Switch Router
Sh ip int br Sh ip int br
Sh vlan Sh int g0/0
Sh running-conf Sh ip route
Sh mac address-table Sh ip protocol
Sh int trunk Sh running-configure
Debug ip rip
Sh ip ospf neighbor
Sh ip ospf
Sh ip ospf interface
Sh ip ospf database
Clear ip ospf process (if neighbors. Is formed
and routing table is not getting updated)
Management
Switch Router
Configure Management IP in the same subnet Configure telnet
Configure telnet And use the router interface IP to telnet.

You might also like