Help with Minimum Spanning Tree

Hello, I need some help with Kruskal's Algorithm, Thanks. This is the link:
http://forum.java.sun.com/thread.jsp?forum=31&thread=325804&tstart=0&trange=15

I don't think the error is mine. I copied the link just as it shows on the address bar.
http://forum.java.sun.com/thread.jsp?forum=31&thread=325804

Similar Messages

  • Help with a binary tree

    I'm writing a binary tree class and am having some trouble with the Insert function. Here is the code for the TreeNode class...
    public class TreeNode
         TreeNode Left;
         TreeNode Right;
         String Name;
         public TreeNode(String NodeName)
              Left = null;
              Right = null;
              Name = NodeName;
    }And this is the code for the Tree class...
    public class Tree
         TreeNode Root;
         public Tree(String RootNode)
              Root = new TreeNode(RootNode);
         public void Insert(String Name)
              InsertNode(Root, Name);
         public void InsertNode(TreeNode t, String NodeName)
              if (t == null)
                   t = new TreeNode(NodeName);
              else
                   if (NodeName.compareTo(t.Name) < 0)
                        InsertNode(t.Left, NodeName);
                   else if (NodeName.compareTo(t.Name) > 0)
                        InsertNode(t.Right, NodeName);
                   else if (NodeName.compareTo(t.Name) == 0)
                        System.out.println("Entered node that was already in Tree");
    }When I enter a new node into a Tree containing just the root, it follows the recursion through once, then creates the new TreeNode as it should. However, the new node is not really recognized by the tree because when I try to insert another node, it only finds the root in the tree and only goes through one recursion. What's wrong?

    I believe t.Left (or t.Right) is getting set in the line
    t = new TreeNode(NodeName);
    Since it is a recursive function, when it is called the second time, the "t" that is passed in is actually the original t.left (I think), which is getting set then.

  • Help with a node tree

    hi guys here's the problem i'm having:
    I have a class called Node that I am building a tree out of. Node is a very simple structure, has three parts: element, left and right, with element being the top. Then I have a class called converterTree. This class will take in a postfix (polish notation) string and convert it into a tree through tokenizing etc. for an ultimate calculator class. The code I will post below uses a stack implementation to do so. It should: add all operands to the stack until it hits an operator, then make a new node with the operator as the element, and the left and right are the top and second stack objects respectively. then it pushes this entire tree back onto the stack and keeps going, at each step creating a new tree and linking it to the old one. The problem is that for some reason when I get the top node back in the return, it comes back as only that node, as if all the things it referenced are gone. You wont be able to run the code below since it needs some other classes, but in my main method where all those printlns are know that the return comes back as -, null, null, null, null, null, null with - being the thing on the stack that is SUPPOSED to link to the rest of them, yet for some reason they all come back null? any suggestions? heres the code:
    import java.util.StringTokenizer;
    public class ConverterTree
         String stringToConvert;
         static QueueLi returnQueue = new QueueLi();
         public ConverterTree (String toConvert)
              stringToConvert = toConvert;
         public static boolean isOperator(String op)
              char c = op.charAt(0);
              return (c == '*'|| c =='/' || c == '+' || c =='-');
         public static boolean isLParen (String op )
              char c = op.charAt(0);
              return c== '(';
         public static boolean isRParen (String op)
              char c = op.charAt(0);
              return c == ')';
         public static boolean isSpace(String op)
              char c = op.charAt(0);
              return c == ' ';
         public static boolean isOperand (String op)
              return (!( isOperator(op) || isLParen(op) || isRParen(op) || isSpace(op)));
         public Node toTree (String toConvert)
              String delims = new String("+-/* ");
              StringTokenizer tokenizer = new StringTokenizer(stringToConvert, delims, true);
              String token = new String();
              StackLi stack = new StackLi();
              while (tokenizer.hasMoreTokens())
                   token = tokenizer.nextToken();
                   System.out.println("token: " + token);
                   if (isOperand(token))
                        ListNode node1 = new ListNode(token);
                        System.out.println("This operand is being pushed: " + token);
                        stack.push(token);
                   else if (isOperator(token))
                        Node op2 = new Node(stack.topAndPop());
                        Node op1 = new Node(stack.topAndPop());
                        Node opTree = new Node(token, op1, op2);
                        System.out.println("node and left and right: " + opTree.element + opTree.left + opTree.right);
                        stack.push(opTree);
                        System.out.println("node and left and right: " + opTree.element + opTree.left + opTree.right);
              Node returnNode = new Node(stack.topAndPop());
              return returnNode;
         public static void main (String [] args)
              String toConvert1 = "2 5 + 6 8 + -";
              ConverterTree treeTest = new ConverterTree(toConvert1);
              Node testNode = treeTest.toTree(toConvert1);
              Node right = new Node(testNode.right);
              Node left = new Node(testNode.left);
              System.out.println(testNode);
              System.out.println(left);
              System.out.println(right);
              System.out.println(left.left);
              System.out.println(left.right);
              System.out.println(right.left);
              System.out.println(right.right);
    }

    hi guys here's the problem i'm having:
    I have a class called Node that I am building a tree out of. Node is a very simple structure, has three parts: element, left and right, with element being the top. Then I have a class called converterTree. This class will take in a postfix (polish notation) string and convert it into a tree through tokenizing etc. for an ultimate calculator class. The code I will post below uses a stack implementation to do so. It should: add all operands to the stack until it hits an operator, then make a new node with the operator as the element, and the left and right are the top and second stack objects respectively. then it pushes this entire tree back onto the stack and keeps going, at each step creating a new tree and linking it to the old one. The problem is that for some reason when I get the top node back in the return, it comes back as only that node, as if all the things it referenced are gone. You wont be able to run the code below since it needs some other classes, but in my main method where all those printlns are know that the return comes back as -, null, null, null, null, null, null with - being the thing on the stack that is SUPPOSED to link to the rest of them, yet for some reason they all come back null? any suggestions? heres the code:
    import java.util.StringTokenizer;
    public class ConverterTree
         String stringToConvert;
         static QueueLi returnQueue = new QueueLi();
         public ConverterTree (String toConvert)
              stringToConvert = toConvert;
         public static boolean isOperator(String op)
              char c = op.charAt(0);
              return (c == '*'|| c =='/' || c == '+' || c =='-');
         public static boolean isLParen (String op )
              char c = op.charAt(0);
              return c== '(';
         public static boolean isRParen (String op)
              char c = op.charAt(0);
              return c == ')';
         public static boolean isSpace(String op)
              char c = op.charAt(0);
              return c == ' ';
         public static boolean isOperand (String op)
              return (!( isOperator(op) || isLParen(op) || isRParen(op) || isSpace(op)));
         public Node toTree (String toConvert)
              String delims = new String("+-/* ");
              StringTokenizer tokenizer = new StringTokenizer(stringToConvert, delims, true);
              String token = new String();
              StackLi stack = new StackLi();
              while (tokenizer.hasMoreTokens())
                   token = tokenizer.nextToken();
                   System.out.println("token: " + token);
                   if (isOperand(token))
                        ListNode node1 = new ListNode(token);
                        System.out.println("This operand is being pushed: " + token);
                        stack.push(token);
                   else if (isOperator(token))
                        Node op2 = new Node(stack.topAndPop());
                        Node op1 = new Node(stack.topAndPop());
                        Node opTree = new Node(token, op1, op2);
                        System.out.println("node and left and right: " + opTree.element + opTree.left + opTree.right);
                        stack.push(opTree);
                        System.out.println("node and left and right: " + opTree.element + opTree.left + opTree.right);
              Node returnNode = new Node(stack.topAndPop());
              return returnNode;
         public static void main (String [] args)
              String toConvert1 = "2 5 + 6 8 + -";
              ConverterTree treeTest = new ConverterTree(toConvert1);
              Node testNode = treeTest.toTree(toConvert1);
              Node right = new Node(testNode.right);
              Node left = new Node(testNode.left);
              System.out.println(testNode);
              System.out.println(left);
              System.out.println(right);
              System.out.println(left.left);
              System.out.println(left.right);
              System.out.println(right.left);
              System.out.println(right.right);
    }

  • Need help with creating B*Tree XMLIndex on a structured object-relational xmltype column

    The following is my schema:
    CREATE TABLE TST_AUDIT_TBL
       NOTE                  VARCHAR2(25 CHAR)     null,
       CHANGE_HISTORY        XMLTYPE               not null,
       CHANGE_HISTORY_EXT    XMLTYPE               null
    XMLTYPE COLUMN CHANGE_HISTORY STORE AS OBJECT RELATIONAL XMLSCHEMA "http://www.oracle.com/a.xsd" element "A"
    XMLTYPE COLUMN CHANGE_HISTORY_EXT STORE AS CLOB XMLSCHEMA "http://www.oracle.com/a.xsd" element "AX"
    XML Schema for the above is defined as follows:
    <schema targetNamespace="http://www.oracle.com/a.xsd"
            xmlns:a="http://www.oracle.com/a.xsd"
            xmlns="http://www.w3.org/2001/XMLSchema"  elementFormDefault="qualified">
        <complexType name="AuditExtType">
          <sequence>
            <element name="C" maxOccurs="unbounded" minOccurs="0">
              <complexType>
                <sequence>
                  <element type="string" name="CN"/>
                  <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                  <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                </sequence>
              </complexType>
            </element>
          </sequence>
        </complexType>
        <complexType name="AuditType">
          <sequence>
            <element type="string" name="M" maxOccurs="1" minOccurs="0"/>
            <element type="string" name="O"/>
            <element name="B" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="BC" minOccurs="1" maxOccurs="unbounded">
                    <complexType>
                      <sequence>
                        <element type="string" name="BN"/>
                        <element name="F" maxOccurs="unbounded" minOccurs="0">
                          <complexType>
                            <sequence>
                              <element type="string" name="FN"/>
                              <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                              <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                            </sequence>
                          </complexType>
                        </element>
                      </sequence>
                    </complexType> 
                  </element>
                </sequence>
              </complexType>
            </element>
            <element name="T" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="TL" minOccurs="1" maxOccurs="unbounded">
                    <complexType>
                      <sequence>
                        <element type="string" name="TN"/>
                        <element name="C" maxOccurs="unbounded" minOccurs="0">
                          <complexType>
                            <sequence>
                              <element type="string" name="CN"/>
                              <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                              <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                            </sequence>
                          </complexType>
                        </element>
                      </sequence>
                    </complexType>
                  </element>
                </sequence>
              </complexType>
            </element>
            <element name="I" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="K" maxOccurs="unbounded" minOccurs="0">
                    <complexType>
                      <sequence>
                        <element type="string" name="N"/>
                        <element type="string" name="V"/>
                      </sequence>
                    </complexType>
                  </element>
                </sequence>
              </complexType>
            </element>
          </sequence>
        </complexType>
        <element name="A" type="a:AuditType"/>
        <element name="AX" type="a:AuditExtType"/>
    </schema>
    I want to create a B*Tree XML Index on the above table for the following:
    1. CN
    2. TN
    in the above schema.
    Following the doc, this is what I am issuing:
    SQL> CREATE INDEX audt_audit_idx1 ON TST_AUDIT_TBL(CHANGE_HISTORY) INDEXTYPE IS XDB.XMLINDEX PARAMETERS ('XMLTABLE IXTAB
      2  XMLNAMESPACES(DEFAULT ''http://www.oracle.com/a.xsd''), ''/A'' COLUMNS COLUMN_NAME VARCHAR2(128) PATH ''A/T/TL/C/CN'' ');
    CREATE INDEX audt_audit_idx1 ON TST_AUDIT_TBL(CHANGE_HISTORY) INDEXTYPE IS XDB.XMLINDEX PARAMETERS ('XMLTABLE IXTAB
    ERROR at line 1:
    ORA-29958: fatal error occurred in the execution of ODCIINDEXCREATE routine
    ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name:
    (A)
    Not sure what is going wrong (and what would be a working xmlindex will look like?)

    Here goes...
    1) Schema registration
    begin
    dbms_xmlschema.registerSchema(
      schemaURL => 'http://www.oracle.com/a.xsd'
    , local     => true
    , genTypes  => true
    , genTables => false
    , enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE
    , schemaDoc =>
    '<schema targetNamespace="http://www.oracle.com/a.xsd"
            xmlns:a="http://www.oracle.com/a.xsd"
            xmlns="http://www.w3.org/2001/XMLSchema"  elementFormDefault="qualified">
        <complexType name="AuditExtType">
          <sequence>
            <element name="C" maxOccurs="unbounded" minOccurs="0">
              <complexType>
                <sequence>
                  <element type="string" name="CN"/>
                  <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                  <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                </sequence>
              </complexType>
            </element>
          </sequence>
        </complexType>
        <complexType name="AuditType">
          <sequence>
            <element type="string" name="M" maxOccurs="1" minOccurs="0"/>
            <element type="string" name="O"/>
            <element name="B" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="BC" minOccurs="1" maxOccurs="unbounded">
                    <complexType>
                      <sequence>
                        <element type="string" name="BN"/>
                        <element name="F" maxOccurs="unbounded" minOccurs="0">
                          <complexType>
                            <sequence>
                              <element type="string" name="FN"/>
                              <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                              <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                            </sequence>
                          </complexType>
                        </element>
                      </sequence>
                    </complexType>
                  </element>
                </sequence>
              </complexType>
            </element>
            <element name="T" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="TL" minOccurs="1" maxOccurs="unbounded">
                    <complexType>
                      <sequence>
                        <element type="string" name="TN"/>
                        <element name="C" maxOccurs="unbounded" minOccurs="0">
                          <complexType>
                            <sequence>
                              <element type="string" name="CN"/>
                              <element type="string" name="OV" minOccurs="0" maxOccurs="1"/>
                              <element type="string" name="NV" minOccurs="0" maxOccurs="1"/>
                            </sequence>
                          </complexType>
                        </element>
                      </sequence>
                    </complexType>
                  </element>
                </sequence>
              </complexType>
            </element>
            <element name="I" maxOccurs="1" minOccurs="0">
              <complexType>
                <sequence>
                  <element name="K" maxOccurs="unbounded" minOccurs="0">
                    <complexType>
                      <sequence>
                        <element type="string" name="N"/>
                        <element type="string" name="V"/>
                      </sequence>
                    </complexType>
                  </element>
                </sequence>
              </complexType>
            </element>
          </sequence>
        </complexType>
        <element name="A" type="a:AuditType"/>
        <element name="AX" type="a:AuditExtType"/>
    </schema>'
    end;
    2) Table creation
    CREATE TABLE TST_AUDIT_TBL
       NOTE                  VARCHAR2(25 CHAR)     null,
       CHANGE_HISTORY        XMLTYPE               not null,
       CHANGE_HISTORY_EXT    XMLTYPE               null
    XMLTYPE COLUMN CHANGE_HISTORY STORE AS OBJECT RELATIONAL XMLSCHEMA "http://www.oracle.com/a.xsd" element "A"
    XMLTYPE COLUMN CHANGE_HISTORY_EXT STORE AS CLOB XMLSCHEMA "http://www.oracle.com/a.xsd" element "AX"
    3) Retrieving the nested table and column related to the target element :
    SQL> select dbms_xmlstorage_manage.xpath2TabColMapping(
      2           owner_name => 'DEV'
      3         , table_name => 'TST_AUDIT_TBL'
      4         , column_name => 'CHANGE_HISTORY'
      5         , xpath => '/A/T/TL/C/CN'
      6         , namespaces =>'default ''http://www.oracle.com/a.xsd'''
      7         )
      8  from dual;
    DBMS_XMLSTORAGE_MANAGE.XPATH2T
    <Result>
      <Mapping TableName="SYS_NTr0U7dPWyRu6OVvDN2f5HEg==" ColumnName="CN"/>
    </Result>
    4) Creating the index :
    SQL> create index CHANGE_HISTORY_IX1 on "SYS_NTr0U7dPWyRu6OVvDN2f5HEg==" ("CN");
    Index created
    If you're going to create multiple indexes like this, you could really benefit from renaming all the nested tables to meaningful names. That can be done via DBMS_XMLSTORAGE_MANAGE as well.

  • Please can anyone help with ajax memory tree

    I need to have the ajax memory tree expanded on page load. Can anyone please give me some ideas or piece of code. I have the tree working perfectly but only, the users have to click on the + sign to see the branches. This is from Scott Spendolini's example.
    Thanks in advance,
    Suma

    Hi Suma,
    I posted this on the other thread but if you haven't checked that, here is the code I use to simulate the first button click (in a PL/SQL region after the tree region)
    declare
    l_id number;
    begin
    select id into l_id from tree_view where pid is null;
    htp.p('<script language="Javascript">var table = document.getElementsByName("level_1");
    if (table.item(0).name = "level_1")
    getTreeNode(table.item(0),'||l_id||');
    </script>');
    end;
    Cheers,
    Paul

  • Help with displaying a tree...

    Hello,
    I created a window program that displays some data in a tree structure. I have two versions of the program. One that works and one that doesn't. The one that does, builds the tree in the constructor method of my window class, creates a scrollPane for it, and adds the scrollPane to the window. Again, this version displays the tree fine.
    The second version, what I want to accomplish is load the tree when a button is pressed. When the button is pressed, I execute exactly the same steps that I do in the constructor but now these steps are in the actionPerformed method associated to the button. The thing is that the program does not display the tree. I have tried the repaint methods at the contentPane level, at the tree level, reloading the treeModel, but cannot get the tree to show. I would very appreciate any ideas on this...
    Thanks
    Antonio

    Hey...
    Thanks for the tip...that did the trick. What does the validate() method do exactly? The documentation doesn't say much....Thanks again...
    Antonio

  • Core (4500x vss) with Access HP switch spanning tree

    Hello Friends,
    i need your support to guide me for this type of topology network in-order to avoid loops...
    like
    2  4500X series switch configure as a VSS working as core switch
    in access layer i have HP switches which are connected with 1G fiber uplinks to each other (cascaded) and back to these Core switch for Vlan forwarding.
    i need help to configure  spanning tree  for such topology and avoid loops.
    Topology is in attached..

    Hi,
    you mean to say, connect each HP switch back to core (VSS) with 2 uplinks and configure as a ether-channel?
    Yes, exactly.
    actually that is  not possible because the lack of fiber cable between the cabinets (core to access) are not much cores.
    How could it not be possible? According to your drawing in your current design ASW-HP1 and ASW-HP3 both connect to the core VSS, core anyway. So it is just a matter of connecting ASW-HP2 to the core.
    Of course you want 2 uplinks from each HP.
    HTH

  • Can I get some help with this please

    I got the following error messages from java after running my code.
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 66
         at Graph.ChainingHashTable.get(ChainingHashTable.java:76)
         at Graph.Vertex.isNeighbor(Vertex.java:123)
         at Graph.LinkedGraph.addEdge(LinkedGraph.java:42)
         at Graph.Traversals.main(Traversals.java:311)
    The following is my code
    Traversal.java
    package Graph;
    public class Traversals implements Callback<Vertex>
        public void visit( Vertex data )
            System.out.println( data.getName() );
         * Perform a breadth first traversal of the vertices in the given graph
         * starting at the specified node. The call back object is used to process
         * each node as it appears in the traversal.
         * @param g the graph to traverse
         * @param start the vertex where the traversal will start
         * @param cb the object that processes vertices.
        public void BFSTraverse( Graph g, Vertex start, Callback<Vertex> cb )
            Queue<Vertex> waiting = new LinkedQueue<Vertex>(); // Queue of waiting
                                                                // vertices
            // Ensure the graph has no marked vertices
            List<Vertex> vertices = g.getVertices();
            for( vertices.first(); vertices.isOnList(); vertices.next() )
                vertices.get().setTag( false );
            // Put the start vertex in the work queue
            waiting.enqueue( start );
            // While there are waiting vertices
            while( !waiting.empty() )
                // Get the next Vertex
                Vertex curVertex = waiting.front();
                waiting.dequeue();
                // If this Vertex hasn't been processed yet
                if( !curVertex.getTag() )
                    cb.visit( curVertex ); // Process the vertex
                    curVertex.setTag( true ); // Mark it as visited
                    // Put its unmarked neighbors into the work queue
                    List<Vertex> neighbors = curVertex.getNeighbors();
                    for( neighbors.first(); neighbors.isOnList(); neighbors.next() )
                        Vertex cur = neighbors.get();
                        if( !cur.getTag() )
                            waiting.enqueue( cur );
         * Use Kruskal's algorithm to create a minimum spanning tree for the given
         * graph. The MST is returned in the form of a graph.
         * @param g the graph from which to generate the MST
         * @return a graph containing the the vertices of g and the the edges
         *         nesseary to form a minimum spanning tree.
        public Graph kruskalMST( Graph g )
            // Where the MST will be stored
            Graph mst = new LinkedGraph();
            // All the vertices in the graph
            List<Vertex> vertices = g.getVertices();
            // List of Vertex Sets
            List<Set<String>> vertexSets = new LinkedList();
            // Add the vertices in the original graph to mst
            // and create the vertex sets at the same time
            for( vertices.first(); vertices.isOnList(); vertices.next() )
                String curName = vertices.get().getName();
                Set<String> curSet = null; // new ArrayBasedSet<Vertex>();
                // Add the name of the current vertex to its set and then
                // add the set to the list that contains the vertex sets
                curSet.add( curName );
                vertexSets.add( curSet );
                // Add the current vertex to the MST graph
                mst.addVertex( curName );
            // Put the edges into a heap which effectively sorts them
            Heap<Edge> edges = new ArrayBasedHeap<Edge>();
            List<Edge> allEdges = g.getEdges();
            for( allEdges.first(); allEdges.isOnList(); allEdges.next() )
                edges.insertHeapNode( allEdges.get() );
            // Setup is complete - run the algorithm
            // There is more than one set left in the list vertex sets
            while( vertexSets.size() > 1 )
                // Get the smallest edge
                Edge cur = edges.getSmallest();
                // Find the sets where these vertices are located
                int sourcePos = findSet( vertexSets, cur.getSource().getName() );
                int destPos = findSet( vertexSets, cur.getDest().getName() );
                // If the vertices are in different sets - add the edge to
                // the MST
                if( sourcePos != destPos )
                    Set<String> sourceSet = vertexSets.get( sourcePos );
                    Set<String> destSet = vertexSets.get( destPos );
                    // Add the edge to the MST
                    mst.addEdge( cur.getSource().getName(),
                            cur.getDest().getName(), cur.getCost() );
                    // Merge the sets
                    sourceSet.union( destSet );
                    vertexSets.remove( destPos );
            // The MST can be read from this graph
            return mst;
         * Return the position of the first set in the list that contains the
         * specified name.
         * @param vertexSets a list of sets to search.
         * @param name the name being searched for.
         * @return the position of the first set in the list that contains the name
         *         or -1 if the name cannot be found.
        private int findSet( List<Set<String>> vertexSets, String name )
            int retVal = -1;
            // Step through the list and examine each set. Stop when you
            // find a set with the name or we fall off the list
            for( int i = 0; retVal == -1 && i < vertexSets.size(); i = i + 1 )
                Set curSet = vertexSets.get( i );
                // Does the current set contain the name we are looking for?
                if( curSet.contains( name ) )
                    retVal = i;
            // Return the position of the set
            return retVal;
         * Perform Dijkstra's Shortest Path algorithm on the given graph, starting
         * at the given vertex.
         * @param g the Graph to traverse.
         * @param name the name of the vertex where the traversal starts.
         * @return an array containing vertex path costs.
        public int[] dijkstraSP( Graph g, String name )
            // The names of the vertices for which the shortest
            // path is not known
            Set<String> u = new ArrayBasedSet<String>();
            // The names of the vertices for which the shortest
            // path is known
            Set<String> s = new ArrayBasedSet<String>();
            // Put the vertices in an array to make things easier
            List<Vertex> vertices = g.getVertices();
            Vertex v[] = new Vertex[ vertices.size() ];
            for( int i = 0; i < vertices.size(); i++ )
                v[ i ] = vertices.get( i );
            // The starting vertex
            Vertex start = g.getVertex( name );
            // The lowest costs seen so far
            int c[] = new int[ v.length ];
            // Temporary edge used by the program
            Edge curEdge = null;
            // Sort the vertices by name so that the costs will
            // appear in order by name
            Heap<String> names = new ArrayBasedHeap<String>();
            // Build the heap
            for( int i = 0; i < v.length; i = i + 1 )
                names.insertHeapNode( v[ i ].getName() );
            // Read out the values
            for( int i = 0; !names.empty(); i = i + 1 )
                v[ i ] = g.getVertex( names.getSmallest() );
            // We "know" the shortest path to the source
            s.add( name );
            // For each vertex, compute the starting cost
            for( int i = 0; i < v.length; i = i + 1 )
                // If this isn't the start node
                if( !v[ i ].getName().equals( name ) )
                    // Put it in the unknown set
                    u.add( v[ i ].getName() );
                    // Compute the initial cost to reach this Vertex
                    curEdge = start.getEdge( v[ i ].getName() );
                    if( curEdge != null )
                        c[ i ] = curEdge.getCost();
                    else
                        // This Vertex is currently unreachable
                        c[ i ] = Integer.MAX_VALUE;
                else
                    // It costs 0 to get to the start vertex
                    c[ i ] = 0;
            // Set is complete - run the algorithm until all of
            // the paths are known
            while( !u.isEmpty() )
                // Find the position of the lowest-cost unknown node
                int min = Integer.MAX_VALUE;
                int minPos = -1;
                for( int i = 0; minPos == -1 && i < c.length; i = i + 1 )
                    if( c[ i ] < min && u.contains( v[ i ].getName() ) )
                        min = c[ i ];
                        minPos = i;
                // We know the shortest path to the vertex
                s.add( v[ minPos ].getName() );
                u.remove( v[ minPos ].getName() );
                // Update the costs based
                for( int i = 0; i < c.length; i = i + 1 )
                    // Get the edge between the new shortest and the
                    // current node in the array
                    curEdge = v[ minPos ].getEdge( v[ i ].getName() );
                    // If there is an edge
                    if( curEdge != null )
                        // If going through the new node is better than
                        // what has been seen update the cost
                        if( c[ i ] > c[ minPos ] + curEdge.getCost() )
                            c[ i ] = c[ minPos ] + curEdge.getCost();
            return c;
        public static void main( String args[] )
            Traversals t = new Traversals();
            Graph g = new LinkedGraph();
            g.addVertex( "A" );
            g.addVertex( "B" );
            g.addVertex( "C" );
            g.addVertex( "D" );
            g.addVertex( "E" );
            g.addVertex( "F" );
            g.addEdge( "A", "B", 5 );             <--------------------------------------------------------------------------------------------Line 311
            g.addEdge( "A", "D", 9 );
            g.addEdge( "A", "C", 10 );
            g.addEdge( "B", "A", 5 );
            g.addEdge( "B", "D", 4 );
            g.addEdge( "C", "A", 10 );
            g.addEdge( "C", "D", 13 );
            g.addEdge( "C", "E", 14 );
            g.addEdge( "D", "B", 4 );
            g.addEdge( "D", "A", 9 );
            g.addEdge( "D", "C", 13 );
            g.addEdge( "D", "E", 7 );
            g.addEdge( "D", "F", 8 );
            g.addEdge( "E", "C", 14 );
            g.addEdge( "E", "D", 7 );
            g.addEdge( "E", "F", 2 );
            g.addEdge( "F", "D", 8 );
            g.addEdge( "F", "E", 2 );
            int costs[] = t.dijkstraSP( g, "A" );
            for( int i = 0; i < costs.length; i = i + 1 )
                System.out.println( costs[ i ] );
    }

    ChainingHashTable.java
    package Graph;
    * An implementation of a HashTable using chaining for collision resolution.
    * Javadoc comments for methods specified in the Table interface have been
    * omitted.
    * This code assumes that the preconditions stated in the comments are true when
    * a method is invoked and therefore does not check the preconditions.
    public class ChainingHashTable<K, V> implements Table<K, V>
        private List<Tuple<K, V>> hashTable[]; // The hashtable
        int size; // The size of the hash table
         * Create a new hash table.
         * @param cardinality the number of elements in the domain.
        public ChainingHashTable( int cardinality )
            // Note that the cast is necessary because you cannot
            // create generic arrays in Java. This statement will
            // generate a compiler warning.
            hashTable = (LinkedList<Tuple<K, V>>[]) new LinkedList[ cardinality ];
            size = 0;
        public void put( K key, V value )
            int bucket = key.hashCode();
            // Do we need to create a new list for this bucket?
            if( hashTable[ bucket ] == null )
                hashTable[ bucket ] = new LinkedList<Tuple<K, V>>();
            hashTable[ bucket ].add( new Tuple<K, V>( key, value ) );
            size = size + 1;
        public void remove( K key )
            int bucket = key.hashCode();
            List<Tuple<K, V>> chain = hashTable[ bucket ];
            boolean found = false;
            // Is there a chain to search?
            if( chain != null )
                // Step through the chain until we fall off the end or
                // find the tuple to delete
                chain.first();
                while( !found && chain.isOnList() )
                    // If this tuple has the key we are looking for
                    // delete it and stop the loop
                    if( chain.get().getKey().equals( key ) )
                        chain.remove();
                        found = true;
                    else
                        chain.next();
        public V get( K key )
            int bucket = key.hashCode();
            List<Tuple<K, V>> chain = hashTable[ bucket ];     <----------------------------------------------------------------Line 76
            V retVal = null;
            // Is there a chain to search?
            if( chain != null )
                // Step through the chain until we find the element or
                // run out of list.
                for( chain.first(); retVal == null && chain.isOnList(); chain
                        .next() )
                    // If this tuple has the key we are looking for,
                    // extract the value
                    if( chain.get().getKey().equals( key ) )
                        retVal = chain.get().getValue();
            return retVal;
        public boolean isEmpty()
            return size == 0;
        public int size()
            return size;
        public int cardinality()
            return hashTable.length;
        public List<K> getKeys()
            List<Tuple<K, V>> chain;
            List<K> keys = new LinkedList<K>();
            // Go through each chain and create a list that contains all
            // of the keys in the table
            for( int i = 0; i < hashTable.length; i++ )
                if( hashTable[ i ] != null )
                    chain = hashTable[ i ];
                    for( chain.first(); chain.isOnList(); chain.next() )
                        keys.add( chain.get().getKey() );
            return keys;
        public List<V> getValues()
            List<Tuple<K, V>> chain;
            List<V> values = new LinkedList<V>();
            // Go through each chain and create a list that contains all
            // of the keys in the table
            for( int i = 0; i < hashTable.length; i++ )
                if( hashTable[ i ] != null )
                    chain = hashTable[ i ];
                    for( chain.first(); chain.isOnList(); chain.next() )
                        values.add( chain.get().getValue() );
            return values;
         * Return a string representation of this hash table.
         * @return a string representation of this hash table.
        public String toString()
            StringBuffer hashAsString = new StringBuffer( "" );
            List chain = null;
            for( int i = 0; i < hashTable.length; i = i + 1 )
                hashAsString.append( "h[" + i + "]==" );
                if( hashTable[ i ] != null )
                    chain = hashTable[ i ];
                    for( chain.first(); chain.isOnList(); chain.next() )
                        hashAsString.append( " " + chain.get() );
                hashAsString.append( "\n" );
            return hashAsString.toString();
    } // ChainingHashTable

  • Switching Best Practice - Spanning Tree andEtherchannel

    Dear All,
    Regarding best practice related to Spanning Tree and Etherchannel, we have decided to configure following.
    1. Manually configure STP Root Bridge.
    2. On end ports, enable portfast and bpduguard.
    3. On ports connecting to other switches enable root guard.
    In etherchannel config, we have kept mode on on both side, need to change to Active and desirable as I have read that mode on may create loops? Please let me know if this is OK and suggest if something missing.
    Thank You,
    Abhisar.

    Hi Abhisar,
    Regarding your individual decisions: Manually configuring the Root Bridge is a natural thing to do. You should never leave your network just pick up a root switch based on default switch settings.
    On end ports, using PortFast and BPDU Guard is a must especially if you are running Rapid PVST+ or MSTP.
    Regarding the Root Guard on ports to other switches - this is something I do not recommend. The Root Guard is a protective mechanism in situations when your network and the network of your customer need to form a single STP domain, yet you want to have the STP Root Bridge in your network part and you do not want your customer to take over this root switch selection. In these cases, you would put the Root Guard on ports toward the customer. However, inside your own network, using Root Guard is a questionable practice. Your network can be considered trustworthy and there is no rogue root switch to protect against. Using Root Guard in your own network could cause your network to be unable to converge on a new workable spanning tree if any of the primary links failed, and it would also prevent your network from converging to a secondary root switch if the primary root switch failed entirely. Therefore, I personally see no reason to use Root Guard inside your own network - on the contrary, I am concerned that it would basically remove the possibility of your network to actually utilize the redundant links and switches.
    Regarding EtherChannels - yes, you are right, using the on mode can, under circumstances, lead to permanent switching loops. EtherChannel is one of few technologies in which I wholeheartedly recommend on relying on a signalling protocol to set it up, as opposed to configuring it manually. The active mode is my preferred mode, as it utilizes the open LACP to signal the creation of an EtherChannel, and setting both ends of a link to active helps to bring up the EtherChannel somewhat faster.
    If you are using fiber links between switches, I recommend running UDLD on them to be protected against issues caused by uni-directional links. UDLD is not helpful on copper ports and is not recommended to be run on them. However, I strongly recommend running Loop Guard configured globally with the spanning-tree loopguard default. Loop Guard can, and should, be run regardless of UDLD, and they can be used both as they nicely complement each other.
    My $0.02...
    Best regards,
    Peter

  • Nexus spanning tree pseudo configuration

    Hi
    I am trying to understand the pseudo configuration commands in a Nexus hybrid topology.
    I have vlans a, b and c only in the vPC side of the topology.  I have peer switch configured and the same stp priority on both switches.
    In the standard Spaning-tree topology I have completely seperate vlans x, y and z.
    What should I be configuring in the pseudo config section ?  Do I define a pseudo root priority for all vlans a, b, c and x, y, z or just for the standard spanning tree vlans x, y and z.  I need to avoid and, even short, spanning tree outages if I take one Nexus out of service for a short time.
    My thinking is that if one Nexus is out of service the physical mac will be used and potentially reduce the root priority of the vPC vlans causing a TCN and STP recalculation in vlans a, b and c.  This can be avoided by configuring a pseudo root priority for all Vlans lower than the current spanning tree priority shared by the vPC peers.  Is this correct ?  However, since I have a shared priority of 8192 on current vPC vlans will configuring, for example, a pseudo root priority of 4096 on those vPC vlans won't this also cause the TCN and recalculation I am trying to avoid ?  Is the benefit of the pseudo root config only obtained if it is configured at the start when the vPC is formed and prior to the peer switch command being issued ?
    Thanks, Stuart.

    Hi Ajay,
    It is recommended that switch-to-switch links are configured with the spanning-tree port type normalcommand. The one exception is the vPC peer-link which is recommended to configure with the spanning-tree port type network command.
    Take a read of the Best Practices for Spanning Tree Protocol Interoperability from page 56 of the vPC Best Practice Design Guide for further information on this.
    Regards

  • Challenge: Spanning Tree Control Between 2 links from Switch DELL M6220 to 2 links towards 2 switches CISCO 3750 connected with an stack (behavior like one switch for redundancy)

    Hello,
    I have an Spanning tree problem when i conect  2 links from Switch DELL M6220 (there are blades to virtual machines too) to 2 links towards 2 switches CISCO 3750 connected with an stack (behavior  like one switch  for redundancy, with one IP of management)
    In dell virtual machine is Spanning tree rapid stp, and in 3750 is Spanning tree mode pvst, cisco says that this is not important, only is longer time to create the tree.
     I dont know but do you like this solutions i want to try on sunday?:
     Could Spanning tree needs to work to send one native vlan to negociate the bdpus? switchport trunk native vlan 250
    Is it better to put spanning-tree guard root in both 3750 in the ports to mitigate DELL to be root in Spanning Tree?
    Is it better to put spanning- tree port-priority in the ports of Swicht Dell?
    ¿could you help me to control the root? ¿Do you think its better another solution? thanks!
     CONFIG WITH PROBLEM
    ======================
    3750: (the 2 ports are of 2 switches 3750s conected with a stack cable, in a show run you can see this)
    interface GigabitEthernet2/0/28
     description VIRTUAL SNMP2
     switchport trunk encapsulation dot1q
     switchport trunk allowed vlan 4,13,88,250
     switchport mode trunk
     switchport nonegotiate
     logging event trunk-status
     shutdown
    interface GigabitEthernet1/0/43
     description VIRTUAL SNMP1
     switchport trunk encapsulation dot1q
     switchport trunk allowed vlan 4,13,88,250
     switchport mode trunk
     switchport nonegotiate
     shutdown
    DELL M6220: (its only one swith)
    interface Gi3/0/19
    switchport mode trunk
    switchport trunk allowed vlan 4,13,88,250
    exit
    interface Gi4/0/19
    switchport mode trunk
    switchport trunk allowed vlan 4,13,88,250
    exit

    F.Y.I for catylyst heroes - here is the equivalent config for SG-300 - Vlan1 is required on the allowed list on the catylyst side (3xxx/4xxx/6xxx)
    In this example:
    VLANS - Voice on 188, data on 57, management on 56.
    conf t
    hostname XXX-VOICE-SWXX
    no passwords complexity enable
    username xxxx priv 15 password XXXXX
    enable password xxxxxx
    ip ssh server
    ip telnet server
    crypto key generate rsa
    macro auto disabled
    voice vlan state auto-enabled !(otherwise one switch controls your voice vlan….)
    vlan 56,57,188
    voice vlan id 188
    int vlan 56
    ip address 10.230.56.12 255.255.255.0
    int vlan1
    no ip add dhcp
    ip default-gateway 10.230.56.1
    interface range GE1 - 2
    switchport mode trunk
    channel-group 1 mode auto
    int range fa1 - 24
    switchport mode trunk
    switchport trunk allowed vlan add 188
    switchport trunk native vlan 57
    qos advanced
    qos advanced ports-trusted
    exit
    int Po1
    switchport trunk allowed vlan add 56,57,188
    switchport trunk native vlan 1
    do sh interfaces switchport po1
    !CATYLYST SIDE
    !Must Explicitly allow VLan1, this is not normal for catalysts - or spanning tree will not work ! Even though it’s the native vlan on both sides.
    interface Port-channel1
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 1,56,57,189
    switchport mode trunk

  • Sg-300 - 3750 stack with SPANNING-TREE root problem.

    Morning. I think ive configured a few hundred switches, maybe a thousand in my time, but never have a faced such horribleness that is the SG-300. After this week, I think ill refuse to touch them.
    Got 2 voice vlans and running a few vrf's on a 3750 stack. but this discussion is about layer 2.
    2 x 3750 stacked
    1 x voice switch sg-300 company A voice vlan 18 - Po1 up to 3750 distributed etherchannel Po1 (LACP active both sides) 2 ports in channel
    1 x voice switch sg-300 company B voice vlan 19 - Po1 up to 3750 distributed etherchannel Po2 (LACP active both sides) 2 ports in channel
    Allowed vlans on both sides (command on Port-channel) are data A, Voice A, Mgt A to switch A
    Allowed vlans on both sides (command on Port-channel) are data B, Voice B, Mgt B to switch B
    It seems that these switches are limited to one voice vlan....
    and that spanning tree BPDU's are ignored (or not recevied- havnt released the shark yet).  let me explain.
    originally when using "smart port" the switch with the lowest mac address, whatever Voice vlan was configured would take over the other switche's voice vlan, argh what a nightmare.
    I gave up on the GUI as its far to complcated and have Almost got this working.
    I am now using auto voice vlan, but have disabled smart macro. I hope that disabling smart macro stop other switches from learning the switch with the lowest mac address's voice vlan.  So far so good - in the LAB. No where was it documented in the cli guide how do disable this stupid feature.
    DHCP is working from scope on core, can mange the switches etc etc, access vlan voice vlan all good (after a monster battle).
    Now I have an issue with spanning tree.
    spanning tree priority for vlans 1-4094 on the 3750 is 4096.
    spanning tree priority for vlans 1-4094 on the SG-300's is 6xxxx.
    ALL switches think that they are the root. (well the "logical" 3 of them) The 3750's for all vlans, and the SG-300 for the one instance as it doesnt support per vlan.  (I am not interested in trying MST here..this is not a datacentre)
    On the 3750's Ive tried ieee, pvst, rpvst, while matching the non per-vlan equivalent on the SG series.
    What is the difference between a General port and Trunk Port on a SG-300 specific to spanning tree, native vlans (when you can just configure an untagged vlan anyway!!) and what is the relevance to the way the bpdu's are carried?
    And why the need for a PVID, when you can tell a port what is tagged and what isnt.
    Does the trunk need Vlan1 to be explicitly allowed, and untagged? Does the Po trunk need to be a general port with PVID configured? in vlan 1?
    I need to sort this, as cannot put an access switch into production that thinks it is the root of the tree.  I wish I had a 2960.... a 3500XL..anything
    Does anyone have CLI commands that can help here?

    F.Y.I for catylyst heroes - here is the equivalent config for SG-300 - Vlan1 is required on the allowed list on the catylyst side (3xxx/4xxx/6xxx)
    In this example:
    VLANS - Voice on 188, data on 57, management on 56.
    conf t
    hostname XXX-VOICE-SWXX
    no passwords complexity enable
    username xxxx priv 15 password XXXXX
    enable password xxxxxx
    ip ssh server
    ip telnet server
    crypto key generate rsa
    macro auto disabled
    voice vlan state auto-enabled !(otherwise one switch controls your voice vlan….)
    vlan 56,57,188
    voice vlan id 188
    int vlan 56
    ip address 10.230.56.12 255.255.255.0
    int vlan1
    no ip add dhcp
    ip default-gateway 10.230.56.1
    interface range GE1 - 2
    switchport mode trunk
    channel-group 1 mode auto
    int range fa1 - 24
    switchport mode trunk
    switchport trunk allowed vlan add 188
    switchport trunk native vlan 57
    qos advanced
    qos advanced ports-trusted
    exit
    int Po1
    switchport trunk allowed vlan add 56,57,188
    switchport trunk native vlan 1
    do sh interfaces switchport po1
    !CATYLYST SIDE
    !Must Explicitly allow VLan1, this is not normal for catalysts - or spanning tree will not work ! Even though it’s the native vlan on both sides.
    interface Port-channel1
    switchport trunk encapsulation dot1q
    switchport trunk allowed vlan 1,56,57,189
    switchport mode trunk

  • VLAN Spanning-tree (VSTP) issue with Metro-E links

    Hi Everyone,
    We have Juniper EX 4200 as core switch at two sites connected Cisco  2960s and Cisco 3560s (access layer switches). For even-numbered VLANs,  one Juniper switch is root bridge and for odd-numbered VLANs, other  Juniper switch is the root bridge.
    We have Cox and Verizon Metro-E links connecting core switches (Juniper EX 4200 at both sites).
    I want to do VLAN load sharing using VSTP but somehow it is not  working as expected. I want to pass some VLANs through COX and some  through Verizon. When there is any issue with Cox, all VLAN traffic pass  through Verizon and vice-versa. RSTP is also enabled on both Juniper  switches.
    I see MAC flapping in log messages on all Cisco access layer switches  when I bring up both Metro-E links together. When only Cox is  connected, everything works fine. When only Verizon is connected,  everything works fine. But when BOTH COX and Verizon are connected,  network gets disrupt and I see MAC flapping on all Cisco switches. All  cisco switches are running PVST.
    Anybody knows what is happening  and why VSTP is not working when both COX and VERIZON Metro-E links are active ?

    Hi Tojackson, I guess this depends on how stuff is interconnecting. It's obvious gi1/1 is forwarding and gi1/2 is blocking. So from the furthest access switch, what path must it take to reach gi1/1? That is the number of hops involved for normal traffic.
    Now, if you're concerned about a specific VLAN and you need gi1/2 forwarding to reduce travel time for other traffic, you may employ RPVST to have that specific VLAN and cost to go to gi1/2.
    In some part of the network I support we have a pair of Cisco 7606 which feeds in to a 4507R and off the 4507R we have a ring of 2955 with even 10-12 L2 switches on the ring. The consequence of multiple layer 2 hops is not of much concern and our spanning tree stops with the 4507 since we're not concerned about broadcast storm on the routed interfaces on the 7600.
    -Tom
    Please mark answered for helpful posts

  • BPDU-STP Discrpancy - Help Please - spanning-tree portfast bpduguard

    Hi,
    I get this discrepancy report by the CicoWorks saying that BPDU-STP is disabled on ports (all te ports on my switch). I have seen a document on this and how to enable this Spanning Tree feature but I am not really sure if I need to do this or not? what is the benefit in having or not having this feature enabled? if enabled, then, wont I get into the port disabling and traffic disrruption business? understanding that there is a time out feature available as well.
    Thx,
    Masood

    Hi Masood.
    STP BPDUGuard is used only on the ports which are set to STP portfast. As when the portfast is enabled on the switch it trnasitions from blocking --> forwarding as soon as you connect any device on it. If you connect a switch or a bridge, this can cause a STP loop in your network which can bring your entire N/W to halt/down.
    STP BPDUguard is specially designed for the edgeports. So as far as you have a centralized control on your network device and no one can connect any device without proper approval (your) ,you can have it disable. But if you understand the potential impact of connecting a switch or a bridge by anyone without proper authority then you might want it enable it on your switch.
    http://www.cisco.com/en/US/tech/tk389/tk621/technologies_tech_note09186a008009482f.shtml
    HTH, Please rate if it does.
    regards,
    -amit singh

  • Cisco Switches and HP Interoperability with Spanning-Tree (RSTP)

    Hello All.
    I read a lot of information from this forum about Spaning-Tree interoperability between HP Switches and Cisco Switches.
    Rather than having questions I would like to post that I manage to configure successfully HP and Cisco using RSTP (802.1w).
    SWPADRAO]display stp root
    MSTID  Root Bridge ID        ExtPathCost IntPathCost Root Port
      0    32768.cc3e-5f3a-2939  0           0
    [SWPADRAO]display stp brief
    MSTID      Port                         Role  STP State     Protection
      0        GigabitEthernet1/0/47        DESI  FORWARDING    NONE
      0        GigabitEthernet1/0/48        DESI  FORWARDING    NONE
    [SWPADRAO]display stp instance 0
    -------[CIST Global Info][Mode RSTP]-------
    CIST Bridge         :32768.cc3e-5f3a-2939
    Bridge Times        :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
    CIST Root/ERPC      :32768.cc3e-5f3a-2939 / 0
    CIST RegRoot/IRPC   :32768.cc3e-5f3a-2939 / 0
    CIST RootPortId     :0.0
    BPDU-Protection     :enabled
    Bridge Config-
    Digest-Snooping     :disabled
    TC or TCN received  :17
    Time since last TC  :0 days 0h:1m:52s
    SWNHAM17#show spanning-tree VLAN0001
     Spanning tree enabled protocol rstp
     Root ID    Priority    32768
                Address     cc3e.5f3a.2939
                Cost        4
                Port        26 (GigabitEthernet0/2)
                Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec  Bridge ID  Priority    61441  (priority 61440 sys-id-ext 1)
                Address     001b.54db.7200
                Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
                Aging Time 300 Interface        Role Sts Cost      Prio.Nbr Type
    Gi0/1            Altn BLK 4         128.25   P2p
    Gi0/2            Root FWD 4         128.26   P2p
    SWNHAM18#show spanning-tree VLAN0001
     Spanning tree enabled protocol rstp
     Root ID    Priority    32768
                Address     cc3e.5f3a.2939
                Cost        4
                Port        26 (GigabitEthernet0/2)
                Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec  Bridge ID  Priority    61441  (priority 61440 sys-id-ext 1)
                Address     001b.0cbc.4300
                Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
                Aging Time 300 Interface        Role Sts Cost      Prio.Nbr Type
    Gi0/1            Desg FWD 4         128.25   P2p
    Gi0/2            Root FWD 4         128.26   P2p

    Hello, David.
    Your command doesn't work because it's made only for tha ports that has command "spanning-tree portfast" in them. Try change spanning tree mode at the HP switch to MSTP if this is possible.

Maybe you are looking for

  • Web reference WSDL not conforming to SOAP standard

    I built a web service based on the BAPI_FLIGHT_GETLIST function module using the "create web service" wizard. The generated web service endpoint is active in SOAMANAGER transaction. When I try to generate a proxy class in Visual Studio 2005 using the

  • ConcurrentModificationException for a GeneralPath

    I've got a problem that I don't know how to solve. I've got a GeneralPath, let's call it path. I've got the normal EDT thread running. I've got a JPanel in a JFrame. I also got a communication thread (separate thread). Now, I get coordinates to add t

  • Application to help delete unwanted programs?

    I've got a MacBook Pro (OS 10.5.8), and over the last 6 months I've downloaded a number of demos (music software) and would like to delete them and their associated files. For applications that don't have an Uninstaller, is there a program (freeware?

  • Cover flow albums show songs from multiple albums

    I love my iPod classic. the only issue I'm having is that when reviewing some albums via the coverflow feature, about 5 albums shows songs from multiple albums. they play correctly. It appears just the listing is messed up. I've tried deleting, addin

  • Xserve Raid - Devicer Removal Error ?!

    Hi ! Can anybody help me ? Whenever I copy some files from my Macintosh HD on my G5 to Xserve Raid 30 seconds after start copy process stops and I get an Device Removal error. I have traid everything and I can't get it right. BTW is my setup ok ? App