Networking Forums

Networking Forums > Computer Networking > Linux Networking > User Mode Linux = Network Problem

Reply
Thread Tools Display Modes

User Mode Linux = Network Problem

 
 
William Fargo
Guest
Posts: n/a

 
      10-08-2003, 05:15 PM
Hi,

I have problems to set up the network with user-mode-linux, I can't
set up the eth0 interface under
UML.
The Host system is a Debian 3.0, ip adress 192.168.1.3, kernel 2.4.10
with tun/tap, netlink device
emulation...
For UML, root filesystem is Debian 3.0, ip adress 192.168.1.101,
kernel 2.4.16

To configure the network, I have done :

On the host :

[root @host]# tunctl -u root
Set 'tap0' persistent and owned by uid 0

[root @host]# ifconfig tap0 192.168.1.3 netmask 255.255.255.0
broadcast 192.168.1.255

[root @host]# ifconfig

eth0 Link encap:Ethernet HWaddr 00:60:97:8D:90:2F
inet addr:192.168.1.3 Bcast:192.168.1.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:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:3 Base address:0x300

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)

tap0 Link encap:Ethernet HWaddr 00:FF:6F:7B:09D
inet addr:192.168.1.3 Bcast:192.168.1.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:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

Well it works !

To configure the interfaces (routing)

[root @host]# bash -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
[root @host]# route add -host 192.168.1.101 dev tap0
[root @host]# bash -c 'echo 1 >
/proc/sys/net/ipv4/conf/tap0/proxy_arp'
[root @host]# arp -Ds 192.168.1.101 eth0 pub

I check the permissions for uml_net and /dev/net/tun

[root @host]# ls -l /dev/net/tun /usr/lib/uml/uml_net

crw-rw---- 1 root root 10, 200 Oct 7 12:34 /dev/net/tun
-rwxrwxrwx 1 root uml-net 18072 Apr 26 2002
/usr/lib/uml/uml_net


Everything is good

I launch UML :

[root @host]# linux ubd0=/uml/root_fs ubd1=/uml/swap_fs umid=root
eth0=tuntap,tap0 con=null con0=fd:0,fd:1 root=/dev/ubd0

Calibrating delay loop... 5.95 BogoMIPS

tracing thread pid = 2399
Linux version 2.4.16-1um (root@muetdhiver) (gcc version 2.95.4
20011002 (Debian prerelease)) #1 Tue Feb 19 11:25:56 CET 2013
On node 0 totalpages: 8192
zone(0): 0 pages.
zone(1): 8192 pages.
zone(2): 0 pages.
Kernel command line: ubd0=/uml/root_fs ubd1=/uml/swap_fs umid=root
eth0=tuntap,tap0 con=null con0=fd:0,fd:1 root=/dev/ubd0
Calibrating delay loop... 5.95 BogoMIPS
Memory: 32244k available
Dentry-cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode-cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Starting kswapd
VFS: Diskquotas version dquot_6.4.0 initialized
devfs: v0.120 (20011103) Richard Gooch ((E-Mail Removed))
devfs: boot_options: 0x1
pty: 256 Unix98 ptys configured
block: 64 slots per queue, batch=16
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Netdevice 0 : TUN/TAP backend -
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
loop: loaded (max 8 devices)
PPP generic driver version 2.4.1
Universal TUN/TAP device driver 1.4 (C)1999-2001 Maxim Krasnyansky
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 2048)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Initializing stdio console driver
Initializing software serial port version 1
mconsole initialized on /tmp/uml/root/mconsole
Mapper v0.1
devfs: devfs_do_symlink(mmapper): entry already exists
VFS: Mounted root (ext2 filesystem) readonly.
Mounted devfs on /dev
INIT: version 2.84 booting
Activating swap.
Checking root file system...
fsck 1.27 (8-Mar-2002)
/dev/ubd/0: clean, 11122/25896 files, 51827/103424 blocks
Calculating module dependencies... depmod: Can't open
/lib/modules/2.4.16-1um/modules.dep for writing
done.
Loading modules:
modprobe: Can't open dependencies file
/lib/modules/2.4.16-1um/modules.dep (No such file or directory)
Checking all file systems...
fsck 1.27 (8-Mar-2002)
Setting kernel variables.
Mounting local filesystems...
nothing was mounted
Running 0dns-down to make sure resolv.conf is ok...done.
Setting up IP spoofing protection: rp_filter.
Configuring network interfaces: done.
Cleaning: /tmp /var/lock /var/run.
Initializing random number generator... done.
Recovering nvi editor sessions... done.
INIT: Entering runlevel: 2
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting internet superserver: inetd.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: cron.
parse_chan couldn't parse "null"
parse_chan couldn't parse "null"
Serial line 0 assigned device '/dev/ptyp0'

Everything is good but when I want to configure my eth0 :

[root @uml]# ifconfig eth0 192.168.1.101 up

tuntap_open_tramp : didn't receive a message
Exec of 'uml_net' failed - errno = 2
tuntap_open_tramp failed - errno = 22
SIOCSIFFLAGS: Invalid Argument
tuntap_open_tramp : didn't receive a message
Exec of 'uml_net' failed - errno = 2
tuntap_open_tramp failed - errno = 22
SIOCSIFFLAGS: Invalid Argument


It failed, what's going wrong, what can I do ?

Thank you !
 
Reply With Quote
 
 
 
 
alt
Guest
Posts: n/a

 
      10-08-2003, 07:03 PM
William Fargo wrote:

> Hi,
>
> I have problems to set up the network with user-mode-linux, I can't
> set up the eth0 interface under
> UML.
> The Host system is a Debian 3.0, ip adress 192.168.1.3, kernel 2.4.10
> with tun/tap, netlink device
> emulation...
> For UML, root filesystem is Debian 3.0, ip adress 192.168.1.101,
> kernel 2.4.16
>
> To configure the network, I have done :
>
> On the host :
>
> [root @host]# tunctl -u root
> Set 'tap0' persistent and owned by uid 0
>
> [root @host]# ifconfig tap0 192.168.1.3 netmask 255.255.255.0
> broadcast 192.168.1.255
>


<much snippage>

>
> Everything is good but when I want to configure my eth0 :
>
> [root @uml]# ifconfig eth0 192.168.1.101 up
>
> tuntap_open_tramp : didn't receive a message
> Exec of 'uml_net' failed - errno = 2
> tuntap_open_tramp failed - errno = 22
> SIOCSIFFLAGS: Invalid Argument
> tuntap_open_tramp : didn't receive a message
> Exec of 'uml_net' failed - errno = 2
> tuntap_open_tramp failed - errno = 22
> SIOCSIFFLAGS: Invalid Argument
>
>
> It failed, what's going wrong, what can I do ?
>
> Thank you !


I had the same problem. Check the permissions on tunctl. You may want to
make it (tunctl) SUID (possibly a security issue there). AFAIK, you need to
be root to set the tunnels up.

--
Donovan Hill
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
user mode not able to execute 'udhcpc' hieswarmcaquest Linux Networking 0 05-23-2011 04:25 PM
user mode permission denied to bind to socket hieswarmcaquest Linux Networking 0 05-03-2011 04:35 PM
mgetty does not work in single user mode wong_powah@yahoo.ca Linux Networking 2 10-24-2007 02:09 PM
FTP Weirdness, now need passive mode for just one user Mkez1 Windows Networking 0 09-30-2005 02:15 PM
Network User's List Access Problem Rick Windows Networking 1 01-18-2004 01:47 AM



1 2 3 4 5 6 7 8 9 10 11