From: Alex L. <ale...@st...> - 2004-06-04 16:22:08
|
Hi: I just want to play with the uml_switch to set up a vitual networking = between two UMLs. I build UML with the 2.4.24-kernel and uml-patch-2.4.24-2.My host OS = is Redhat9.0. First I ran the uml_switch with: host# ./uml_switch=20 Then I ran the two UMLs with: uml1# ./linux ubd0=3Dcow1 eth0=3Ddaemon uml2# ./linux ubd0=3Dcow2 eth0=3Ddaemon Then I configured the Ips of the UMLs after they booted. But the UMLs coundn't communicate with each other. On the host it outputed: ----------------------------------------------------------- ./uml_switch ./uml_switch attached to unix socket '/tmp/uml.ctl' New connection New connection Addr: fe:fd:00:00:00:00 New port 5 Addr: fe:fd:00:00:00:00 New port 6 old port 5 Addr: fe:fd:00:00:00:00 New port 5 old port 6 Addr: fe:fd:00:00:00:00 New port 6 old port 5 Addr: fe:fd:00:00:00:00 New port 6 Addr: fe:fd:00:00:00:00 New port 5 old port 6 Addr: fe:fd:00:00:00:00 New port 6 old port 5 Addr: fe:fd:00:00:00:00 New port 5 old port 6 -------------------------------------------------------------- =20 However,the network can work when I run the uml_switch as hub = function(host# ./uml_switch -hub). =20 Then I also found If I configure the MAC address of the UMLs at the = command line,the network also can work. (uml# ./linux ubd0=3Dcow1 eth0=3Ddaemon,fe:fd:xx:xx:xx:xx) =20 So I think at first,both of the UMLs must be configured the same = MAC(fe:fd:00:00:00:00),so there is some=20 Confliction. But uml_switch should work without the configuration of the UML MAC = address,right? Any comments will be appreciated. Thanks! Alex=20 =20 |
From: roland <for...@gm...> - 2004-06-04 21:02:20
|
Alex, you hit a little "uml annoyance" - uml itself doesn`t assign a unique MAC-Address to itself at startup. (afaik) >So I think at first,both of the UMLs must be configured the same MAC(fe:fd:00:00:00:00),so there is some >Confliction. there MUST NOT be configured the same MAC - if it is there IS a confliction and networking fails. >But uml_switch should work without the configuration of the UML MAC address,right? uml switch is just like a network switch - it "learns" the MACs of connected devices and "forwards" the packets to the appropriate "ports". each uml need`s it`s own mac-adress which must DIFFER from other MACs on the same subnet. you should assign 2 different MACs to each uml - eg: uml1: fe:fd:00:00:00:01 uml2: fe:df:00:00:00:02 furthermore, i think it would be good, if uml could assign a uniqe MAC for itself, if none is given on the commandline - sure that would need some programming.... regards roland ----- Original Message ----- From: "Alex LIU" <ale...@st...> To: <use...@li...> Sent: Friday, June 04, 2004 6:21 PM Subject: [uml-user] Question about uml_switch Hi: I just want to play with the uml_switch to set up a vitual networking between two UMLs. I build UML with the 2.4.24-kernel and uml-patch-2.4.24-2.My host OS is Redhat9.0. First I ran the uml_switch with: host# ./uml_switch Then I ran the two UMLs with: uml1# ./linux ubd0=cow1 eth0=daemon uml2# ./linux ubd0=cow2 eth0=daemon Then I configured the Ips of the UMLs after they booted. But the UMLs coundn't communicate with each other. On the host it outputed: ----------------------------------------------------------- ./uml_switch ./uml_switch attached to unix socket '/tmp/uml.ctl' New connection New connection Addr: fe:fd:00:00:00:00 New port 5 Addr: fe:fd:00:00:00:00 New port 6 old port 5 Addr: fe:fd:00:00:00:00 New port 5 old port 6 Addr: fe:fd:00:00:00:00 New port 6 old port 5 Addr: fe:fd:00:00:00:00 New port 6 Addr: fe:fd:00:00:00:00 New port 5 old port 6 Addr: fe:fd:00:00:00:00 New port 6 old port 5 Addr: fe:fd:00:00:00:00 New port 5 old port 6 -------------------------------------------------------------- However,the network can work when I run the uml_switch as hub function(host# ./uml_switch -hub). Then I also found If I configure the MAC address of the UMLs at the command line,the network also can work. (uml# ./linux ubd0=cow1 eth0=daemon,fe:fd:xx:xx:xx:xx) So I think at first,both of the UMLs must be configured the same MAC(fe:fd:00:00:00:00),so there is some Confliction. But uml_switch should work without the configuration of the UML MAC address,right? Any comments will be appreciated. Thanks! Alex ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ User-mode-linux-user mailing list Use...@li... https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user |
From: henrique <hen...@fu...> - 2004-06-06 18:43:06
|
> Alex, > you hit a little "uml annoyance" - uml itself doesn`t assign a unique > MAC-Address to itself at startup. (afaik) Hello Roland, At least the version I am using (2.4.24-1um #3), assigns hwaddr (MAC-address) uniquely with a given static ip. command-line example: eth0=tuntap,tap0 I use the static ip on UML: 192.168.0.147, and the hwaddr is FE:FD:XX:XX:XX:93 (93 hexa is 147 decimal). XX:XX:XX are of course the hexa values for 192.168.0. On the UML eth0 configurator I use is a plain 'ifconfig'... Regards, Henrique |
From: roland <for...@gm...> - 2004-06-06 18:56:08
|
> At least the version I am using (2.4.24-1um #3), > assigns hwaddr (MAC-address) uniquely with a given static ip. mhhh - but the bridging howto at http://edeca.net/articles/bridging/questions.html tells: Q: Why can multiple UMLs on a bridge talk to the host but not each other? A: By default, every UML instance uses the same MAC address so ethernet can't distinguish the two hosts. You need to assign each UML a unique MAC address by specifying it as part of the eth0 argument, like so: "eth0=tuntap,tap1, FE:FD:00:00:00:01". and i can acknowledge this, as far as i remember. i always specify the mac adress on the commandline - being "safe" this way. so - what is right ? is there differnt neworking code in different uml versions ? roland ----- Original Message ----- From: "henrique" <hen...@fu...> To: "roland" <for...@gm...> Cc: <use...@li...> Sent: Sunday, June 06, 2004 8:42 PM Subject: Re: [uml-user] Question about uml_switch > > Alex, > > you hit a little "uml annoyance" - uml itself doesn`t assign a unique > > MAC-Address to itself at startup. (afaik) > > Hello Roland, > > At least the version I am using (2.4.24-1um #3), > assigns hwaddr (MAC-address) uniquely with a given static ip. > > command-line example: eth0=tuntap,tap0 > I use the static ip on UML: 192.168.0.147, > and the hwaddr is FE:FD:XX:XX:XX:93 (93 hexa is 147 decimal). > > XX:XX:XX are of course the hexa values for 192.168.0. > > On the UML eth0 configurator I use is a plain 'ifconfig'... > > > Regards, > Henrique > |
From: Dan L. <ar...@co...> - 2004-06-07 01:49:32
|
I've noticed that it actually depends on the way a distribution goes about doing the interface turn-up. I use RH8.0 in my UML sessions and I have to specify the hwaddr in the commandline when starting the session or it will not automatically set one. (ends up being a FE:FD:00:00:00:00 address) If I don't turn up the interface in the sysconfig scripting, and I do it by hand with ifconfig eth0 <IP>, it sets the MAC right. However, if I use Debian, it seems to work great! Mandrake was a little flakey, and I haven't tried Gentoo/SuSE/Slackware/etc... I'm not sure what causes the weirdness, but I figured I'd share my experiences with it. --Dan henrique wrote: >Hello Roland, > >At least the version I am using (2.4.24-1um #3), >assigns hwaddr (MAC-address) uniquely with a given static ip. > >command-line example: eth0=tuntap,tap0 >I use the static ip on UML: 192.168.0.147, >and the hwaddr is FE:FD:XX:XX:XX:93 (93 hexa is 147 decimal). > >XX:XX:XX are of course the hexa values for 192.168.0. > >On the UML eth0 configurator I use is a plain 'ifconfig'... > > >Regards, > Henrique > > > |
From: BlaisorBlade <bla...@ya...> - 2004-08-20 10:10:28
|
Alle 20:42, domenica 6 giugno 2004, henrique ha scritto: > > Alex, > > you hit a little "uml annoyance" - uml itself doesn`t assign a unique > > MAC-Address to itself at startup. (afaik) > > Hello Roland, > > At least the version I am using (2.4.24-1um #3), > assigns hwaddr (MAC-address) uniquely with a given static ip. > command-line example: eth0=tuntap,tap0 > I use the static ip on UML: 192.168.0.147, > and the hwaddr is FE:FD:XX:XX:XX:93 (93 hexa is 147 decimal). > > XX:XX:XX are of course the hexa values for 192.168.0. > > On the UML eth0 configurator I use is a plain 'ifconfig'... As the web site specifies (and as detailed on the sources, and as tested just now) the MAC address is assigned when doing "ifconfig eth0 up"; if at that time the IP has not been assigned, then it gets the default MAC. Otherwise, i.e. if you do ifconfig eth0 <address> up, you get a good MAC: root [~: (none): 1 (0)] # ifconfig eth0 192.168.0.16 root [~: (none): 1 (0)] # ifconfig eth0 Link encap:Ethernet HWaddr FE:FD:C0:A8:00:10 inet addr:192.168.0.16 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:18 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:1120 (1.0 Kb) TX bytes:0 (0.0 b) Interrupt:5 So, this explains why some distributions work and other don't. David, you should update the UML howto to explain this. About the Slackware 9.0 distro, it works Ok here (but since you have to edit the scripts by hand, YMMV). Also, the MAC address can change every time you assign the IP, but only if you assign the IP on a closed interface; i.e. if you do "ifconfig eth0 down", then you can assign any new IP and the interface will get a new MAC. -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 |
From: David C. <li...@ed...> - 2004-06-05 21:59:20
|
On Friday 04 June 2004 16:21, Alex LIU wrote: > First I ran the uml_switch with: > host# ./uml_switch > Then I ran the two UMLs with: > uml1# ./linux ubd0=cow1 eth0=daemon > uml2# ./linux ubd0=cow2 eth0=daemon > Then I configured the Ips of the UMLs after they booted. > But the UMLs coundn't communicate with each other. > On the host it outputed: There's an answer to this in my bridging HOWTO. http://edeca.net/articles/bridging/questions.html#id2451954 David |