public/private IPs and subnet masks

  • Thread starter Thread starter biff
  • Start date Start date
B

biff

Say you have a computer on IP 132.132.132.6 with subnet mask 255.255.255.0
and gateway 132.132.132.254

You want to setup your new network printer with a private IP. The printer
gets a private IP of 10.78.22.130. What do you put into the printer for a
subnet mask? Do you put 255.255.255.0? What would you put for the gateway
on the printer since it is a private IP but you want it to communicate with
your public IP computer?
 
Hi
You can not Mix Public and private IPs on the same Network.
Maintaining a network of Public IPs is a big mistake to begin with since it
is Not safe.
Get yourself a Router and configure a cohesive Private network.
Jack (MS, MVP-Networking)
 
biff said:
Say you have a computer on IP 132.132.132.6 with subnet mask 255.255.255.0
and gateway 132.132.132.254

You want to setup your new network printer with a private IP. The printer
gets a private IP of 10.78.22.130. What do you put into the printer for a
subnet mask? Do you put 255.255.255.0? What would you put for the gateway
on the printer since it is a private IP but you want it to communicate with
your public IP computer?


Are all the computers and printer on the same network, using the same
switches? If so, are you just trying to "hide" the printer from the
other computers on the network? If the latter is true you should use
132.132.132.254 for the gateway on the printer. Of course this does not
prevent others from using the printer if they find the address and set
up their computer to access that printer.
 
Thanks for the post Michael. Yes all the printers and computers are on the
same network although there are a couple of subnets on the network. The
printers are private to conceal their presence.

I wonder if it matters which subnet gateway the printer should get once the
printer is assigned a private IP?
 
Thanks for the post Michael.  Yes all the printers and computers are onthe
same network although there are a couple of subnets on the network.  The
printers are private to conceal their presence.

I wonder if it matters which subnet gateway the printer should get once the
printer is assigned a private IP?

Both the PCs and the printer should be on the same IP subnet using the
private IP addresses. Then the subnet mask will be the same and use
the exact same gateway IP address (your router's IP.)

Most general private networks tend to be less than 254 unique IP
address assigned devices.
 
Thanks for the post Michael. Yes all the printers and computers
are on the same network although there are a couple of subnets on
the network. The printers are private to conceal their presence.

I wonder if it matters which subnet gateway the printer should get
once the printer is assigned a private IP?

:

In order for this to work, the NIC on your computer must have two IP
addresses assigned to it -- one on the 132.132.132.x subnet and one
on the 10.78.22.x subnet. The 132.x.x.x address will give your
computer connectivity to your local network and router, and the
10.x.x.x address will provide connectivity to your printer.

Windows does allow more than one IP address to be assigned to a NIC
but only when DHCP is disabled. So to do this, you will have to go
to the Network control panel for your NIC, then:
Properties-> Scoll down & Double-click on "TCP/IP" in the window ->
Click "Use the following IP address" and manually set up your IP
Address in the 132.x.x.x subnet. It goes without saying that you
should avoid any IP addresses "owned" by a DHCP server. After that,
click "Advanced" button and in the "IP Address" window, click "Add"
and enter an additional address for your computer in the 10.x.x.x
subnet. This will configure your computer.

The printer configuration subnet mask should match the subnet match
you configured on your computer above for the 10.x.x.x subnet and
both computer & printer must be in the same logical subnet. The
gateway setting on your printer does not matter because there is no
gateway on your 10.x.x.x subnet that it can use -- IOW, the printer
can only be accessed by computers in the same physical subnet and
thus a gateway setting is moot (such is the nature of private
addresses).

FWIW: While this will work, it is Mickey-Mouse at best and a down-
right nuisance if your computers ever need DHCP.

HTH,
John
 
John said:
In order for this to work, the NIC on your computer must have two IP
addresses assigned to it -- one on the 132.132.132.x subnet and one
on the 10.78.22.x subnet. The 132.x.x.x address will give your
computer connectivity to your local network and router, and the
10.x.x.x address will provide connectivity to your printer.

Windows does allow more than one IP address to be assigned to a NIC
but only when DHCP is disabled. So to do this, you will have to go
to the Network control panel for your NIC, then:
Properties-> Scoll down & Double-click on "TCP/IP" in the window ->
Click "Use the following IP address" and manually set up your IP
Address in the 132.x.x.x subnet. It goes without saying that you
should avoid any IP addresses "owned" by a DHCP server. After that,
click "Advanced" button and in the "IP Address" window, click "Add"
and enter an additional address for your computer in the 10.x.x.x
subnet. This will configure your computer.

The printer configuration subnet mask should match the subnet match
you configured on your computer above for the 10.x.x.x subnet and
both computer & printer must be in the same logical subnet. The
gateway setting on your printer does not matter because there is no
gateway on your 10.x.x.x subnet that it can use -- IOW, the printer
can only be accessed by computers in the same physical subnet and
thus a gateway setting is moot (such is the nature of private
addresses).

FWIW: While this will work, it is Mickey-Mouse at best and a down-
right nuisance if your computers ever need DHCP.

HTH,
John
Are you sure about this? I print all the time to a printer on a
different subnet 75 miles away without having to set up two IP
addresses. The computer and printer need to know how to get to the
other subnet but that is handled by the gateway.
 
Are you sure about this? I print all the time to a printer on a
different subnet 75 miles away without having to set up two IP
addresses. The computer and printer need to know how to get to the
other subnet but that is handled by the gateway.

Sure, you can print to a remote printer miles away -- but that printer
must be set up with an IP address that is routable. On the internet-
at-large, you cannot route to a private IP address (10.x.x.x or
192.168.x.x for example) which is what you specified that you want to
do.

A VPN connection could accomplish this by tunneling the data to the
destination subnet - but you didn't metion that you were using VPN.

Alternatively, if you have a 2nd router on the subnet that can handle
traffic to private 10.x.x.x destinations, then you could manually
modify the routing table on your Windows machine to match your network
topology.

HTH,
John
 
Back
Top