Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

how does my machine register with a router?

hi guys,

I am just trying to get a conceptual understanding here. At my workplace, there is a network cable on my desk. When I get to work, I connect this network cable to my laptop. My laptop now has an IP address. I am trying to figure out how it got this IP address? Is it the network cable that has an IP address? Is it some setting on my laptop that decides that when it is connected to a LAN, what IP address it should get? I mean, I know in linux we can do ifconfig eth0, but that confuses me, because what if we choose an IP address that is reserved? Or choose an IP address that belongs to someone else?

thanks.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Hall of Fame Super Blue

Re: how does my machine register with a router?

NetworkNewbie17 wrote:

hi guys,

I am just trying to get a conceptual understanding here. At my workplace, there is a network cable on my desk. When I get to work, I connect this network cable to my laptop. My laptop now has an IP address. I am trying to figure out how it got this IP address? Is it the network cable that has an IP address? Is it some setting on my laptop that decides that when it is connected to a LAN, what IP address it should get? I mean, I know in linux we can do ifconfig eth0, but that confuses me, because what if we choose an IP address that is reserved? Or choose an IP address that belongs to someone else?

thanks.

Your laptop is probably set for DHCP where it asks for an IP address. This request is sent via the network to a DHCP server , usually Windows but it can be Unix or a Cisco router, and this DHCP server allocates you an address for your subnet that is not currently in use.

Jon

Re: how does my machine register with a router?

If your laptop is setup for DHCP which it probably is here is the sequence of events to get you IP address.

When you connect your ethernet cable and turn on the laptop the laptop sees it is setup to use DHCP and needs an IP Address so here is what happens

Laptop sends out a broadcast DHCP discover message with its MAC Address

When the DHCP server sees the discover message it sends out a DHCP offer to the laptop with an IP Address, Subnet Mask, Default Gateway, and any other things defined in the IP Address range being used, and it also sends it own IP Address.

Next the laptop receives the offer and then makes a formal DHCP request for the offered IP address and sends it to the IP address of the DHCP server that made the offer.

Next the DHCP server sends a DHCP Acknowledgement and give the Laptop approval to use that IP address.

Hope this helps.

Mike

4 REPLIES
Hall of Fame Super Blue

Re: how does my machine register with a router?

NetworkNewbie17 wrote:

hi guys,

I am just trying to get a conceptual understanding here. At my workplace, there is a network cable on my desk. When I get to work, I connect this network cable to my laptop. My laptop now has an IP address. I am trying to figure out how it got this IP address? Is it the network cable that has an IP address? Is it some setting on my laptop that decides that when it is connected to a LAN, what IP address it should get? I mean, I know in linux we can do ifconfig eth0, but that confuses me, because what if we choose an IP address that is reserved? Or choose an IP address that belongs to someone else?

thanks.

Your laptop is probably set for DHCP where it asks for an IP address. This request is sent via the network to a DHCP server , usually Windows but it can be Unix or a Cisco router, and this DHCP server allocates you an address for your subnet that is not currently in use.

Jon

Re: how does my machine register with a router?

If your laptop is setup for DHCP which it probably is here is the sequence of events to get you IP address.

When you connect your ethernet cable and turn on the laptop the laptop sees it is setup to use DHCP and needs an IP Address so here is what happens

Laptop sends out a broadcast DHCP discover message with its MAC Address

When the DHCP server sees the discover message it sends out a DHCP offer to the laptop with an IP Address, Subnet Mask, Default Gateway, and any other things defined in the IP Address range being used, and it also sends it own IP Address.

Next the laptop receives the offer and then makes a formal DHCP request for the offered IP address and sends it to the IP address of the DHCP server that made the offer.

Next the DHCP server sends a DHCP Acknowledgement and give the Laptop approval to use that IP address.

Hope this helps.

Mike

Community Member

Re: how does my machine register with a router?

Many thanks for the replies. They were very helpful.

Re: how does my machine register with a router?

Thanks for the ratings and glad we were able to help.

Mike

231
Views
0
Helpful
4
Replies
CreatePlease to create content