Salvando / descarregando a configuração de rede com gateway e dns?

1

Usando o comando netsh interface dump > dumpfile.cfg , obtenho minha configuração de rede em um formato de script que pode ser recarregado por netsh exec dumpfile.cfg . No arquivo recuperado não há menção de gateway e endereço de DNS ... por quê? Qualquer maneira alternativa de realmente salvar e restaurar a configuração real da rede?

Conteúdo do meu dumpfile:

#========================
# Interface configuration
#========================
pushd interface 


popd
# End of interface configuration



# ----------------------------------
# IPHTTPS Configuration
# ----------------------------------
pushd interface httpstunnel

reset


popd
# End of IPHTTPS configuration



# ----------------------------------
# IPv4 Configuration
# ----------------------------------
pushd interface ipv4

reset
set global icmpredirects=enabled
add route prefix=0.0.0.0/0 interface="Local Area Connection" nexthop=169.254.144.200 metric=1 publish=Yes
add address name="VirtualBox Host-Only Network" address=192.168.56.1 mask=255.255.255.0
add address name="VMware Network Adapter VMnet1" address=192.168.6.1 mask=255.255.255.0
add address name="VMware Network Adapter VMnet8" address=192.168.111.1 mask=255.255.255.0
add address name="Local Area Connection" address=169.254.144.155 mask=255.255.255.0


popd
# End of IPv4 configuration



# ----------------------------------
# IPv6 Configuration
# ----------------------------------
pushd interface ipv6

reset
set interface interface="Teredo Tunneling Pseudo-Interface" forwarding=disabled advertise=disabled mtu=1280 metric=0 siteprefixlength=0 nud=disabled routerdiscovery=disabled managedaddress=disabled otherstateful=disabled weakhostsend=disabled weakhostreceive=disabled ignoredefaultroutes=disabled advertisedrouterlifetime=0 advertisedefaultroute=disabled currenthoplimit=0 forcearpndwolpattern=disabled enabledirectedmacwolpattern=disabled


popd
# End of IPv6 configuration



# ----------------------------------
# ISATAP Configuration
# ----------------------------------
pushd interface isatap



popd
# End of ISATAP configuration



# ----------------------------------
# 6to4 Configuration
# ----------------------------------
pushd interface 6to4

reset



popd
# End of 6to4 configuration



# ----------------------------------
# ISATAP Configuration
# ----------------------------------
pushd interface isatap



popd
# End of ISATAP configuration


#========================
# Port Proxy configuration
#========================
pushd interface portproxy

reset


popd

# End of Port Proxy configuration



# ----------------------------------
# TCP Configuration
# ----------------------------------
pushd interface tcp

reset

set global rss=enabled chimney=automatic autotuninglevel=normal congestionprovider=none ecncapability=disabled timestamps=disabled netdma=enabled dca=enabled

Dump has failed when retreiving chimneyapplication  settings.

Dump has failed when retreiving chimneyapplication  settings.

Dump has failed when retreiving chimneyapplication  settings.

Dump has failed when retreiving chimneyapplication  settings.


popd
# End of TCP configuration



# ----------------------------------
# Teredo Configuration
# ----------------------------------
pushd interface teredo
set state type=client servername=teredo.ipv6.microsoft.com. servervirtualip=0.0.0.0



popd
# End of Teredo configuration



# ----------------------------------
# 6to4 Configuration
# ----------------------------------
pushd interface 6to4

reset



popd
# End of 6to4 configuration
    
por obeliksz 31.01.2014 / 09:42

1 resposta

0

Encontrei no fórum microsoft a thread que diz para usar um parâmetro -c addtional:

netsh –c interface dump

Só que isso não escreve o gateway como "gateway", mas como "nexthop" e eu não vejo a entrada do DNS lá ... isso não é uma solução viável para qualquer coisa como eu vejo, mas isso é o máximo que eu poderia sair do netsh com dump / restore.

    
por 03.02.2014 / 11:04