private static LinkedList createNetworkFIFO(BufferedReader buf)
                                                throws Exception
    {
        if (buf == null) {
            return null;
        }

        // create the Router objects first
        LinkedList routerList = createRouter(buf, NetworkReader.RIP_ROUTER);

        int GB = 1000000000;  // 1 GB in bits
        String line;
        String name1, name2;
        StringTokenizer str = null;
        Router r1, r2;
        Link tempLink = null;

        // creating the linking between two routers
        while ((line = buf.readLine()) != null)
        {
            str = new StringTokenizer(line);
            if (!str.hasMoreTokens()) {     // ignore newlines
                continue;
            }


            // parse the name of the connected routers
            name1 = str.nextToken();    // router name
            if (name1.startsWith("#")) {    // ignore comments
                continue;
            }

            name2 = str.nextToken();    // router name
            r1 = getRouter(name1, routerList);
            r2 = getRouter(name2, routerList);

            if (r1 == null || r2 == null)
            {
                System.out.println("NetworkReader.createNetworkFIFO(): " +
                    "Warning - unable to connect both "+name1+" and "+name2);
                continue;
            }

            // get baud rate of the link
            String baud = str.nextToken();       // bandwidth (Gbps)
            String propDelay = str.nextToken();  // latency (in millisec)
            String mtu = str.nextToken();        // link MTU (in byte)

            tempLink = new SimpleLink(r1.get_name() + "_" + r2.get_name(),
                    Double.parseDouble(baud) * GB,
                    Double.parseDouble(propDelay), Integer.parseInt(mtu));

            FIFOScheduler r1Sched = new FIFOScheduler(r1.get_name()
                    + "_to_" + r2.get_name());

            FIFOScheduler r2Sched = new FIFOScheduler(r2.get_name()
                    + "_to_" + r1.get_name());

            r1.attachRouter(r2, tempLink, r1Sched, r2Sched);
        }

        return routerList;
    }