как создать bat файл

пишите каждую команду с новой строки, например так (например - настройка статической маршрутизации ipv6):

netsh interface ipv6 set interface interface="subnet1" forwarding=enabled advertise=enabled
netsh interface ipv6 set interface interface="subnet2" forwarding=enabled advertise=enabled
netsh interface ipv6 add route prefix=FEC0:0:0:1::/64 interface="subnet1" publish=yes
netsh interface ipv6 add route prefix=FEC0:0:0:2::/64 interface="subnet2" publish=yes
netsh interface ipv6 add route prefix=::/0 interface="subnet2" nexthop=fe80::a00:27ff:fea9:bc9f publish=yes
pause

а для второго компа такой вот перекрёстный батник - настройка статической ipv6 маршрутизации:

netsh interface ipv6 set interface interface="subnet2" forwarding=enabled advertise=enabled
netsh interface ipv6 set interface interface="subnet3"forwarding=enabled advertise=enabled
netsh interface ipv6 add route prefix=FEC0:0:0:2::/64 interface="subnet2" publish=yes
netsh interface ipv6 add route prefix=FEC0:0:0:3::/64 interface="subnet3" publish=yes
netsh interface ipv6 add route prefix=::/0 interface="subnet2" nexthop=fe80::a00:27ff:fe75:ccae publish=yes
pause

адреса интерфейсов были получены с помощью следующей команды

Comments

vedro-compota's picture

netsh interface ipv6 set interface interface="subnet1" forwarding=enabled advertise=enabled
netsh interface ipv6 set interface interface="subnet2" forwarding=enabled advertise=enabled
netsh interface ipv6 add route FEC0:0:0:1::/64 interface="subnet1" publish=yes
netsh interface ipv6 add route FEC0:0:0:2::/64 interface="subnet2" publish=yes
netsh interface ipv6 add route ::/0 interface="subnet2" nexthop=fe80::a00:27ff:fea9:bc9f publish=yes
pause

_____________
матфак вгу и остальная классика =)

vedro-compota's picture

netsh interface ipv6 set interface interface="subnet2" forwarding=enabled advertise=enabled
netsh interface ipv6 set interface interface="subnet3"forwarding=enabled advertise=enabled
netsh interface ipv6 add route prefix=FEC0:0:0:2::/64 interface="subnet2" publish=yes
netsh interface ipv6 add route prefix=FEC0:0:0:3::/64 interface="subnet3" publish=yes
netsh interface ipv6 add route prefix=::/0 interface="subnet2" nexthop=fe80::ffff:ffff:fffd publish=yes
pause

_____________
матфак вгу и остальная классика =)

vedro-compota's picture

netsh interface ipv6 set interface "subnet2" enabled enabled
netsh interface ipv6 set interface "subnet3" forwarding=enabled advertise=enabled
netsh interface ipv6 add route FEC0:0:0:1::/64 interface="subnet2" publish=yes
netsh interface ipv6 add route FEC0:0:0:2::/64 interface="subnet3" publish=yes
netsh interface ipv6 add route ::/0 interface="subnet2" nexthop=fe80::ffff:ffff:fffd publish=yes
pause

_____________
матфак вгу и остальная классика =)

vedro-compota's picture

 
netsh interface ipv6 show routes
ping fe80::a00:27ff:fe60:600a
tracert -d fe80::a00:27ff:fe60:600a
pause

_____________
матфак вгу и остальная классика =)

vedro-compota's picture

netsh interface ipv6 set interface "subnet2" siteid=1
netsh interface ipv6 set interface "subnet3" siteid=1
pause

_____________
матфак вгу и остальная классика =)