Options

ping question

macwhizardmacwhizard Member Posts: 66 ■■□□□□□□□□
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
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

  • Options
    BubbaJBubbaJ Member Posts: 323
    Network A and Network C are the same network. The way to make that work is bidirectional NAT.
  • Options
    Silver BulletSilver 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.
  • Options
    sprkymrksprkymrk 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.
  • Options
    Silver BulletSilver Bullet Member Posts: 676 ■■■□□□□□□□
  • Options
    WebmasterWebmaster Admin Posts: 10,292 Admin
    Subnetting 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 ?.
    No, and no. Because the target address is in the same IP network as the source, the source won't send it to a router (e.g. it's default gateway) to be forwarded to the other network.

    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:
    icon_arrow.gifwww.techexams.net/technotes/networkplus/networkcomponents.shtml
    icon_arrow.gifwww.techexams.net/technotes/networkplus/tcpipsuite.shtml
    icon_arrow.gifwww.techexams.net/technotes/networkplus/internetconnections.shtml
    icon_arrow.gifwww.learntosubnet.com
  • Options
    BubbaJBubbaJ Member Posts: 323
    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.
    In a case like this, NAT should only be a temporary solution. This is like combining two different groups that have the same addressing. Use NAT to gain time while coming up with a new address scheme for the combined entity.
  • Options
    macwhizardmacwhizard 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.
  • Options
    sprkymrksprkymrk 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.
    On Windows or Linux machines, you can enter static routes, though this can be a cumbersome and tedious method to say the least, unless you have a small number of workstations, or a way to script the solution. On a Windows box, you could enter static routes to individual machines like this:

    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.
  • Options
    forbeslforbesl Member Posts: 454
    BubbaJ wrote:
    Use NAT to gain time while coming up with a new address scheme for the combined entity.
    For some reason I believe that if he has basic IP addressing issues such as this, he doesn't know how to even begin configuring NAT.
  • Options
    macwhizardmacwhizard Member Posts: 66 ■■□□□□□□□□
    sprkymrk wrote:
    ... Are you doing this just as a lab/concept/practice,
    yes. the best way to practice is to messup everything in the first place, and sort it out. icon_wink.gif
    do you have some practical need for this setup?
    i think yes. this set up worked on old System 7.x.x (Macintosh OS, a decade ago), using Apple talk zones & localtalk bridge software, if i remember correctly.

    forbesl wrote:
    ... he doesn't know how to even begin configuring NAT.

    how did you know that ? icon_wink.gif 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 icon_eek.gif
  • Options
    forbeslforbesl Member Posts: 454
    macwhizard wrote:
    how did you know that ? icon_wink.gif 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 icon_eek.gif
    Hopefully you didn't take that the wrong way. Just an observation from content of your original question.

    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.
  • Options
    WebmasterWebmaster Admin Posts: 10,292 Admin
    BubbaJ 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.
    In a case like this, NAT should only be a temporary solution. This is like combining two different groups that have the same addressing. Use NAT to gain time while coming up with a new address scheme for the combined entity.
    Looks like you are starting another unnecessary controverse again. Just because some one replies and adds something after you replied doesn't mean the person doesn't agree with you, or is even replying to what you said. Yes, you could use NAT as a temporary solution, but the word 'temporary' itself already shows the proper solution is to re-address one of the networks. That's why I said "NAT would work, but imo the proper..."

    Keep it up....
  • Options
    WebmasterWebmaster Admin Posts: 10,292 Admin
    forbesl wrote:
    I call it "techie-itis". It begins with a very simple question and evolves into a massive thread with 50 different opinions.
    icon_lol.gif Well, I hope it's not contagious... One of the things I like most about IT is that in many cases opinions don't matter, only the facts, which are 'researchable'. 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.
  • Options
    forbeslforbesl Member Posts: 454
    Webmaster 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.
    Agreed to a certain extent. :)

    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.
  • Options
    Danman32Danman32 Member Posts: 1,243
    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 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.
  • Options
    WebmasterWebmaster Admin Posts: 10,292 Admin
    forbesl wrote:
    For the inexperienced, however, it can often be very confusing.
    Very true. The inexperienced should treat 'it' kinda like a CompTIA exam: go for the obvious, common, basic, or the standard solution and leave the advanced and 'clever' solutions out of it until the former are very clear.
  • Options
    WebmasterWebmaster Admin Posts: 10,292 Admin
    Danman32 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.
    NAT could work because Cisco NAT devices can work with a DNS server to intercept and modify requests from hosts to hosts that have same IP, or from the same range. Pinging an IP address in the other network obviously won't work.

    icon_arrow.gifwww.cisco.com/warp/public/556/3.html
Sign In or Register to comment.