two computer network

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have only one static IP in my office. I want to use two
computers(Linux and Windows) with one pair of keyboard/mouse/screen
through KVM switch.
But I want both computers to be connect to internet. I don't want to
use Router. I heard something like: if I have two network cards in one
machine, I can use "pass through", I am not sure......

Any suggestion would be appreciated. (please tell me what I need to use
in order to set up the network)


Re: two computer network

Quoted text here. Click to load it

Get a router... It's cheap, easy, and won't cause you any headaches.

Any reason why not?

Re: two computer network

Noozer wrote:
Quoted text here. Click to load it

yes, I want one of the machine still entitled my static IP and I can
easily ssh to.
Thank you for the reply!

Re: two computer network

Quoted text here. Click to load it

There are a couple of concepts for routers. DMZ (Demilitarized Zone)
is useful if a server on your local network, does not use a
convenient-to-specify set of ports. This is really an ugly hack,
because it is the equivalent of connecting one PC directly
to the Internet (to be port scanned by weenies). For example,
if your public address is and the two computers
are and, you can have all incoming
requests forwarded to, so in effect that PC has
an address of The other computer continues to
be able to surf.

"Port Forwarding" allows port numbers to be forwarded
to one of your two computers (but not both). For example
you could forward an FTP request on the well-known FTP port
to computer #1, and an HTTP request to a web server on
computer #2. But both computers could not get HTTP
requests at the same time (unless using non-standard ports
for a service, like :80 for one web server and :8080 for
a second web server on the second PC, to be configured on
the web server itself). So you could get port 23
to port 23 and port 80
to port 80. The benefit of port forwarding,
is it only opens your "shields" to attack on those services.
Opening any ports on your router, or via connection sharing
with PCs, still has risks, but port forwarding only
exposes the ports you specify.

"Port Forwarding" is only as good as the protocol design.
Some of the game servers have clumsy port usage, that
makes setup a pain. There are possibly other services
like that as well. My puny router doesn't have enough
port forwarding resources to set up just any arbitrary
service - more modern designs will be better in that
regard. You will become a protocol expert, in the
process of setting up port forwarding. An example of a
nasty thing, would be VOIP, which has call setup and
transport, and for that, there are dedicated routing
devices that do the VOIP first, then pass the rest of
the network traffic to your normal router.

(A comment on VOIP's hunger for port numbers...)

An alternative to a router, is equipping one PC with
two network cards. One card has the public address, the other card points to a subnetwork
of private addresses. Between the two computers, they
look like and to one another.
I suppose there is still the possibility of
NAT/firewall/port_forwarding in that first computer, for
deciding what ports are open to the outside world, what
ports are terminated locally on the first computer, or
port forwarded to the second computer. It just might
be a little harder to configure the ICS (internet connection
sharing) or the level of functionality might be limited
in some way. So a computer with two network cards can
be used, but you might have more research to do, to achieve
the ends you want. (Using a Linux box for routing might
be easier to do, than using Windows, if the config is
at all complicated. I tried ICS and it wasn't too hard
to get the two computers to surf, but I never tried to
do anything more complicated than that.)

The router box has the advantage that both computers don't
have to be running, when using networking. Each computer
connects point to point to the router. Using ICS means
the first computer must be running ICS, in order for the
packets to make it to the second computer. So the router
can save on electricity in the long run (and if you do the
calculation, it doesn't take that many years to pay off).

The router way: ---comp #1
                        +------comp #2

The ICS way (comp #1 has two network cards...) comp #1 ------------------------ comp #2

One potential advantage of the second configuration, if you
are a cheapskate like me, is comp #1 and comp #2 can have
gigabit ethernet interfaces, allowing fast transfer of files
between computers. At one time, finding a gigabit router
would have cost a lot of money. I think there are now
small gigabit routers, so you can still have the advantage
of 10/100bt connection to your cable modem/ADSL modem, while
using gigabit connectivity between local computers.

Good luck,

Re: two computer network

On 10 Jan 2006 16:08:42 -0800, "questions?"

Quoted text here. Click to load it

You don't need two network cards.  

Machine 1 is connected to the modem and get the IP.
It runs a NAT or proxy software, so the other machine is
directed to use Machine 1's LAN IP as the gateway.

Re: two computer network

On Tue, 10 Jan 2006 16:08:42 -0800, questions? thoughtfully wrote:

Quoted text here. Click to load it

kony and Paul provided excellent answers.  Linux would probably be the
better choice using NAT and DHCP instead of the Windows IC Sharing.

My problem with ICS and NAT is the static IP connected machine must be on
for the 2nd machine to connect.   A problem with Windows kills the
whole network when using ICS.  Using a decent router one with a firewall,
DMZ, DCHP, you can shutdown both machines and still remain connected to
the internet.   Routers can be found for a little more than a NIC.

Re: two computer network

Thanks you all for the nice reply

I will try. Appreciate the help!

jaster wrote:
Quoted text here. Click to load it

Re: two computer network

Just exactly why don't you want to use a Router?  That's the easiest and
safest way to do it.


Quoted text here. Click to load it

Re: two computer network

DaveW wrote:
Quoted text here. Click to load it
I don't have a spare rounter in lab but have quite a few spare network

Quoted text here. Click to load it

Site Timeline