Router IP Address basics


I have gotten fairly deep into the CCNA lessons on this website, and am still feeling uncomfortable with some of the basics of networking.

Would you be able to go into more detail on the following?

  • On a layer 2 switch, the ports / interfaces do not have IP addresses, but on a layer 3 switch sometimes they do. Why would we configure these, and would they be on the same subnet?
  • On a home router, I understand that one interface would be the “default gateway”, and would be assigned the IP address that a host device would contact, to reach the router. There would also be another port with a different IP address, that’s given by the Internet Service Provider, to reach the internet.
    For a router for a business though, such as a rack-mounted one, what types of interfaces can we expect to see? (Serial, ethernet, etc.) Would each of these interfaces have its own IP address? Would they be put on different subnets? Why would we assign one address versus another?

If there was a diagram I could look at with IP addresses, and why they were assigned the way they were, based on subnets, etc., that would be extremely helpful. (I’m a visual learner)

Thank you!

Hello Konrad

I’ll do my best to clarify as much as possible for you!!

The role of a router is to receive IP packets and route them from one subnet to another based on routing rules that exist within the router (statically assigned routes or routes learned from routing protocols such as OSPF or EIGRP). As such, a router will have multiple layer 3 interfaces, each one assigned an IP address on a different subnet. It will receive a packet on one interface and route it out another. Router interfaces cannot be assigned IP addresses in the same subnet. If you attempt to configure two interfaces on the same subnet, it will give you an error. Such a configuration defeats the purpose of the router, which is to route packets from one subnet to another.

Layer 2 switches have switchports, or Layer 2 ports. These don’t have IP addresses and cannot be assigned IP addresses, because a layer 2 switch cannot route packets.

Now on a layer 3 switch, it is possible to configure what is known as a “routed port”. When configured, such a port would behave exactly the same as a port on a router, with an assigned IP address in a unique subnet (unique compared to other IP addresses assigned to interfaces on the local device).

The types of interfaces depend upon the type of connections an enterprise needs. Is it serial, fiber, xDSL, Ethernet, or wireless? What technology is being used at that location? Depending upon this, you can procure the appropriate router with the right interfaces. Now as is the case with all routers, as we mentioned, each interface must have an IP address in a different subnet.

I hope this has been helpful!


Hi Laz,

Thank you, this is definitely helpful! Would you be able to possibly add this to one of the introductory networking sections / lessons? For a beginner, this information is very important, for us to grasp the concepts of how switches and routers work.

Thank you,

Hello Konrad

We’ve started creating a repository of small notes and snippets of information such as this. I’ve added this information to the repository, and you can find them here:

Thanks for the feedback, it’s always beneficial in order to make the site better…

I hope this has been helpful!


Thank you for your help Laz.

1 Like