Ethernet phys gate either not or double connected

311 views
Skip to first unread message

Ramon Hofer

unread,
Jan 15, 2014, 4:13:51 AM1/15/14
to omn...@googlegroups.com
Hi all

In the PLC code I'm updating, there are two modules with Ethernet
gates: PowerlineHost and PlcNet which are connected to PowerlineHost_CCo

Please find attached all the relevant files.

In the original PowerlineHost_CCo the two gates are connected with an
ideal channel, which return this error:

<!> Error in module (EtherMACFullDuplex)
PowerlineNetwork_0.powerlineHost_CCo.powerlineHost.eth[0].mac (id=21)
during network initialization: Ethernet phys gate must be connected
using a transmission channel.

On this list I have found that the Ethernet gates need to be connected
with a channel that has datarate and delay specified.

So I tried using Eth40G as channel, but now I get this error:

<!> Error in module (cCompoundModule)
PowerlineNetwork_0.powerlineHost_CCo (id=2) during network setup: More
than one channel with data rate found in the connection path between
gates PowerlineNetwork_0.powerlineHost.ethg$o[0] and
PowerlineNetwork_0.powerlineHost_CCo.plcNet.ethg$i[1],
at /home/hoferr/MasterThesis/Simulation/omnetpp/PLC/src/PowerlineHost_CCo.ned:48.

Since I'm still a noob, I would very much appreciate any help.

Do I have to look for the error in the PlcNet C++ code?
Or can I simply use another channel?


Thanks in advance and best regards
Ramon
PlcFrame.msg
PlcNet.cc
PlcNet.h
PlcNet.ned
PowerlineHost.ned
PowerlineHost_CCo.ned

Ramon Hofer

unread,
Jan 15, 2014, 10:37:42 AM1/15/14
to omn...@googlegroups.com
I have renamed all eth and ethg to plc and plcg respectively.
Seems to have worked...

Alfonso Ariza Quintana

unread,
Jan 15, 2014, 1:32:25 PM1/15/14
to omn...@googlegroups.com
Where is the network definition?
The problem is in the network definition, the nodes aren't connected using
Datarate channels



-----Mensaje original-----
De: omn...@googlegroups.com [mailto:omn...@googlegroups.com] En nombre de
Ramon Hofer
Enviado el: miércoles, 15 de enero de 2014 10:14
Para: omn...@googlegroups.com
Asunto: [Omnetpp-l] Ethernet phys gate either not or double connected
--
You received this message because you are subscribed to the Google Groups
"omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ramon Hofer

unread,
Jan 16, 2014, 6:00:06 AM1/16/14
to omn...@googlegroups.com, aari...@hotmail.com
Ups! Forgot to attach that. Sorry!

Here it is:
package plc.simulations.Old_Networks;

import inet.networklayer.autorouting.ipv4.FlatNetworkConfigurator;
import ned.DatarateChannel;
import plc.src.PowerlineHost_CCo;
import plc.src.PowerlineHost;
import plc.src.DataCollector;


network
PowerlineNetwork_0
{
   
@display("bgb=313,242;i=block/network");
    types
:
        channel
ChannelA extends DatarateChannel
       
{
            delay
= 5ns;
       
}
    submodules
:
        powerlineHost_CCo
: PowerlineHost_CCo {
           
@display("p=63,176");
       
}
        powerlineHost
: PowerlineHost {
           
@display("p=240,176");
       
}
        dataCollector
: DataCollector {
           
@display("p=152,42");
       
}
        flatNetworkConfigurator
: FlatNetworkConfigurator {
           
@display("p=55,53");
       
}
    connections allowunconnected
:
        powerlineHost_CCo
.ethg++ <--> ChannelA <--> powerlineHost.ethg++;
}

As far as I can tell, they were connected with a datarate channel. But it was probably complaining about a missing datarate definition of the datarate channel itself?

Anyway, the original software used eth gates for powerline gates which I think is a bit confusing and may have caused as well a problem. The PowerlineHost_CCo is a network containing a PowerlineHost and a PlcNet which are connected using their eth gates. But the traffic is powerline and not ethernet.


Best regards and thanks alot for your reply!
Ramon

Ramon Hofer

unread,
Jan 16, 2014, 10:36:50 AM1/16/14
to omn...@googlegroups.com
Hi all

I have replaced the plc gates (that were named eth gates) with their
proper naming. Both in the ned and C++ files.

With the attached network, I want to send UDP messaged. Unfortunately
the IPv4NetworkConfigurator seems to not be able to find a route
through the PlcNet.

When I use the debugger, for a very short time the message "No source
file named
[...]/inetmanet-2.0/src/networklayer/autorouting/ipv4/IPv4NetworkConfigurator.cc." (Actually
this line is printed twice).
The file is definitely there.
Anyway: When I run the simulation without debugger, there is no such
error.
Either way the IPv4NetworkConfigurator is not able to assign IP
addresses to the gates and therefore the UDP messages are ot sent.

The messages in the simulation window are attached as simmessages.txt.
e.g. line 277: DEBUG: Selected interface address: 10.0.0.1
so it seems as if it was configured properly.

When I add e.g. an Eth100M channel between the hosts eth gates, the
simulation output becomes the content of the attached
simmessages+ethg.txt.

Lines 348-351 are:
DEBUG: Adding route PowerlineNetwork_0.powerlineHost1.eth0 ->
PowerlineNetwork_0.powerlineHost2.eth0 as dest:10.0.0.2 gw:*
mask:255.255.255.255 metric:0 if:eth0(<unspec>) DIRECT MANUAL DEBUG:
Adding route PowerlineNetwork_0.powerlineHost1.eth0 ->
PowerlineNetwork_0.powerlineHost2.plc0 as dest:10.0.0.9 gw:10.0.0.2
mask:255.255.255.255 metric:0 if:eth0(<unspec>) REMOTE MANUAL DEBUG:
Adding route PowerlineNetwork_0.powerlineHost2.eth0 ->
PowerlineNetwork_0.powerlineHost1.eth0 as dest:10.0.0.1 gw:*
mask:255.255.255.255 metric:0 if:eth0(<unspec>) DIRECT MANUAL DEBUG:
Adding route PowerlineNetwork_0.powerlineHost2.eth0 ->
PowerlineNetwork_0.powerlineHost1.plc0 as dest:10.0.0.5 gw:10.0.0.1
mask:255.255.255.255 metric:0 if:eth0(<unspec>) REMOTE MANUAL

It seems to me if the configurator can't "see through" the PlcNet and
therefore routes through the Ethernet interface.

Do you have any idea how I solve this problem?


Best regards
Ramon
> > De: omn...@googlegroups.com <javascript:>
> > [mailto:omn...@googlegroups.com<javascript:>] En nombre de
> > Ramon Hofer
> > Enviado el: miércoles, 15 de enero de 2014 10:14
> > Para: omn...@googlegroups.com <javascript:>
> > send an email to omnetpp+u...@googlegroups.com <javascript:>.
PowerlineNetwork_0.ini
PowerlineNetwork_0.ned
PlcNet.cc
PlcNet.h
PlcNet.ned
PowerlineHost.ned
simmessages.txt
simmessages+ethg.txt

Ramon Hofer

unread,
Jan 16, 2014, 11:02:57 AM1/16/14
to omn...@googlegroups.com
The problem is the lack of an InterfaceTable of the PlcNet. But there
should be no interfaces since it's only a bus.

How could I convince the IPv4NetworkConfigurator to set up the
interface towards PlcNet to be used?

Jawad Haider Kazmi

unread,
Jun 26, 2014, 7:24:36 AM6/26/14
to omn...@googlegroups.com
Dear Ramon,

I'm searching for the PLC implementation by Holger Kellerbauer and saw you post.

I have seen the code of some of the modules (as attachments with your posts) and like to request you to kindly share the code of the rest/all of the modules.

Thanks and regards,
Jawad
Reply all
Reply to author
Forward
0 new messages