0% found this document useful (0 votes)
10 views

Switching Commands

Uploaded by

abbas.leaders
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Switching Commands

Uploaded by

abbas.leaders
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

Switch>enable

Switch#config t
Switch(config)#hostname S1
S1(config)#enable secret class
S1(config)#no ip domain-lookup
S1(config)#ip default-gateway 172.17.99.1
S1(config)#line console 0
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#logging sync
S1(config-line)#line vty 0 15
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#end
S1#copy running-config startup-config

***

S1#config t
S1(config)#interface fa0/18
S1(config-if)#speed 100
S1(config-if)#duplex full
S1(config-if)#end

***

PC>telnet 192.168.7.190

***

S1(config)#ip default-gateway 172.17.99.1


S1(config)#exit

***************************************************************

//DELETING NVRAM

Remove the VLAN database information file.

Switch#delete flash:vlan.dat

***

Remove the switch startup configuration file from NVRAM.

Switch#erase startup-config

***

Switch#reload

**********************************

//MAC ADDRESS CONFIGURATION

S1#clear mac-address-table dynamic

S1(config)#mac-address-table static 0002.16E8.C285 vlan 99 interface fastethernet


0/18

S1(config)#no mac-address-table static.........

************************************************************************

//ASSIGN SWITCH PORTS TO VLANS

S2(config)#interface fa0/6
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 5
S2(config-if)#no shutdown
S2(config-if)#interface fa0/11
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 5
S2(config-if)#no shutdown
S2(config-if)#interface fa0/18
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 5
S2(config-if)#no shutdown

********************************************************************

//CONFIGURE OPERATING MODE, DOMAIN NAME AND VTP PASSWORD

S1(config)#vtp mode server


S1(config)#vtp domain Lab4
S1(config)#vtp password cisco
S1(config)#end

S2(config)#vtp mode client


S2(config)#vtp domain Lab4
S2(config)#vtp password cisco
S2(config)#end

S3(config)#vtp mode transparent


S3(config)#vtp domain Lab4
S3(config)#vtp password cisco
S3(config)#end

********************************************************************

//CONFIGURE TRUNKING AND NATIVE VLANS

S1(config)#interface fa0/1
S1(config-if)#switchport mode trunk
S1(config-if)#switchport trunk native vlan 99
S1(config-if)#no shutdown
S1(config-if)#interface fa0/2
S1(config-if)#switchport mode trunk
S1(config-if)#switchport trunk native vlan 99
S1(config-if)#no shutdown
S1(config-if)#end

S2(config)#interface fa0/1
S2(config-if)#switchport mode trunk
S2(config-if)#switchport trunk native vlan 99
S2(config-if)#no shutdown
S2(config-if)#end

S3(config)#interface fa0/2
S3(config-if)#switchport mode trunk
S3(config-if)#switchport trunk native vlan 99
S3(config-if)#no shutdown
S3(config-if)#end

***

//MOVE PC INTO DIFFERENT VLAN

S2(config-if)#switchport access vlan 20

********************************************************************

//PORT SECURITY

S2(config)#interface fa0/6
S2(config-if)#switchport port-security
S2(config-if)#switchport port-security maximum 1
S2(config-if)#switchport port-security mac-address sticky
S2(config-if)#interface fa0/11
S2(config-if)#switchport port-security
S2(config-if)#switchport port-security maximum 1
S2(config-if)#switchport port-security mac-address sticky
S2(config-if)#interface fa0/18
S2(config-if)#switchport port-security
S2(config-if)#switchport port-security maximum 1
S2(config-if)#switchport port-security mac-address sticky
S2(config-if)#end

*********************************************************

//CREATE VLANS

S1(config)#vlan 99
S1(config-vlan)#name management
S1(config-vlan)#exit
S1(config)#vlan 10
S1(config-vlan)#name faculty/staff
S1(config-vlan)#exit
S1(config)#vlan 20
S1(config-vlan)#name students
S1(config-vlan)#exit
S1(config)#vlan 30
S1(config-vlan)#name guest
S1(config-vlan)#exit

*************************************************************

//CONFIGURE THE MANAGEMENT INTERFACE ADDRESS ON ALL SWITCHES

S1(config)#interface vlan 99
S1(config-if)#ip address 172.17.99.11 255.255.255.0
S1(config-if)#no shutdown
S2(config)#interface vlan 99
S2(config-if)#ip address 172.17.99.12 255.255.255.0
S2(config-if)#no shutdown
S3(config)#interface vlan 99
S3(config-if)#ip address 172.17.99.13 255.255.255.0
S3(config-if)#no shutdow

*************************************************************

//ASSIGN SWITCH PORTS TO VLANS

S3(config)#interface range fa0/6 - fa0/10


S3(config-if-range)#switchport access vlan 30
S3(config-if-range)#interface range fa0/11 - fa0/17
S3(config-if-range)#switchport access vlan 10
S3(config-if-range)#interface range fa0/18 - fa0/24
S3(config-if-range)#switchport access vlan 20
S3(config-if-range)#end

//OOOORRRRRRRRRRRR

S2(config)#interface fa0/6
S2(config-if)#switchport access vlan 30
S2(config-if)#interface fa0/11
S2(config-if)#switchport access vlan 10
S2(config-if)#interface fa0/18
S2(config-if)#switchport access vlan 20
S2(config-if)#enD

******************************************************************

//ADD SUBINTERFACES ON A ROUTER

R1(config)#interface fastethernet 0/0


R1(config-if)#no shutdown
R1(config-if)#interface fastethernet 0/0.1
R1(config-subif)#encapsulation dot1q 1
R1(config-subif)#ip address 172.17.1.1 255.255.255.0
R1(config-if)#interface fastethernet 0/0.10
R1(config-subif)#encapsulation dot1q 10
R1(config-subif)#ip address 172.17.10.1 255.255.255.0
R1(config-if)#interface fastethernet 0/0.20
R1(config-subif)#encapsulation dot1q 20
R1(config-subif)#ip address 172.17.20.1 255.255.255.0
R1(config-if)#interface fastethernet 0/0.30
R1(config-subif)#encapsulation dot1q 30
R1(config-subif)#ip address 172.17.30.1 255.255.255.0
R1(config-if)#interface fastethernet 0/0.99
R1(config-subif)#encapsulation dot1q 99 native
R1(config-subif)#ip address 172.17.99.1 255.255.255.0

************************************************************************

//CONNECT TO WIRELESS ROUTER

From PC access the Desktop then PC Wireless. Select the Connect tab and connect to
the default network

click the Web Browser. Enter the URL 192.168.1.1, the default gateway of the PC

You will be prompted for a username and password. The default username and password
are both admin

**********************************

//CONFIGURE IP

at the Setup page of the Linksys router. Under Internet Setup is the Internet
Connection Type option. Select Static IP

Set the Internet IP address to 172.17.99.35


Set the subnet mask to 255.255.255.0
Set the default gateway to the Fa0/1 VLAN 99 IP address of R1, 172.17.99.1

Configure the Network Setup IP address to 172.17.30.1 /24

You might also like