Solved

interesting question - no gateway

Posted on 2010-08-21
21
298 Views
Last Modified: 2012-05-10
Ok may sound weird , but here it goes...


Can i access and communicate with a machine in a different network if I have a router in my network , BUT my machine doesn't have a gateway ?

Is that possible ?
0
Comment
Question by:its_ns_04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 8
  • 3
  • +1
21 Comments
 
LVL 13

Expert Comment

by:Surone1
ID: 33492814
yes. the gateway setting just determines how you reach the internet
0
 
LVL 24

Accepted Solution

by:
B H earned 250 total points
ID: 33492843
if your machines are on the same subnet, yes... they'll arp eachother and find eachother.

but if one is on the opposite side of a router, you need either a gateway entry on both machines, or a static route on both machines.

the gateway setting just says "and everything else goes to here"
a static route entry would say "for this guy, go to [some gateway]"
0
 
LVL 1

Author Comment

by:its_ns_04
ID: 33492881
In this scenario, there are two machines A and B, but on different subnets... B is well configured with its gateway, however, there is no static route or gateway configured in A.

There is a router D which connects both LANS of A & B . Now how about in this case, will A be able to communicate with B ?
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 1

Author Comment

by:its_ns_04
ID: 33492885
is there any way which makes A be able to communicate with B (without configuring static route and gateway in A)
0
 
LVL 24

Expert Comment

by:B H
ID: 33492932
we need ip addresses to say for sure... but...

if A is 192.168.0.5, 255.255.255.0
if D is 192.168.0.1, 255.255.255.0
if B is 192.168.1.5, 255.255.255.0
if the router for machine B is 192.168.1.1, 255.255.255.0

then you'll need a static route on both machines, like:
for machine A:  route add 192.168.1.0 MASK 255.255.255.0 192.168.0.1 METRIC 2
for machine B:  route add 192.168.0.0 MASK 255.255.255.0 192.168.1.1 METRIC 2

add a -p switch in there to make it stick forever

0
 
LVL 24

Expert Comment

by:B H
ID: 33492934
this is assuming there's a vpn tunnel handled by the routers as you seemed to indicate
0
 
LVL 1

Author Comment

by:its_ns_04
ID: 33493214
ok it goes like this
A is 192.168.1.2, 255.255.255.0
 B is 192.168.2.2, 255.255.255.0
D is a router with two interfaces 192.168.1.5/32 and 192.168.2.5/32

A's gateway is not defined and there is no static route in A either. Can A still communicate with B somehow via D ?
0
 
LVL 24

Expert Comment

by:B H
ID: 33493516
If they are different interfaces in the router, you'll need to create a firewall rule to allow them to talk, then set both subnets to 255.255.0.0
0
 
LVL 1

Author Comment

by:its_ns_04
ID: 33494803
where is again "firewall" coming here into the picture ?
0
 
LVL 1

Author Comment

by:its_ns_04
ID: 33494808
ok. I think still I can make A talk with B without configuring gateway of A.

I can enable "proxy ARP" in the router D and with this feature, I will be able to talk with B from A, even though A's gateway is not configured. This is what I was looking for.

0
 
LVL 24

Expert Comment

by:B H
ID: 33495732
the router D ....  i mentioned firewall because you mentioned multiple lan interfaces...

usually, a router would have one wan interface and one lan interface (with 4 physical ports)

however, if your router has for example two different lan interfaces like lan1 and lan2 ... then that router would need to be configured to allow traffic between lan1 and lan2.  by default, lan1 could access wan1... lan2 could access wan1...but lan1 and lan2 wouldn't be able to see each other.

proxy arp would allow them to see eachother, but you might still need a firewall rule in the router to allow the actual traffic.

gateways still wouldn't be required on the network cards, as long as the router can handle the two interfaces properly
0
 
LVL 1

Author Comment

by:its_ns_04
ID: 33496267
router's job is to route traffic :)
0
 
LVL 24

Assisted Solution

by:B H
B H earned 250 total points
ID: 33496288
yeah but it's job is also to police the interfaces that it manages.

if your two lan networks are connected via a switch, OR the same interface of the router, then the router doesn't care.

but - if your networks have to traverse two different interfaces on the router, then the router has to be configured to allow or deny that
0
 
LVL 26

Expert Comment

by:Fred Marshall
ID: 33496723
It seems that nobody asked: Why no gateway entry on A?
0
 
LVL 1

Author Comment

by:its_ns_04
ID: 33510608
well, this is just a test scenario. And the main question here is, is it possible not to have gateway defined in A and still make things work
0
 
LVL 24

Expert Comment

by:B H
ID: 33514603
router's job is to route traffic - across interfaces that ARP cannot traverse.

so - same subnet, same switch/interfce things will work without a gateway (locally).  but if they are on different interfaces in the router, the router needs to route (or allow ARP between the interfaces)
0
 
LVL 26

Expert Comment

by:Fred Marshall
ID: 33515599
The fundamental question to your original post and to this clarification "the main question here is, is it possible not to have gateway defined in A and still make things work" the answer is "no".
That's because in the original post you say:
"Can i access and communicate with a machine in a *different* network .. "
Not only does this require a router but it requires a gateway entry at both ends.

The details of how the router is interconnected with the computers, how the routers routing table is configured goes beyond this.

Or, you might put routes in all the computers that need to communicate so that the packets go out on the wire even though they aren't on the same subnet.

route -p add
[destination network IP] mask [destination network subnet mask] [gateway ip address]

The gateway IP address can be the NIC address and then the packets will just hit the wire as if there would be a destination connected to the wire.  You add this route at both ends....

0
 
LVL 1

Author Comment

by:its_ns_04
ID: 33555068
i can make it work without gateway defined in A and I have recently made it work :)
0
 
LVL 24

Expert Comment

by:B H
ID: 33555376
thats great - did any of our comments help?
0
 
LVL 26

Expert Comment

by:Fred Marshall
ID: 33555417
*How* did you make it work?
0
 
LVL 1

Author Closing Comment

by:its_ns_04
ID: 33567038
to some extent, it was correct
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PXE boot across multiple different subnets or VLAN ? 4 128
Using WIndows 7 to route 389 (ldap) 3 84
Non Compliant port group ? 2 82
Vlan to Vlan communication 9 134
I know for anybody starting from Beginner to Expert in Networking knows what OSI model. But this tutorial is for freshers or those who are new to networking world. Why I am putting OSI in such simple and compact manner is because it enables you to k…
Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question