9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Rodolfo (kix)" <rodolfogarciap@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: [9fans] err 2: arena creation time after last write time
Date: Sat, 19 Aug 2006 16:59:07 +0200	[thread overview]
Message-ID: <3096bd910608190759h372c09c8m83d830915f02b98@mail.gmail.com> (raw)
In-Reply-To: <44E692D6.8060108@lanl.gov>

[-- Attachment #1: Type: text/plain, Size: 4737 bytes --]

Thanks Ronald,

This is my new method ;-) and I can use ping :-)
If any thinks is ok, I can write it in the wiki.

slds.

- - - - - - - -

Installing Plan9 network for QEMU (Linux)

Do you need:

* Support for tunneling in kernel, with 802.1q:

tun: "Network device support" -> "Universal TUN/TAP device driver support"
bridging: "Networking options" -> "802.1d Ethernet Bridging"

* The bridge-utils package

First, load the Tunneling kernel support as modules

add "tun" to /etc/modules

Load it now (do not reboot ;-)): modprobe tun

* Create this script:

darky:~# cat kixconf
IFACE=eth0
BRIF=br0
IPORIG=`/sbin/ifconfig $IFACE | grep "inet addr" | cut -d: -f2 | cut -d" "
-f1`
IPGW=`netstat -nr | grep ^"0.0.0.0" | awk -F" " '{print $2} '`
IPBCAST=`/sbin/ifconfig $IFACE | grep "Bcast" | cut -d: -f3 | cut -d" " -f1`

echo "Interface = " $IFACE
echo "Bridge if = " $BRIF
echo "IP = " $IPORIG
echo "Gateway = " $IPGW
echo "Broadcast = " $IPBCAST

ifconfig $IFACE down
brctl addbr $BRIF
ifconfig $IFACE 0.0.0.0 promisc up
ifconfig $BRIF $IPORIG netmask 255.255.255.0 broadcast $IPBCAST up
brctl stp $BRIF off
brctl setfd $BRIF 1
brctl sethello $BRIF 1
brctl addif $BRIF $IFACE
route add default gw $IPGW
darky:~#

Now, configure /etc/qemu-ifup, and set the +x bit (chmod 755 /etc/qemu-ifup)
like this:

darky:~# ls -l /etc/qemu-ifup
-rwxr-xr-x 1 root root 60 2006-08-19 12:57 /etc/qemu-ifup
darky:~# cat /etc/qemu-ifup
#!/bin/sh
ifconfig $1 0.0.0.0 promisc up
brctl addif br0 $1
darky:~#

Now, you can use your Plan9 as a physical node in your network, then
configure the Plan9 scripts as
http://plan9.bell-labs.com/wiki/plan9/Network_configuration/index.html

For boot the Plan 9 you shoud use this command:

/usr/bin/qemu -m 128 -hda '' -net nic,vlan=0,macaddr=00:11:22:33:44:55 -net
tap,vlan=0,ifname= -localtime &

slds.

2006/8/19, Ronald G Minnich <rminnich@lanl.gov>:
>
> here's how I run qemu so as to get things going. This allows me to
> drawterm into it.
>
> qemu qemu.vesaroot &
>
> Gets me a cpu kernel going
>
> sleep 5 && dhcpd -d
>
> gets me the dhcpd
>
> a run looks like this:
>
> [root@q plan9]# qemu qemu.vesaroot & sleep 5&& dhcpd -d
> [1] 4674
> Connected to host network interface: tun1
> Could not open '/dev/kqemu' - QEMU acceleration layer not activated
> Internet Systems Consortium DHCP Server V3.0.2-RedHat
> Copyright 2004 Internet Systems Consortium.
> All rights reserved.
> For info, please visit http://www.isc.org/sw/dhcp/
> Wrote 0 deleted host decls to leases file.
> Wrote 0 new dynamic host decls to leases file.
> Wrote 17 leases to leases file.
> Listening on LPF/tun1/46:9c:6d:94:f5:1f/172.20.0/24
> Sending on   LPF/tun1/46:9c:6d:94:f5:1f/172.20.0/24
>
> No subnet declaration for ath0 (192.168.0.104).
> ** Ignoring requests on ath0.  If this is not what
>     you want, please write a subnet declaration
>     in your dhcpd.conf file for the network segment
>     to which interface ath0 is attached. **
>
> Sending on   Socket/fallback/fallback-net
> DHCPDISCOVER from 52:54:00:12:34:56 via tun1
> DHCPOFFER on 172.20.0.2 to 52:54:00:12:34:56 via tun1
> Dynamic and static leases present for 172.20.0.2.
> Remove host declaration qemu or remove 172.20.0.2
> from the dynamic address pool for 172.20.0/24
> DHCPREQUEST for 172.20.0.2 (172.20.0.1) from 52:54:00:12:34:56 via tun1
> DHCPACK on 172.20.0.2 to 52:54:00:12:34:56 via tun1
>
>
> (note the DHCPREQUEST -- that's my plan 9)
> (the error message is unimportant)
>
> OK, what's the config look like? dhcpd.conf:
> subnet 172.20.0.0 netmask 255.255.255.0 {
>                range 172.20.0.2 172.20.0.2 ;
>                default-lease-time 600;
>                   max-lease-time 7200;
>                option subnet-mask 255.255.255.0;
>                  option routers 172.20.0.1;
>              }
> host qemu {
>          hardware ethernet 52:54:00:12:34:56;
>          fixed-address xtest;
> }
>
> xtest is (from /etc/hosts):
> 172.20.0.2 xtest
>
>
> ok but how did tun1 get configured? You need to set up /etc/qemu-ifup
>
> [root@q etc]# cat /etc/qemu-ifup
> #!/bin/sh
> tun=$1
> sudo /sbin/ifconfig $1 172.20.0.1
> sudo /sbin/iptables -N nat
> sudo /sbin/iptables -t nat -F
> sudo /sbin/iptables -t nat -A POSTROUTING -s 172.20.0.1 -j MASQUERADE
> sudo /sbin/iptables -t nat -A POSTROUTING -d 172.20.0.1 -o $tun
> sudo echo 1 > /proc/sys/net/ipv4/ip_forward
> [root@q etc]#
>
>
> this allows me to drawterm into the plan 9 cpu server running on my
> laptop.
>
> If this all works, then put it in the wiki :-) This is on FC4.
>
> ron
>



-- 
Rodolfo García "kix"

[-- Attachment #2: Type: text/html, Size: 7842 bytes --]

  reply	other threads:[~2006-08-19 14:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-18 11:40 Rodolfo (kix)
2006-08-18 14:45 ` David Leimbach
2006-08-19  0:28   ` Rodolfo (kix)
2006-08-19  1:53     ` erik quanstrom
2006-08-19  2:46     ` Gorka guardiola
2006-08-19 18:21       ` [9fans] Searching for text outside Acme yard-ape
2006-08-19 18:33         ` Benn Newman
2006-08-19 20:59           ` Micah Stetson
2006-08-19 21:24             ` Benn Newman
2006-08-20  1:03               ` Micah Stetson
2006-08-19 21:45             ` yard-ape
2006-08-19 21:53               ` Francisco J Ballesteros
2006-08-19 21:02           ` Charles Forsyth
2006-08-20  3:29           ` erik quanstrom
2006-08-20  5:07             ` yard-ape
2006-08-19  4:25     ` [9fans] err 2: arena creation time after last write time Ronald G Minnich
2006-08-19 14:59       ` Rodolfo (kix) [this message]
2006-08-19 17:21       ` Gorka guardiola
2006-08-28 12:46       ` [9fans] test command is broken Richard Miller
2006-08-18 20:25 ` [9fans] err 2: arena creation time after last write time csant
2006-08-18 20:29   ` John Floren
2006-08-18 20:38     ` csant
2006-08-18 20:41       ` andrey mirtchovski
2006-08-18 20:46         ` John Floren
2006-08-18 20:46         ` csant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3096bd910608190759h372c09c8m83d830915f02b98@mail.gmail.com \
    --to=rodolfogarciap@gmail.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).