public void CreateReplicaLan(XmlNode parent, XmlNode router, XmlNode node, 
								 String name, float latency, float bit_rate)
	{
		if (parent == null || router == null || node == null)
			return;
		
		XmlNode replicalan = CreateReplica(parent, node, name);
		
		XmlNode if1 = CreateInterface(router, INTERFACE + "_" + name + "_" + ROUTER, 
								      latency, bit_rate);
		
		//create link between hosts and router
		XmlNode link = new XmlNode(XmlNodeType.NODE, router.name + "_" + name + "_" + ROUTER);
		link.setAttribute(TYPE, NODE_TYPE_LINK);
		parent.addChild(link);
		
		XmlNode bitratelem = new XmlNode(XmlNodeType.ATTR, BANDWIDTH);
		DecimalFormat df = new DecimalFormat("#########");
		bitratelem.setAttribute(VALUE, df.format(bit_rate));
		link.addChild(bitratelem);
		
		XmlNode delayelem = new XmlNode(XmlNodeType.ATTR, DELAY);
		df = new DecimalFormat("#.######");
		delayelem.setAttribute(VALUE, df.format(latency));
		link.addChild(delayelem);
		
		String name1 = router.name;
		String name2 = name + "_" + ROUTER;
		
		XmlNode ref1 = new XmlNode(XmlNodeType.REF, name1);
		XmlNode ref2 = new XmlNode(XmlNodeType.REF, name2);
		link.addChild(ref1);
		link.addChild(ref2);
		
		//String path1 = "..:" + router.name + ":" + INTERFACE + "_" + name + "_" + ROUTER;
		//String path2 = "..:" + name + ":" + ROUTER + ":"+ INTERFACE + "_" + ROUTER;
		
		String path1 = tree.getPath(ref1, if1);
		String path2 = tree.getPath(ref2, replicalan);
		path2 += ":" + ROUTER + ":"+ INTERFACE + "_" + ROUTER;

		ref1.setAttribute(PATH, path1);
		ref2.setAttribute(PATH, path2);
		
		//tree.addReplica(replicalan);
	}