I said:
> To run root_fs:
> ./linux-2.6.16 rw eth0=slirp,,/usr/bin/slirp

Blaisorblade said:

> That is fine, but is uncommon and maybe slower... However, if it's ok for you
> don't worry... indeed it's the setup with less parameters.

So I tried run with tun/tap.

(kernel and root are from Jeff' site)

Why can I ping the host from uml?


# modprobe -v tun
insmod /lib/modules/2.6.14-kanotix-6/kernel/drivers/net/tun.ko

# tunctl -u root
Set 'tap0' persistent and owned by uid 0

# ifconfig
eth0       Encapsulamento do Link: Ethernet  Endereço de HW 00:50:FC:B3:8C:C5
          inet end.: 201.12.138.45  Bcast:255.255.255.255  Masc: 255.255.254.0
          endereço inet6: fe80::250:fcff:feb3:8cc5/64 Escopo:Link
          UP BROADCASTRUNNING MULTICAST  MTU:1500  Métrica:1
          RX packets:31008 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3745 errors:0 dropped:0 overruns:0 carrier:0
          colisões:0 txqueuelen:1000
          RX bytes:4692452 (4.4 MiB)  TX bytes:647393 ( 632.2 KiB)
          IRQ:10

lo         Encapsulamento do Link: Loopback Local
          inet end.: 127.0.0.1   Masc:255.0.0.0
          endereço inet6: ::1/128 Escopo:Máquina
          UP LOOPBACKRUNNING  MTU:16436  Métrica:1
          RX packets:8188 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8188 errors:0 dropped:0 overruns:0 carrier:0
          colisões:0 txqueuelen:0
          RX bytes:636538 (621.6 KiB)  TX bytes:636538 (621.6 KiB)



#ifconfig tap0 192.168.0.253
#bash -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
#route add -host 192.168.0.254 dev tap0
#bash -c 'echo 1 > /proc/sys/net/ipv4/conf/tap0/proxy_arp'
#arp -Ds 192.168.0.254 eth0 pub
#chmod 666 /dev/net/tun
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

# ifconfig
eth0       Encapsulamento do Link: Ethernet  Endereço de HW 00:50:FC:B3:8C:C5
          inet end.: 201.12.138.45   Bcast:255.255.255.255  Masc: 255.255.254.0
          endereço inet6: fe80::250:fcff:feb3:8cc5/64 Escopo:Link
          UP BROADCASTRUNNING MULTICAST  MTU:1500  Métrica:1
          RX packets:60067 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4981 errors:0 dropped:0 overruns:0 carrier:0
          colisões:0 txqueuelen:1000
          RX bytes:7736782 (7.3 MiB)  TX bytes:800643 ( 781.8 KiB)
          IRQ:10

lo         Encapsulamento do Link: Loopback Local
          inet end.: 127.0.0.1   Masc:255.0.0.0
          endereço inet6: ::1/128 Escopo:Máquina
          UP LOOPBACKRUNNING  MTU:16436  Métrica:1
          RX packets:8188 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8188 errors:0 dropped:0 overruns:0 carrier:0
          colisões:0 txqueuelen:0
          RX bytes:636538 (621.6 KiB)  TX bytes:636538 (621.6 KiB)

tap0       Encapsulamento do Link: Ethernet  Endereço de HW 06:AA:1E:C9:3E:3B
          inet end.: 192.168.0.253   Bcast:192.168.0.255  Masc: 255.255.255.0
          endereço inet6: fe80::4aa:1eff:fec9:3e3b/64 Escopo:Link
          UP BROADCASTRUNNING MULTICAST  MTU:1500  Métrica:1
          RX packets:15 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:91 overruns:0 carrier:0
          colisões:0 txqueuelen:500
          RX bytes:1414 (1.3 KiB)  TX bytes:2265 ( 2.2 KiB)


# ./linux-2.6.16  eth0=tuntap,tap0

[root@localhost ~]# ifconfig eth0 192.168.0.254 up
[root@localhost ~]# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr FE:FD:C0:A8:00:FE
          inet addr:192.168.0.254  Bcast: 192.168.0.255  Mask:255.255.255.0
          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:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:5

[root@localhost ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0

[root@localhost ~]# ping 192.168.0.253
PING 192.168.0.253 ( 192.168.0.253) 56(84) bytes of data.

--- 192.168.0.253 ping statistics ---
14 packets transmitted, 0 received, 100% packet loss, time 13232ms

Marcos