Hmm… This is hard to explain I guess.
Let me get some outside sources to help explain what I am getting at here. I will link them at the bottom, then I will try to explain as best I am able. Bear in mind, I am a better network admin than I am a teacher.
The kind of network you are mentioning is called a “Multihomed Network”. Most private networks will all live inside the same subnet. To understand what that means, you need to understand what a subnet mask is, and what it does, but for now, know that yours does not all live in the same subnet, which is why it is “Multihomed.” With that in mind, here is a rambling and horrible attempt at explaining subnets in a hurry.
In addition to your IP address, your network configuration dialog will want to know some other information. Specifically, it wants to know what your “Default Gateway”, and your “Subnet Mask” are. I will now explain what a subnet mask is, and how it works-- Later, I will explain what the default gateway is, and what it does.
First up-- IP network addressing. An IP network has 4 decimal separated numbers, between 0 and 255. The decimals are there for human convenience, as the number is really just a 32bit integer, expressed in binary-- as far as the computer is concerned. The values given between the decimal points is exactly equal to a value that can be stored in 8 bits, which is why each of these values is called an ‘Octet’. There are 4 numbers, and 4X8=32 Eg, a 32bit number. Each computer needs to have a unique number in order for other computers to send it data.
So, what is a subnet mask, and what does it do? Basically, it divides the IP address space up. Most home networks will use a subnet mask of 255.255.255.0 . What does that even mean?
Well-- It means that the full values of the first 3 octets, and none of the last octet, are used to define “Networks”, while the last octet is used to define the members of those networks.
EG, if we had a subnet mask of 255.255.0.0, then the first two octets are used for networks, and the last two octets are used for members of those networks.
Why is that important?
In order for a data packet to get to another “Network”, it has to be routed. This is accomplished with a device that has a connection to both networks, that is used as a middle man to hand that packet across. For devices within a single network, no router is needed. The subnet mask defines how large the local network is.
Now, you might ask why there isn’t just one enormous network, eg, a netmask of 0.0.0.0. (All of the space is used for devices)— The answer, is that when you have lots of devices in the network, the wire gets VERY VERY BUSY. Basically, a network is like an old fashioned telephone partyline. Every device in that network hears every message that is sent across that network, and each device has to wait its turn to send a message. (Or rather, in the case of Ethernet, it has to try to get a word in edgewise when the line is not super busy.) The more devices in the subnet, the busier that wire will be. To mitigate this, and keep traffic more local, subnetting is used so that packets from outer mongolia arent preventing you from using the network. This is why packets that originate in one subnet are not magically transported to all other subnets. They have to be specifically given a “Route” to get there, otherwise the message will never be delivered. This is by design, so that traffic from some distant part of your building does not become a nuisance elsewhere. (It also keeps your neighbor’s internet traffic from beating down on your own home network.) This isolation is very useful, and is the reason for subnet masks existing.
You can then imagine a router being like an old fashioned telephone operator. You have two “Party lines”, each chatting it up, but one of the people in the first party line wants to talk to somebody in the second, but they dont want all of the conversations in both lines to be forwarded, because then nobody could hear anything. So, the router listens in one both lines, listens for the message to the other line, then repeats that message on the other line. The router is actively listening to both networks at the same time, and serves as this seamless middle man to forward the messages.
To make effective use of this, the people in both party lines need to know who is the designated person that forwards their messages. This is what the “Default gateway” is.
Basically, there can be any number of designated routers attached to your network segment, but one of them is the “Default” route. If there is no specified route, and the destination is not inside your local network, the datagram gets sent to this “Default Gateway.” Again, in most home networks, the default gateway is going to be your home router, which sits between your home network, and the internet. The internet is a hugely interconnected mesh of privately owned networks, each designated with ICANN registered network numbers. When you ask for a website from your browser, your browser asks your router for a DNS entry for the web address you have entered, and then your router responds with a global (Internet) IP address. Your computer then sends a data packet to that address, requesting data. Since that address is not inside your local network, and no dedicated route from your network exists to that target network, your packet is forwarded to the default gateway, which then forwards it out to your ISP’s network— where it then gets forwarded to another router… then another router… then another router… until it reaches the target network.
Why is that applicable to you and your situation?
You have multiple networks inside your site. Unless there is a dedicated route between those two networks, then the “Default route” will be selected. However, your router cannot deliver the datagrams being sent to it, and so it discards them!
Messages to santaclaus type situation, as far as your router is concerned.
On a windows box, you can see what the current routing table for your network looks like by issuing
route print
It will give you output that looks like this:
===========================================================================
Interface List
11...d8 cb 8a c0 72 cd ......Realtek PCIe GBE Family Controller
1...........................Software Loopback Interface 1
12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
13...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.20 20
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.0.0 255.255.255.0 On-link 192.168.0.20 276
192.168.0.20 255.255.255.255 On-link 192.168.0.20 276
192.168.0.255 255.255.255.255 On-link 192.168.0.20 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.0.20 276
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.0.20 276
===========================================================================
Persistent Routes:
None
It takes getting used to to read these tables, and ordinary people usually dont need to bother with them. Only people that need to actually administer a network need to mess with these things, and most people are not network administrators, so it is OK if this confuses the bejeebus out of you. That said, I will try to explain what this table says.
First, is the global context. Here is where the default gateway rules the roost. It says "For any network, ANYWHERE (netmask of 0.0.0.0), not specifically defined in this list, forward the datagram to the default gateway. (In this case, 192.168.0.1) Since I am using a windows workstation to view the local routing table (of that computer!), the interface it uses to talk to the default gateway is listed (192,168.0.20), which is the IP address of that workstation.
Next up, are the 3 " global Loopback" routes. These are special. You can basically ignore them-- they are used for diagnostic purposes and local services, and basically are just an alias for “This computer”, or the “local host”. Anything you send to that network never makes it onto the wire, and instead just gets delivered right back to you instantly.
After that, we start getting into actual routes.
The first one, is the default rule for any packet destined for the 192.168.0.X network. It has a network mask of 255.255.255.0, which sets the size of the network portion of the segment, and any message being sent to a machine in that network will go out on the interface at 192.168.0.20. The next two are the “Local Loopback” and “local broadcast” routes
Then you have another set of loopback routes after that. (note how they reference 127.0.0.0, and the current system’s IP address!)
And then you have the global broadcast routes at the bottom.
You might notice that I do not have any routes pointing to another private network. This is because I do not have a multihomed configuration.
Since you DO have a multihomed configuration, your router needs to have routes between these networks, in order to deliver messages.
These would be defined similarly to the default gateway, but would instead look something like this:
192.168.0.0 255.255.255.0 On-link 192.168.0.20 276
192.168.1.0 255.255.255.0 On-link 192.168.1.20 276
This would be for a router that has interfaces at both 192.168.0.20 and at 192.168.1.20. That is two network cards, each with its own IP address, attached to the appropriate networks.
Since such a route is defined, when a packet destined for one of those networks is presented to the router, it knows what interface to forward it out of, and all is golden with the world.
Now, like I said earlier in the previous post-- Some corporate networks PURPOSEFULLY keep segments from sending messages to each other, while still having a route out to the internet from both. This is used to keep say-- People waiting in the hospital lobby, looking at youtube videos, from being able to see the medical records computers in the hospital’s primary network, and vice-versa, while both can still reach the internet. Since both are private networks, there is no “return route” from the internet side back into the other private network, so packets can never get across. Like I said, this is often PURPOSEFUL. Medium to large enterprises will have a special facility, called the Network Operations Center, or NOC, that handles all these routes, router configurations, IP address assignments, etc inside the enterprise-- They get REALLY REALLY mad if you go behind their back and start plugging things in, or making routes between networks they want isolated. You did not specify if this is a multihomed HOME network, or if this is a multihomed CORPORATE network. If it is the latter, you MUST go through your NOC, and more than lilely, they are gonna want to know why you are plugging in a strange server that they do not know about. Trust me, it is best to stay on their good side.
If you are working with a multihomed HOME network, then I presume that you get the glorious task of being the “NOC” yourself.
You might find the following article on multihomed networks useful.