28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

B–16<br />

rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet<br />

-lrumpvfs -lrumpdev -lrumpdev_bpf<br />

-lrumpnet_virtif<br />

# TCP/IP networking<br />

# bpf support<br />

# virt(4)<br />

So, to start <strong>the</strong> TCP/IP server execute <strong>the</strong> following. Make sure RUMP_SERVER stays<br />

set in <strong>the</strong> shell you want to use to access <strong>the</strong> rump kernel.<br />

golem> export RUMP_SERVER=unix:///tmp/netsrv<br />

golem> rump_server -lrumpnet -lrumpnet_net -lrumpnet_netinet -lrumpvfs<br />

-lrumpdev -lrumpdev_bpf -lrumpnet_virtif $RUMP_SERVER<br />

<strong>The</strong> TCP/IP server is now running <strong>and</strong> waiting for clients at RUMP_SERVER. For<br />

applications to be able to use it, we must do what we do to a regular host kernel<br />

TCP/IP stack: configure it. This is discussed in <strong>the</strong> next section.<br />

B.3.1<br />

Configuring <strong>the</strong> TCP/IP stack<br />

A kernel mode TCP/IP stack typically has access to networking hardware for sending<br />

<strong>and</strong> receiving packets, so first we must make sure <strong>the</strong> rump TCP/IP server has<br />

<strong>the</strong> same capability. <strong>The</strong> canonical way is to use bridging <strong>and</strong> we will present that<br />

here. An alternative is to use <strong>the</strong> host kernel to route <strong>the</strong> packets, but that is left as<br />

an exercise to <strong>the</strong> reader. In both cases, <strong>the</strong> rump kernel sends <strong>and</strong> receives external<br />

packets via a /dev/tap device node. <strong>The</strong> rump kernel must have read-write<br />

access to this device node. <strong>The</strong> details are up to you, but <strong>the</strong> recommended way is<br />

to use appropriate group privileges.<br />

To create a tap interface <strong>and</strong> attach it via bridge to a host E<strong>the</strong>rnet interface we<br />

execute <strong>the</strong> following comm<strong>and</strong>s. You can attach as many tap interfaces to a single

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!