Suppose there is a setup like below:
------
-INTERNET-
------
|
|
|
|
___(ETH1)___
| |
(SUBNET 1)---------------(ETH0)| ROUTER |(ETH2)---------------(SUBNET 2)
|____________|
(ETH3)
|
|
|
|
[SWITCH]
/ | \
/ | \
/ | \
/ | \
PC#1 PC#2 PC#3
My first questions are regarding the router. I am under the impression that each router interface has its own IP address and subnet mask, both of which are given to them by the ISP. For example, ETH3 could have the IP: 192.168.1.20/24. This means that the network ID (id of the subnet) is 192.168.1, and thus all servers in the subnet connecting to the ETH3 interface will have IP's of the form 192.168.1.XX. Is all this correct?
Next, I am a little uncertain as to how a packet is routed from the internet to, say, PC #3. Suppose PC#3 has the IP 192.168.1.45 and makes a request to www.facebook.com. Is the following correct? PC#3 is part of the 192.168.1 subnet (which connects to the 192.168.1.20 ETH3 interface). So, www.facebook.com sees a request is made from 192.168.1.20 (ETH3 interface). It sends a response to this request, which is eventually routed to ETH1 and then to ETH3. Finally, when the response reaches the switch, the switch reads the MAC address in the response packet header, and sees that PC#3 made the request. Thus, it sends the packet to PC#3.
If this is correct, I am slightly confused as to why it is necessary for PC#3 to have its own IP address in the first place, if the only information used to get the packet from www.facebook.com to PC#3 is the IP address of the router interface the PC is connected to + the MAC address of the PC.
Finally, I have a question about the ethernet interfaces. Are ETH0, ETH1, etc. just generic names given to ethernet ports? So, if my laptop has an ethernet port, will that also often be referred to as ETHO? In the same vein, are switch ethernet ports also enumerated in the same way (ETH0, ETH1, ETH2).
Any clarification on this would be greatly appreciated. Thanks!