private void loadRIBFromFile(String ribFilename) {
		try {

			logger.info("loading RIB from " + ribFilename);

			FileReader fr = new FileReader(ribFilename);
			BufferedReader br = new BufferedReader(fr);

			String str = br.readLine();

			int routes_total = 0;
			int routes_read = 0;

			while (str != null) {

				routes_total++;

				int message_type_size;

				// check message format
				if (str.startsWith("TABLE_DUMP2|")) {
					message_type_size = 12;
				} else if (str.startsWith("TABLE_DUMP|")) {
					message_type_size = 11;
				} else {
					logger.trace("Update message does not start with 'TABLE_DUMP2|' or 'TABLE_DUMP|'. Skipping message...");
					str = br.readLine();
					continue;
				}

				// delete "TABLE_DUMP2|" or "TABLE_DUMP|" 
				str = str.substring(message_type_size);

				// get name (number) of AS sent the update message
				for (int i = 0; i < 3; i++) { // skip '|' 3 times
					str = str.substring(str.indexOf("|") + 1);
				}
				int nameAS;
				try { // parse AS's name
					nameAS = Integer
							.parseInt(str.substring(0, str.indexOf("|")));
				} catch (NumberFormatException e) {
					logger.trace(
							"Can't parse the name of AS, which has sent the update message! Message will be skipped.",
							e);
					str = br.readLine();
					continue;
				}

				if (!inputASs.contains(nameAS)) {
					logger.trace("Update from AS "
							+ nameAS
							+ ", not contained in inputASs list found. Update message will be skipped.");
					str = br.readLine();
					continue;
				}

				// read prefix
				Destination prefix;
				String sprefix = str.substring(str.indexOf("|") + 1,
						str.indexOf("/"));
				try { // parse prefix
					prefix = new Destination(Inet4Address.getByName(sprefix));
				} catch (UnknownHostException e) {
					logger.error(
							"Can't parse prefix: "
									+ sprefix
									+ ". Update message will be skipped. It's normal if the prefix is IPv6, as I analyse only IPv4 prefixes.",
							e);
					str = br.readLine();
					continue;
				}

				// read AS path
				str = str.substring(str.indexOf("|") + 1); // delete AS name
				str = str.substring(str.indexOf("|") + 1); // delete prefix
				String ases = str.substring(0, str.indexOf("|"));

				ASPath asPath = new ASPath(ases);

				// add prefix with AS Path to the RIB!
				announce(nameAS, prefix, asPath);

				routes_read++;

				str = br.readLine();
			}

			br.close();
			fr.close();

			logger.info(routes_read + " of " + routes_total
					+ " loaded from RIB.");

		} catch (FileNotFoundException e) {
			logger.fatal("FileNotFound exception during reading RIB", e);
		} catch (IOException e) {
			logger.fatal("IO exception during reading RIB", e);
		}
	}