• De afgelopen dagen zijn er meerdere fora waarop bestaande accounts worden overgenomen door spammers. De gebruikersnamen en wachtwoorden zijn via een hack of een lek via andere sites buitgemaakt. Via have i been pwned? kan je controleren of jouw gegeven ook zijn buitgemaakt. Wijzig bij twijfel jouw wachtwoord of schakel de twee-staps-verificatie in.

Netwerkadapter instellingen wijzigen d.m.v CMD.

Status
Niet open voor verdere reacties.

NigelHagen

Windows Geek
Lid geworden
17 jul 2013
Berichten
273
Waarderingsscore
0
(LET OP: VERVANG DE address name door jouw netwerkadapter)

Je kan je IP adres, Subnetmask, Gateway en DNS instellen via de command prompt. En dus ook via een batchfile. Handig voor als je via een script een systeem uitrolt of anderzijds je IP adres wilt kunnen wijzigen via de prompt. Je kan vaste gegevens invoeren of instellen op DHCP.

Dit doe je met het commando: netsh.exe

Usage: netsh [-a AliasFile] [-c Context] [-r RemoteMachine] [-u [DomainName\]UserName] [-p Password | *]
[Command | -f ScriptFile]
The following commands are available:
Commands in this context:
? – Displays a list of commands.
aaaa – Changes to the `netsh aaaa’ context.
add – Adds a configuration entry to a list of entries.
bridge – Changes to the `netsh bridge’ context.
delete – Deletes a configuration entry from a list of entries.
dhcp – Changes to the `netsh dhcp’ context.
diag – Changes to the `netsh diag’ context.
dump – Displays a configuration script.
exec – Runs a script file.
firewall – Changes to the `netsh firewall’ context.
help – Displays a list of commands.
interface – Changes to the `netsh interface’ context.
ipsec – Changes to the `netsh ipsec’ context.
ras – Changes to the `netsh ras’ context.
routing – Changes to the `netsh routing’ context.
rpc – Changes to the `netsh rpc’ context.
set – Updates configuration settings.
show – Displays information.
wins – Changes to the `netsh wins’ context.
winsock – Changes to the `netsh winsock’ context.
The following sub-contexts are available:
aaaa bridge dhcp diag firewall interface ipsec ras routing rpc wins winsock
To view help for a command, type the command, followed by a space, and then type ?.
IP en Subnetmask

netsh interface ip set address name=”Local Area Connection” source=static addr=192.168.1.150 mask=255.255.255.0
Gateway

netsh interface ip set address name=”Local Area Connection” gateway=192.168.1.1 gwmetric=1
DNS (eerste en tweede)

netsh interface ip set dns name=”Local Area Connection” source=static addr=192.168.1.5
netsh interface ip add dns name=”Local Area Connection” addr=192.168.1.6
WINS (eerste en tweede)

netsh interface ip set wins name=”Local Area Connection” source=static addr=192.168.1.21
netsh interface ip add wins name=”Local Area Connection” addr=192.168.1.22
Bovenstaande IP adressen zijn uiteraard fictief en dien je te vervangen voor je eigen waarden.

Alles op DHCP zetten (IP, DNS en WINS)

netsh interface ip set address name=”Local Area Connection” source=dhcp
netsh interface ip set dns name=”Local Area Connection” source=dhcp
netsh interface ip set wins name=”Local Area Connection” source=dhcp
Batchfile

Stel dat we dit nu in een batch file willen gieten dan kun je op de volgende manier iets moois maken waarbij ook alles meteen variabel is.

@echo off
setlocal
cls
rem ** define variables **
set MYADAPTERNAME=”Local Area Connection”
set MYIP=192.168.1.150
set MYSUBNETMASK=255.255.255.0
set MYGATEWAY=192.168.1.1
set MYDNS1=192.168.1.5
set MYDNS2=192.168.1.6
rem ** apply new settings **
netsh interface ip set address name=%MYADAPTERNAME% source=static addr=%MYIP% mask=%MYSUBNETMASK%
netsh interface ip set address name=%MYADAPTERNAME% gateway=%MYGATEWAY% gwmetric=1
netsh interface ip set dns name=%MYADAPTERNAME% source=static addr=%MYDNS1%
netsh interface ip add dns name=%MYADAPTERNAME% addr=%MYDNS2%


Source: http://www.viperlook.com/2010/06/ip-adres-instellen-met-een-batchfile/
 
Wou graag het volgende plaatje toevoegen, maar kan bericht niet bewerken :S

FwJWoZk.png
 
Hoi Abraham,

Ik bedoel dat er geen Bewerk knop bij mijn post staat.
 
Aha, die heb je ook niet.
Als je iets post in dit forumdeel moet het feitelijk af zijn en dus zonder fouten!

a) Kijk eens naar bbEditor: http://www.bleepingcomputer.com/download/search/?keyword=bbeditor

b) in de Zandbak van dit forum kan je alles uittesten.

En waarom staat op dat plaatje de nVidia nForce NetworkController?
Dat kreng is in staat in Windows 7 de netwerkverbindingen a.h.w. te saboteren.

En nog wat
 
Hoi Abraham,

Hartelijk bedankt voor je antwoord.

En over mijn nForce.
Ik gebruik Windows 8, en heb nooit problemen met deze driver gehad :p
Bedoel je dat het dit probleem kan veroorzaken ?
http://support.microsoft.com/kb/979464
 
Nooit problemen mee gehad ;)
 
Dat kan natuurlijk.
Want geen Windows die gelijk is aan een andere.
 
Gelukkig maar ^^
 
Status
Niet open voor verdere reacties.
Steun Ons

Nieuwste berichten

Terug
Bovenaan