* [9fans] [GSOC] port forwarding @ 2014-06-12 4:52 yan cui 2014-06-12 7:29 ` Nick Owens 0 siblings, 1 reply; 4+ messages in thread From: yan cui @ 2014-06-12 4:52 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs [-- Attachment #1: Type: text/plain, Size: 746 bytes --] Hi all, I run into a situation that may need to setup the port forwarding rule, but not quite sure. Hope you guys can provide some suggestions. Thanks in advance! Basically, I have a virtual machine (KVM) working as plan9's fs+auth server. The auth+fs server listens the port 564 and uses NAT (network address translation) to connect to the Internet. The virtual machine runs on a Linux box. On the same Linux machine, I use qemu to execute an enhanced plan9 cpu server (with new features included). The qemu instance needs to boot from the auth+fs server. My question is, to make the boot successful, do I need to set any port forwarding rules? If so, how to do that? -- Think big; Dream impossible; Make it happen. [-- Attachment #2: Type: text/html, Size: 1006 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] [GSOC] port forwarding 2014-06-12 4:52 [9fans] [GSOC] port forwarding yan cui @ 2014-06-12 7:29 ` Nick Owens 2014-06-12 7:53 ` Charles Forsyth 0 siblings, 1 reply; 4+ messages in thread From: Nick Owens @ 2014-06-12 7:29 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs [-- Attachment #1: Type: text/plain, Size: 1881 bytes --] yan, you need to set up some kind of bridge. there's a few options. in my setup, i use libvirt. with libvirt, i configured one vm with two NICs, one for the 'internet' and one for a private network between my cpu/auth/fs and a pxe booted vm for testing. i put ether0 on /net (private lan) and ether1 on /net.alt. in this way, i can pxe boot a vm from the first one, and it has internet access by importing /net.alt. in this way, i can change code, recompile on vm 1, and then boot vm 2 over pxe to test, so i don't lose any state in vm 1 through reboots or crashes. http://www.linux-kvm.org/page/Networking describes various ways to configure networking in kvm. libvirt removes some of the manual work here required for configuring the bridges and interfaces of the vms. it's not very coherent but http://9.offblast.org/9front/guide/PXE_boot talks a little bit about my setup, except in the doc i say that i used /net for the NAT side and /net.alt for the private side. now i use the opposite. good luck. On Thu, Jun 12, 2014 at 12:52:33AM -0400, yan cui wrote: > Hi all, > > I run into a situation that may need to setup the port forwarding rule, > but not quite sure. Hope you guys can provide some suggestions. Thanks in > advance! > > Basically, I have a virtual machine (KVM) working as plan9's fs+auth > server. > The auth+fs server listens the port 564 and uses NAT (network address > translation) to connect to the Internet. > > The virtual machine runs on a Linux box. On the same Linux machine, > I use qemu to execute an enhanced plan9 cpu server (with new features > included). The qemu instance needs to boot from the auth+fs server. > My question is, to make the boot successful, do I need to set any port > forwarding rules? If so, how to do that? > > > -- > Think big; Dream impossible; Make it happen. [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] [GSOC] port forwarding 2014-06-12 7:29 ` Nick Owens @ 2014-06-12 7:53 ` Charles Forsyth 2014-06-12 9:56 ` Aram Hăvărneanu 0 siblings, 1 reply; 4+ messages in thread From: Charles Forsyth @ 2014-06-12 7:53 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs [-- Attachment #1: Type: text/plain, Size: 2269 bytes --] > > The qemu instance needs to boot from the auth+fs server. Note that qemu instance loads from an elf file, so it doesn't need to PXE boot, which might make it a little simpler. "Boot from" here means "root from ...". On 12 June 2014 08:29, Nick Owens <mischief@9.offblast.org> wrote: > yan, > > you need to set up some kind of bridge. there's a few options. in my > setup, i use libvirt. with libvirt, i configured one vm with two NICs, > one for the 'internet' and one for a private network between my > cpu/auth/fs and a pxe booted vm for testing. i put ether0 on /net > (private lan) and ether1 on /net.alt. in this way, i can pxe boot a vm > from the first one, and it has internet access by importing /net.alt. > > in this way, i can change code, recompile on vm 1, and then boot vm 2 > over pxe to test, so i don't lose any state in vm 1 through reboots or > crashes. > > http://www.linux-kvm.org/page/Networking describes various ways to > configure networking in kvm. > libvirt removes some of the manual work here required for configuring > the bridges and interfaces of the vms. > > it's not very coherent but http://9.offblast.org/9front/guide/PXE_boot > talks a little bit about my setup, except in the doc i say that i used > /net for the NAT side and /net.alt for the private side. now i use the > opposite. > > good luck. > > On Thu, Jun 12, 2014 at 12:52:33AM -0400, yan cui wrote: > > Hi all, > > > > I run into a situation that may need to setup the port forwarding > rule, > > but not quite sure. Hope you guys can provide some suggestions. Thanks in > > advance! > > > > Basically, I have a virtual machine (KVM) working as plan9's fs+auth > > server. > > The auth+fs server listens the port 564 and uses NAT (network address > > translation) to connect to the Internet. > > > > The virtual machine runs on a Linux box. On the same Linux machine, > > I use qemu to execute an enhanced plan9 cpu server (with new features > > included). The qemu instance needs to boot from the auth+fs server. > > My question is, to make the boot successful, do I need to set any port > > forwarding rules? If so, how to do that? > > > > > > -- > > Think big; Dream impossible; Make it happen. > [-- Attachment #2: Type: text/html, Size: 3251 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] [GSOC] port forwarding 2014-06-12 7:53 ` Charles Forsyth @ 2014-06-12 9:56 ` Aram Hăvărneanu 0 siblings, 0 replies; 4+ messages in thread From: Aram Hăvărneanu @ 2014-06-12 9:56 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs If you don't want to PXE-boot, you don't need two NICs on the fs/auth server. As Charles mentioned, QEMU can boot an ELF kernel directly. I would recommend PXE-booting, however, simply because you don't have to do the extra step of getting kernels out of the Plan 9 system and onto Unix. I'm lazy. If you want to PXE-boot, just set up two NICs on the fs/auth server. You do this to create two broadcast domains (so bridging is out), you don't want your external DHCP server to respond to your Plan 9 machines. You don't need to set up two alternate network stacks (as Nick does with his systems), it's fine to have a single stack and have ip/dhcpd listen on your external interface too. ip/dhcpd can be configured not to respond to requests from unknown MAC addresses, so it shouldn't interfere with your external DHCP server. You can give your CPU server two NICs too, that way you can configure it to be accessible from the outside with no extra steps. In effect you only use the private network for PXE-booting and connecting to the file server. All other I/O is on the other NIC. I don't do this wiht my QEMU CPU servers because the version of QEMU I am using has a bug where it can't PXE-boot with more than one NIC. On my CPU servers I just import /net from my primary fs/cpu/auth server, and to access the CPU server directly I just use aux/trampoline. -- Aram Hăvărneanu ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-12 9:56 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-06-12 4:52 [9fans] [GSOC] port forwarding yan cui 2014-06-12 7:29 ` Nick Owens 2014-06-12 7:53 ` Charles Forsyth 2014-06-12 9:56 ` Aram Hăvărneanu
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).