qemu network on windows

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
tsdnz
Member
Member
Posts: 333
Joined: Sun Jun 16, 2013 4:09 am

qemu network on windows

Post by tsdnz »

Hi All, I have my os running using BareMetal and Pure64
The network is showing a Mac Address, but I cannot get any packets received.
I am guessing I need to set up qemu, but I cannot find what I need.
My IP is 192.168.x.x/16
dns is 192.168.1.1
What qemu settings do I need to get it so I can send packets to the os?
I am running in Windows 7 64 bit.

Alistair,
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: qemu network on windows

Post by Nable »

I'm sorry if that sounds rude but why didn't you read qemu docs? They are really easy, even examples are given.
http://wiki.qemu.org/download/qemu-doc. ... 05fnetwork
If you don't understand some exact moments, then you can ask about them but I'm not sure that this is a correct place for it.
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: qemu network on windows

Post by iansjack »

BareMetal OS doesn't support TCP (so won't support IP) as I read the documentation, so IP address and DNS server are irrelevant. How exactly are you trying to send packets to the OS, and what are you doing to detect them? Presumably you have set the networking up in qemu if you say the network is "showing a MAC address". But what exactly do you mean by that - where and how is a MAC address showing?
tsdnz
Member
Member
Posts: 333
Joined: Sun Jun 16, 2013 4:09 am

Re: qemu network on windows

Post by tsdnz »

Hi, I have talked with Ian @ BareMetal.
He uses VirtualBox, so I set it up for VirtualBox and it works fine.

Currently using UDP Broadcast, the C# console code is below.

Code: Select all

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Sockets;
using System.Net;

namespace TestEthernet
{
    class Program
    {
        static void Main(string[] args)
        {
            UdpClient udp = new UdpClient();

            int GroupPort = 15000;



            //IPEndPoint groupEP = new IPEndPoint(IPAddress.Parse("192.168.98.98"), GroupPort);
            IPEndPoint groupEP = new IPEndPoint(IPAddress.Broadcast, GroupPort);



            string str4 = "Is anyone out there?";

            byte[] sendBytes4 = Encoding.ASCII.GetBytes(str4);


            for (int i = 0; i <= 10000; )
                udp.Send(sendBytes4, sendBytes4.Length, groupEP);


            byte[] receiveBytes = udp.Receive(ref groupEP);

            string returnData = Encoding.ASCII.GetString(receiveBytes);

        }
    }
}
Mikemk
Member
Member
Posts: 409
Joined: Sat Oct 22, 2011 12:27 pm

Re: qemu network on windows

Post by Mikemk »

I have an unfinished Java program for network uses/testing. It currently only supports HTTP requests to and from it's own computer (including virtual machines). If you like, i can send you a copy.

EDIT: Sorry, forgot Ill be gone for a week.
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
tsdnz
Member
Member
Posts: 333
Joined: Sun Jun 16, 2013 4:09 am

Re: qemu network on windows

Post by tsdnz »

That would be great m12, thanks.
Mikemk
Member
Member
Posts: 409
Joined: Sat Oct 22, 2011 12:27 pm

Re: qemu network on windows

Post by Mikemk »

Im back. When I can get to my computer, Ill upload.
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
Mikemk
Member
Member
Posts: 409
Joined: Sat Oct 22, 2011 12:27 pm

Re: qemu network on windows

Post by Mikemk »

Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
Post Reply