|01 Nov 2012||#1|
| || |
How do i create a Virtual NIC
Hi there everyone,
I have a small computer that i use for server, but i want to make it a gateway using ICS, but i need 2 NIC for it to work, so i want to create a Virtual NIC so that i could do ICS and make other computer on my LAN connect with the Virtual NIC.
Thanks in advance
|My System Specs|
|01 Nov 2012||#2|
| || |
You can do this with the Microsoft Loopback Adapter which is a driver for a virtual network card.
Depending on the licensing you might be able to use the TUN/TAP driver that is part of OpenVPN, see here for details.
Using tuntap under Windows
By Dmitri Varsanofiev
The tun-tap driver is extremely useful for implementing IP tunnels under both Linux and Windows. While the tun-tap driver is a quite popular part of modern Linux and is well documented, its open-source Windows counterpart (developed by Damion K. Wilson and James Yonan) is relatively unknown.
The goal of this page is to provide instructions and examples of use of the tuntap under Win32. I have chosen C#/.Net for the code sample simply to keep the code short and to the point; the sample uses no true .NET features and can be easily rewritten into any other language. For simplicity, the sample also assumes that only one tuntap driver is present in the system, and a fixed static IP allocation address for the tun network (10.3.0.1:255.255.255.0).
How to get tuntap for Windows
The Win32 tuntap code is a part of OpenVPN project. Download the source (I used 2.0.9), unzip the subdirectory tap-win32, and use the Windows DDK "build" command to build the driver. You will also need a config-win32.h file from OpenVPN in the directory above the tap-win32.
Tuntap installation under Windows
Only two files are relevant for the installation, the driver itself (default name is tap0801.sys) and the corresponding .inf file (OemWin2K.inf). To install the driver a DevCon utility from Microsoft will be necessary (the OpenVPN distribution includes a DevCon clone called "tapinstall", but the original DevCon will work just as well. Issue the following commands to install, enable the interface, and set the static IP address (replace <tapname> with the connection name of the tap driver in the Control Panel - it is also a result of the HumanName function in the sample):
DevCon install OemWin2k.inf TAP0801
netsh interface ip set address <tapname> static 10.3.0.1 255.255.255.0
The sample uses the "tun" (IP) mode of the driver to create an "IP mirror" (an illusion of a remote 10.3.0.xxx network). All packets addressed to this network will be returned back to the local computer, but their IP headers will be modified so that they appear to come from the remote network). Therefore, for example, ping to all addresses in the remote network - and many other IP protocols - will work. Note that the FTP protocol will not work, since it contains an IP address inside the packet.
|My System Specs|
|Similar help and support threads for2: How do i create a Virtual NIC|
|Windows Virtual PC - Create Virtual Machine||Tutorials|
|How can I create a USB Virtual Printer Port||Virtualization|
|how to use host image to create virtual machine?||Virtualization|
|How to Create a Win95 Virtual Machine in Windows Virtual PC||Virtualization|
|Could not create the java virtual machine||BSOD Help and Support|
|Virtual Hard Disk - Create and Attach VHD||Tutorials|
|Windows Virtual PC - Create Differencing Disks||Tutorials|
|Our Sites ||Site Links ||About Us ||Find Us |
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
All times are GMT -5. The time now is 09:49 AM.