Eu uso tabelas de roteamento para isso no Linux, existe algo similar no Windows?
O Windows tem o comando rota :
ROUTE.exe
Manipulate network routing tables. Route packets of network traffic from one subnet to another by modifying the route table.
Syntax
Display route details:
ROUTE [-f] PRINT [destination_host] [MASK subnet_mask_value] [gateway] [METRIC metric] [IF interface_no.]Add a route:
ROUTE [-f] [-p] ADD [destination_host] [MASK subnet_mask_value] [gateway] [METRIC metric] [IF interface_no.]Change a route:
ROUTE [-f] CHANGE [destination_host] [MASK subnet_mask_value] [gateway] [METRIC metric] [IF interface_no.]Delete a route:
ROUTE [-f] DELETE [destination_host] [MASK subnet_mask_value] [gateway] [METRIC metric] [IF interface_no.]Key
-f- Clear (flush) the routing tables of all gateway entries.If this is used in conjunction with one of the commands, the tables are cleared prior to running the command.
destination_host- The address (or set of addresses) that you want to reach.
-p- Create a persistent route - survives system reboots. (not supported in Windows 95)
subnet_mask_value- The subnet mask value for this route entry.This defines how many addresses are there.
If not specified, it defaults to 255.255.255.255.
gateway- The gateway.
interface- The interface number (1,2,...) for the specified route. If the optionIF interface_nois not given, ROUTE will try to find the best interface available.
metric- The metric, ie. cost for the destination.
Origem rota
Leitura Adicional
- Um índice A-Z da linha de comando do Windows CMD - Uma excelente referência para todas as coisas relacionadas à linha do Windows cmd.
- route - Manipule as tabelas de roteamento de rede. Rotear pacotes de tráfego de rede de uma sub-rede para outra, modificando a tabela de rotas.