User Mode Linux = Network Problem
From: William Fargo (wfargo_at_caramail.com)
Date: 10/08/03
- Next message: Rob: "The connection was refused when attempting to contact the localhost"
- Previous message: Jeremy Gray: "Re: making sshd require keys"
- Next in thread: alt: "Re: User Mode Linux = Network Problem"
- Reply: alt: "Re: User Mode Linux = Network Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 8 Oct 2003 10:15:13 -0700
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:09:DD
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 (rgooch@atnf.csiro.au)
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 !
- Next message: Rob: "The connection was refused when attempting to contact the localhost"
- Previous message: Jeremy Gray: "Re: making sshd require keys"
- Next in thread: alt: "Re: User Mode Linux = Network Problem"
- Reply: alt: "Re: User Mode Linux = Network Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|