Subject: Re: Questions about networking
To: Juan RP <juan@xtraeme.nopcode.org>
From: Quentin Garnier <cube@cubidou.net>
List: port-xen
Date: 03/15/2005 23:32:13
--+YNiMqYexvphW3UE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 15, 2005 at 11:14:11PM +0100, Juan RP wrote:
>=20
> Hi, I have a domU running perfectly now, but the network still does not
> work, so I have a few questions:
>=20
> o Does the dom0 kernel needs ipfilter/pf and bridge for this? (something =
more?)
>=20
> I'm using this line in the nbsd file to create domUs:
>=20
> vif =3D [ 'mac=3Daa:00:00:50:02:f0, bridge=3D10.0.0.254 netmask 255.255.2=
55.0' ]
>=20
> and my dom0 now has created the interface:
>=20
> xvif9.0: flags=3D8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> =
mtu 1500
>         address: aa:00:00:51:02:f0
>         inet 10.0.0.254 netmask 0xffffff00 broadcast 10.0.0.255
>         inet6 fe80::a800:ff:fe51:2f0%xvif9.0 prefixlen 64 scopeid 0x4
>=20
> I'm using DHCP in dom0, my gateway is 192.168.1.1, DNS is assigned via DH=
CP, so my next
> question is: what values do I have to use in domU to have the network wor=
king?
> (I want to mount some NFS shares).
=20
sysctl -w net.inet.ip.forwarding=3D1 should be plenty enough.  After that,
it really depends on the topology of your network.

FWIW, this afternoon when I could take a try at booting a domU, I used a
modified vif-bridge script to do bridging by doing this:

vif =3D [ 'mac=3Dlalala, bridge=3Dbridge:bridge0:fxp0' ]

The meaning of the bridge parameter is the following:  first it starts
with bridge to distinguish between plain ifconfig case and bridge case,
then it bridges the vif interface with fxp0 on bridge0, creating it if
necessary.  I'll send it tomorrow if you want.

BTW, xentools20 package needs some work (and should include such a
script).  Also, it really needs to default to 127.0.0.1 for the relevant
daemonized parts, I've patched mine for that.  I'll have a closer look
at this during the next few days.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--+YNiMqYexvphW3UE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBQjdibdgoQloHrPnoAQKOeggAk8EInjtW3anxhYzngesXI9EDR4CwU5IV
s/KhG+glCVqsjgb+31bF5+oN+XV1+1OUQ0HUpyDZqeL6rYEMmlhgSgUAaWfKkw25
1LP/uUJXEeCtF1nxIc82Ev7osKw3jOdpxDppFOmGXevDBRppOjWRXgSsA0LWKw7z
J4cg4L8Mqi4OTuJPBIIV3IYfrqNvU3QZXIxbd/o6IMssGal+f2yzU7H4OgnSxKdw
RXhHbt0tOWRWy04/X6EVqbE1TcDj0l0vduEFLj9pV57QK8lS7t0s9sc0EflBktxr
XKIDNrqr4DUBiRHrrHci5poCvSzV0WMdoYQdYCAc/b0GbAg0BDiKAw==
=R2AL
-----END PGP SIGNATURE-----

--+YNiMqYexvphW3UE--