Monday, 30 July 2018

Switch command

CORE01.PUB.DAL01> user mode
CORE01.PUB.DAL01# privileged mode. In privileged mode, you can show anything.
CORE01.PUB.DAL01(config)# global configuration mode by typing config terminal (or config t). From here, you can change global parameters.
CORE01.PUB.DAL01(config-if)# interface configuration mode by typing interface port1.0.1

#############################################################
##save the configuration that is currently being modified (in RAM),  
##also known as the running-configuration, to the nonvolatile RAM (NVRAM).
##If the power is lost, the NVRAM will preserve this configuration.

copy running-configuration startup-configuration
wr mem

 #############################################################
CORE01.PUB.DAL01#show run | i user
username admin privilege 15 password 8 <someHashedPassword>

Change the password from configuration mode:
CORE01.PUB.DAL01>en
CORE01.PUB.DAL01#conf t
CORE01.PUB.DAL01(config)#username admin privilege 15 password <new password>
CORE01.PUB.DAL01(config)#exit
CORE01.PUB.DAL01#wr mem

#############################################################
CORE01.PUB.DAL01#terminal length 0
CORE01.PUB.DAL01#show run

#############################################################
##to see interface status (up/down), Protocol status on the interface, Utilization, Errors, MTU
CORE01.PUB.DAL01#terminal length 0
CORE01.PUB.DAL01#show interface status
Port       Name               Status            Vlan Duplex   Speed Type
port1.0.1  #Server FTP#       connected           88 a-full  a-1000 1000BASE-T

CORE01.PUB.DAL01#show interface brief
Interface             Status          Protocol
port1.0.1             admin up        running

CORE01.PUB.DAL01#show interface
Interface port1.0.1
  Scope: both
  Link is UP, administrative state is UP
  Thrash-limiting
    Status Not Detected, Action learn-disable, Timeout 1(s)
  Hardware is Ethernet, address is ecad.6cad.46e5
  Description: #Server FTP#
  index 5001 metric 1 mru 1500
  current duplex full, current speed 1000, current polarity mdi
  configured duplex auto, configured speed auto, configured polarity auto
  <UP,BROADCAST,RUNNING,MULTICAST>
  SNMP link-status traps: Disabled
    input packets 39687961322, bytes 42484636452052, dropped 0, multicast packets 32
    output packets 23903668488, bytes 10073459886452, multicast packets 26146261, broadcast packets 319810482
    input average rate : 30 seconds 70.13 Mbps, 5 minutes 83.95 Mbps
    output average rate: 30 seconds 5.64 Mbps, 5 minutes 6.10 Mbps
    input peak rate 407.97 Mbps at 2018/07/23 11:31:04
    output peak rate 584.86 Mbps at 2018/06/02 16:55:53
  Time since last state change: 37 days 17:19:50

CORE01.PUB.DAL01#show interface port1.0.1
Interface port1.0.1
  Scope: both
  Link is UP, administrative state is UP
  Thrash-limiting
    Status Not Detected, Action learn-disable, Timeout 1(s)
  Hardware is Ethernet, address is ecad.6cad.46e5
  Description: #Server FTP#
  index 5001 metric 1 mru 1500
  current duplex full, current speed 1000, current polarity mdi
  configured duplex auto, configured speed auto, configured polarity auto
  <UP,BROADCAST,RUNNING,MULTICAST>
  SNMP link-status traps: Disabled
    input packets 39687961322, bytes 42484636452052, dropped 0, multicast packets 32
    output packets 23903668488, bytes 10073459886452, multicast packets 26146261, broadcast packets 319810482
    input average rate : 30 seconds 70.13 Mbps, 5 minutes 83.95 Mbps
    output average rate: 30 seconds 5.64 Mbps, 5 minutes 6.10 Mbps
    input peak rate 407.97 Mbps at 2018/07/23 11:31:04
    output peak rate 584.86 Mbps at 2018/06/02 16:55:53
  Time since last state change: 37 days 17:19:50

#############################################
##provides a quick status of the interfaces on the router, 
##including their IP address, Layer 2 status, and Layer 3 status.
CORE01.PUB.DAL01#show ip interface
CORE01.PUB.DAL01#show ip interface brief
Interface             IP-Address         Status          Protocol
lo                       unassigned         admin up        running
vlan1                 10.0.0.1/24         admin up        running
vlan2                 unassigned         admin up        running

#############################################
##brings up interface
CORE01.PUB.DAL01(config-if)#no shutdown
##brings down interface
CORE01.PUB.DAL01(config-if)#shutdown

#############################################
##10.0.0.1 is firewall
##10.0.0.3 is other project firewall
##in show run:
###ip route 0.0.0.0/0 10.0.0.1
###ip route 10.200.1.0/24 10.0.0.18

CORE01.PUB.DAL01#show ip route
Codes: C - connected, S - static, R - RIP, B - BGP
       O - OSPF, D - DHCP, 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
       * - candidate default

Gateway of last resort is 10.0.0.1 to network 0.0.0.0

S*      0.0.0.0/0 [1/0] via 10.0.0.1, vlan1
C       10.0.0.0/24 is directly connected, vlan1
S       10.200.1.0/24 [1/0] via 10.0.0.3, vlan1

#############################################
CORE01.PUB.DAL01#show version
Cisco IOS Software, C2600 Software (C2600-ADVIPSERVICESK9-M),
Version 12.3(4)T4,  RELEASE SOFTWARE (fc2)

#############################################
Server_SW#show vlan all
VLAN ID    Name            Type       State           Member ports
                                         (u)-Untagged, (t)-Tagged
====================================
1                  default          STATIC   ACTIVE   sa1(u) sa2(u) po1(t) po2(u)
                                                                           port1.0.1(u) port1.0.2(u) port1.0.3(u)
2                  vlan2            STATIC   ACTIVE   port1.0.4(t)

#############################################
#In core switch, check mac address with IP.
CORE01.PUB.DAL01#show arp | i 10.10.49.95
10.10.49.95     3c18.a050.ef4a  vlan49       po2         dynamic

#In Distribution switch, check the port number, shutdown the port.
BlkD_ES94# show bridge address-table address 3c18.a050.ef4a
Aging time is 300 sec

  Vlan        Mac Address       Port     Type
-------- --------------------- ------ ----------
   49      3c:18:a0:50:ef:4a    g11    dynamic

#############################################
In Server switch
Server_SW#show run int port1.0.48
!
interface port1.0.48
 description * DS*
 switchport
 switchport mode trunk
 switchport trunk allowed vlan add 1,36-37
 switchport trunk native vlan none
 spanning-tree portfast
!
#############################################