Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How do i create a Virtual NIC


01 Nov 2012   #1

Windows 7 Ultimate 64 Bit
 
 
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 SpecsSystem Spec
.

01 Nov 2012   #2

Windows 7 Professional x64 Linux Mint 16
 
 

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

Tap-win32 sample

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 SpecsSystem Spec
Reply

 How do i create a Virtual NIC




Thread Tools




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 11:50 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33