linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alistair John Strachan <s0348365@sms.ed.ac.uk>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Realtime Preemption, 2.6.12, Beginners Guide?
Date: Mon, 11 Jul 2005 16:50:33 +0100	[thread overview]
Message-ID: <200507111650.33187.s0348365@sms.ed.ac.uk> (raw)
In-Reply-To: <20050711144328.GA18244@elte.hu>

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

On Monday 11 Jul 2005 15:43, Ingo Molnar wrote:
> * Alistair John Strachan <s0348365@sms.ed.ac.uk> wrote:
> > It's annoying that this is so readily reproducible here, yet almost
> > impossible to debug, and clearly a sideaffect of 4KSTACKS.. without it
> > actually being a stack overflow.
> >
> > I realise 4KSTACKS is a considerable rework of the IRQ handler, etc.
> > and probably even more heavily modified by rt-preempt, but is there
> > nothing else that can be tested before a serial console run?
>
> 4K stacks never really caused any trouble under PREEMPT_RT (or any other
> kernel i tried). It's not that complex either.
>
> one useful thing could be to give me exact instructions on how to set up
> an openvpn network similar to yours, and what kind of workload to
> generate. Maybe i can reproduce it here.

OpenVPN isn't terribly difficult to set up, but it's more than a 5 minute job. 
You'll need universal tun/tap in your kernel before you start, and openvpn 
itself installed (I've compiled from source and used Debian's 2.0.0 package, 
I'm sure Red Hat has an equivalent), then it's just a case of setting up a 
client and a server.

If you like, I can generate the "keys" used for server/client and I've 
attached the configs for the server and the client they we use here. 
Obviously for security reasons I can't attach OUR keys verbatim, but I'll 
instruct you on how to generate them.

So, on the server:

a) Install OpenVPN
b) mkdir -p /etc/openvpn/keys
c) Copy attached server.conf to /etc/openvpn
d) Modify server.conf if necessary (shouldn't be required)
e) Generate your server and client keys (see below)

This mostly repeats the moderately good documentation on 
http://openvpn.net/howto.html, but I can't expect you to read it all so I'll 
give you a bite-sized version. It saves you figuring out the same rubbish I 
had to about 6 months ago. OpenVPN will create (with my configs) a verbose 
log in /etc/openvpn/log on both machines.

1) cd /usr/share/doc/openvpn/easy-rsa

2) Edit "vars". Change line export KEY_DIR=... to:

	export KEY_DIR=/etc/openvpn/keys

3) Save and exit

4) On Bash (at least) type

	. ./vars

	Which imports "vars" into your environment.

5) ./clean-all

6) ./build-ca (enter any old crap)

7) ./build-key-server server

	Enter the common-name as "server" again. No password.

8) Finally, generate the client key (used by the client for crypto)

	./build-key client1

	Where "client1" is an arbitrary name. When prompted for "common-name", enter
	the same string; this is important and I was head-scratching for some time
	as to why it wouldn't work without this... Again no password.

8) ./build-dh (this takes a while)

With that done, /etc/openvpn/keys should contain at least..

01.pem
ca.{crt,key}
dh1024.pem
server.{crt,csr,key}
client1.{crt,csr,key}

Plus some other cruft that's probably not required. Now you should be able to 
start the openvpn server with something like..

openvpn --cd /etc/openvpn --config server.conf

Add some other flags like verbose if you want to see what's happening. 
Remember it's logging everything to /etc/openvpn/log which you can supress by 
commenting out the logfile line in the config.

It'll bring up a tun device on the server side, and wait patiently for VPN 
connections.

The client side is a piece of cake.

1) mkdir /etc/openvpn

2) Copy client1.crt, client1.key, and ca.crt from the server's /etc/openvpn 
directory to the client's /etc/openvpn directory.

3) Copy the attached client.conf to the same directory.

4) Edit the config as necessary and save (should work with only the server IP 
changes).

Again, the client machine will need to have the universal tun/tap driver 
loaded. Bring up the openvpn with:

openvpn --cd /etc/openvpn --config client.conf

A connection should be established and, hopefully, you'll get a pingable route 
to 10.0.0.1. I then made this my default gateway with:

route del default wlan
route add default tun0

Then I was able to ping machines on the server side without having a local 
gateway to them. One working VPN.

I suggest you try all this on a "stable" kernel, and once you've established 
it works, just transfer a file at a reasonable data rate through the tunnel.

Ours links to a company server with a consumer grade 1Mbit ADSL connection, 
and transferring just about anything at 110K/s causes the kernel to crash 
within about 10 seconds.

I wish you the best of luck with getting this going, and I apologise in 
advance for the poor instructions.

-- 
Cheers,
Alistair.

personal:   alistair()devzero!co!uk
university: s0348365()sms!ed!ac!uk
student:    CS/CSim Undergraduate
contact:    1F2 55 South Clerk Street,
            Edinburgh. EH8 9PP.

[-- Attachment #2: client.conf --]
[-- Type: text/plain, Size: 200 bytes --]

client
remote 192.168.99.1 443

ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server

dev tun
proto udp
nobind
user nobody
group nobody

persist-key
persist-tun

log /etc/openvpn/log
verb 3

[-- Attachment #3: server.conf --]
[-- Type: text/plain, Size: 358 bytes --]

server 10.0.0.0 255.255.255.0
port 443

ca keys/ca.crt
cert keys/server.crt
key keys/server.key
dh keys/dh1024.pem

dev tun
proto udp
user nobody
group nogroup

persist-key
persist-tun
ifconfig-pool-persist ipp

log /etc/openvpn/log
verb 3

client-to-client
push "redirect-gateway def1"
push "dhcp-option DNS 192.168.1.1"
push "dhcp-option WINS 192.168.1.2"

  reply	other threads:[~2005-07-11 15:54 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-06 11:57 Realtime Preemption, 2.6.12, Beginners Guide? Alistair John Strachan
2005-07-06 12:51 ` Alistair John Strachan
2005-07-06 13:39   ` Ingo Molnar
2005-07-06 15:58     ` Alistair John Strachan
2005-07-06 16:28       ` Ingo Molnar
2005-07-06 16:31         ` Alistair John Strachan
2005-07-06 13:31 ` Ingo Molnar
2005-07-06 15:55   ` Alistair John Strachan
2005-07-06 16:24     ` Ingo Molnar
2005-07-06 16:37       ` Alistair John Strachan
2005-07-06 16:56         ` Alistair John Strachan
2005-07-06 17:01           ` Ingo Molnar
2005-07-06 17:14             ` Alistair John Strachan
2005-07-06 17:27               ` Ingo Molnar
2005-07-06 18:23                 ` Alistair John Strachan
2005-07-06 18:38                   ` Ingo Molnar
2005-07-06 18:41                     ` Ingo Molnar
2005-07-06 19:47                       ` Alistair John Strachan
2005-07-06 20:44                         ` Ingo Molnar
2005-07-06 21:00                           ` Alistair John Strachan
2005-07-06 21:02                             ` Ingo Molnar
2005-07-06 22:15                               ` Alistair John Strachan
2005-07-06 23:08                                 ` Fernando Lopez-Lezcano
2005-07-07  6:04                                   ` Michal Schmidt
2005-07-07 10:25                                     ` Ingo Molnar
2005-07-07  9:46                           ` Alistair John Strachan
2005-07-07 11:21                             ` Alistair John Strachan
2005-07-07 11:29                               ` Ingo Molnar
2005-07-07 11:37                                 ` Alistair John Strachan
2005-07-07 11:42                                   ` Ingo Molnar
2005-07-07 12:15                                     ` Alistair John Strachan
2005-07-07 12:29                                       ` Ingo Molnar
2005-07-07 13:38                                         ` Alistair John Strachan
2005-07-07 12:33                                       ` Alistair John Strachan
2005-07-08  9:47                                     ` Alistair John Strachan
2005-07-08 11:46                                       ` Ingo Molnar
2005-07-08 18:38                                         ` Alistair John Strachan
2005-07-08 19:12                                           ` USB storage does not work with 3GB of RAM, but does with 2G of RAM Jon Schindler
2005-07-08 19:25                                           ` Realtime Preemption, 2.6.12, Beginners Guide? Ingo Molnar
2005-07-08 19:31                                           ` Ingo Molnar
2005-07-08 19:34                                             ` Ingo Molnar
2005-07-08 19:48                                           ` Ingo Molnar
2005-07-08 19:55                                             ` Alistair John Strachan
2005-07-08 20:45                                             ` Alistair John Strachan
2005-07-09 11:58                                               ` Ingo Molnar
2005-07-09 14:07                                                 ` Alistair John Strachan
2005-07-09 14:55                                                   ` Ingo Molnar
2005-07-09 15:57                                                   ` Ingo Molnar
2005-07-09 16:02                                                     ` Ingo Molnar
2005-07-09 16:04                                                     ` Alistair John Strachan
2005-07-11 13:55                                                       ` Alistair John Strachan
2005-07-11 14:12                                                         ` Ingo Molnar
2005-07-11 14:16                                                           ` Ingo Molnar
2005-07-11 14:38                                                             ` Alistair John Strachan
2005-07-11 14:43                                                               ` Ingo Molnar
2005-07-11 15:50                                                                 ` Alistair John Strachan [this message]
2005-07-13 14:45                                                                   ` Ingo Molnar
2005-07-13 15:30                                                                     ` Ingo Molnar
2005-07-14 19:58                                                                       ` Alistair John Strachan
2005-07-14 20:16                                                                         ` Lee Revell
2005-07-15 22:12                                                                           ` Alistair John Strachan
2005-07-12  2:56                                                               ` Lee Revell
2005-07-11 15:07                                                             ` Ingo Molnar
2005-07-12 20:09                                                               ` Lee Revell
2005-07-12 21:01                                                                 ` Chuck Harding
2005-07-13 10:39                                                                   ` Ingo Molnar
2005-07-13 12:29                                                                     ` Gene Heskett
2005-07-13 14:01                                                                     ` K.R. Foley
2005-07-13 19:41                                                                       ` Chuck Harding
2005-07-13 19:45                                                                         ` Ingo Molnar
2005-07-14 13:39                                                                           ` K.R. Foley
2005-07-14 12:50                                                                       ` Karsten Wiese
2005-07-14 13:56                                                                         ` K.R. Foley
2005-07-14 14:10                                                                           ` K.R. Foley
2005-07-14 14:11                                                                             ` K.R. Foley
2005-07-14 19:49                                                                         ` Chuck Harding
2005-07-16 17:15                                                                         ` Ingo Molnar
2005-07-16 19:01                                                                           ` K.R. Foley
2005-07-17 12:07                                                                           ` Karsten Wiese
2005-07-18 15:46                                                                             ` K.R. Foley
2005-07-19 11:14                                                                             ` Karsten Wiese
2005-07-19 13:35                                                                               ` Gene Heskett
2005-07-19 13:57                                                                               ` Ingo Molnar
2005-07-19 15:19                                                                                 ` Gene Heskett
2005-07-19 23:00                                                                                   ` Karsten Wiese
2005-07-09 12:41                                               ` Ingo Molnar
2005-07-09 12:46                                                 ` Ingo Molnar
2005-07-09 13:05                                                 ` Ingo Molnar
2005-07-11 22:48                                                   ` William Weston
2005-07-12 13:53                                                     ` Ingo Molnar
2005-07-09 13:13                                                 ` Ingo Molnar
2005-07-09 13:26                                                 ` Ingo Molnar
2005-07-10 19:01                                                   ` PCMCIA stack reduction patch [Was: Re: Realtime Preemption, 2.6.12, Beginners Guide?] Dominik Brodowski
2005-07-09 13:36                                                 ` Realtime Preemption, 2.6.12, Beginners Guide? Ingo Molnar
2005-07-11 13:28                                                 ` Paulo Marques
2005-07-08 11:48                                       ` Ingo Molnar
2005-07-08 17:42                                         ` Alistair John Strachan
2005-07-08 17:48                                           ` Jakub Jelinek
2005-07-08 18:12                                             ` Alistair John Strachan
     [not found] <20050713063310.GA12661@elte.hu>
2005-07-13 10:30 ` karsten wiese
2005-07-13 18:38   ` Chuck Harding

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=200507111650.33187.s0348365@sms.ed.ac.uk \
    --to=s0348365@sms.ed.ac.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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).