public int checkDGPI(String dg ){
		String output = telnet.sendCommand("show ip mroute "+dg+" detail");
		String lines[] = output.trim().split("\\n+|\\r+");
		if(!output.contains("Decap")){
			System.out.println("ERROR:NVE Decap flag is missing on DG");
			cmdOut.logs[3] = "ERROR:NVE Decap flag is missing on DG\n";
			return -1;
		}
		boolean checkingOutgoing = false;
		boolean foundNve = false;
		for(String line:lines){
			String fields[] = line.trim().split("\\s+| +|,+|\\n+|\\r+");
			if(fields[0].compareTo("Incoming")==0){
				if(fields[6].compareTo("0.0.0.0") == 0) {
					System.out.println("ERROR:PIM RP is not set");
					cmdOut.logs[3] = "ERROR:PIM RP is not set\n";
					return -1;
				}
			}
			if(fields[0].compareTo("Outgoing")==0){
				if(fields[4].compareTo("1)") == 0) {
					System.out.println("ERROR:Core PIM neighborship is not up!");
					cmdOut.logs[3] = "ERROR:Core PIM neighborship is not up!\n";
					return -1;
				}
				checkingOutgoing = true;
			}
			if(checkingOutgoing) {
				if(!foundNve && (fields[0].compareTo("nve1")==0)) {
					foundNve = true;
				}
			}
		}
		System.out.println("DG has Decap flag programmed, RPF intf is known and Core neighborship is up");
		cmdOut.logs[3] = "DG has Decap flag programmed, RPF intf is known and Core neighborship is up\n";
		return 0;
	}