On Wed, 22 Oct 2003, Thomas Preissler muttered drunkenly:
> The box itself has correct routing entries. The gateway is the IP of
> the TAP-dev. I have encountered, that the IP does not matter...
> Before starting dhclient I do a "ifconfig eth0 down".
> But when I start "dhclient" on my box, I can't see the
> DHCP-Requests. Then I get "SIOCSIFFLAGS: Protocol driver not
> attached", what is this?
dhclient needs the packet filter and packet socket options
(CONFIG_PACKET and CONFIG_FILTER) enabled.
> The box never gets an IP address from the DHCP server running on the
> host. (box, tap, and host are on the same subnet, of course.)
>
> So, where did I miss something? Is anyone outthere which is using
> DHCP in UML? Can somone give me a hint?
For me, this code (using Alexey Kuznetsov's ip(8) utility rather than
ifconfig and route) brings up the host (edited to remove code that
brings up unrelated interfaces and a second TUN/TAP bridge; I may have
typoed, but I doubt it):
,----
| ip link set eth1 up multicast off txqueuelen 50 mtu 1458 name adsl-phys
|
| tunctl -u firewall >/dev/null # ADSL link (tap0)
| ip link set tap0 mtu 1458 up
|
| brctl addbr adsl
| brctl stp adsl off
| brctl setfd adsl 1
| brctl sethello adsl 1
|
| brctl addif adsl adsl-phys
| brctl addif adsl tap0
|
| ip link set dev adsl mtu 1458 up
|
| # (There is no IP address associated with this link; the host should
| # never need to access it. Should one be needed, code like that below
| # would work.)
|
| # ip addr add 192.168.14.17/24 broadcast 192.168.14.255 dev adsl
`----
And this brings up the link on the UML underneath that (again, trimmed
to remove additional TUN/TAPs, using ip(8)):
,----
| ip link set eth0 name adsl 2>/dev/null
|
| # Kill all existing routes and addresses.
|
| ip route flush dev adsl 2>/dev/null
| ip addr flush dev adsl 2>/dev/null
|
| # Bring up the ADSL-side Ethernet link.
|
| ip link set adsl up multicast on txqueuelen 10 mtu 1458
|
| # Manage it with dhclient.
|
| /usr/sbin/dhclient adsl
`----
I think everything will just work for you once you turn on CONFIG_PACKET
and CONFIG_FILTER, myself.
--
`If you want a vision of the future, it is a wireless broadband network
feeding requests for foreign money-laundering assistance into a human
temporal lobe, forever. With banner ads.' --- John M. Ford
-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
|