Grab the LAN settings how on win10? - Page 1
Forum section: electronics / general

author: Chriss
author_rank: Frequent Contributor
timestamp: March 14, 2021, 09:27:41 am
content: I need to reinstall lot of win10 pc.Where I need to setup all the LAN etc.Is there any way how to export or whateverexport the LAN settings and after the reinstallimport them through network or manually isalso an option for me.But somehow to avoid to manually enter anyIP, DNS...Thank you.

author: mansaxel
author_rank: Super Contributor
timestamp: March 14, 2021, 10:45:29 am
content: ipconfig /allin a terminal does what you want. For that PC.But why would you want to do that? DHCP was invented for this.First, to get a picture of what nodes are registered today, do a nmap scan from a Real Computer (ie. something unixy) connected to the same network like so:nmap -sP 192.0.2.0/24 > /dev/null(Exchange your actual net for 192.0.2.0, which is the "example" net.)Then look at the arp table:arp -an | grep -v incomp(this is dynamic so be a bit swift.)Then populate your DHCP server and reinstall the computers.DNS settings, domain name and search list are options in the DHCP config as well. No need to bother hand-configuring that on every computer. If you feel you have different needs for different computers and don't know the answer to your original question, there is a serious mismatch between available competence and perceived needs. Seek more help.

author: Chriss
author_rank: Frequent Contributor
timestamp: March 14, 2021, 12:49:44 pm
content: Hmmm this looks very cool and Im comfortable with your writing.My problem is, I have around 300 win10 in a network class1.All the pc's use static IP.The sys. admind who managed this set up before me made everything by hand. Sadly he passed away and now IHave to figured out everything as a new admin.The company head establishment give me an order toreinstall al the PC's. And now to be somehow safe and not to loose some network settings I dont wish to change from static to dhcp. At the moment Im not sure why the admin before me didnt used dhcp.And it is also unclear for me why he used a subnet 255.255.255.0 for a class1 network?Only the first octet should be 255 and the remaining shoukd be the number of devices on the network.But however.For now I'm playing with nmap to discover every pc on the net and then I have an idea to netsh to export the profile and import when the pc is reset ( win reinstalled ).But Im not really sure does Im on the right way.Thank you for any help and suggestion.

author: retiredfeline
author_rank: Frequent Contributor
timestamp: March 14, 2021, 12:58:29 pm
content: These days subnets are classless and you can choose the network mask to suit the size of your LAN.

author: Chriss
author_rank: Frequent Contributor
timestamp: March 14, 2021, 01:06:02 pm
content: I didnt know this info.It is really valuable to me.Thank you.

author: Syntax Error
author_rank: Frequent Contributor
timestamp: March 14, 2021, 01:18:34 pm
content: Another question, did your predecessor configure those 300 PCs (and obviously other network hardware) to use VLANs (virtual LAN)? I have no idea why your predecessor did it this way, but changing static IPs might mess up the network config, along with any firewall rules. Assuming there is a network firewall of course.If you are in any doubt, please seek professional assistance from qualified network guys before changing anything.

author: PKTKS
author_rank: Super Contributor
timestamp: March 14, 2021, 01:24:33 pm
content: 2 cents...**IF** MS did (would) follow simple facts of plain good standards..The static file resolution would be *ENOUGH* to wide spreada decent LAN configuration..As noted.. DHCP would just allow 256 clients into single and probablyvery messy IP spread in which you can not control 'de facto' neitherPCs or features at all..Their "implied" **SOLUTION** was always biased to their REGISTRYmethods and perhaps some sort of MIB based SNMP UCD config protocol..UNIX culture is and was a wide solution to such wide problems..You *should* just distribute a single "HOSTS" file in whichclever config scripts would raise your NICs just fine..They used to include that for the sake of "legacy" or whateverthey call their vertical money make model..Alas an analog SMB file already exists since they acquiredLANTASTIC to have that service in their pile stuff ...Code:# Copyright (c) 1998 Microsoft Corp.## This is a sample HOSTS file used by Microsoft TCP/IP stack for Windows98## This file contains the mappings of IP addresses to host names. Each# entry should be kept on an individual line. The IP address should# be placed in the first column followed by the corresponding host name.# The IP address and the host name should be separated by at least one# space.## Additionally, comments (such as these) may be inserted on individual# lines or following the machine name denoted by a '#' symbol.## For example:## 102.54.94.97 rhino.acme.com # source server# 38.25.63.10 x.acme.com # x client host127.0.0.1localhost loopback192.168.2.5one.craapy.com192.168.5.40two.craapy.com192.168.1.80dat.craapy.com192.168.2.7this.craapy.com192.168.2.9that.craapy.com192.168.2.10alte.craapy.com192.168.3.255cow.craapy.com...A single HOSTS file is enough in whatever competentwide system management as you can reconfig eachand every client using that simple file...(including inter client access tables)But MS being MS I doubt this will be simple or evena solution they will ever agree with... as they managedto crap each and every simple standard so far..PaulPS. BTW... as they crapped every sort of configurations intothose funky shitty panel dialogs..We are hopeless having proper tools to deal with simple booting problems..Nevertheless the companion SMB file they called LMHOSTS...go figure why they still exist once their proper working is just a piece of shit.nevertheless... again they are there... so to speak

author: Chriss
author_rank: Frequent Contributor
timestamp: March 14, 2021, 01:30:45 pm
content: Yes.There are firewalls, cctv systems, other hardware who are connected with static ip to the network.Im sure about all that stuff.As Im the only person who was close to my friend who passed away, I have the most info about the whole company here in the IT sector but I cant still be sure enough.I can remember when he built up the LAN he configured every hardware and pc one by one by hand.So, for now the main goal should be to export and reinport the LAN settings for every single pc.So I have not to write to a paper etc..

author: PKTKS
author_rank: Super Contributor
timestamp: March 14, 2021, 01:38:03 pm
content: Someone said above...that today you have tools like NMAP companion ZenMAP...Which can dump such network pretty easy and pretty fast...Once you have the sketch .. a simple HOSTS file *WOULD* beenough to distribute and start to leverage the network toa reasonable proper state..FUNNY ENOUGH I HAVE JUST TODAY NOTED THAT MS DIDPLACED A COPYRIGHT NOTICE INTO A *UNIX* BASED FILE STANDARD..they never ever owned ...go figure how their minds have always worked that stupid..these folks just take ownership of things...including our hardware..Paul

author: PKTKS
author_rank: Super Contributor
timestamp: March 14, 2021, 01:55:20 pm
content: Quote from: madires on March 14, 2021, 01:49:55 pmI am hardly the person to spoke on that...But AFAIK... such "CMDs" are part only of their so called"SERVER" bullshit in which someone is just forced to payan extortive value for some "tool" they crafted to notusing simple standards..AFAIK that shit is only available in "SERVER" shitware MSBut I am not the proper person to hint that thingos..Paul

author: Chriss
author_rank: Frequent Contributor
timestamp: March 14, 2021, 02:01:24 pm
content: MS makes me angry every day. Task wich are so simple in unix based systems are almost not possible to do in MS world without of paying for some fancy tool.That makes no sense.And then when I speak to a MS certified person, sometime I asking myself "wtf he/she told to me?".In much case at the end of conversation Im already on the same point like with their products.Nowhere.

author: PKTKS
author_rank: Super Contributor
timestamp: March 14, 2021, 02:06:13 pm
content: When you reach that point of clear understanding...You simply realize that is just not enough being a shit.For them .. every folk using their shit must own whatI just call.. a "CERTIFICATED SHIT"Yes indeed this is a "CERTIFICATED SHIT"any MS related job definitively needs that certificate.And it must be paid as well.simple shit is not enough for them..Paul

author: Chriss
author_rank: Frequent Contributor
timestamp: March 14, 2021, 02:27:05 pm
content: M8 ur the king, u made my day sunny even on this shit raining day.

author: Syntax Error
author_rank: Frequent Contributor
timestamp: March 14, 2021, 02:33:33 pm
content: Ignoring MS, how exactly is that network connected up? Having static IP addresses suggests no managed switching; certainly no gateway router/s. Which for long term support is a big problemo. btw For 300 machines on the same net, you need a subnet of 255.255.254.0 or /23 which is 510 host addresses.Anyway, for Win10, Google is always your friend:"How to View Network Adapter Details in Windows 10"https://www.maketecheasier.com/view-network-adapter-details-in-windows/[check out the Nirsoft link]

author: Ian.M
author_rank: Super Contributor
timestamp: March 14, 2021, 03:18:18 pm
content: The solution long-term is DHCP, with a capable enough DHCP server to support a large table of devices with static DHCP addresses, set by MAC lookup. Any devices that are totally incapable of DHCP would be manually configured in an address range outside the DHCP allocation pool. You'd also want a fallback DHCP server that tracks the allocations of the primary DHCP server.However getting there in the face of significant push-back from 'manglement' is *difficult*. Meanwhile, you can script configuring the IP4 network settings of a PC using Microsoft's command linenetshutility in itsinterface ipcontext, (assuming you are using IPv4 addressing). Thisnetsh interface ipcommand reference should still be valid under Win10.N.B. you cant count on the interface name being consistent. You'll probably need to parse the results ofipconfig /allto identify the hardware ethernet adaptor's interface name.

author: PKTKS
author_rank: Super Contributor
timestamp: March 14, 2021, 03:53:00 pm
content: ... if you wrote down a HOST like feed...called LAN_POLICY... distribute that over your hosts..a very very raw 2 second shit like...Code:$NETMASK = '255.255.255.0';$BROADCAST = '192.168.xxx.255';$thisif = `ifconfig | grep -P 'eth0'`;if (defined $thisif && $thisif =~ /HWaddr/) { $thisif = $'; }while (<>) { chomp; ($MAC,$HOST,$IPADDR) = split(/\s+/,$_);`hostname $HOST`;`ifconfig eth0 $IPADDR broadcast BROADCAST netmask $NETMASK up'`if ( $MAC =~ /$thisif/)}*should* do the trick. after carefully fixing things...(including my 2 seconds typos etc...)Alas that will work even upon booting...as long as your system was **NOT** taken over by systemdor other agent likePaul... the bad side is that such tools require at least CYGWIN...

author: madires
author_rank: Super Contributor
timestamp: March 14, 2021, 04:04:51 pm
content: Quote from: PKTKS on March 14, 2021, 02:06:13 pmThe former certification required was MCSE (Minesweeper Consultant and Solitaire Expert).

author: PKTKS
author_rank: Super Contributor
timestamp: March 14, 2021, 04:08:53 pm
content: Quote from: madires on March 14, 2021, 04:04:51 pmThe even more funny side is that they *REQUIRE* YOU...to REVALIDATE your CERTIFICATED SHIT from time to time..and pay for that..kinda flushing their own shit... (literally)so I have heard..Paul

author: Ian.M
author_rank: Super Contributor
timestamp: March 14, 2021, 04:22:30 pm
content: netshhas adumpcommand valid in many of its contexts that outputs a script that is supposed to restore all the settings required for that context. Knowing MS, I doubt the output of:Code:netsh interface ip dumpactually does so reliably, but it should be a decent guide to what you need to configure in your own script.

author: mansaxel
author_rank: Super Contributor
timestamp: March 14, 2021, 07:02:13 pm
content: Quote from: Chriss on March 14, 2021, 12:49:44 pmThere are large if's and but's in what has come out in terms of info so far (Yes, I read the entire thread first, but, honestly, while I despise Windows, a lot, there are reasons to use it, which we can't disregard. So, just ranting against it is not going to be constructive. )so any advice is going to be a bit sketchy.However; to reiterate:Find out what you got. Using nmap is good, it's built to find things.Order your findings. You want, minimum, name, MAC address and IP adress for each computer (if you're going to replicate what you've got) and also, which of course can be deduced from below, which network.Make DHCP happen. Static if you must, dynamic if you can. People swap computers. In the old bad days they swapped network cards. Dynamic DHCP and DNS updates tied to it makes sense.Similarly, for the network, find out what networks there are, how they're interconnected, if there are rules for traffic between LANs.Is there some kind of central system management, like Active Directory? If there isn't, and you can't put one in, you are never going to get anything even remotely approaching predictability, order and security. Give up, get a janitor job. The practical limit for "individually managed computers" is 1. One. Anything more than that requires the likes of Samba, IPA or Active Directory. Not having it for 300 computers would make me an alcoholic. In a week.What I'm trying to say here, over and over again, is: You can't reasonably perform a good job managing 300 desktops without serious automation. Just keeping things as they are, is a recipe for disaster.Oh, and backups. I prefer not to cry.Good luck!