What Is My IP Address? - IP Address Lookup, Bandwidth Speed Test, IP Info, plus more

Go Back   What Is My IP Forum > IP and Network Questions > Networking Questions

Notices

Networking Questions Any questions about network setup, management, etc. should be posted here.

Closed Thread
 
Thread Tools Display Modes
Old 11-16-2009, 05:32 AM   #1
sankar.84
Member
 
Join Date: Nov 2009
Posts: 1
sankar.84 is on a distinguished road
Default Ping loopback

Let me explain the topology first.
I have 2 routers directly connected named R1 and R2.
Please see below for the config of the same. I have not configured ip address on f0/0. I made it as no shut and also configured the default route with exit interface f0/0. I'm not able to ping from R1 to 2.2.2.2. I understood that i need ip address for f0/0 on both the routers. Where this address come into picture while pinging from R1 to 2.2.2.2?

R1
===
conf t
int f0/0
no shut
exit
int l0
ip add 1.1.1.1 255.255.255.255
exit
ip route 0.0.0.0 0.0.0.0 f0/0

R2
====
conf t
int f0/0
no shut
exit
int l0
ip add 2.2.2.2 255.255.255.255
exit
ip route 0.0.0.0 0.0.0.0 f0/0

Please help me in addressing this issue.
sankar.84 is offline  
Old 11-16-2009, 10:40 AM   #2
wimiadmin
Administrator
 
wimiadmin's Avatar
 
Join Date: May 2008
Location: Pigeon Forge, TN
Posts: 858
wimiadmin is a splendid one to beholdwimiadmin is a splendid one to beholdwimiadmin is a splendid one to beholdwimiadmin is a splendid one to beholdwimiadmin is a splendid one to beholdwimiadmin is a splendid one to beholdwimiadmin is a splendid one to behold
Default

You assigned each router its own IP block. 1.1.1.1 and 2.2.2.2 each with a subnet of 255.255.255.255. You won't be able to ping back and forth.

If R1 were 1.1.1.1/255.0.0.0 and R2 were 1.2.2.2/255.0.0.0 then you would be able to ping back and forth. Each router would be separate from each other but with the subnet being 255.0.0.0, it means they'll be part of the same network.

Not sure if this really answers your question.

What are you trying to accomplish?

Perhaps telling us what you're trying to do might enable us to give you better assistance.
__________________
Brian
Please Search Before Posting
wimiadmin is offline  
Old 11-16-2009, 05:56 PM   #3
aprotosimaki
Member
 
Join Date: Sep 2009
Posts: 18
aprotosimaki is on a distinguished road
Default

Hi,

I am not sure what router you are using but all routers must obey the rules of networking regardless of their make or brand.

The routers must share at least one common subnet or nothing will work. As you have them configured they are not meeting this minimal condition.

So your two routers must be in the on the same subnet, although as routers they can have other subnets hanging off them. In addition they need to have default gateways set up (but see below for exceptions).

Let us say that R1 has two interfaces, R1-0 and R1-1.

Let us say that R2 has two interface, R2-0 and R2-1.

Let us also say that R1 plugs into R2 using R1-0 and R2-0.

So the first step is to make sure that R1-0 and R2-0 are on the same subnet: 192.168.1.0/24

Let us assign R1-0 the ip address 192.168.1.254 with a netmask of 255.255.255.0

Let us assign R2-0 the ip address 192.168.1.253 with a netmask of 255.255.255.0

As this point R1 can ping R2 because they are on the same subnet.

Now you let us add some subnets to these routers.

On R1-1 add the IP address 192.168.2.1, netmask 255.255.255.0.

On R2-1 add the IP address 192.168.3.1, netmask 255.255.255.0

So now we have this topology:

192.168.2.1 [R1] 192.168.1.254 <-----> 192.168.1.253 [R2] 192.168.3.1

1. If you log into R1 can you ping 192.168.1.253?
Yes you can.

2. If you log into R1 can you ping 192.168.3.1?
The chances are that you cannot (unless you are using a protocol the discovers network routes such as OSPF or if these routers like Linux OSs 'route' some packets via the kernel). But I shall assume you are not using OSPF and that these routers are not Linux-based routers.

So in order to get R1 to ping 192.168.3.1 you need to add to the routing tables on R1 a rule that effectively says 'send all packets for the 192.168.3.0/24 subnet to 192.168.1.253'. This can be done using a default gateway or you can use a static net route. Since you mentioned gateways, let us add a default gateway to R1:

0.0.0.0 192.168.1.253

3. Can you ping 192.168.3.1 from R1 now?

No, you cannot and the reason is that R2 does not know where to send the return packets.

So now you need to add a default gateway on R2 as well:

0.0.0.0 192.168.1.254

4. Now you should be able to ping 192.168.3.1 from R1.

And if you add a machine to the 192.168.2.0/24 subnet using the following TCP/IP settings:

IP: 192.168.2.200
MASK: 255.255.255.0
GW: 192.168.2.1

this machine too will be able to ping 192.168.3.1.

And if you add a second machine to the 192.168.3.0/24 subnet using these settings:

IP: 192.168.3.200
MASK: 255.255.255.0
GW: 192.168.3.1

this machine will be able to ping the other machine at 192.168.2.200.

Now the actual steps for doing this on your router maybe different but in theory this should all work as described above, assuming I have not made any typos.
aprotosimaki is offline  
Old 11-17-2009, 11:41 AM   #4
systemslave
Member
 
Join Date: Nov 2009
Posts: 22
systemslave is on a distinguished road
Default

You have detailed answers. I am going to give you the quick and nasty concept. Routers span networks. With two routers you would generally have three networks.

Network1--router1--Network2--router2--Network3

Network 1 and 3 are where computers generally live. Network 2 is a seperate network connecting your routers. When router 1 sees a packet on network 1 that belongs on network 2 or network 3 it passes it over to network 2. When router 2 sees a packet on network 2 that belongs on network 3 it passes it over to network 3.

BTW that is a dramatic simplification.
systemslave is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:49 PM.


What Is My IP - IP Command Lines - What is an IP Address - Speed Test - IP Address FAQ

Need IP address location detection service? Get it from IP2Location.com now.

Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright - WhatIsMyIP.com