View previous topic :: View next topic |
Author |
Message |
danomytt n00b
Joined: 28 Jul 2002 Posts: 8 Location: Arizona, USA
|
Posted: Fri Nov 08, 2002 7:46 pm Post subject: Networking + UML |
|
|
Hello everyone,
I got my gentoo UML up and running (cool), _but_ I'm having a bit of trouble getting networking to go.
Here's symptom: when I log into the UML kernel as root, I type: "ifconfig eth0 192.168.1.200 up" and I get:
SIOCSIFADDR: No such device
eth0: unknown interface: No such device
eth0: unknown interface: No such device
My thinking is that I missing something in the UML kernel config, but that's a wild stab.
Here is how I start the UML (lines prefaced with '[HOST]' are done on the host machine and '[UML]' in the uml instance):
[HOST] iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
[HOST] echo 1 > /proc/sys/net/ipv4/ip_forward
[HOST] tunctl
('tunctl' spits back something like: "Set 'tap1' persistent and owned by uid 0")
[HOST] /sbin/ifconfig tap1 192.168.1.200 up
(now if I run 'ifconfig' on the HOST, I get:
eth0 Link encap:Ethernet HWaddr 00:10:A4:EF:9E:F8
inet addr:192.168.1.103 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1
RX packets:8698 errors:1 dropped:0 overruns:0 frame:0
TX packets:9094 errors:1 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:100
RX bytes:4297395 (4.0 Mb) TX bytes:1032963 (1008.7 Kb)
Interrupt:9 Base address:0x200
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:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:704 (704.0 b) TX bytes:704 (704.0 b)
tap1 Link encap:Ethernet HWaddr 00:FF:11:0A:C3:88
inet addr:192.168.1.200 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)
)
[HOST] linux ubd0=root_fs ubd1=swap_fs ubd2=/dev/cdroms/cdrom0 eth0=ethertap,tap1,,192.168.1.200
At this point, I get the usual linux startup verbage with an early line of:
Kernel command line: ubd0=root_fs ubd1=swap_fs ubd2=/dev/cdroms/cdrom0 eth0=ethertap,tap1,,192.168.1.200 root=/dev/ubd0
7 virtual xterms popup..
"Starting local..."
[UML] log in as root
[UML] ifconfig eth0 192.168.1.200 up
SIOCSIFADDR: No such device
eth0: unknown interface: No such device
eth0: unknown interface: No such device
So that's what I've got. Anyone have any ideas?
Thanks in advance-
daniel |
|
Back to top |
|
|
danomytt n00b
Joined: 28 Jul 2002 Posts: 8 Location: Arizona, USA
|
Posted: Fri Nov 08, 2002 9:00 pm Post subject: Networking + UML (additional host info) |
|
|
Here is a bit more information I'm thinking is pertainent:
the host computer is a laptop w/pcmcia _not_ installed in the kernel, rather using pcmcia-cs.
So does the UML instance need to load the same modules (i.e. ds, pcmcia-core, i82365) as the host machine in order to talk to the eth0 device on the host?
hmm... |
|
Back to top |
|
|
Keyed Tux's lil' helper
Joined: 26 Jul 2002 Posts: 135 Location: Tennessee
|
Posted: Mon Feb 17, 2003 10:47 pm Post subject: |
|
|
I just got UML running on my system and have the networking operating. My notes are at home, but one thing that I sw missing in your information was the step that you need to set the gateway ip address back to the host while in UML.
My system has DSL without a ethernet card, but I am using a virtual ethernet card through tun/tap. My filesytem is gentoo and I can acess the internet from within UML. |
|
Back to top |
|
|
j0n4th4n n00b
Joined: 17 Feb 2003 Posts: 3
|
Posted: Tue Feb 18, 2003 4:08 am Post subject: UML? |
|
|
What is UML? I know i use Unified Modeling Language a lot. _________________ His name is Tron... He plays for the users. |
|
Back to top |
|
|
danomytt n00b
Joined: 28 Jul 2002 Posts: 8 Location: Arizona, USA
|
Posted: Tue Feb 18, 2003 5:37 am Post subject: |
|
|
User Mode Linux
Running a linux kernel within a linux kernel.
Useful for experimenting with all sorts of linux internals/kernels. Good also for setting up cross-compiling environments where you don't want to mess up the compiler env. of the host computer -- atleast that was my original intent which I haven't persued actively lately. |
|
Back to top |
|
|
|