• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 536
  • Last Modified:

Basic Routing question

I am trying to setup a network in my office.basically I have two networks.

one is  192.168.0.0
other one is 192.168.1.0
 I want to be able to connect and  ping from one network to another.How to do it with route command.?

man route is confusing me much.Sorry for asking very basic question.I am a noice to this area

 
0
palanisaravanan
Asked:
palanisaravanan
  • 4
  • 2
1 Solution
 
JivkoCommented:
There is only one thing to configure in your case - enable IP Forwarding :

echo "1" > /proc/sys/net/ipv4/ip_forward

Then just set up two IP addresses :
192.168.0.x and 192.168.1.x

The routes are connected and do not need to be set manualy.

Regards
0
 
palanisaravananAuthor Commented:
Ref:Jivko
where and how to set up the two IP adddresses.Can u explain it bit more detail
0
 
palanisaravananAuthor Commented:
I have only one netowork interface connected to the machines
0
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

 
palanisaravananAuthor Commented:
I will explain the scenario.So that u will get a clear picture

I have two networks in my work place.
1. Network one
192.168.0.0---It has got two machines
one with IP adddress 192.168.0.1
Another one with IP address 192.168.0.2
(netmask 255.255.255.0)

2.Network two
10.1.1.0 -It has got two machines
one with IP address 10.1.1.1
Another one with IP address 10.1.1.2
(netmask 255.0.0.0)
  All the machines have only one network interface.

I want to link both the networks so that I can ssh and ping form both the sides.How to do that?.What are the steps involved in this work.Can any one explain in in detail.Thx in advance
0
 
JivkoCommented:
Are the all machines in same network segment/hub/switch ?
If yes , on your machine , let say 192.168.0.1 just type:

route add 10.1.1.0 dev eth0

now you should be able to ping 10.1.1.1 and 10.1.1.2 from 192.168.0.1
0
 
palanisaravananAuthor Commented:
yes all the machines are in the same network.I did the same thing.But i could not ping it.It is failing
0
 
MercantilumCommented:
route add -net 10.0.0.0 netmask 255.0.0.0 dev eth0

if you need first to reach a gateway:

route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.0.111

(111 being your router, or the host to route to the other net, if any)
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now