Re: Networking discussion
Posted: Wed 26 Aug, 2015 2:32 am
OK, so here is my combined SLiRP and PCAP binary/source.
http://vpsland.superglobalmegacorp.com/ ... p-slirp.7z
Again sorry, you have to deal with the stupid password protection. The 404 page has the username and password.
USING PCAP
If you want to use pcap, you will need to know the interface 'guid' to connect to. YOU CANNOT USE PCAP+WIFI since almost all wifi chips won't send and receive promiscuous packets with a forged address. This is a hardware limitation, and Pcap will never work in this setup. Instead try SLiRP.
PCAP can work with protocols like IPX, DecNET, AppleTalk as the raw Ethernet frames are passed on the wire. It will always work best with a WIRED Ethernet connection.
To find your ethernet GUID names, I've included a program ethlist.exe
net_type = 0 sets this to Pcap. You need a valid pcap_device. It shouldn't error out if you use the wrong interface, it just won't work. It's silent and I don't like that. However I did include a PCem-debug which will output all kinds of good debug data to the file pclog.txt. Look for the ne2000 sections and you can follow what is going on.
For example, a working configuration will have output similar to this:
USING SLiRP
Using SLiRP is far more easier, as it is 100% user mode code.
SLiRP only supports TCP/IP. PPTP doesn't work going through it's NAT. It's best suited to HTTP/HTTPS traffic, and unidrectional traffic, like Quake. The IP address you need to give a SLiRP VM is STATIC. Non Passive (active) mode FTP will not work. Passive mode FTP may or may not work, it really depends on the client. Telnet and SSH work fine.
You *MUST* either use BOOTP/DHCP or the following static IP address:
THE FUTURE
I want to add more network connection options, but I think this is a 'good start' for now. Let me know if it works, what kind of setup, even if it fails.
http://vpsland.superglobalmegacorp.com/ ... p-slirp.7z
Again sorry, you have to deal with the stupid password protection. The 404 page has the username and password.
USING PCAP
If you want to use pcap, you will need to know the interface 'guid' to connect to. YOU CANNOT USE PCAP+WIFI since almost all wifi chips won't send and receive promiscuous packets with a forged address. This is a hardware limitation, and Pcap will never work in this setup. Instead try SLiRP.
PCAP can work with protocols like IPX, DecNET, AppleTalk as the raw Ethernet frames are passed on the wire. It will always work best with a WIRED Ethernet connection.
To find your ethernet GUID names, I've included a program ethlist.exe
In this example my Ethernet device is "\Device\NPF_{0CFA803F-F443-4BB9-A83A-657029A98195}". You may need a lot of trial and error here. Sorry. Open up the pcem.cfg file, and you will need to manually add the following:D:\temp\pcem>ethlist
Network devices:
Number NAME (Description)
0 \Device\NPF_{0DF68748-A9D1-461A-A3E8-F1E10E495688} (Local Area Connection* 2)
1 \Device\NPF_{0CFA803F-F443-4BB9-A83A-657029A98195} (Ethernet)
2 \Device\NPF_{A3F2C156-9D1C-4442-9766-2D745AB46145} (VMware Network Adapter VMnet8)
3 \Device\NPF_{69E9FFD0-D3D6-4985-8823-CDA5937BB224} (Local Area Connection 3)
4 \Device\NPF_{99C37A8D-040F-4217-A0DE-A3CE88B33F8B} (Bluetooth Network Connection 2)
5 \Device\NPF_{551CFF39-47A8-43FE-8137-598FD60859F1} (Wi-Fi)
6 \Device\NPF_{656B6ADB-13BF-4A58-96AD-BD0B61333E6A} (VMware Network Adapter VMnet13)
7 \Device\NPF_{726F0EB3-CC94-45F5-891F-8A8AE8C7CEEB} (VMware Network Adapter VMnet1)
8 \Device\NPF_{A542548C-1A7F-4C49-8CCC-1F8E890F026C} (tun0)
Press Enter to continue...
Code: Select all
netinterface = 1
netcard = 1
net_type = 0
pcap_device = \Device\NPF_{0CFA803F-F443-4BB9-A83A-657029A98195}
[Novell NE2000]
netcard = 1
addr = 0x300
irq = 10
#EMPTY LINE
For example, a working configuration will have output similar to this:
While having an incorrect GUID will give you output similar to this:D:\pcem>grep ne2000 pclog.txt
ne2000 pcap device \Device\NPF_{0CFA803F-F443-4BB9-A83A-657029A98195}
ne2000 reset
ne2000 init 0x300 10 slirp is 0 net_is_pcap is 1
ne2000 initalizing libpcap
ne2000 Pcap version [WinPcap version 4.1.3 (packet.dll version 4.1.0.2980), based on libpcap version 1.0 branch 1_0_rel0b (20091008)]
ne2000 pcap is currently in blocking mode
ne2000 Setting interface to non-blocking mode......!
ne2000 Building packet filter.........!
ne2000 Using filter [( ((ether dst ff:ff:ff:ff:ff:ff) or (ether dst ac48:88:bb:aa)) and not (ether src ac48:88:bb:aa) )]
ne2000 net_is_pcap is 1 and net_pcap is 10ed28f8
ne2000 is_slirp 0 is_pcap 1
ne2000 closing pcap
ne2000 close
ne2000 pcap device \Device\NPF_{0CFA803F-F443-4BB9-A83A-657029A98195}
ne2000 reset
ne2000 init 0x300 10 slirp is 0 net_is_pcap is 1
ne2000 initalizing libpcap
ne2000 Pcap version [WinPcap version 4.1.3 (packet.dll version 4.1.0.2980), based on libpcap version 1.0 branch 1_0_rel0b (20091008)]
ne2000 pcap is currently in blocking mode
ne2000 Setting interface to non-blocking mode......!
ne2000 Building packet filter.........!
ne2000 Using filter [( ((ether dst ff:ff:ff:ff:ff:ff) or (ether dst ac48:88:bb:aa)) and not (ether src ac48:88:bb:aa) )]
ne2000 net_is_pcap is 1 and net_pcap is 11b328f8
ne2000 is_slirp 0 is_pcap 1
ne2000 reset
ne2000 pcap sending packet
ne2000 pcap received a frame 60 bytes
ne2000 pcap sending packet
ne2000 pcap received a frame 60 bytes
ne2000 closing pcap
ne2000 close
D:\pcem>grep ne2000 pclog.txt
ne2000 pcap device \Device\NPF_{0CFA803F-F443-4BB9-A83A-657029A98196}
ne2000 reset
ne2000 init 0x300 10 slirp is 0 net_is_pcap is 1
ne2000 initalizing libpcap
ne2000 Pcap version [WinPcap version 4.1.3 (packet.dll version 4.1.0.2980), based on libpcap version 1.0 branch 1_0_rel0b (20091008)]
ne2000 pcap_open_live error on \Device\NPF_{0CFA803F-F443-4BB9-A83A-657029A98196}!
ne2000 close
USING SLiRP
Using SLiRP is far more easier, as it is 100% user mode code.
SLiRP only supports TCP/IP. PPTP doesn't work going through it's NAT. It's best suited to HTTP/HTTPS traffic, and unidrectional traffic, like Quake. The IP address you need to give a SLiRP VM is STATIC. Non Passive (active) mode FTP will not work. Passive mode FTP may or may not work, it really depends on the client. Telnet and SSH work fine.
You *MUST* either use BOOTP/DHCP or the following static IP address:
Anything other than this will not work. You can *ONLY* ping the address 10.0.2.2 . If you get a reply this will verify that SLiRP is functioning. You will also need to ensure the following entries are in your pcem.cfg file:IP: 10.0.2.15
NETMASK: 255.255.255.0
GATEWAY: 10.0.2.2
DNS: 10.0.2.3
Code: Select all
netinterface = 1
netcard = 1
net_type = 1
[Novell NE2000]
netcard = 1
addr = 0x300
irq = 10
#EMPTY LINE
THE FUTURE
I want to add more network connection options, but I think this is a 'good start' for now. Let me know if it works, what kind of setup, even if it fails.