-2

enter image description here

I have one router which connects to two different networks as shown in the diagram . I have few silly doubts. Please help me.

For every NIC the router will have different IP. Lets assume we have two private networks ( Here the image shows network id's which are actually not private but lets assume they are private ) connected to the same router. So the router will have two ip for each network as the network id will be different.

Then my question is which one is public ip (which is visible over internet) in this case? Or there is another network(our ISP) to which the router should be connected and that interface will have the public IP for both the private network.I think each router will have at max one public ip even if it is connected to many private networks. I am confused about number of public IP in this case.

But we can see in this diagram the router does have two public IP for two different networks or they are not actually public IP? I am just claiming it to be public IP as these IP address can not be used for private IP allocation.

If a router is connected to another router then the interface connecting to both will have what public IP address? Previously it was the same network ID that router uses but in this case it is connected to another router.

I understand there may be lots of wrong things I would have said in those above lines but badly need help to get into it.

3

How many public IP can a router have?

There is no limit, other then those imposed by limitations of the software and hardware of a specific router.

  • If two private networks are connected to one router then it will have public ip for both or only one? If two then for each network it will have separate NAT. is this true? – ViX28 Sep 22 '16 at 17:55
  • 1
    No, those things really have nothing to do with each other. Routers have publicly routable IPs when you assign them. You can have as many private subnets behind as your want. How you NAT private to public is very flexible, but may be limited by your software/hardware. – Zoredache Sep 22 '16 at 17:58
  • An enterprise router doesn't really distinguish between internal and external ports. It just has a bunch of ports on it, usually labeled eth0, eth1, eth2, etc. It's up to the user to decide which ones get connected to the public internet and which ones are used for private networks, and then set up rules that dictate how traffic can flow. – Charles Burge Sep 22 '16 at 21:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.