cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
514
Views
0
Helpful
4
Replies

how does my machine register with a router?

NetworkNewbie17
Level 1
Level 1

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

Jon Marshall
Hall of Fame
Hall of Fame

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

View solution in original post

burleyman
Level 8
Level 8

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

View solution in original post

4 Replies 4

Jon Marshall
Hall of Fame
Hall of Fame

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

burleyman
Level 8
Level 8

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

Many thanks for the replies. They were very helpful.

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

Mike

Review Cisco Networking products for a $25 gift card