<< | Thread Index | >> ]    [ << | Date Index | >> ]

To: "Tanat Tonguthaisri" <Tanat,AT,Ayuda,DOT,com,DOT,au>
Subject: Re: Key question
From: "Hans Steegers" <J.Steegers,AT,chello,DOT,nl>
Date: Thu, 10 Jul 2003 09:41:36 +0200
Cc: <cipe-l,AT,inka,DOT,de>
Reply-to: "Hans Steegers" <steegers,AT,steegers,DOT,nl>

Hi, Tanat
Let's go step-by-step:

1. The default options file
>I did have an "options" file (though it also contained a valid key)
>in /etc/cipe .
If many cipe-devices are used, this option file sets the options common to
all devices. The key is always specific to a device.
cipe was also taking options from this file.
Removing/renaming this file reduces the confusion...

2. debug output:
>Prompt> /usr/sbin/ciped-cb debug -o /etc/cipe/options.cipcb0
>The output were:
>CIPE daemon vers 1.4.5 (c) Olaf Titz 1996-2000
>device=(none)
>debug=yes
>ipaddr=
>...
>dynip=no
>missing argument: peer
>
>The last error looks peculiar.
No it is not: all output is weird!
As if the options file is empty: none of the parameters are set!
The peer argument is checked first by ciped (and being empty causing this
error message and abending - only the first error is shown).

This is very abnormal! Ciped should dump the options with the values as set
in the specified options file. I have no idea how this is possible.
It finds and opens the file but doesn't read the options...!?
Maybe the file contains invisible non-printable bytes. (which editor did you
use?).

=> Create a new options (_text_) file, only readable for root, with the
proper options and check with the debug option if the options are properly
set. Use for example mc - Midnight Commander (F4) to edit the file:

** Create for example /etc/cipe/options.test containing:
device=cipcb0
ipaddr=10.0.1.2
ptpaddr=10.0.1.1
me=171.31.22.5:6969
peer=171.31.22.4:6969
ipup=/etc/cipe/ip-up
ipdown=/etc/cipe/ip-down
key d3b07384d113edec49eaa6238ad5ff33

* Note: assuming the scripts ip-up and ip-down are present. If not remove
ipup=.. and ipdown=...

** Give the file the correct permissions:
# cd /etc/cipe
# chmod 0600 options.test
** and verify:
# ls -al options.test
-rw-------   1 root     root          599 May 26 01:54 options.test

** and test again:
# /usr/sbin/ciped-cb debug -o /etc/cipe/options.test
** ciped should dump the option parameters with the values set in this
options file. There must be a reason if it does not.
You need to find it before you can proceed!

* check if the module is loaded:
# lsmod
Module                  Size  Used by
...   .. .
cipcb                  xxxxx   y
..
* check the log files for clues.

It is probably something trivial (and easily overlooked)!

3. ifup errors:
>When I run "ifup cipcb0" from command line, I got these errors:
>RTNETLINK answers: Invalid argument
>RTNETLINK answers: Invalid argument
probably two of the required options not set...
>RTNETLINK answers: File exists
>RTNETLINK answers: File exists
I wonder which file(s). (/var/run/cipcb0.pid?)
These errors most likely will disappear if (2) is solved. See also (4).

4. Red Hat:
You are running Red Hat.
Red Hat uses a patched version of CIPE 1.4.5 and is usually configured a
little differently:
* all option parameters except the key are set in
/etc/networking/ifcfg-cipcb0
* the key is set in /etc/cipe/options.cipcb0
(if I understand it correctly).
* If an option is not specified in ifcfg-<device>, but in options.<device>
it is taken from the latter (options file).

** Example /etc/networking/ifcfg-cipcb0 (with your values):
DEVICE=cipcb0
ONBOOT=yes
USERCTL=yes
MYPORT=6969
ME=171.31.22.5
PEER=171.31.22.4:6969
PTPADDR=10.0.1.1
IPADDR=10.0.1.2

These options will override the options set in the options file(s) and
passed directly to ciped-cb (ciped-cb [-o optionsfile ] [option1 [option2
[...]]]) by the /etc/sysconfig/network-scripts/ipup-cipcb script.

** Example /etc/cipe/options.cipcb0:
key d3b07384d113edec49eaa6238ad5ff33

5. Enough RH scriptology for one day!
I hope this is enough information to get this solved.
Step 2 is now the hurdle to take.
Next are the Red Hat config files (step 4)

Hans Steegers

-----Original Message-----
From: Tanat Tonguthaisri <Tanat,AT,Ayuda,DOT,com,DOT,au>
To: 'Hans Steegers' <steegers,AT,steegers,DOT,nl>
Cc: cipe-l,AT,inka,DOT,de <cipe-l,AT,inka,DOT,de>
Date: Thursday, July 10, 2003 3:47 AM
Subject: RE: Key question

>Hi Hans,
>
>Thanks again for your advices.
>
>I'm running Red Hat 8, with 2.4.18-14 kernel, and cipe 1.4.5.11 .
>
>I did have an "options" file (though it also contained a valid key) in
>/etc/cipe .
>Anyway, I removed it and run this command.
>Prompt> /usr/sbin/ciped-cb debug -o /etc/cipe/options.cipcb0
>
>The output were:
>CIPE daemon vers 1.4.5 (c) Olaf Titz 1996-2000
>device=(none)
>debug=yes
>ipaddr=
>ptpaddr=
>mtu=0
>metric=0
>cttl=0
>me=
>peer=
>key=(none)
>nokey=no
>socks=
>tokxc=0
>tokey=0
>ipup=(none)
>ipdown=(none)
>arg=(none)
>maxerr=8
>tokxts=0
>ping=0
>toping=0
>dynip=no
>missing argument: peer
>
>The last error looks peculiar.
>Here is the content of options.cipcb0 (with an empty last line):
>ptpaddr 10.0.1.1
>ipaddr  10.0.1.2
>me      171.31.22.5:6969
>peer    171.31.22.4:6969
>key     11112222333344445555666677778888
>
>When I run "ifup cipcb0" from command line, I got these errors:
>RTNETLINK answers: Invalid argument
>RTNETLINK answers: Invalid argument
>RTNETLINK answers: File exists
>RTNETLINK answers: File exists
>
>(Searching Google for them didn't really help much.)
>
>Your thoughts or anyone else's on this would certainly be much
>appreciated.
>
>Kind Regards,
>Tanat
>
>-----Original Message-----
>From: Hans Steegers [mailto:J.Steegers,AT,chello,DOT,nl
>Sent: Wednesday, July 09, 2003 9:38 PM
>To: Tanat Tonguthaisri
>Subject: Re: Key question -2-
>
>In addition to my previous answer, here is another possibility:
>
>If the file /etc/cipe/options exists, cipe reads this option file
>overriding
>the options file specified by the -o option (in the script) and if this
>file
>doesn't contain a valid "key .."" line, your error message is produced.
>
>Hans Steegers.
>
>-----Original Message-----
>From: owner-cipe-l,AT,inka,DOT,de [mailto:owner-cipe-l,AT,inka,DOT,de On 
>Behalf Of
>Hans Steegers
>Sent: Wednesday, July 09, 2003 6:12 PM
>To: Tanat Tonguthaisri; cipe-l,AT,inka,DOT,de
>Subject: Re: Key question
>
>Hi, Tanat
>
>If I comment out the line "key <128bitkey>" in the options file, I get
>the
>message  "ciped-cb[10121]: missing argument: key", which is consistent
>with
>what I can find in the cipe-1.5.4 sources.
>
>I can't find the message "bringing up interface cipcb0: missing required
>cipe key in /etc/cipe/options.cipcb0" in the sources, so I assume you
>are
>using the Red Hat (which?) version, and the message must be generated by
>the
>ifup-cipcb script when it can't find a line starting with "key". In that
>case the script exits and doesn't bring up the cipe interface, which
>explains why there is no "missing argument" error message.
>
>Somehow the ifup-cipcb script finds the "key" line in the options file
>(it
>does a grep  "^key[        ]" in the file /etc/cipe/options.cipcb0) and
>ciped does not.
>
>ciped does read the options file (but is it the same file?), but somehow
>doesn't recognise the "key" keyword.
>
>However, I am not too familiar nor happy with the "Red Hat scriptology"
>(aiming to make things easier, but when things go wrong ending up with a
>mess of spaghetti..).
>
>I suggest to bring up cipe manually (as root):
># /usr/sbin/ciped-cb debug -o /etc/cipe/options.cipcb0
>and see what happens..
>[Specifying the "debug" option will dump all the options.]
>
>May be we get a clue what is wrong.
>
>Hans Steegers.
>
>
>-----Original Message-----
>From: Tanat Tonguthaisri <Tanat,AT,Ayuda,DOT,com,DOT,au>
>To: 'Hans Steegers' <steegers,AT,steegers,DOT,nl>
>Date: Wednesday, July 09, 2003 3:27 AM
>Subject: RE: Key question
>
>
>>Hi Hans,
>>
>>Thanks very much for your advice.
>>I've just got a chance to try it today, but it still didn't work. I
>made
>>sure that there's an empty line at the end of both options.cipcb0 and
>>ifcfg-cipcb0 .
>>
>>Any ideas what else could have gone wrong, please?
>>
>>Warm Regards,
>>Tanat
>>
>>Hi all,
>>I'm completely new to CIPE and am trying to get CIPE to run at the
>>moment.
>>During startup, I get this error:
>>bringing up interface cipcb0: ciped-cb[644]: missing argument: key
>>But the key line was in /etc/cipe/options.cipcb0 as follows:
>>key 1234567890abcdef1234567890abcdef
>>When I try commenting out the key line, I get another error instead:
>>bringing up interface cipcb0: missing required cipe key in
>>/etc/cipe/options.cipcb0
>>Any help on "ciped-cb[644]: missing argument: key" error would be very
>>very much appreciated.
>>Kind Regards,
>>Tanat
>


<< | Thread Index | >> ]    [ << | Date Index | >> ]