Author Topic: Grab the LAN settings how on win10?  (Read 4929 times)

0 Members and 1 Guest are viewing this topic.

Offline ChrissTopic starter

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: 00
Grab the LAN settings how on win10?
« on: March 14, 2021, 09:27:41 am »
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 whatever
export the LAN settings and after the reinstall
import them through network or manually is
also an option for me.

But somehow to avoid to manually enter any
IP, DNS...

Thank you.
« Last Edit: March 14, 2021, 10:11:33 am by Chriss »
 

Offline mansaxel

  • Super Contributor
  • ***
  • Posts: 3558
  • Country: se
  • SA0XLR
    • My very static home page
Re: Grab the LAN settings how on win10?
« Reply #1 on: March 14, 2021, 10:45:29 am »
ipconfig /all

in 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.

Offline ChrissTopic starter

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: 00
Re: Grab the LAN settings how on win10?
« Reply #2 on: March 14, 2021, 12:49:44 pm »
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 I
Have to figured out everything as a new admin.
The company head establishment give me an order to
reinstall 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.
 

Offline retiredfeline

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: au
Re: Grab the LAN settings how on win10?
« Reply #3 on: March 14, 2021, 12:58:29 pm »
These days subnets are classless and you can choose the network mask to suit the size of your LAN.
 
The following users thanked this post: Chriss

Offline ChrissTopic starter

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: 00
Re: Grab the LAN settings how on win10?
« Reply #4 on: March 14, 2021, 01:06:02 pm »
I didnt know this info.
It is really valuable to me.
Thank you.
 

Offline Syntax Error

  • Frequent Contributor
  • **
  • Posts: 584
  • Country: gb
Re: Grab the LAN settings how on win10?
« Reply #5 on: March 14, 2021, 01:18:34 pm »
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.

 
The following users thanked this post: Chriss

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
Re: Grab the LAN settings how on win10?
« Reply #6 on: March 14, 2021, 01:24:33 pm »
2 cents...

**IF**   MS  did (would)  follow simple facts of plain good standards..

The static file resolution would be *ENOUGH*  to wide spread
a decent LAN configuration..

As noted.. DHCP would just allow 256 clients into single and probably
very messy IP spread in which you can not control 'de facto' neither
PCs or features at all..

Their "implied"  **SOLUTION** was always biased to their REGISTRY
methods 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 which
clever config scripts would raise your NICs just fine..

They used to include that for the sake of "legacy" or whatever
they call their vertical money make model..

Alas an analog  SMB file already exists since they acquired
LANTASTIC to have that service in their pile stuff ...

Code: [Select]
# 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 host

127.0.0.1                localhost  loopback
192.168.2.5 one.craapy.com
192.168.5.40 two.craapy.com
192.168.1.80 dat.craapy.com
192.168.2.7 this.craapy.com
192.168.2.9 that.craapy.com
192.168.2.10 alte.craapy.com
192.168.3.255 cow.craapy.com
.
.
.

A single HOSTS file is enough in whatever competent
wide system management as you can reconfig each
and every client using that simple file...
(including inter client access tables)


But MS being MS I doubt this will be simple or even
a solution they will ever agree with... as they managed
to crap each and every simple standard so far..

Paul


PS. BTW... as they crapped every sort of configurations into
those 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
« Last Edit: March 14, 2021, 01:42:08 pm by PKTKS »
 
The following users thanked this post: Chriss

Offline ChrissTopic starter

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: 00
Re: Grab the LAN settings how on win10?
« Reply #7 on: March 14, 2021, 01:30:45 pm »
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..
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
Re: Grab the LAN settings how on win10?
« Reply #8 on: March 14, 2021, 01:38:03 pm »
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* be
enough to distribute and start to leverage the network to
a reasonable proper state..

FUNNY ENOUGH  I HAVE JUST TODAY NOTED THAT MS DID
PLACED 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..  :popcorn:

Paul
« Last Edit: March 14, 2021, 01:43:32 pm by PKTKS »
 
The following users thanked this post: Chriss

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
Re: Grab the LAN settings how on win10?
« Reply #9 on: March 14, 2021, 01:55:20 pm »
netsh!

I 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 pay
an extortive value  for some "tool"  they crafted to not
using simple standards..

AFAIK that shit is only available in "SERVER" shitware MS

But I am not the proper person to hint that thingos..
Paul 
 
The following users thanked this post: Chriss

Offline ChrissTopic starter

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: 00
Re: Grab the LAN settings how on win10?
« Reply #10 on: March 14, 2021, 02:01:24 pm »
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. 
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
Re: Grab the LAN settings how on win10?
« Reply #11 on: March 14, 2021, 02:06:13 pm »
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 what
I 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
 
The following users thanked this post: Chriss

Offline ChrissTopic starter

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: 00
Re: Grab the LAN settings how on win10?
« Reply #12 on: March 14, 2021, 02:27:05 pm »
M8 ur the king, u made my day sunny even on this shit raining day.  :-DD
 

Offline Syntax Error

  • Frequent Contributor
  • **
  • Posts: 584
  • Country: gb
Re: Grab the LAN settings how on win10?
« Reply #13 on: March 14, 2021, 02:33:33 pm »
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]
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13126
Re: Grab the LAN settings how on win10?
« Reply #14 on: March 14, 2021, 03:18:18 pm »
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 line netsh utility in its interface ip context, (assuming you are using IPv4 addressing).  This netsh interface ip command 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 of ipconfig /all to identify the hardware ethernet adaptor's interface name.
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
Re: Grab the LAN settings how on win10?
« Reply #15 on: March 14, 2021, 03:53:00 pm »
... 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: [Select]
$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 systemd
or other agent like

Paul

... the bad side is that such tools require at least CYGWIN...
« Last Edit: March 14, 2021, 04:05:57 pm by PKTKS »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8175
  • Country: de
  • A qualified hobbyist ;)
Re: Grab the LAN settings how on win10?
« Reply #16 on: March 14, 2021, 04:04:51 pm »
Yes indeed this is  a  "CERTIFICATED SHIT"   
any MS related job  definitively needs that certificate.

The former certification required was MCSE (Minesweeper Consultant and Solitaire Expert). ;D
 

Offline PKTKS

  • Super Contributor
  • ***
  • Posts: 1766
  • Country: br
Re: Grab the LAN settings how on win10?
« Reply #17 on: March 14, 2021, 04:08:53 pm »
Yes indeed this is  a  "CERTIFICATED SHIT"   
any MS related job  definitively needs that certificate.

The former certification required was MCSE (Minesweeper Consultant and Solitaire Expert). ;D

The 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  ^-^
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13126
Re: Grab the LAN settings how on win10?
« Reply #18 on: March 14, 2021, 04:22:30 pm »
netsh has a dump command 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: [Select]
netsh interface ip dumpactually does so reliably, but it should be a decent guide to what you need to configure in your own script.
 

Offline mansaxel

  • Super Contributor
  • ***
  • Posts: 3558
  • Country: se
  • SA0XLR
    • My very static home page
Re: Grab the LAN settings how on win10?
« Reply #19 on: March 14, 2021, 07:02:13 pm »
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 I
Have to figured out everything as a new admin.
The company head establishment give me an order to
reinstall 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.

There 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!


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf