Thursday, July 23, 2020

Configure an IP address on a switch

By:   Last Updated: in: ,

Configure an IP address on a switch

By default, Cisco switches forward Ethernet frames without any configuration. This means that you can buy a Cisco switch, plug in the right cables to connect various devices to the switch, power it on, and the switch will work properly.
However, to perform switch management over the network or use protocols such as SNMP, the switch will need to have an IP address. The IP address is configured under a logical interface, known as the management domain or VLAN. Usually, the default VLAN 1 acts like the switch’s own NIC for connecting into a LAN to send IP packets. Here are the steps to configure an IP address under VLAN 1:
  1. enter the VLAN 1 configuration mode with the interface vlan 1 global configuration command.

  2. assign an IP address with the ip address IP_ADDRESS SUBNET_MASK interface subcommand.
  3. enable the VLAN 1 interface with the no shutdown interface subcommand.
  4. (Optional) use the ip default-gateway IP_ADDRESS global configuration command to configure the default gateway.
  5. (Optional) Add the ip name-server IP_ADDRESS global configuration command to configure the DNS server.

::::::-Here is a simple example network:::::::::-

We have a simple network of a host and a switch. We can assign the switch with an IP address to enable IP communication between the two devices:
SW1(config)#int vlan 1
SW1(config-if)#ip address
SW1(config-if)#no shutdown

%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
To verify the IP address set on a switch, we can use the show int vlan 1 command:
SW1#show int vlan 1
Vlan1 is up, line protocol is up
Hardware is CPU Interface, address is 0030.a3e8.6b3c (bia 0030.a3e8.6b3c)
Internet address is
We can verify that the host can reach the switch using its IP address by pinging it from Host A:

Pinging with 32 bytes of data:

Reply from bytes=32 time<1ms TTL=255
Reply from bytes=32 time<1ms TTL=255

show processes command:-

If a Cisco device is suffering from high CPU usage, we can use the show processes command to list all running processes and determine the cause of problem. This command gives you a list of active processes, along with their corresponding process ID, priority, CPU time used, number of times invoked, and other information.
Here is an example output of this command invoked on a Cisco router:
R1#show processes
CPU utilization for five seconds: 0%/0%; one minute: 0%; five minutes: 0%
PID QTy PC Runtime (ms) Invoked uSecs Stacks TTY Process
1 Csp 602F3AF0 0 1627 0 2600/3000 0 Load Meter
2 Lwe 60C5BE00 4 136 29 5572/6000 0 CEF Scanner
3 Lst 602D90F8 1676 837 2002 5740/6000 0 Check heaps
4 Cwe 602D08F8 0 1 0 5568/6000 0 Chunk Manager
5 Cwe 602DF0E8 0 1 0 5592/6000 0 Pool Manager
6 Mst 60251E38 0 2 0 5560/6000 0 Timers
7 Mwe 600D4940 0 2 0 5568/6000 0 Serial Backgrou
8 Mwe 6034B718 0 1 0 2584/3000 0 OIR Handler
9 Mwe 603FA3C8 0 1 0 5612/6000 0 IPC Zone Manage
10 Mwe 603FA1A0 0 8124 0 5488/6000 0 IPC Periodic Ti
11 Mwe 603FA220 0 9 0 4884/6000 0 IPC Seat Manage
12 Lwe 60406818 124 2003 61 5300/6000 0 ARP Input
13 Mwe 60581638 0 1 0 5760/6000 0 HC Counter Time
The first line of the output shows the CPU utilization for the last 5 seconds, 1 minute, and 5 minutes. Here is a description of other fields in the output:

  • PID – the Process ID.
  • Q – the process queue priority. Possible values are: C (critical), H (high), M (medium), and L (low).
  • Ty – scheduler test (status). Possible values are: * (currently running), E (waiting for an event), S (ready to run, voluntarily relinquished processor), rd (ready to run, wakeup conditions have occurred), we (waiting for an event), sa (sleeping until an absolute time), si (sleeping for a time interval), sp (sleeping for a time interval (alternate call), st(sleeping until a timer expires), hg (hung; the process will never execute again), xx (dead: the process has terminated, but has not yet been deleted).
  • PC – current program counter.
  • Runtime – CPU time the process has used.
  • Invoked – number of times the process has been invoked.
  • microSecs – CPU time for each process invocation.
  • Stacks – low water mark or Total stack space available, shown in bytes.
  • TTY – terminal that controls the process.
  • Process – the name of the process.

No comments:
Write comment