mbouchard Posted February 25, 2008 Posted February 25, 2008 I have a strange issue, I have a newly built PE 2.0 built with Vista Sp1 and when PE finishes loading I do not have an IP address, I only get the AutoConfig Ip (169.254.etc) I do an Ipconfig /renew and it will get an IP. Any ideas?Nic = Intel 825xx Gigabit Platform LAN Network Device
Jazkal Posted February 26, 2008 Posted February 26, 2008 WinPE 2.x has NIC/TCP timing issues. I set a sleep and ping command after wpeinit is called in the startnet.cmd filewpeinit@ECHO OFFsleep 8ping -n 5 SOMESERVERYou'll need to add the sleep.exe file to your build.
trtkron Posted February 26, 2008 Posted February 26, 2008 I know that nonSP1 did not have the Intel NIC driver for these devices (PCI\VEN_8086&DEV_10BD) and SP1 added support since the first sp1 beta of the waik. I have had 0 issues with these models gettting IP on the first try.
mbouchard Posted February 26, 2008 Author Posted February 26, 2008 WinPE 2.x has NIC/TCP timing issues. I set a sleep and ping command after wpeinit is called in the startnet.cmd filewpeinit@ECHO OFFsleep 8ping -n 5 SOMESERVERYou'll need to add the sleep.exe file to your build.I take it the 8 is seconds, if so will up what I had already tried, a 2 second sleep in a script that is called from startnet.cmd.I know that nonSP1 did not have the Intel NIC driver for these devices (PCI\VEN_8086&DEV_10BD) and SP1 added support since the first sp1 beta of the waik. I have had 0 issues with these models gettting IP on the first try.I had issues with getting the NIC added to Vista gold, but that was probably a user issue on my part. Rebuilt PE with Sp1 and was able to get connected with a delay though.Have no issues with one of my other test PC's, just the 755.Thanks again, will try the longer sleep.
geemail.email Posted February 26, 2008 Posted February 26, 2008 (edited) I have had the same issue with HP dc7700 and dc7800 workstations. In my case, it is not a problem with the boot cd (WinPE 2.0) or with the driver. The problem is on our Cisco switches and their configuration. We do not enable Port Fast on our switches to ensure stability of the network in case someone gets cable happy.What I did to overcome this problem, (although I despise doing it) is to add the follow in the startnet.cmdstart /wait wpeinitCLSipconfig /renew *Local*ipconfig /renew *Local*When I only added "ipconfig /renew once, about 9 times out of 10 it would succeed in obtaining the IP address. When I added it twice, I have never had it fail on either of the two models which were having the issue.By the way, both the 7700 and 7800 have the Intel 825xx Gigabit Platform LAN Network DeviceI hope this helps....this drove me crazy for over a week...literally, you have no idea how many drivers I downloaded along with rebuilds of my boot cd.Good luck. Edited February 26, 2008 by geemail.email
trtkron Posted February 27, 2008 Posted February 27, 2008 That last post reminded me of something... In my code I do this.Check for cable being present.If it is thenCheck for IPif no IP thenRestart network adapterscheck for IPPublic Function CheckForIP() As Boolean'have IP and have gateway means you have IP.' 169. triggers as ipenabled so have to check gatewayDim oNetworkAdapterConfigurationSet As WbemScripting.SWbemObjectSetDim oNetworkAdapterConfiguration As WbemScripting.SWbemObject On Error Resume Next Set oNetworkAdapterConfigurationSet = GetObject("winmgmts:root\CIMV2").ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each oNetworkAdapterConfiguration In oNetworkAdapterConfigurationSet If Not IsNull(oNetworkAdapterConfiguration.DefaultIPGateway) Then CheckForIP = True End If Next Set oNetworkAdapterConfiguration = Nothing Set oNetworkAdapterConfigurationSet = Nothing Exit FunctionEnd FunctionA a snip on checking if the cable is plugged in. There is a WMI call for checking cable plugged in, but it doesn't work in PE (Or at least didn't last time I checked) FYI, TokenRing doesn't return .Speed, so I have different checks for that... but who else is still using that?After checking for a cable, I restart the card (because I change it's mac address to a specific range, identfying it) then ipconfig /setclassid for a specific dhcp class we use for winpe devices (which, btw does a renew on it's own). Then I check for gateway, no gateway then we use WMI to renew one more time. Set oNetworkAdapterSet = GetObject("winmgmts:root\CIMV2").ExecQuery("SELECT Description, Index, MACAddress, Speed FROM Win32_NetworkAdapter WHERE AdapterTypeID = 0", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each oNetworkAdapter In oNetworkAdapterSet If IsNull(oNetworkAdapter.Description) Or IsNull(oNetworkAdapter.MACAddress) Or IsNull(oNetworkAdapter.Speed) Then 'bad card Else If Int(Right$(oNetworkAdapter.Speed, 2)) Mod 10 = 0 Then bNetworkCableConnected = True End If End If Next End If Set oNetworkAdapter = Nothing Set oNetworkAdapterSet = Nothing If bNetworkCableConnected Then ShellAndWait "DEVCON RESTART =NET", vbHide ShellAndWait "IPCONFIG /SETCLASSID * WINPE", vbHide Set oNetworkAdapterConfigurationSet = GetObject("winmgmts:root\CIMV2").ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each oNetworkAdapterConfiguration In oNetworkAdapterConfigurationSet If IsNull(oNetworkAdapterConfiguration.DefaultIPGateway) Then oNetworkAdapterConfiguration.RenewDHCPLease End If Next Set oNetworkAdapterConfiguration = Nothing Set oNetworkAdapterConfigurationSet = Nothing
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now