Två uppkopplingar till samma burk - hur separerar man trafiken

Permalänk
Medlem

Två uppkopplingar till samma burk - hur separerar man trafiken

Hej, har sökt om detta men enbart hittat om personer som vill slåsamman sina förbindelser och få dubbel fart eller personer som inte fått hjälp

Det jag vill är att välja vilken trafik som ska gå vart. Burken kommer ha två anslutningar och jag vill enbart ansluta till burken genom en av ipadresserna den kommer att få och all annan trafik ska gå genom den andra uppkopplingen.

Främst vill jag först pröva i windows xp pro men om det inte finns något alternativ går linux lika bra.

Antar att man måste binda olika program till vilket nic det ska använda? men hur gör man det? guider tack

Permalänk
Medlem

Letar själv efter en enkel lösning på detta, verkar dock inte finns något bra alternativ.

Ivrig på svar jag också

Visa signatur

Gammal geek som lurkar runt

Permalänk
Medlem

Jag vill också veta detta!

Visa signatur

Primär: R9 3900X | ASUS X570-F Gaming | NH-D15 | 64GB@3200MHz | RTX 3080 10GB | Seasonic 850W | Fractal Define R6 |
Gamla bettan: i5 750@3.8GHz | 8GB | HD5770 | Corsair VS 550W | FD R2 |

Permalänk
Medlem

Ett sätt är att "leka" med routing tabellen.

På det interfacet som all övrig trafik skall ut på sätter du default gateway.
På det andra interfacet talar du om till vilka ip-nät trafiken skall gå ut på med route kommandot.

Man kan också "binda" program till en viss interface/ip-adress, men jag har bara gjort det på *nix maskiner, aldrig på windows maskiner.

Visa signatur

Kriga mot min brute: http://gunnard.se.mybrute.com om du vågar :D

Permalänk
Medlem

i cmd: route /help

Manipulates network routing tables. ROUTE [-f] [-p] [command [destination] [MASK netmask] [gateway] [METRIC metric] [IF interface] -f Clears 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. -p When used with the ADD command, makes a route persistent across boots of the system. By default, routes are not preserved when the system is restarted. Ignored for all other commands, which always affect the appropriate persistent routes. This option is not supported in Windows 95. command One of these: PRINT Prints a route ADD Adds a route DELETE Deletes a route CHANGE Modifies an existing route destination Specifies the host. MASK Specifies that the next parameter is the 'netmask' value. netmask Specifies a subnet mask value for this route entry. If not specified, it defaults to 255.255.255.255. gateway Specifies gateway. interface the interface number for the specified route. METRIC specifies the metric, ie. cost for the destination. All symbolic names used for destination are looked up in the network database file NETWORKS. The symbolic names for gateway are looked up in the host name database file HOSTS. If the command is PRINT or DELETE. Destination or gateway can be a wildcard, (wildcard is specified as a star '*'), or the gateway argument may be omitted. If Dest contains a * or ?, it is treated as a shell pattern, and only matching destination routes are printed. The '*' matches any string, and '?' matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*. Diagnostic Notes: Invalid MASK generates an error, that is when (DEST & MASK) != DEST. Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1 The route addition failed: The specified mask parameter is invalid. (Destination & Mask) != Destination. Examples: > route PRINT > route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2 destination^ ^mask ^gateway metric^ ^ Interface^ If IF is not given, it tries to find the best interface for a given gateway. > route PRINT > route PRINT 157* .... Only prints those matching 157* > route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2 CHANGE is used to modify gateway and/or metric only. > route PRINT > route DELETE 157.0.0.0 > route PRINT C:\Documents and Settings\jens>route /help Manipulates network routing tables. ROUTE [-f] [-p] [command [destination] [MASK netmask] [gateway] [METRIC metric] [IF interface] -f Clears 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. -p When used with the ADD command, makes a route persistent across boots of the system. By default, routes are not preserved when the system is restarted. Ignored for all other commands, which always affect the appropriate persistent routes. This option is not supported in Windows 95. command One of these: PRINT Prints a route ADD Adds a route DELETE Deletes a route CHANGE Modifies an existing route destination Specifies the host. MASK Specifies that the next parameter is the 'netmask' value. netmask Specifies a subnet mask value for this route entry. If not specified, it defaults to 255.255.255.255. gateway Specifies gateway. interface the interface number for the specified route. METRIC specifies the metric, ie. cost for the destination. All symbolic names used for destination are looked up in the network database file NETWORKS. The symbolic names for gateway are looked up in the host name database file HOSTS. If the command is PRINT or DELETE. Destination or gateway can be a wildcard, (wildcard is specified as a star '*'), or the gateway argument may be omitted. If Dest contains a * or ?, it is treated as a shell pattern, and only matching destination routes are printed. The '*' matches any string, and '?' matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*. Diagnostic Notes: Invalid MASK generates an error, that is when (DEST & MASK) != DEST. Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1 The route addition failed: The specified mask parameter is invalid. (Destination & Mask) != Destination. Examples: > route PRINT > route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2 destination^ ^mask ^gateway metric^ ^ Interface^ If IF is not given, it tries to find the best interface for a given gateway. > route PRINT > route PRINT 157* .... Only prints those matching 157* > route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2 CHANGE is used to modify gateway and/or metric only. > route PRINT > route DELETE 157.0.0.0 > route PRINT

Visa signatur

Medlem #14

Permalänk
Medlem

I Linux är jag nästan helt säker på att du kan åstadkomma det du vill med hjälp av iproute2. I Windows har jag ingen aning.

Permalänk
Medlem

Nice, tack för svaret på kommandot route.
Mycket intressant!

Visa signatur

Gammal geek som lurkar runt

Permalänk
Medlem
Citat:

Ursprungligen inskrivet av JenzA
i cmd: route /help
text...

Jag är nog lite trög för att förstå hur man använder route kommandot.

I exemplet tex:

> route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2 destination^ ^mask ^gateway metric^ ^ Interface^

Om maskinen med de två nic'n har ip 123.0.0.0 på det ena och 123.0.0.1 på det andra och jag ansluter från 123.0.0.2 till nic ett med ip 123.0.0.0 hur ska det då se ut?

Alltså vad blir min destination respektive gateway? Jag vill att all min trafik ska ske genom 123.0.0.0 och den som utförs från burken ska ske genom 123.0.0.1

Blir det alltså samma ip på destination som gateway? aja är lite för trög för att fatta

Permalänk
Medlem

Du kan inte använda route kommandona om interface ligger på samma subnär, tyvärr.

Det vanligaste i dessa fall är att man binder applikationen mot en viss ip-adress, då svarar den inte på dom andra ip-adresserna.

Hur man gör detta är helt beroende på vilket program det gäller och om det är skrivet så att man kan specificera det.

Visa signatur

Kriga mot min brute: http://gunnard.se.mybrute.com om du vågar :D