[OLSR-users] olsrd can't find the main address of an interface

lolo (spam-protected)
Sat May 20 10:26:39 CEST 2006


Hi Tommi

from http://www.faqs.org/docs/Linux-mini/IP-Alias.html

    *

      IP Alias is standard in kernels 2.0.x and 2.2.x, and available as
      a compile-time option in 2.4.x (IP Alias has been deprecated in
      2.4.x and replaced by a more powerful firewalling mechanism.)

I dont currently own a Nokia 770 but i thought it's running core was a
2.6.x kernel ??..
http://frlinux.net/?section=portables&article=167 (sorry in french)

maybe you should try to remove by hand that interface alias and assign
the adress to the real interface in order to let olsrd run on this one
without complaining (yes it's "reverting" your question...). then use a
script similar to the one below to automate the process :

IPADDR=`$IFCONFIG/ifconfig wlan0:1 | perl -n -e
'if(/inet\s+adr:([\d\.]+)/) { print $1; } '`
NETMASK=`$IFCONFIG/ifconfig wlan0:1 | perl -n -e 'if(/Mask:([\d\.]+)/) {
print $1; } '`
ifconfig wlan0:1 down
ip addr add $IPADDR/$NETMASK dev wlan0

wlan0 should be already up anyway. what does ifconfig and iwconfig
report about it ?

maybe a post to debian mailling list could help to investigate why the
770 is using an alias interface instead of a regular one when in ad hoc
mode ?

my 2 cents

laurent

ps : freebsd ip alias tutorial
http://www.defcon1.org/html/Networking_Articles/natdhowto-whisky/aps-filter/Sharity-Light/body_ip-aliasing.html

Tommi Halonen a écrit :

>Thanks Andreas for the fast reply! I didn't see any difference on the
>behaviour after the patch though:( I integrated it by hand, but it was only
>commenting out one return + the trace/log prints in linux/net.c, right?
>
>I haven't yet familiarized myself with the code, so I'm not sure should I go
>guessing, but should something be done in chk_if_up() (in unix/ifnet.c)?
>Just a thought, because there it can't find the IP address of the interface.
>
>If everything works fine with the interface, should I see the
>LINKS/NEIGHBORS/TOPOLOGY info (with default debug level)? I'm asking this
>only to get a sense of when things are going right and when they're not...
>
>Oh and should this go to olsr-dev instead of olsr-users..?
>
>Thanks again,
>
>-Tommi
>
>
>-----Original Message-----
>From: Andreas Tønnesen [mailto:(spam-protected)] 
>Sent: Friday, May 19, 2006 10:39 AM
>To: (spam-protected); OLSR discussion and development
>Subject: Re: [OLSR-users] olsrd can't find the main address of an interface
>
>Hi Tommi,
>
>Olsrd will not run on "alias" interfaces such as wlan0:1 because it binds
>to the interface using the somewhat hackish SO_BINDTODEVICE setsockopt.
>This socket option cannot be used on alias interfaces. Ofcause one could
>consider binding to the real device(wlan0 in this case), but I'm not sure
>how that would work with different IF states on wlan0 vs. wlan0:1 etc.
>
>Anyways, if you just need some special olsrd code for running on the 770
>not using more than one interface then you can apply the attatched patch
>to the current cvs version. Note that olsrd will not be able to disable
>the IP spoof filter og disable ICMP redirects when using this code.
>
>- Andreas
>
>  
>
>>Hi,
>>
>>just started working on olsrd and Nokia 770 device (Debian/ARM).
>>I got olsrd running on the device, where I've got a WLAN network set up
>>between a couple of those devices in an ad hoc mode.
>>
>>ifconfig lists interfaces "wlan0" and "wlan0:1", where the first one does
>>not have an IP address, but the latter does. In the olsrd.conf I only have
>>"wlan0" listed as one can't use "wlan0:1" (can't find the reference
>>stating
>>this anymore, but hopefully I remember this right). When starting olsrd,
>>it
>>prints (for wlan0) "Wireless interface detected" and "Could not get
>>address
>>of interface - skipping it".
>>
>>I tried to search the olsr.org and the archives of these mailing lists on
>>how to configure this kind of interface, but couldn't find any.
>>Unfortunately I'm novice both in olsrd and Linux, so I'm kind of stuck
>>here...
>>
>>For a reference, if I connect the device to a WLAN access point (in
>>contrast
>>to an ad hoc network), the first interface (wlan0) gets an IP address. In
>>this situation olsrd starts up nicely. But I'm interested in the ad hoc
>>mode, so this doesn't help...
>>
>>Any help or pointers to right place to start finding information is
>>appreciated!
>>
>>Best regards,
>>
>>Tommi Halonen
>>
>>
>>_______________________________________________
>>olsr-users mailing list
>>(spam-protected)
>>https://www.olsr.org/mailman/listinfo/olsr-users
>>
>>    
>>
>
>
>_______________________________________________
>olsr-users mailing list
>(spam-protected)
>https://www.olsr.org/mailman/listinfo/olsr-users
>
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-users/attachments/20060520/bb132ffa/attachment.html>


More information about the Olsr-users mailing list