I have two different network and have two router between them router 1 has ip 192.168.1.1 and router 2 has ip 192.168.2.1 i already defined route between them but they didn't ping with each other

it would help if you can provide more details. If you have two routers seperating two subnets, then you should have three subnets in total. For example, one subnet on each side of each router and a subnet between the routers.

For you to be able to route packets between the two "exterior" subnets each router needs to know about those remote subnets.

If you want to upload a diagram with IP information, that would be helpful.

I was wondering which routing protocol are you using? Is there a default route in the routing table?

it is worth nopting that the address 192.168.1.1 is very often used by modern adsl modems and thus wont respond to a direct ping as they are often protected against that (from the adsl line.
M

if the routers are directly connected normally it wud not require routing. normally a router keeps its directly information of its directly connected networks

what type of routers are that.

if its cisco .

example:

R1 fastethernet0/0 is connected to R2 fastethernet 0/0

then
R1#
interface fa0/0
ip add 192.168.1.1 255.255.255.0
no shut

R2#
interface fa0/0
ip add 192.168.2.1 255.255.255.0
no shut

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.