A router with two private network

Hi,

I am doing Penetration testiong pre requisites course.
In that Link Layer Devices & Protocols - Study Guide section, it is given this slide.


From my understanding Routers route the traffic from network to another or in a way I think it will be okay to say router to router. Every network will be having a router, so If I am sending a request to ine.com, request will be sent as a packet from my device to router, when it reaches router, it does NAT and send the packet to nearby public network, from their it will routed to another public network until it reaches ine.com. In the picture I have attached there is two private network attached to a single router, is this possible? I have tried connecting my laptop through ethernet and wifi. In both case It was assigned same network. So I am confused whether it is possible to have two private networks under a router.

The function of a router is primarily to route the traffic to the respective network. Assume you have a router with 4 ports. Each ports represents a unique network (lets say 1.1.1.0/24, 2.2.2.0/24,3.3.3.0/24,4.4.4.0/24. )
when a traffic comes to port 1, the router determines whether it should be forwarded via port 2,3 or 4 based on the routing table.

You can have multiple networks(public or private) in a router. And each port in a router is supposed to be different network. You won’t see two ports in a router configured with the same network. (exceptions are there like etherchannel, Switching ports etc).

Regarding your wifi/lan example, you can actually set up two DHCP service in the router (if it supports), one for LAN and another for the WiFi. Also NAT is required only if you want to hide your IP or you want to connect to the public internet.

1 Like

I don’t use Ethernet usually. So In that case suppose If my router has 4 ethernet ports(switches), that means I will be having 4 different LAN right? Since I use WIFI, every devices will be in same broadcast domain. Due to that I felt it strange.

Thanks for the information
One doubt

You can have multiple networks(public :point_left:or private) in a router

But the router will be having one and only Public network/IP (from ISP) right and all the networks(LANs) will be behind the router.

No. You might be trying to relate with your router setup at home. In that case, yes, one interface is public and the other interface is private. It also performs the NAT.
The home router usually comes with one WAN interface and multiple LAN ports. All the LAN ports will be in the same network. They are actually switching ports and belongs to the same broadcast domain.

But in an enterprise environment, you have a lot of different networks and there will be multiple routers. Router actually doesn’t care whether the IP is private or public. It only does the routing. If it knows the next hop and the route, it forwards the packet. Just that.
Organizations might have multiple links from different service providers for redundancy and could be connected to the same router.

cisco
The above image is a Cisco Router. It has 4 ports, and you can configure it as you wish. it can be 4 public IP or private or mix. Doesn’t matter. Also In-case need more ports, it is possible to buy extra modules and populate the slots.

Also FYI, some latest home routers comes with dual WAN ports as well. Some may need multiple internet connections at home and they can make use of it.

1 Like