|
Sujet : Plusieurs connexions réseau ? |
| huit |
@echo off
ipconfig
echo ###########################################
echo # qu'est ce que je vous sers ? #
echo # #
echo # 192.168.32.222 @.1 .........1 #
echo # 192.168.1.222 @.254 .........2 #
echo # 192.168.0.222 @.254 .........3 #
echo # 10.0.0.222 @.254 .........4 #
echo # autre @.? .........5 #
echo # #
echo ###########################################
echo choix ?
set /p input=
if %input% GEQ 5 goto five
if %input% EQU 4 goto four
if %input% EQU 3 goto three
if %input% EQU 2 goto two
:one
set adr_ip=192.168.32.222
set adr_gw=192.168.32.1
goto end
:two
set adr_ip=192.168.1.222
set adr_gw=192.168.1.254
goto end
:three
set adr_ip=192.168.0.222
set adr_gw=192.168.0.254
goto end
:four
set adr_ip=10.0.0.222
set adr_gw=10.0.0.254
goto end
:five
echo base ?
set /p base=
echo ip ?
set /p ip_tmp=
echo passerelle ?
set /p gw_tmp=
set adr_ip=%base%%ip_tmp%
set adr_gw=%base%%gw_tmp%
:end
echo en cours : %adr_ip% @%adr_gw%
netsh interface ip set address "local" static %adr_ip% 255.255.255.0 %adr_gw% 1
ipconfig ping %adr_gw% -t
pause
|
[:tartalap] |