On 4/21/06, Stefano Melchior <stefano.melchior@openlabs.it> wrote:

For instance, when you install uml-utilities the system (on debian)
creates a socket

/usr/bin/uml_switch -unix /var/run/uml-utilities/uml_switch.ctl


When you launch your uml systems, remember to include them in the
definition of the ethX parameters: see man linux for examples.

i.e.: eth[0-9]+=mcast,ethernet_address,address,port,ttl
I mean eth0=mcast,,192.168.0.254,3 from machine2 point of view and
eth0=mcast,,192.168.0.253,3 from the other system point of view




First of all, thanks for your help.
It showed me the way to get the ping between two umls.

___________________________________________________________________________________
I- I don't know weather I made correct.

#/usr/bin/uml_switch -unix /var/run/uml-utilities/uml_switch.ctl
The control socket '/var/run/uml-utilities/uml_switch.ctl' has another server attached to it
You can either
        remove '/var/run/uml-utilities/uml_switch.ctl'
        or rerun with a different, unused filename for a socket

So I changed the name to uml_switch_test.ctl:

#/usr/bin/uml_switch -unix /var/run/uml-utilities/uml_switch_test.ctl
/usr/bin/uml_switch attached to unix socket '/var/run/uml-utilities/uml_switch_test.ctl'
(waiting)

First:
#./linux rw ubd0=machine1.cow,root_fs eth0=mcast,,192.168.0.253,3

[root@localhost ~]# ifconfig eth0 192.168.0.253 up
mcast_open : data bind failed, errno = 99
SIOCSIFFLAGS: Cannot assign requested address
mcast_open : data bind failed, errno = 99
SIOCSIFFLAGS: Cannot assign requested address

Second:
#./linux rw ubd0= machine1.cow,root_fs eth0=mcast,,192.168.0.254,3
[root@localhost ~]# ifconfig eth0 192.168.0.254 up
mcast_open : data bind failed, errno = 99
SIOCSIFFLAGS: Cannot assign requested address
mcast_open : data bind failed, errno = 99
SIOCSIFFLAGS: Cannot assign requested address

___________________________________________________________________________________
II- Ping worked.

#uml_switch
uml_switch attached to unix socket '/tmp/uml.ctl
New connection
New connection

First:
# ./linux-meu_2 rw ubd0=machine1.cow,root_fs eth0=daemon

[root@localhost ~]# ifconfig eth0 192.168.0.253 up
[root@localhost ~]# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr FE:FD:C0:A8:00:FD
          inet addr: 192.168.0.253  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 ~]# ping 192.168.0.254
PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data.
64 bytes from 192.168.0.254: icmp_seq=1 ttl=64 time= 0.340 ms
64 bytes from 192.168.0.254: icmp_seq=2 ttl=64 time=0.302 ms
64 bytes from 192.168.0.254: icmp_seq=3 ttl=64 time=0.290 ms

--- 192.168.0.254 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2021ms
rtt min/avg/max/mdev = 0.290/0.310/0.340/0.029 ms

[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



Second:
# ./linux-meu_2 rw ubd0=machine2.cow,root_fs eth0=daemon
[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 ~]# ping 192.168.0.253
PING 192.168.0.253 (192.168.0.253) 56(84) bytes of data.
64 bytes from 192.168.0.253: icmp_seq=1 ttl=64 time=0.388 ms
64 bytes from 192.168.0.253: icmp_seq=2 ttl=64 time=0.309 ms

--- 192.168.0.253 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.309/0.348/0.388/0.043 ms

[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


After everything:

#uml_switch
uml_switch attached to unix socket '/tmp/uml.ctl'
New connection
New connection
 Addr: fe:fd:c0:a8:00:fe New port 6
 Addr: fe:fd:c0:a8:00:fd New port 5

Marcos