This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TAP device not created on running "ping_test"


On Tue, Jul 28, 2009 at 1:37 PM, Sergei
Gavrikov<sergei.gavrikov@gmail.com> wrote:
> On Tue, Jul 28, 2009 at 01:19:23PM +0530, Mandeep Sandhu wrote:
>> Very strange, I get this error!
>>
>> # dhcpd3 -d -f -cf /tmp/mydhcpd.conf tap0
>> Internet Systems Consortium DHCP Server V3.1.1
>> Copyright 2004-2008 Internet Systems Consortium.
>> All rights reserved.
>> For info, please visit http://www.isc.org/sw/dhcp/
>> Can't open /tmp/mydhcpd.conf: Permission denied
>>
>> # ls -l /tmp/mydhcpd.conf
>> -rwxrwxrwx 1 mandeep mandeep 119 2009-07-28 13:09 /tmp/mydhcpd.conf
>>
>> I've tried with 666 perms for /tmp/mydhcpd.conf too, but I get the same error.
>
> Hm, may be that is security restriction...
>
> 1) For details
>
> tail /var/log/syslog
>
> 2) Make sure there is no other dhcp server
>
> ps -ef | grep dhc[p]
>
> I used clean dhcp environment in the example.

It's clean, as in no other dhcp server daemon was running.

>
> 3) that INTERFACES env. vaiable is needed (run command with env).

It's set in /etc/default/dhcp3-server. Even then I did

export INTERFACES="tap0"

But that did not help. How were you able to get dhcp server running on
an interface which did not have an IP for itself? Won't we have to assign
a static IP addr for the interface on which the dhcp server is listening?
(I assume you were running your server on tap0 i/f?)

I'm thinking I'll assign a static IP to eth0 on the same subnet (10.1.1.0/24)
eg 10.1.1.1. Then run udhcpd on that i/f.

$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:1d:09:54:e6:e3
          inet addr:10.1.1.1  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST MULTICAST DYNAMIC  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17

Now I'll bringup tap0 and run dhclient on it to see if gets an IP addr from
the dhcp server. DHCP packets going out of tap0 should get routed to eth0
right?

How did you get your tap interface up? I'm doing the following:

$ sudo tunctl -u mandeep
Set 'tap0' persistent and owned by uid 1000
mandeep@mindstorm:~$

$ sudo ifup -v tap0
Ignoring unknown interface tap0=tap0.
mandeep@mindstorm:~$

This does not bringup the tap0 i/f. So I use ifconfig instead

$ sudo ifconfig tap0 up

$ ifconfig tap0
tap0      Link encap:Ethernet  HWaddr 26:5d:5f:e5:65:1e
          inet6 addr: fe80::245d:5fff:fee5:651e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:4 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Now I run dhclient on tap0:

$ sudo dhclient -d tap0
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

wmaster0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/tap0/26:5d:5f:e5:65:1e
Sending on   LPF/tap0/26:5d:5f:e5:65:1e
Sending on   Socket/fallback
DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on tap0 to 255.255.255.255 port 67 interval 16
^C

:(

>
> Sergei
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]