9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] two nics (alternating) vs dns config
@ 2012-01-24  4:15 Troy Cauble
  2012-01-24 10:04 ` Henning Schild
  0 siblings, 1 reply; 5+ messages in thread
From: Troy Cauble @ 2012-01-24  4:15 UTC (permalink / raw)
  To: 9fans

I have plan9 in VirtualBox on a macbook.
I use the wired network at work and wifi at home.
The Vbox config has two network adaptors,
1 bridged to the wired and 1 bridged to the wifi.

I'd like my plan9 config to boot and work on either network.
(Even better if it could switch without a reboot!)

I've bound '#l1' to /net (not /net.alt) in /lib/namespace.$node
and /cfg/$node/cpurc.  The two static ipconfigs work.
I can ping out and drawterm in.

The only issue is dns.  DNS always uses /net/ether0.
How do I make it use /net/ether1 when needed?
Would the /net.alt style config work better?

My /lib/ndb/local describes both networks with the same sys name.
MAC addresses differentiate.  'ndb/query sys $node' returns the
right set when I'm home, but DNS doesn't use it.

Thanks,
-troy



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] two nics (alternating) vs dns config
  2012-01-24  4:15 [9fans] two nics (alternating) vs dns config Troy Cauble
@ 2012-01-24 10:04 ` Henning Schild
  2012-01-24 10:49   ` Charles Forsyth
  2012-01-24 11:42   ` Steve Simon
  0 siblings, 2 replies; 5+ messages in thread
From: Henning Schild @ 2012-01-24 10:04 UTC (permalink / raw)
  To: 9fans

I suggest you give your VM one NAT interface and run a DNS server on
your macbook. That way you can completely hide mobility from plan9,
which is a good idea because it can not really handle it.
You can also restart the dns resolver telling it which server to use
(/env/DNSSERVER) but that will not affect running processes. I guess
dns should provide a ctl file to allow reconfiguration at runtime.
For your special case you can put multiple ips in /env/DNSSERVER, on
your secondary network you will have to wait until the primary times
out but it will work.

Henning

On Tue, 24 Jan 2012 05:15:20 +0100
Troy Cauble <troycauble@gmail.com> wrote:

> I have plan9 in VirtualBox on a macbook.
> I use the wired network at work and wifi at home.
> The Vbox config has two network adaptors,
> 1 bridged to the wired and 1 bridged to the wifi.
>
> I'd like my plan9 config to boot and work on either network.
> (Even better if it could switch without a reboot!)
>
> I've bound '#l1' to /net (not /net.alt) in /lib/namespace.$node
> and /cfg/$node/cpurc.  The two static ipconfigs work.
> I can ping out and drawterm in.
>
> The only issue is dns.  DNS always uses /net/ether0.
> How do I make it use /net/ether1 when needed?
> Would the /net.alt style config work better?
>
> My /lib/ndb/local describes both networks with the same sys name.
> MAC addresses differentiate.  'ndb/query sys $node' returns the
> right set when I'm home, but DNS doesn't use it.
>
> Thanks,
> -troy
>




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] two nics (alternating) vs dns config
  2012-01-24 10:04 ` Henning Schild
@ 2012-01-24 10:49   ` Charles Forsyth
  2012-01-24 11:42   ` Steve Simon
  1 sibling, 0 replies; 5+ messages in thread
From: Charles Forsyth @ 2012-01-24 10:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

there is one, but it doesn't seem to be documented.

echo refresh >/net/dns
# or you can escalate to
echo restart >/net/dns
# but then you might need to remount in some name spaces

On 24 January 2012 10:04, Henning Schild <henning@plan9.bell-labs.com>wrote:

> I guess
> dns should provide a ctl file to allow reconfiguration at runtime.
>

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] two nics (alternating) vs dns config
  2012-01-24 10:04 ` Henning Schild
  2012-01-24 10:49   ` Charles Forsyth
@ 2012-01-24 11:42   ` Steve Simon
  1 sibling, 0 replies; 5+ messages in thread
From: Steve Simon @ 2012-01-24 11:42 UTC (permalink / raw)
  To: 9fans

You could always use googl'es DNS server if local conditions (firewalls) permit.

	8.8.8.8  and 8.8.4.4

-Steve



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] two nics (alternating) vs dns config
       [not found] <CAMhmq__WZQ2MS_FiAfgV385xHuKbwzi8aTXhxLJ7_HZppw+N1w@mail.gmail.c>
@ 2012-01-24  4:23 ` erik quanstrom
  0 siblings, 0 replies; 5+ messages in thread
From: erik quanstrom @ 2012-01-24  4:23 UTC (permalink / raw)
  To: 9fans

> I've bound '#l1' to /net (not /net.alt) in /lib/namespace.$node
> and /cfg/$node/cpurc.  The two static ipconfigs work.
> I can ping out and drawterm in.
>
> The only issue is dns.  DNS always uses /net/ether0.
> How do I make it use /net/ether1 when needed?
> Would the /net.alt style config work better?
>
> My /lib/ndb/local describes both networks with the same sys name.
> MAC addresses differentiate.  'ndb/query sys $node' returns the
> right set when I'm home, but DNS doesn't use it.

what you've said about dns(8) isn't quite right.  it doesn't
use the ethernet devices directly, but rather through the ip
stack.  so you can use the usual tools to change the default
route in the ip stack (ip/ipconfig) and dns will be none the
wiser.

- erik




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-24 11:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-24  4:15 [9fans] two nics (alternating) vs dns config Troy Cauble
2012-01-24 10:04 ` Henning Schild
2012-01-24 10:49   ` Charles Forsyth
2012-01-24 11:42   ` Steve Simon
     [not found] <CAMhmq__WZQ2MS_FiAfgV385xHuKbwzi8aTXhxLJ7_HZppw+N1w@mail.gmail.c>
2012-01-24  4:23 ` erik quanstrom

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).