1

This question may be too naive to be Google-able, but I haven't found anything.

I'm curious what happens when I go in to a Client device like my personal Laptop and add a Static IP (as opposed to doing so via the Router itself).

How does the Router learn about this new IP? Does something with Routing Tables change that get propagated (not sure if my Laptop would have one of its own, I'd assume not, and just Gateway)?

Thanks!

EDIT:
I also wish to add that I'm considering to create my own DNS Server (for learning purposes), and intend to give it a Static IP (via netplan).

So please also consider Server-specific Static IP cases (which I understand tend to be one of the main use-cases for Static IPs).

2
  • 1
    "How does the Router learn about this new IP?" It does not; routers only care about networks, and it gets those from directly connected networks, statically configured routes, or through a routing protocol. "Does something with Routing Tables change that get propagated (not sure if my Laptop would have one of its own, I'd assume not, and just Gateway)? Routers may use routing protocols to exchange routing information with other routers. Your laptop does have a routing table, but it does not exchange routing information with a router.
    – Ron Maupin
    Aug 19, 2022 at 0:32
  • "So please also consider Server-specific Static IP cases (which I understand tend to be one of the main use-cases for Static IPs)." Questions about host/server configurations and protocols above OSI layer-4 are off-topic here. We can answer questions about IP theory, but not about a specific host/server implementations.
    – Ron Maupin
    Aug 19, 2022 at 1:08

2 Answers 2

1

How does the Router learn about this new IP?

Only when some packet originating from that IP hits the router, ie. when it tries to get forwarded to another network, or when there are additional functions on the router that are addressed by the packet.

However, if the new IP doesn't belong to the router's subnet (on that interface), the above won't happen.

Does something with Routing Tables change that get propagated?

No. Routing tables don't change by themselves. Entries are either automatic (for subnets directly attached to the router), static (manual addition by an admin), or learned through a routing protocol like OSPF or BGP.

What you use the new IP address for is irrelevant. If it's a private IPv4 address intended to be accessible from the public Internet you'd need destination NAT aka reverse NAT aka port forwarding, of course.

2

It depends.

If you configure an address in the same subnet as the router interface, AND you configure the gateway address to be the router interface address, everything will work just fine.

If you do anything else, then you will likely fail to communicate with anything.

If your router interface doesn’t have an address, then nothing will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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