[j-sim-users] 2 wireless NICs
zhdu7528 at mail.usyd.edu.au
zhdu7528 at mail.usyd.edu.au
Mon Jan 22 23:11:13 CST 2007
Quoting Hung-ying Tyan <tyanh at ieee.org>:
Thank a lot first of all.
There are two NICs for each node, so there should be two IDs and RTs, one
for each NIC, right? Unless, the ID and RT is refer to node instead of
NIC.
>From my understanding, add static routes to rt means that NIC_1 in node 1
connects to NIC_1 in node 2 and NIC_2 in node 1 connects to NIC_2 in node
2, am right? :(
is this the function i need to look up to add the route to rt?
public static void add(RTKey key_, RTEntry entry_, double timeout_, Port
out_)
{
out_.sendReceive(new Message(ADD, key_, entry_, timeout_));
}
Best regards
> There should be only one pktdispatcher, one id and one rt. Traffic
> source should run on this one instance of pktdispatcher. Then
> ll_2/up@ should be connected to, say, pktdispatcher/1 at down, for
> example.
>
> You don't want to use aodv as aodv was implemented to run in a
> wireless network on the same channel. Its behavior is not known when
> involved with more than one wireless networks. Instead, add static
> routes to rt. Refer to src/drcl/inet/contract/RTConfig.add(...) for
> adding routes to rt.
>
> HT
>
> On 1/22/07, zhdu7528 at mail.usyd.edu.au <zhdu7528 at mail.usyd.edu.au> wrote:
> > Quoting Hung-ying Tyan <tyanh at ieee.org>:
> >
> > I proposed 2 wireless NICs for each node in simulation.
> >
> > puts "create node 0"
> > set node0 [mkdir drcl.inet.Node n0]
> > cd n0
> > # NIC 1
> > mkdir drcl.inet.mac.LL ll
> > mkdir drcl.inet.mac.ARP arp
> > mkdir drcl.inet.core.queue.FIFO queue
> > mkdir drcl.inet.mac.Mac_802_11 mac
> > mkdir drcl.inet.mac.WirelessPhy phy
> > mkdir drcl.inet.mac.FreeSpaceModel propagation
> > mkdir drcl.inet.mac.MobilityModel mobility
> > # NIC 2
> > mkdir drcl.inet.mac.LL ll_2
> > mkdir drcl.inet.mac.ARP arp_2
> > mkdir drcl.inet.core.queue.FIFO queue_2
> > mkdir drcl.inet.mac.Mac_802_11 mac_2
> > mkdir drcl.inet.mac.WirelessPhy phy_2
> > mkdir drcl.inet.mac.FreeSpaceModel propagation_2
> > mkdir drcl.inet.mac.MobilityModel mobility_2
> >
> > mkdir drcl.inet.protocol.aodv.AODV aodv
> > set PD [mkdir drcl.inet.core.PktDispatcher pktdispatcher]
> > set RT [mkdir drcl.inet.core.RT rt ]
> > set ID [mkdir drcl.inet.core.Identity id ]
> > $PD bind $RT
> > $PD bind $ID
> >
> > mkdir drcl.inet.protocol.aodv.AODV aodv_2
> > set PD_2 [mkdir drcl.inet.core.PktDispatcher pktdispatcher_2]
> > set RT_2 [mkdir drcl.inet.core.RT rt_2 ]
> > set ID_2 [mkdir drcl.inet.core.Identity id_2 ]
> > $PD_2 bind $RT_2
> > $PD_2 bind $ID_2
> >
> > # enable route_back flag at PktDispatcher
> > ! pktdispatcher setRouteBackEnabled true
> >
> > #! pktdispatcher_2 setRouteBackEnabled true
> >
> > # connect components in node 0
> > puts "connect components in node 0"
> > connect phy/.mobility@ -and mobility/.query@
> > connect phy/.propagation@ -and propagation/.query@
> > connect mac/down@ -and phy/up@
> > connect mac/up@ -and queue/output@
> > connect ll/.mac@ -and mac/.linklayer@
> > connect ll/down@ -and queue/up@
> > connect ll/.arp@ -and arp/.arp@
> > connect -c pktdispatcher/0 at down -and ll/up@
> > connect -c aodv/down@ -and pktdispatcher/103 at up
> > connect aodv/.service_rt@ -and rt/.service_rt@
> > connect aodv/.service_id@ -and id/.service_id@
> > connect aodv/.ucastquery@ -and pktdispatcher/.ucastquery@
> > connect mac/.linkbroken@ -and aodv/.linkbroken@
> >
> > puts "connect components in node 0"
> > connect phy_2/.mobility@ -and mobility_2/.query@
> > connect phy_2/.propagation@ -and propagation_2/.query@
> > connect mac_2/down@ -and phy_2/up@
> > connect mac_2/up@ -and queue_2/output@
> > connect ll_2/.mac@ -and mac_2/.linklayer@
> > connect ll_2/down@ -and queue_2/up@
> > connect ll_2/.arp@ -and arp_2/.arp@
> > connect -c pktdispatcher_2/0 at down -and ll_2/up@
> > connect -c aodv_2/down@ -and pktdispatcher_2/103 at up
> > connect aodv_2/.service_rt@ -and rt_2/.service_rt@
> > connect aodv_2/.service_id@ -and id_2/.service_id@
> > connect aodv_2/.ucastquery@ -and pktdispatcher_2/.ucastquery@
> > connect mac_2/.linkbroken@ -and aodv_2/.linkbroken@
> >
> > ! arp setAddresses 0 0
> > ! ll setAddresses 0 0
> > ! mac setMacAddress 0
> > ! phy setNid 0
> > ! mobility setNid 0
> > ! id setDefaultID 0
> > ! . addAddress 0
> >
> > ! arp_2 setAddresses 1 1
> > ! ll_2 setAddresses 1 1
> > ! mac_2 setMacAddress 1
> > ! phy_2 setNid 1
> > ! mobility_2 setNid 1
> > ! id_2 setDefaultID 1
> > ! . addAddress 1
> >
> > The node 2's internal structure is exactly same as the node 1 except
> that i
> > assigned the first NIC address of node 2 to 2 and second NIC address
> of
> > node 2 to 3.
> >
> > I also created two channels for this simulation as there are two NICs
> for
> > each wireless node. Is my concept right?
> >
> > puts "create channel 1"
> >
> > mkdir drcl.inet.mac.Channel channel
> > mkdir drcl.inet.mac.NodePositionTracker tracker
> > #! tracker setGrid maxX minX maxY minY dX dY
> > ! tracker setGrid 100.0 0.0 100.0 0.0 50.0 50.0
> >
> > connect channel/.tracker@ -and tracker/.channel@
> > connect /example/n0/mobility/.report@ -and /example/tracker/.node@
> > connect /example/n1/mobility/.report@ -and /example/tracker/.node@
> >
> > ! channel setCapacity 2
> >
> > connect n0/phy/down@ -to channel/.node@
> > ! channel attachPort 0 [! /example/n0/phy getPort .channel]
> >
> > connect n1/phy/down@ -to channel/.node@
> > ! channel attachPort 1 [! /example/n1/phy getPort .channel]
> >
> > puts "create channel 2"
> >
> > mkdir drcl.inet.mac.Channel channel_2
> > mkdir drcl.inet.mac.NodePositionTracker tracker_2
> > #! tracker setGrid maxX minX maxY minY dX dY
> > ! tracker_2 setGrid 200.0 100.0 200.0 100.0 50.0 50.0
> >
> > connect channel_2/.tracker@ -and tracker_2/.channel@
> > connect /example/n0/mobility_2/.report@ -and /example/tracker_2/.node@
> > connect /example/n1/mobility_2/.report@ -and /example/tracker_2/.node@
> >
> > ! channel_2 setCapacity 2
> >
> > connect n0/phy_2/down@ -to channel_2/.node@
> > ! channel_2 attachPort 0 [! /example/n0/phy_2 getPort .channel]
> >
> > connect n1/phy_2/down@ -to channel_2/.node@
> > ! channel_2 attachPort 1 [! /example/n1/phy_2 getPort .channel]
> >
> > NOW once i run this simulation, the source node (node 1) can send the
> > packets out. But when i cat n0/source, i got the following results:
> >
> > TrafficModel: drcl.net.traffic.traffic_PacketTrain:packetSize=512,
> > interArrivalTime=1.0
> > EnclosingPkt:
> >
>
sz20(INET)sz20--src:1--dest:3--prot:0--TTL:0/255--ToS:#0--label:0__<EMPTY_BODY>__
> > startTime = 0.0, seed=0, pkt count=11, byte count=5632, running
> > State: nextTime=11.0
> >
> > the src is not mapped to the second NIC of node 0 rather than node 0
> > itself. and the dest is mapped to the second NIC of node 1 rahter than
> > node 1 itself. i am wonderting that how the CBR source choose the
> NICs?
> >
> > Best regards
> >
> >
> >
> > > too busy right now, will get back to you later. --HT
> > >
> > > On 1/18/07, zhdu7528 at mail.usyd.edu.au <zhdu7528 at mail.usyd.edu.au>
> wrote:
> > > >
> > > > plz advise whether my design notion is right or not for my 2
> wireless
> > > NICs
> > > > simulation?
> > > >
> > > >
> > > > Best regards
> > > >
> > > >
> > > >
> > > > ----------------------------------------------------------------
> > > > This message was sent using IMP, the Internet Messaging Program.
> > > >
> > >
> >
> >
> >
> >
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> >
> _______________________________________________
> j-sim-users mailing list
> j-sim-users at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/j-sim-users
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the j-sim-users
mailing list