network settings for live migration must use the “Settings” button in the failover cluster manager.
Tuesday, December 29, 2009
Monday, December 28, 2009
Bind NDIS filter driver to a NDIS Mux driver
Normally, you cannot bind a NDIS filter driver to a NDIS Mux driver. This is because usually a NDIS filter driver will specify FilterMediaTypes as
HKR, Ndi\Interfaces, FilterMediaTypes, , "Ethernet, TokenRing, FDDI"
On the other hand, NDIS Mux driver need to specify
HKR, Ndi\Interfaces, LowerRange, 0, "nolower"
The “nolower” is not in the filter driver’s FilterMediaTypes list, thus you need to add “nolower” into FilterMediaTypes list in order to bind a filter driver to a mux driver.
See here for the reference.
Tuesday, December 15, 2009
wmi and powershell
Getting WMI Objects using PowerShell 2.0
WMI Enhancements in Windows PowerShell 2.0
Monitoring WMI Events with the Register-WMIEvent Cmdlet
parse ip addresses:
"10.1.1.1” | %{[Net.IPAddress]::Parse($_)}
Monday, December 14, 2009
NdisRegisterDeviceEx return STATUS_OBJECT_NAME_COLLISION
when i uninstall my mux driver and reinstall it, the driver fails at NdiRegisterDeviceEx() and the error code is STATUS_OBJECT_NAME_COLLISION.
This happens when i initially binding no adapter to my mux driver. If i initially bind one physical adapter to my mux driver, this does not happen.
We can use !object \Device and !object \GLOBAL?? to check the devices as shown here, but this provide no solution to my problem. I also traced to nt!IoCreateDevice and nt!IoCreateSymbolicLink, also no help. Maybe i’ll solve this bug later.
Thursday, December 03, 2009
Saturday, November 14, 2009
802.1q tagging
In a recent project, we want to send packets with 802.1q header. It may seem easy to do this, however it turns out to be very tricky to do this in reality.
First, the NIC card will automatically strip the header when they receive it. Thus, you need configure the NIC card not to do this. For broadcom nics, you need to add "PreserveVlanInfoInRxPacket=1" in the registry. For intel nics, there is instruction, however it seems no effect when I tried on our Intel Pro 1000 PT NIC card.
Second, we want to control IP tos field when we send packet. As one may think, we can use setsockopt() to configure IP_TOS field. However, when you do this on a windows xp/2003 machine, you need to configure the registry, i.e. add DisableuserTOSSetting=0 in TCPIP/Parameters. More information can be find in technet.
Friday, October 23, 2009
kernel debugging on virtual machine
Let Host to debug its virtual machine
1. configure virtual machine to add a com port. refer here
set up a COM port for a named pipe (in VPC settings COM1 you can select named pipe and give it a name like \\.\pipe\ThePipe)
2. configure virtual operation system (vista) to enable debug and sets its output port. refer here
bcdedit /debug on
dcdedit /dbgsettings serial debugport:1 baudrate:115200
3. config host machine to connect to virtual machine
configure WinDbg to kernel debug (specify the same \\.\pipe\ThePipe in File\Kernel Debug, COM tab, Port text box).
4. Replace OS with checked ndis.sys
To disable WRP on windows vista. Install TakeOwnership.zip refer
5. You can start debug now.
Use !ndiskd.dbglevel, !ndiskd.dbgsystems
Saturday, October 10, 2009
dbgview for vista
Under vista, dbgview default does not show debug messages printed out from KdPrint(). In this case, you need add a registry
1. add a registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter
2. add a DWORD DEFAULT=0xF
For more information, please see msdn here.
Test unsigned driver for windows server 2008 R2 x64
Windows server 2008 R2 x64 version require every kernel driver digitally assigned. To remove this constraint, we need install Driver Signature Enforcement Overrider. The first step is to disable UAC.
Sunday, September 27, 2009
Energy efficient data center
"We all need fatter pipes, but there are other ways of moving forward if the speeds come at the cost of too much power consumption, physical complexity and cost of ownership," said Bikash Koley of Google in a talk to a group of more than 100 developers hosted by the Ethernet Alliance. See here for the news report. Very interesting to hear.
Another report from Donn Lee says he needs 64 terabits switch.
Thursday, September 24, 2009
System Center for Virtual Machine Management
Quick Start from Nothing to SCVMM contains quick guide video to get started with SCVMM 2008 R2.
MDSN guide for SCVMM scripting
sample script for configure vm network adapter. This script connects the virtual network adapter to a virtual network, changes the MAC address from static to dynamic, and enables virtual LAN (VLAN) identification for the network adapter.
Friday, April 10, 2009
install netfpga on ubuntu
1. Install prerequites
sudo apt-get install build-essential (for compiling driver)
sudo apt-get install linux-headers-`uname -r` (for compiling driver)
sudo apt-get install ncurses-dev (for selftest)
sudo apt-get install libnet1-dev (for the reference router/selftest)
sudo apt-get install libxml-simple-perl (Used in ./nf21_run_test.pl to verify *simulator* output)
sudo apt-get install libio-interface-perl (Used to manually build a newer version of Net::PCap)
sudo apt-get install liblist-moreutils-perl (Used to manually build a newer version of Net::RawIP)
sudo apt-get install liberror-perl (for the reference router)
sudo apt-get install sun-java6-jre (for the reference router GUI)
sudo apt-get install sun-java6-jdk
sudo apt-get install jpackage-utils
sudo apt-get install libpcap0.8 (for SCONE)
sudo apt-get install libpcap0.8-dev (for SCONE)
2. Create symbol links
sudo ln /usr/bin/lspci /sbin/lspci
sudo ln /usr/bin/setpci /sbin/setpci
3. Modify the source code
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/reference_nic/regress/test_loopback_drop/run: usleep 10;
projects/router_buffer_sizing/regress/test_time_stamp/send_pkt: `usleep 10000`;
projects/router_buffer_sizing/regress/test_store_event/send_pkt: `usleep 10000`;
replace "usleep 10;" with "sleep 0.000010;"
4. Prepare env
source /root/netfpga/NF2/bashrc_addon
5. make; make install;
6. modify grub
title Ubuntu 8.04.1, kernel 2.6.24-19-server (netfpga)
uppermem 524288
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-19-server root=UUID=5c9521ed-d36d-417a-a755-36e3bb5d1887 ro quiet splash vmalloc=256M
initrd /boot/initrd.img-2.6.24-19-server
quiet
7. After reboot, testing
sudo cpci_reprogram.pl --all
sudo nf2_download ~/NF2/bitfiles/reference_nic.bit
sudo ~/NF2/bin/nf21_regress_test.pl
Tuesday, March 03, 2009
add IE8 search provider
Friday, February 20, 2009
Quick guide to analyze performance on windows platform
- Use Visual Studio Team System‘s Performance Explorer to debug windows application.
- Use kernrate to analyze windows kernel.
- Run vsperfcmd to start analyzing process.
- Run your application
- Stop your application
- Run vsperfcmd to stop analyzing process.
- Use VSTS performance explorer to view the generated report.
kernrate.exe is for windows 2000/XP/2003 to analyze kernel performance. It is included windows WDK toolkit. Running kernrate is simple, just type
kernate -j SYMBOL_PATH -z module
where -j is the symbol path of kernel modules, -z are the module you'd like to zoom in.
To download kernel symbol, you need to use symchk which is included in windows debugging tools. For example, following command download all symbols under c:\windows\system32\
symchk /r c:\windows\system32 /s SRV*c:\symbols\*http://msdl.microsoft.com/download/symbols
Tuesday, February 10, 2009
overlapped I/O on windows
Windows Sockets 2.0: Write Scalable Winsock Apps Using Completion Ports