Component communication over ethernet using VDE switches

Joel Valenciano joelv1907 at gmail.com
Fri Oct 22 04:11:39 CEST 2021


What happens if you start the emulators like you used to? It should
work fine, as long as there isn't a MAC conflict; just remember that
one computer will probably have to be a DHCP server, if you want
internet protocols to work.

Here is a run script that connects all components (including the
nic_drv) to the same subnet with DHCP:

##################
import_from_depot [depot_user]/src/[base_src] \
  [depot_user]/pkg/[drivers_nic_pkg] \
  [depot_user]/src/vfs_lxip \
  [depot_user]/src/init \
  [depot_user]/src/vfs \
  [depot_user]/src/posix \
  [depot_user]/src/stdcxx \
  [depot_user]/src/nic_router \
  [depot_user]/src/libc

install_config {
<config>
  <parent-provides>
    <service name="CPU"/>
    <service name="LOG"/>
    <service name="RAM"/>
    <service name="ROM"/>
    <service name="RM"/>
    <service name="PD"/>
    <service name="IRQ"/>
    <service name="IO_PORT"/>
    <service name="IO_MEM"/>
    <service name="CPU"/>
  <parent-provides>

  <default-route>
    <any-service> <any-child/> <parent/> </any-service>
  </default-route>

  <default caps="200"/>

  <start name="timer">
    <resource name="RAM" quantum="5M"/>
    <provides> <service name="Timer"/> </provides>
  </start>

  <start name="drivers">
    <binary name="init"/>
    <resource name="RAM" quantum="30M"/>
    <route>
      <service name="ROM" label_last="config"> <parent
label="drivers.config"/> </service>
    </route>
  </start>

  <start name="nic_router">
    <resource name="RAM" quantum="10M"/>
    <config>
      <default-policy domain="local"/>

      <domain name="local" interface="10.0.3.1/24" gateway="10.0.3.1">
        <dhcp-server ip_first="10.0.3.10" ip_last="10.0.3.100"/>
      </domain>
    </config>
    <provides>
      <service name="Uplink"/>
      <service name="Nic"/>
    </provides>
  </start>

</config>
}

create_boot_directory

build_boot_image
##################

While not very secure, it's a simple way to test it.


On Thu, Oct 7, 2021 at 10:15 AM Kevin Burton <kevin.burton at tum.de> wrote:
>
> Hello,
>
> I am currently writing a program which boils down to a few components
> communicating over Ethernet using sockets. This works well utilizing the
> nic_router functionality, but I would like to emulate a more realistic
> scenario with the components being started from their own respective run
> scripts.
>
> I know for a fact that this was possible using the VDE switch
> functionality of QEMU in late 2015, but can't get it to work now the
> same way it used to, which simply consisted of starting the switch in a
> terminal and appending
>
> -net vde,sock=<switch location>
>
> to the QEMU args. No errors or warnings are thrown.
>
> Does anybody have recent experience with VDE switches or knows anything
> similar that could be used to achieve a more lifelike scenario? If
> possible, examples of such run scripts would be very helpful.
>
> Thanks in advance for your assistance.
>
> Kind regards,
>
> Kevin Burton
>
>
>
> _______________________________________________
> Genode users mailing list
> users at lists.genode.org
> https://lists.genode.org/listinfo/users



More information about the users mailing list