-->
🏠 🔍
SHAREOLITE

SOLVED ORA-21561 OID generation failed Linux


When trying to connect to database , error ORA-21561 observed - 

[root@ShareoliteLab scripts]# sqlplus shareo/lite1234@ORAINST

SQL*Plus: Release 11.2.0.4.0 Production on Thu Dec 11 20:30:29 2014

Copyright (c) 1982, 2013, Oracle. All rights reserved.
 

ERROR:
ORA-21561: OID generation failed

[root@ShareoliteLab ~]# tnsping ORAINST

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 11-DEC-2014 20:27:53
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
/opt/oracle/product/11.2.0/client_1/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.20.5.9)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORAINST) (SID = ORAINST)))
OK (0 msec)



How we solved :

The entry for host 192.20.5.9 was missing in /etc/hosts.
Added the IP 192.20.5.9 to /etc/hosts


Terminal # cat /etc/hosts
127.0.0.1   localhost.localdomain localhost
192.20.5.9  ShareoliteLab

After this connection was successful.

Stacking Cisco Switches - SOLVED

In this post , we explain in detail step by step tested and working procedure to stack two Cisco switches. In our setup , we have verified stacking two Cisco L3 3750 48 port + 4G switches which had 2 stack ports each. 

Before stacking , verify the switch slot number and MAC address as below. If required backup your switch configurations using "copy flash: ftp:" command as described in our earlier posts.  

Switch1# show switch
Switch/Stack Mac Address : 001c.23b1.e298
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
*1       Master 001c.23b1.e298     1     0       Ready


Switch2#show switch
Switch/Stack Mac Address : 001c.23b2.e295
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
*1       Master 001c.23b2.e295     1      0       Ready

From above output , we may observe both individual switches are acting as Master with priority 1.

After stacking the switch which has the highest priority will be the "Master" and the other will be "Member" of the stack. The Master switch is responsible for updating the configurations to other switches. 

Hence before connecting the stack cables , decide which switch has to be the master and change the priority. In our example , Switch1 will be the Master. Change the switch priority to the highest value i.e, 15 .

Switch2 # config terminal
Switch2(config)# switch 1 priority 15
Changing the Switch Priority of Switch Number 1 to 15
Do you want to continue?[confirm]
New Priority has been set successfully

Switch1#show sw
Switch/Stack Mac Address : 001c.23b1.e298
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
*1       Master 001c.23b1.e298     15     0       Ready


Connect the Stack cables now . Important Note - The stack cables should be connected in crisscross manner i.e, stack port 1 of Switch1 to the 2nd stack port of Switch2 and vice-versa to form a ring. Please note only one cable is enough for stacking which would still work with half ring speed. However for cable redundancy and optimal ring speed usage , 2nd stack cable should also be used. 

We assume now you have connected the cables now . If not please connect and then proceed with the below steps.

After connecting the cables , reload the switches.  Once both switches are booted up , you should see a output as below with Switch1 elected as Master and Switch2 as the Member as Switch1 priority is higher.

Switch1#show sw
Switch/Stack Mac Address : 001c.23b1.e298
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
*1       Master 001c.23b1.e298     15     0       Ready
 2       Member 001c.23b2.e295     1      0       Ready


To view the stack port and neighbor switch connection status -

Switch1# show switch detail
Switch/Stack Mac Address : 001c.23b1.e298
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
*1       Master 001c.23b1.e298     15     0       Ready
 2       Member 001c.23b2.e295     1      0       Ready



         Stack Port Status             Neighbors
Switch#  Port 1     Port 2           Port 1   Port 2
--------------------------------------------------------
  1        Ok         Ok                2        2
  2        Ok         Ok                1        1

Note - If you are not observing the second switch in the display , then there may be a requirement to "manually provision" the switch as described in the procedure below on Switch1.

Switch1 # config terminal
Switch1(config)# switch 2 provision ws-c3750-48ts
Switch1(config)# ^Z

Switch1 # show switch
Switch/Stack Mac Address : 001c.23b1.e298
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
*1       Master 001c.23b1.e298     15     0       Ready
 2       Member 0000.0000.0000     0      0       Provisioned

Now reload the switches , after which you should be seeing both the switches in "Ready" state.

Now that you have stacked the switches , you will notice all the ports of both switches may be managed through the Master switch. If you execute "show run" , you will notice ports of both switches are displayed and hence treated as one logical unit.

Now lets reboot the master switch and observe the status change

Switch/Stack Mac Address : 001c.23b2.e295
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
 1       Member 0000.0000.0000     0      0       Removed
*2       Master 001c.23b2.e295     1      0       Ready


Switch1#
Switch1#show sw
Switch/Stack Mac Address : 001c.23b2.e295
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
 1       Member 001c.23b1.e298     15     0       Progressing
*2       Master 001c.23b2.e295     1      0       Ready



Switch1#show sw
Switch/Stack Mac Address : 001c.23b2.e295
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
 1       Member 001c.23b1.e298     15     0       Initializing
*2       Master 001c.23b2.e295     1      0       Ready


Switch1 boot up is completed now . You will notice Switch2 is "elected" as Master which confirms you have successfully stacked the switches. Repeat this procedure by rebooting Switch2 also.

Switch1#show  sw
Switch/Stack Mac Address : 001c.23b2.e295
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
 1       Member 001c.23b1.e298     15     0       Ready
*2       Master 001c.23b2.e295     1      0       Ready


Some of other useful switch stack commands for monitoring the performance and their output are as below 

Switch1# show switch neighbors
  Switch #    Port 1       Port 2
  --------    ------       ------
      1         2             2
      2         1             1


Switch1#show switch stack-ports
  Switch #    Port 1       Port 2
  --------    ------       ------
    1           Ok           Ok
    2           Ok           Ok



Switch1#show platform stack manager all
Switch/Stack Mac Address : 001c.23b1.e298
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
*1       Master 001c.23b1.e298     15     0       Ready
 2       Member 001c.23b2.e295     1      0       Ready



         Stack Port Status             Neighbors
Switch#  Port 1     Port 2           Port 1   Port 2
--------------------------------------------------------
  1        Ok         Ok                2        2
  2        Ok         Ok                1        1


               Stack Discovery Protocol View
==============================================================


Switch   Active   Role    Current   Sequence   Dirty
Number                    State     Number     Bit
--------------------------------------------------------------------
1        TRUE    Master   Ready       115       FALSE
2        TRUE    Member   Ready       117       FALSE



                 Stack State Machine View
==============================================================

Switch   Master/   Mac Address          Version    Current
Number   Member                          (maj.min)  State
-----------------------------------------------------------
1        Master    001c.23b1.e298          1.45        Ready
2        Member    001c.23b2.e295          1.45        Ready

Last Conflict Parameters

Switch Master/ Cfgd Default Image H/W  # of    Mac Address
Number Member  Prio Config   Type Prio Members
-----------------------------------------------------------------------
 1     Master   15   No       6    2   0  001c.23b1.e298

            Stack Discovery Protocol Counters
        Messages Sent                  Messages Recvd
        UP       DOWN                  UP        DOWN
--------------------------------------------------------
*1: 0000001121 0000000885          0000000115 0000000116
 2: 0000000117 0000000117          0000000859 0000000858
 3: 0000000000 0000000000          0000000000 0000000000
 4: 0000000000 0000000000          0000000000 0000000000
 5: 0000000000 0000000000          0000000000 0000000000
 6: 0000000000 0000000000          0000000000 0000000000
 7: 0000000000 0000000000          0000000000 0000000000
 8: 0000000000 0000000000          0000000000 0000000000
 9: 0000000000 0000000000          0000000000 0000000000


             Misc  Counters
   Counter                      Up          Down
---------------------------------------------------

 Wrong Ver Number: Send:    0000000000    0000000000
 Wrong Ver Number: Recv:    0000000000    0000000000
 Missed Messages:           0000000001    0000000000
 Orphaned Messages          0000000000    0000000000
 Suppressed Messages        0000000761    0000000762
 No Available Messages      0000000096    0000000091
 Link Present               0000000009    0000000003
 Link Not Present           0000000009    0000000003
 Link RxReset               0000000025    0000000013
 Link Sync Stuck Resets     0000000026    0000000000
 Duplicates                 0000000741    0000000742
 RAC Not OK Resets          0000000000
 Switch# of last duplicate  0000000002
 Sequence Number Failures   0000000000
 RAC Not OK Resets          0000000000
 Sync Not OK Resets         0000000070    0000003982
 Switch# of last Failure:   256  Last Difference 0
 Switch Number Conflicts    0
 Stack Changes              18
 Int Stack Link changes     0
 Int Stack Link state       0x0
 Reciprocal Efficiency Changes: Upgrade 0, Downgrade 0
             Resource Counters
-------------------------------------------
 Chunk Alloc's        0000000005
 Chunk Free's         0000000004
 Enqueue Failures:    0000000000
 Null Queue Failures: 0000000000
 Chunk Alloc Errors:  0000000000


           Stack State Machine Counters
   Messages Sent              Messages Recvd
-------------------------------------------------
*1: 0000000000                 0000000000
 2: 0000000005                 0000000005
 3: 0000000000                 0000000000
 4: 0000000000                 0000000000
 5: 0000000000                 0000000000
 6: 0000000000                 0000000000
 7: 0000000000                 0000000000
 8: 0000000000                 0000000000
 9: 0000000000                 0000000000



Switch1#show switch stack-ring speed

Stack Ring Speed        : 32G
Stack Ring Configuration: Full
Stack Ring Protocol     : StackWise

Switch1#show switch stack-ring activity

Sw  Frames sent to stack ring (approximate)
------------------------------------------------
1           52147
2           18487

Total frames sent to stack ring : 70634

Note: these counts do not include frames sent to the ring
by certain output features, such as output SPAN and output
ACLs.


When any one stack cable is removed , you will notice stacking still works but at half the ring speed

Switch1#show switch stack-ports
  Switch #    Port 1       Port 2
  --------    ------       ------
    1          Down          Ok
    2           Ok          Down

Switch1#show switch stack-ring speed

Stack Ring Speed        : 16G
Stack Ring Configuration: Half
Stack Ring Protocol     : StackWise

Hope this article helps to some who are new to stacking.

How to change Cisco switch slot number - SOLVED

In this post , we share step by step tested and working procedure on how to change a Cisco switch slot number. A brand new switch from factory usually comes with a Slot number defaulting to 1. However when the switches are used in a Stack , the slot number may get changed or one may even change the slot number manually for identification purposes


Get the switch slot number

Switch # show switch
Switch/Stack Mac Address : 001b.8fb8.6f00
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
*3       Master 001b.8fb8.6f00     1      0       Ready

Switch2#configure t
Enter configuration commands, one per line.  End with CNTL/Z.

Switch(config)#switch 3 renumber 1
WARNING: Changing the switch number may result in a
configuration change for that switch.
The interface configuration associated with the old switch
number will remain as a provisioned configuration.
Do you want to continue?[confirm]
Changing Switch Number 3 to Switch Number 1
New Switch Number will be effective after next reboot
Switch(config)# ^Z
Switch # wr
Switch # reload

After switch reboot , verify the slot number

Switch # show switch
Switch/Stack Mac Address : 001b.8fb8.6f00
                                           H/W   Current
Switch#  Role   Mac Address     Priority Version  State
----------------------------------------------------------
*1       Master 001b.8fb8.6f00     1      0       Ready

Hope this helps to some beginners.

Inter VLAN routing Cisco Layer 3 switch

In this post , we share a step by step tested and working command line procedure for enabling Inter VLAN routing on a Cisco Layer 3 or L3 switch using Switch Virtual Interface (SVI).  In this simple example we cover the following topics

  • Create VLAN 100  , assign a IP to it (SVI) , connect a host 'A' to VLAN 100
  • Create VLAN 200 , assign a IP to it (SVI), connect a host 'B' to VLAN 200
  • Enable Inter VLAN routing so that host A may reach Host B


Create VLAN 100  , assign a IP to it (SVI) , connect a host 'A' to VLAN 100

Switch1 # config terminal
Switch1(config)#int vlan 100
Switch1(config-if)#description VLAN100
Switch1(config-if)#no shut
Switch1(config-if)#ip address 10.1.1.1 255.255.255.0   
Switch1(config-if)# ^Z

Switch1(config)#interface f1/0/1
Switch1(config-if)#switch access vlan 100
Switch1(config-if)#no shut


With the above steps , VLAN100 will be created and port f1/0/1 is assigned to VLAN100. Connect Host A to this port and assign a IP of range 10.1.1.X say for example 10.1.1.2. 

Verify whether Host A is able to reach the VLAN virtual interface 10.1.1.1 using ping command. Output should show a response as below 

Host A Terminal # ping 10.1.1.1

Pinging 10.1.1.1 with 32 bytes of data:

Reply from 10.1.1.1: bytes=32 time=1ms TTL=127
Reply from 10.1.1.1: bytes=32 time=1ms TTL=127


Create VLAN 200 , assign a IP to it (SVI), connect a host 'B' to VLAN 200

Switch1 # config terminal
Switch1(config)#int vlan 200
Switch1(config-if)#description VLAN200
Switch1(config-if)#no shut
Switch1(config-if)#ip address 20.1.1.1 255.255.255.0
Switch1(config-if)# ^Z

Switch1(config)#interface f1/0/2
Switch1(config-if)#switch access vlan 200
Switch1(config-if)#no shut


With the above steps , VLAN200 will be created and port f1/0/2 is assigned to VLAN200. Connect Host B to this port and assign a IP of range 20.1.1.X say for example 20.1.1.2. 

Verify whether Host B is able to reach the VLAN virtual interface 20.1.1.1 using ping command. Output should show a response as below 

Host B Terminal # ping 20.1.1.1

Pinging 20.1.1.1 with 32 bytes of data:

Reply from 20.1.1.1: bytes=32 time=1ms TTL=127
Reply from 20.1.1.1: bytes=32 time=1ms TTL=127

Now that both the VLANs are created and hosts are connected , lets check whether Host A is able to reach Host B by using ping . You should not observe any ping response and the destination is un-reachable / timeout as they belong to two separate IP ranges and on different VLAN.

Host B Terminal # ping 10.1.1.2

Pinging 10.1.1.2 with 32 bytes of data:

Request timed out
Request timed out

Enabling Inter VLAN routing

Well this is a very simple step. Just enable the IP routing option on your L3 switch . Some switches may require reboot to load the configuration . In such cases issue a reload command.

Verify whether IP routing feature is enabled , when disabled - status would be as below

Switch1#show ip route
Default gateway is not set
Host               Gateway           Last Use    Total Uses  Interface

ICMP redirect cache is empty

Switch1 # config terminal
Switch1(config)# ip routing
Switch1(config-if)# ^Z
Switch1 # reload


Once the switch reboots , verify the routing status and whether either hosts may reach the other end using ping command.


Switch1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, 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
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/24 is subnetted, 1 subnets
     20.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, Vlan100
C       20.1.1.0 is directly connected, Vlan200


Host A Terminal # ping 20.1.1.2

Pinging 20.1.1.2 with 32 bytes of data:

Reply from 20.1.1.2: bytes=32 time=1ms TTL=127
Reply from 20.1.1.2: bytes=32 time=1ms TTL=127

Host B Terminal # ping 10.1.1.2

Pinging 10.1.1.2 with 32 bytes of data:

Reply from 10.1.1.2: bytes=32 time=1ms TTL=127
Reply from 10.1.1.2: bytes=32 time=1ms TTL=127


Hope this helps to some beginners.

Cisco switch create Trunk , Assign VLAN to trunk , View trunk properties

In this post , we share step by step tested and working command line procedures to enable Trunk/ VLAN tagged ports on a Cisco switch and cover the following topics

  • How to create and enable a Trunk port
  • How to assign VLANs to a Trunk port
  • How to View the trunk properties
  • How to Disable a Trunk port.
How to create and enable a Trunk port


Switch1# config terminal

Select the interface port which has to be set as trunk port

Switch1(config)#interface f1/0/1

If this trunk carries traffic of more than one VLAN enable 802.1q support

Switch1(config-if)#switchport trunk encapsulation dot1q

Set the port mode to trunk

Switch1(config-if)#switchport mode trunk


Activate the trunk port

Switch1(config-if)#no shut

Switch1(config-if)#^Z

How to assign VLANs to a Trunk port

By default when 802.1q VLAN tagging is enabled , all the VLANs will be automatically assigned to the trunk port. However specific VLANs may be allowed / disallowed using the below commands.

Switch1#  config t
Switch1(config)#interface f3/0/33


To remove VLAN 200 from the trunk.

Switch1(config-if)# switchport trunk allowed vlan remove 200
Switch1(config-if)#^Z

To allow VLAN 100 on the trunk port

Switch1(config-if)#switchport trunk allowed vlan add 100
Switch1(config-if)#


To allow all VLANs expect VLAN 300 on trunk port

Switch1(config-if)#
Switch1(config-if)#switchport trunk allowed vlan except 200


To allow all VLANs traffic on the trunk port

Switch1(config-if)#
Switch1(config-if)#switchport trunk allowed vlan all
Switch1(config-if)#


How to view the trunk port properties

Switch1 # show int f1/0/1 trunk

Port        Mode             Encapsulation  Status        Native vlan
Fa1/0/1    on               802.1q         trunking      1

Port        Vlans allowed on trunk
Fa1/0/1    1-4094

Port        Vlans allowed and active in management domain
Fa1/0/1    1,100,200                (VLANs will be displayed only when cable is connected to port)

Port        Vlans in spanning tree forwarding state and not pruned
Fa1/0/1    none


Switch1# show interfaces trunk

Port        Mode             Encapsulation  Status        Native vlan
Fa1/0/1    on               802.1q         trunking      1

Port        Vlans allowed on trunk
Fa1/0/1    1-4094

Port        Vlans allowed and active in management domain
Fa1/0/1    1,100,200

Port        Vlans in spanning tree forwarding state and not pruned
Fa1/0/1    1,100,200

Switch1 # show interfaces f1/0/1  switchport
Name: Fa1/0/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none
Administrative private-vlan mapping: none
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
Appliance trust: none

How to disable a trunk port

Switch1(config)#interface f1/0/1
Switch1(config-if)#no switchport trunk encapsulation dot1q
Switch1(config-if)#no switchport mode trunk
Switch1(config-if)#switchport mode access 

Hope this helps some Cisco switch learning beginners.

–>