Link to home
Start Free TrialLog in
Avatar of John Porter
John PorterFlag for United States of America

asked on

Subnet Mask issue

Hello Experts,

I have two subnets: 192.068.0.x and 192.168.4.x.

I would like to set up one Windows 7 computer to be able to access both subnets with one network card.

I thought I had read you can do that by adjusting the Subnet mask. Networking theory is not my strong point.

I have a computer with this address:

IP: 192.168.4.9
SM: 255.255.255.0
DG: 192.168.4.1
DNS: 192.168.4.1

Does anyone know how to adjust the SM of 255.255.255.0 in the TCP/IP configuration above in order to access both subnets (192.168.4.x and 192.168.0.x)?

Thanks!
Avatar of Steven Carnahan
Steven Carnahan
Flag of United States of America image

Mask of 255.255.0.0 would permit it access to 192.168.0.1-192.168.255.255

Do you need to be more restrictive?

Mask of 255.255.248.0 would permit it access to 192.168.0.1-192.168.7.255

You can use an online subnet calculator.
SOLUTION
Avatar of Chris Millard
Chris Millard
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of John Porter

ASKER

Hmm - I never understood that.

So I could have the main page be:
IP: 192.168.0.201SM: 255.255.255.0
DG: 192.168.0.1
DNS: 192.168.0.1


and the second IP scheme on the same Interface be:
IP: 192.168.4.9
SM: 255.255.255.0
DG: 192.168.4.1
DNS: 192.168.4.1

After this is accomplished, this computer will be able to communicate with both LANS (ping, IPCONFIG, ODBC etc)?
Yes - I have a similar configuration on my work PC.
Do you want to be able to communicate with machines on each subnet or combine the subnets into one?

The better question is whether you want any machines in general to communicate with both subnets.

What type of firewall are you using?
Supernetting?
192.18.0.1 - 192.168.4.255 is a really wide range. Okay if you don't have too many devices (not more than 500) as I imagine. ....And yes, the best subnet across the board would be 255.255.248.0
Supernetting combines multiple subnets (vlans) into 1.

You will need to change the subnet on the router also, not just on the computer.

Configuring an alternate address on your computer is okay but your computer can only be on "1 subnet (vlan) at a time in general". Please note the word in general

The solution I think you need may be as simple as creating a route between the two subnets on your router.
I am trying to solve an ODBC issue between two computers on the subnet...

1. Previously I was on a subnet with no Firewall. Address range 192.168.0.x.

ODBC between the two computers works great.

2. I added a firewall to the 192.168.0.x (Made that the "WAN" into the firewall) I gave the LAN an address range of 192.168.4.x

ODBC does not work for some reason in the 192.168.4.x range! I have been beating on this for days and cannot find out why. Maybe there is still a reference somewhere to 192.168.0.x because when I remove the firewall and change TCP/IP properties on the the two computers back to 192.168.0.x, ODBC works again.

I can't change the subnet addressing on the firewall LAN to 1912.168.0.x because it would be the same as the firewall "WAN" (cannot change the WAN to something else for complicated reason right now)

So, essentially, I am trying to keep all computers on the firewall LAN (192.168.4.x) but try and get the ODBC to talk on 192.168.0.x between the two computers using it. This is a SQL Anywhere 11 ODBC.

SO...

If I do as roybridge suggests:

Have the main TC/PIP on the two ODBC computers as:
IP: 192.168.4.x
SM: 255.255.255.0
DG: 192.168.4.1
DNS: 192.168.4.1

but set another IP and subnet mask in Advanced properts on the 2 ODBC computers of:
192.168.0.x
255.255.255

All networking should work on the 192.168.4.x subnet BUT THE QUESTION IS will ODBC work between the two ODBC computers on 192.168.0.x because 192.168.0.x has been set up in TCP/IP advanced on the two ODBC computers (.200 for one and .201 for the other)??
There is either no route or there is a filter (configured or implied) blocking the traffic. What models of switch, router and firewall do you have.
Here is some additional information.

 I have the firewall (SOPHOS UTM) in place. Firewall WAN is 192.168.0.x and firewall LAN is 192.168.4.x.

TCPIP/IP with SQL AnyWhere server:
IP: 192.168.4.11
SM: 255.255.255.0
DG: 192.168.4.1
DNS: 192.168.4.1

added IP and subnet in advanced properties:
192.168.0.201
255.255.255.

0DBC works fine from here (same machine that SQLAnywhere DB lives on). Will connect to 192.168.4.11 or 192.168.0.201!

but if I do the same on a networked computer:

TCP/IP of client computer wants to connect over network with ODBC:
IP: 192.168.4.5
SM: 255.255.255.0
DG: 192.168.4.1
DNS: 192.168.4.1

added IP and subnet in advanced properties:
192.168.0.200
255.255.255.

ODBC FAILS when trying to connect to 192.168.4.11 or 192.168.0.201!

I really think this is a networking issue not an ODBC issue.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The real problem here is this: Cannot create ODBC connection over the network (client to server) but same ODBC connection works fine locally on server.

I have simplified things by taking out the Sophos firewall

1. I took the hardware firewall out of the network
2. I set the client and server up in my office (Clearwire Internet NATs to 192.168.1.x)

SQL Anywhere server TCP/IP: Win7 32bit

IP:   192.168.1.201
SM:  255.255.255.0
DG:  192.168.1.1
DNS: 192.168.1.1

Client trying to access TCP/IP: Win 7 64 bit

IP:   192.168.1.200
SM:  255.255.255.0
DG:  192.168.1.1
DNS: 192.168.1.1

3. Windows firewall is turned off on both computers
4. I cannot telnet into the server SQL Anywhere port from the client like this:

telnet 192.168.1.201 2638

note (I CAN telnet into the server when telnet string shown above is called FROM the server computer)

5. ODBC to the SQL Anywhere DB works from the server computer but WILL NOT work  from the client computer to server computer. Note. I am using the 32 bit ODBC on the client since the server is a 32 bit installation.

Can anyone see what may be going on here?
Can you even ping the server from another machine? A machine connecting to itself might tell you that the server is running, but does not explain why clients can't connect. The problem isn't SQLAnywhere, it's involving the server itself.
Also, could you check to make sure there is no conflict of IP address or machine name? If you disconnect the server from the network and ping that IP, what happens?
- pings work fine to and from server
- No IP conflicts anywhere. I disconnected all computers from network EXCEPT the client and server in question here
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree - what would be the point of the firewall with "parallel" connections to both subnets.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@Saxitalis - Then we need to see how the server is handling incoming connections. You obviously don't even seem to be able to ping it. What happens if you try to trace the route of network traffic between the two machines. Can either machine ping the other?
Ping works fine
can map network drives etc.
Tracert resolves  immediately
So in theory, if the client can ping the server fine, it *should* be able to connect to the server as long as SQLAnywhere is configured right. What type of virus/malware protection is on the server?
ODBC is configured correctly to SQL Anywhere because it works fine set up the same way on the server (not over the network)

I have all antivirus/malware etc. uninstalled from the server right now

Windows firewall is turned off.

Yeah I know it should work "In Theory" but it doesn't
What software is installed on the server? The problem is definitely involving the server, especially since you cannot connect to anything on it from other machines. Just because of a possible issue, could you also try to define some Windows Firewall exceptions? Or just turning the service off completely?
"especially since you cannot connect to anything on it from other machines"

If you reread my previous posts you see that

1. Windows firewall IS turned off
2. I can connect to the server in every way BUT the ODBC
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've requested that this question be closed as follows:

Accepted answer: 0 points for Saxitalis's comment #a39705057
Assisted answer: 84 points for roybridge's comment #a39702352
Assisted answer: 84 points for Akinsd's comment #a39703019
Assisted answer: 83 points for masnrock's comment #a39703403
Assisted answer: 83 points for masnrock's comment #a39705029
Assisted answer: 83 points for masnrock's comment #a39705086
Assisted answer: 83 points for pony10us's comment #a39706274

for the following reason:

Thanks All!
Thanks All! I reset TCP/IP and created a PORT firewall rule and got it working