9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: hiro <23hiro@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Static ip configuration for a standalone cpu server in qemu on Linux
Date: Sat, 25 Aug 2018 19:53:31 +0200	[thread overview]
Message-ID: <CAFSF3XOJh3KF94UWyUWNmh9nNO9JH+rqk-mSG26b-q_JjB35fA@mail.gmail.com> (raw)
In-Reply-To: <CAJ1xhMVC6gr7k6j1C0UnK_ku4gHDMSp23Rt+eAj5scfpfos5bQ@mail.gmail.com>

what is the output of (1) after you did (7)
i am counting the 2nd 1 is a 6 (obviously).

On 8/25/18, Alexander Kapshuk <alexander.kapshuk@gmail.com> wrote:
> I am trying to follow the instructions given here:
>
> http://fqa.9front.org/fqa3.html#3.3.1.4.4
> 3.3.1.4.4 - Linux TAP
>
> Here's what I've done so far:
> (1). Set up a tap0 device as user root:
> ip tuntap add dev tap0 mode tap user sasha
> ip address add 10.0.0.1/24 dev tap0
>
> ip addr show dev tap0
> 4: tap0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
> default qlen 1000
>     link/ether c6:1c:63:d9:91:1d brd ff:ff:ff:ff:ff:ff
>     inet 10.0.0.1/24 scope global tap0
>        valid_lft forever preferred_lft forever
>
> (2). Started qemu with Bell Labs system image as a regular user like so:
> qemu-system-x86_64 \
> -boot order=d \
> -drive file=$HOME/Plan9.raw.img,format=raw \
> -netdev tap,id=eth,ifname=tap0,script=no,downscript=no \
> -device e1000,netdev=eth,mac=C6:1C:63:D9:91:1D
>
> (3). Put these details into /lib/ndb/local:
> sys=gnot ether=c61c63d9911d ip=10.0.0.2 ipmask=255.255.255.0 ipgw=10.0.0.1
> dns=10.0.0.1
> dom=gnot.plan9
>
> (4). And these into /cfg/gnot/termrc
> ip/ipconfig -g 10.0.0.1 ether /net/ether0 10.0.0.2 255.255.255.0
>
> (5). And rebooted the system.
>
> Current state of things:
> (1). MAC address is recognised:
> cat /net/ether0/addr
> c61c63d9911d
>
> (2). Still no networking.
> ping'ing 10.0.0.2 from my Linux host results in all packets being dropped.
> ip/ping 10.0.0.1 from qemu plan9 sees all packates dropped also.
>
> I understand that it is something I am not doing right because of my
> lack of networking knowledge.  In all likelyhood, the answer was given
> by Skip in his reply to my original email.
> The 9front wiki article probably too has all the information needed to
> setup networking in qemu.
> I am probably just not seeing it.
>
> A further tip(s) would be much appreciated.
> This list's patience for my ignorance is much appreciated.
>
> On Sat, Jul 7, 2018 at 5:33 PM Alexander Kapshuk
> <alexander.kapshuk@gmail.com> wrote:
>>
>> Thanks. I'll give that a try.
>>
>> On Fri, Jul 6, 2018 at 10:37 PM Skip Tavakkolian
>> <skip.tavakkolian@gmail.com> wrote:
>> >
>> > You could use private network addresses (10.0.0.0/8,  172.16.0.0/12 or
>> > 192.168.0.0/16). Your /lib/ndb/local file can then be setup around a
>> > subnet like 192.168.9.0/24.  According to the following, qemu uses
>> > 10.0.2.0/24 when using "user mode networking" and provides a virtual
>> > dhcp (10.0.2.2), dns (10.0.2.3) and cifs (10.0.2.4).  Using "tap" mode,
>> > you get to pick the subnet in qemu-ifup script.
>> >
>> > https://en.wikibooks.org/wiki/QEMU/Networking
>> >
>> >
>> > On Fri, Jul 6, 2018 at 9:43 AM Alexander Kapshuk
>> > <alexander.kapshuk@gmail.com> wrote:
>> >>
>> >> I've installed Plan 9 in qemu on Linux as instructed here:
>> >> https://9p.io/wiki/plan9/Installing_Plan_9_on_Qemu/index.html
>> >>
>> >> Now I'm in the process of converting it into a standalone cpu server.
>> >> I'm following the instructions given here:
>> >> https://9p.io/wiki/plan9/Configuring_a_Standalone_CPU_Server/index.html
>> >>
>> >> I would like to configure a static IP address for the cpu server, so I
>> >> can drawterm into it from other machines on my home network.
>> >> My knowledge of networking is limited. I understand that I need to put
>> >> this:
>> >> ip/ipconfig -g <gateway-addr> ether /net/ether0 <ip-addr> <ip-mask>
>> >>
>> >> into my /cfg/$sysname/cpurc.
>> >>
>> >> What I don't understand, and am asking for assistance with, is where
>> >> those three ip addresses in the example above have to come from. Do I
>> >> add them to the ethernet interface on the host system, or is there a
>> >> way to do this from within the Plan 9 system?
>> >>
>> >> Thanks.
>> >> Alexander Kapshuk.
>> >>
>
>



  reply	other threads:[~2018-08-25 17:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06 16:42 Alexander Kapshuk
2018-07-06 19:25 ` Skip Tavakkolian
2018-07-07 14:33   ` Alexander Kapshuk
2018-08-25 11:20     ` Alexander Kapshuk
2018-08-25 17:53       ` hiro [this message]
2018-08-25 18:27       ` Bakul Shah
2018-08-25 19:17         ` Alexander Kapshuk
2018-08-25 19:28           ` hiro
2018-08-25 20:05             ` Alexander Kapshuk
2018-08-25 20:59               ` hiro
2018-08-26  4:56                 ` Alexander Kapshuk
2018-08-26 13:45                   ` Alexander Kapshuk
2018-08-25 19:42           ` Bakul Shah

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=CAFSF3XOJh3KF94UWyUWNmh9nNO9JH+rqk-mSG26b-q_JjB35fA@mail.gmail.com \
    --to=23hiro@gmail.com \
    --cc=9fans@9fans.net \
    /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).