How does the computer know who is the router

1

I was wondering, when I plugs in the ethernet cable, how does my computer know that this is a router that just plugged in?

I mean, the router is allways listening and waiting for new connections, so this is how he knows, but i am not sure how does the computer know that, how could he know that what have just plugged into it was the router?

xsss

Posted 2017-08-18T11:54:01.003

Reputation: 23

Answers

2

The computer knows it through the parameter called "Default Gateway" in the IP configuration.

Such configuration can be done manually in the computer (Static IP) or it can be obtained through a DHCP server (Dynamic IP).

In the typical home configuration the DHCP server is the same device as the router, but in corporate networks usually there are different devices for each task.

The network administrator defines the IP address of the router and then proceeeds to configure it in the DHCP server, so it can be assigned automatically. Otherwise, if there is not a DHCP server then he manually configures it on each computer.

jcbermu

Posted 2017-08-18T11:54:01.003

Reputation: 15 868

Hey, Thanks for the quick replay, but who defines that default getway and its value on my own computer? – xsss – 2017-08-18T11:57:26.473

The network administrator assigns an IP address to the router and then proceeeds to configure it in the DHCP server or put it manually on each computer. – jcbermu – 2017-08-18T11:58:42.157

Do some further research on DHCP - there are MANY resources available - plenty with diagrams to show the flow of the process... – Kinnectus – 2017-08-18T12:17:28.220

Ohh, i think got it(fix me if i'm wrong), so my computer is running something called DHCP client, and this service is communicating with the router DHCP server to get an IP address in the local network, Thank You – xsss – 2017-08-18T12:19:09.340

That's right. There is a service called DHPC Client that runs when the computer starts.

– jcbermu – 2017-08-18T12:45:50.423