public static boolean addCmd(String strCmd,StrideTrie trie){
        try{
            if( strCmd.isEmpty() ) return false;
            String[] strs = strCmd.split("\\s+");
            if( strs[0].compareTo("add")!=0 ) return false;
            int[] ips = new int[2];
            //get ip address and netmasklen
            if( !IPv4Util.IPandMasklenfromStr(strs[1],ips) ) return false;
            if( strs[2].compareTo("via")!=0 ) return false;

            int nhop = 0;
            nhop = Integer.parseInt(strs[3]);

            //trie.addEntry(ips[0],ips[1],nhop);
            trie.addRandomItem(ips[0],ips[1]);

            System.out.println("Total entries is : " + trie.m_total);

        }catch (Exception ex){
            System.out.println(strCmd + " failed!");
            //ex.printStackTrace();
            return false;
        }
        return true;
    }