Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

DHCP and IP questions(IPv4 for now)


  • Please log in to reply
3 replies to this topic

#1 crossbone

crossbone

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:11:54 PM

Posted 18 March 2017 - 10:06 AM

I'm trying to learn about networking on my own and right now, mainly from watching youtube so it's easy to get confused. I have a regular home set-up with one modem and one wi-fi router which is the only gateway. I'm trying to understand the process by which my computer gets its IP address each time I turn it on and my questions:

1. I'm running Win 7 on my computer and in my network setting, I have DHCP enabled and an IP assigned. But who really assigns it? My computer or router? If it's the former, how does it avoid conflicting with other hosts on the same network? Also, when I checked my IP address online eg whatismyipaddress.com, it gives a different value. Does that mean I'm using two layers of DHCP services ie one on my router or computer and the other an external server which my guess is my ISP's?

 

2. for an external DHCP server eg provided by an ISP, can the same IP be leased to more than one host that are on different networks at the same time eg say you have 3 homes, A,B,C, where each have their own modem, modem A, modem B and modem C(all by the same ISP) and their own computer, computer A, computer B, computer C, then is it possible to have each computer, namely computer A, computer B and computer C gets assigned the same IP addr at the same time? I mean afterall, their modems have different IP addrs.



BC AdBot (Login to Remove)

 


#2 Wand3r3r

Wand3r3r

  • Members
  • 2,027 posts
  • OFFLINE
  •  
  • Local time:09:54 PM

Posted 18 March 2017 - 12:26 PM

My computer or router?

 

Where is the dhcp server?  Answer: on the router

 

 it gives a different value

 

has nothing to do with dhcp.  You should get different values for local ip address vs your public ip address.

 

question #2 .  A, B and C each have their OWN dhcp server.  Yes they could all assign a lan pc the same ip address because they are all NOT on the same lan.

Do a tracert google.com for a better view of how you go from lan to wan and the internet



#3 Kilroy

Kilroy

  • BC Advisor
  • 3,378 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Launderdale, MN
  • Local time:11:54 PM

Posted 20 March 2017 - 02:00 PM

I don't know what videos you're watching, but they seem to be skipping a bit.

 

Public IP address (whatismyIP.com) -> Router WAN (Wide Area Network) port -> Router LAN (Local Area Network) port -> Your computer.

123.123.123.123                                                                                                                              192.168.1.1                               192.168.1.2

 

Dynamic Host Configuration Protocol (DHCP)

 

1.  In your network your router is also functioning as your DHCP server.  If there is no DHCP server your machine will generate an IP address that starts with 169.254.x.x, with the two x being random numbers.  While there is a chance that two computers on the same network without a DHCP server would generate the same two random numbers it is very unlikely.

 

Your public IP address, 123.123.123.123 in my example above comes from your ISP.  When your router connects to the ISP it pulls an address via DHCP from the ISP server.  Provided DHCP is turned on for the router, devices you connect to the router will get non-routable IP addresses (192.168.x.x or 10.x.x.x) from the router.

 

2.  No, IP addresses must be unique for every device on the network.  Your router is on two networks, the ISP on the WAN side and your private network on the LAN side.  Every computer if connected directly to the modem would have a different IP address in the public range, 123.123.123.124, 123.123.123.125, and 123.123.123.126, for example.  However, if they all had routers they could have the same IP, since the router would put them on a different network.

 

Think of a network as a city and the IP address as a house address.  You can have the same house address as long city is different 123 Main, Chicago and 123 Main, Detroit.  If you have the same house address in the same city then you have problems.



#4 crossbone

crossbone
  • Topic Starter

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:11:54 PM

Posted 31 March 2017 - 01:05 AM

Thanks, Kilroy. That is a very good explanation.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users