ping question
macwhizard
Member Posts: 66 ■■□□□□□□□□
in CCNA & CCENT
sorry if this have been asked
If i have 2 networks on 2 routers and use the same class ip addr and default mask for internal networks (say 192.168.5.0).
eg
if i ping x.x.x.170 from network A, it will find that in network C, right ?.
ok, but if i ping x.x.x.150 from network A, will it also find x.x.x.150 in network C ?. Is there a way to do this ?.
If i have 2 networks on 2 routers and use the same class ip addr and default mask for internal networks (say 192.168.5.0).
eg
network A
network C
192.168.5.0 /24
192.168.5.0 /24
hosts x.x.x.2 to 150
hosts x.x.x.2 to 170
if i ping x.x.x.170 from network A, it will find that in network C, right ?.
ok, but if i ping x.x.x.150 from network A, will it also find x.x.x.150 in network C ?. Is there a way to do this ?.
Comments
-
BubbaJ Member Posts: 323Network A and Network C are the same network. The way to make that work is bidirectional NAT.
-
Silver Bullet Member Posts: 676 ■■■□□□□□□□Looks like you are going to have IP address conflicts. From what you wrote you are assigning range xxx.xxx.xxx.2 thru .150 on both and connecting them together.
Edit: You could do something like .2 thru .150 for network A and .151 thru .254 for network C to avoid the conflicts. -
sprkymrk Member Posts: 4,884 ■■■□□□□□□□He would still need to change the subnet mask. If computer A is 192.168.5.10/24, and he tries to ping computer B at 192.168.5.250, it will never make it to the default gateway (the router). Since it thinks (via the subnet mask) that computer is on the same subnet, it will simply broadcast an ARP asking "who has 192.168.5.250? Tell 192.168.5.10".
To make it work you need to subnet properly on the client. Johan has made a nice subnet claculator so I don't have to figure it out in this post.All things are possible, only believe. -
Webmaster Admin Posts: 10,292 AdminSubnetting the class C network to accomodate for both networks probably won't be a workable solution, because he has max 148 hosts on one network and max 168 on the other, he likely won't have enough addresses when subnetting the class C address and create two subnets with 126 hosts each.
NAT would work, but the only imo proper solution in this scenario is changing the class C network for one of the networks. With the number of hosts, and assuming DHCP is used and clients in other networks are configured to use DNS to contact server in the network, it's not 'that' much work.if i ping x.x.x.170 from network A, it will find that in network C, right ?.
ok, but if i ping x.x.x.150 from network A, will it also find x.x.x.150 in network C ?.
Don't get me wrong, but based on your questions, I suggest reading a bit more about the function of routers and basics of IP addressing. For example:
www.techexams.net/technotes/networkplus/networkcomponents.shtml
www.techexams.net/technotes/networkplus/tcpipsuite.shtml
www.techexams.net/technotes/networkplus/internetconnections.shtml
www.learntosubnet.com -
BubbaJ Member Posts: 323Webmaster wrote:NAT would work, but the only imo proper solution in this scenario is changing the class C network for one of the networks.
-
macwhizard Member Posts: 66 ■■□□□□□□□□great, keep them coming. my question is, are there any way to find the target host using a router ID+hostname+ip addr or MAC addr combination on any operating systems out there.Webmaster wrote:Don't get me wrong, but based on your questions ...
i will, thanks. -
sprkymrk Member Posts: 4,884 ■■■□□□□□□□macwhizard wrote:great, keep them coming. my question is, are there any way to find the target host using a router ID+hostname+ip addr or MAC addr combination on any operating systems out there.Webmaster wrote:Don't get me wrong, but based on your questions ...
i will, thanks.
route add -p 192.168.5.151 mask 255.255.255.255 192.168.5.1
Assuming that 192.168.5.151 is on another subnet and the Gateway/router is 192.168.5.1
If you had several computers on a seperate subnet, you could just change the mask IP to the appropriate octet:
route add -p 192.168.5.129 mask 255.255.255.128 192.168.5.1
This is assuming you split your network into 2 halves, but if that's the case it would be a simpler matter just to assign the correct subnet mask to your machines than to crerate static routes on them. Basically you have to somehow tell the computers where the other computers are. Are you doing this just as a lab/concept/practice, or do you have some practical need for this setup?All things are possible, only believe. -
macwhizard Member Posts: 66 ■■□□□□□□□□sprkymrk wrote:... Are you doing this just as a lab/concept/practice,do you have some practical need for this setup?forbesl wrote:... he doesn't know how to even begin configuring NAT.
how did you know that ? well, i've always used automatic NAT config, think it is time to learn the hard way. problems of using world's easiest computer. 100% brian damage -
forbesl Member Posts: 454macwhizard wrote:how did you know that ? well, i've always used automatic NAT config, think it is time to learn the hard way. problems of using world's easiest computer. 100% brian damage
I call it "techie-itis". It begins with a very simple question and evolves into a massive thread with 50 different opinions.
P.S.....I'd go with what webmaster suggested in his reply. -
Webmaster Admin Posts: 10,292 AdminBubbaJ wrote:Webmaster wrote:NAT would work, but the only imo proper solution in this scenario is changing the class C network for one of the networks.
Keep it up.... -
Webmaster Admin Posts: 10,292 Adminforbesl wrote:I call it "techie-itis". It begins with a very simple question and evolves into a massive thread with 50 different opinions.
-
forbesl Member Posts: 454Webmaster wrote:On the other hand, there is often more than one 'solution', and then different opinions (though luckely often based on experience) can become very interesting to hear/read.
For the experienced tech, varying opinions on the solution to a problem is a good thing. One can "weed out" the solutions that won't work many times by merely by looking at them, and then try the other ones.
For the inexperienced, however, it can often be very confusing. -
Danman32 Member Posts: 1,243I don't see how even NAT will work, if all the hosts on network A are to address all hosts on network C and vice-versa unless you have a 1-1 IP map to IP addresses on the 'public' network, since you have a duplication of IP addresses, as well as duplication of network. To make NAT work, you'd need a whole new set of IPs on the public side that can be mapped to the private side, so you might as well reorganize the networks to be distinct and unique to begin with.
-
Webmaster Admin Posts: 10,292 Adminforbesl wrote:For the inexperienced, however, it can often be very confusing.
-
Webmaster Admin Posts: 10,292 AdminDanman32 wrote:I don't see how even NAT will work, if all the hosts on network A are to address all hosts on network C and vice-versa.
www.cisco.com/warp/public/556/3.html