I apologize for the possible offtop, but can someone help me with the integration of 2 networks. The programmer himself, the issues of network administration, I know only superficially.


The bottom line: There is an enterprise, it has 2 local networks: 192.168.0.0 and 192.168.1.0. Each exists separately. There is a PC with two network adapters (192.168.0.240 and 192.168.1.240) that is connected to both networks running Windows 7. It is necessary that through this PC one PC from the network 192.168.1.0 with ip 192.168.1.2 can access the PC from networks 192.168.0.0 with ip 192.168.0.2. I combined the interfaces 192.168.0-1.240 into the bridge, and assigned the bridge 2 ip addresses: 192.168.0.240 and 192.168.1.240. Registered on all PC routes

route add -p 192.168.0.0 mask 255.255.255.0 192.168.0.240 route add -p 192.168.1.0 mask 255.255.255.0 192.168.1.240 

As a result, all PCs with a bridge are pinged from a PC, and addresses 192.168.0.240 and 192.168.1.240 from a PC on networks (both addresses are from both PCs), but they are each other (192.168.0.2 <=> 192.168). 1.2) do not see. What could be the problem? Thank.


Previously, I had the opportunity to solve the problem of networking, and the bridge to windows worked perfectly.

    2 answers 2

    In order for the computer to become a router, you must enable IP Forwarding in the driver settings. On Windows, this is done in the registry key HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters , the value is IPEnableRouter . True, it is written in the instructions for WinXP, I personally did not check whether this setting was sufficient.

    But in the bridge you have combined the interfaces in vain. The bridge and routing are mutually exclusive: the bridge connects the two networks on the data link layer, and the routing - on the network.


    Alternatively, leave the bridge and merge the subnets. For example, assign in both segments of the address from the subnet 192.168.0.0 or leave it as it is - but assign the subnet mask 255.255.254.0. Routes in this mode are not needed.

    • It does not interfere. On one channel can sit arbitrarily networks and routers, respectively. They work at different levels, as you correctly noted. Just this bridge is clearly superfluous - Sergey

    I agree with Paul, put a mask overlapping both networks if you use a bridge. If you want full routing, then install some software that supports a software router such as Usergate or Traffpro, there are a lot of them.

    • What is your Windows out of the box not full? Usergate is a gateway, for simple routing it is redundant. - Pavel Mayorov
    • the answer to the first question is for everyone. This is not a router, and arguing is pointless. Even in Unix it is necessary to put additional paetas as a rule for full-fledged work as a router. I just gave an example of possible programs, and not in such a case I do not insist on using it, especially since it is paid. - Alexey Maksimenko
    • That in linux, that in freebsd, that on Windows in order to use them as a router on a fixed route table, it’s enough to do exactly one thing: enable ip forwarding. - Pavel Mayorov