1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Automatic IP Address

Discussion in 'Networking (Hardware & Software)' started by joezep1, 2004/11/11.

Thread Status:
Not open for further replies.
  1. 2004/11/11
    joezep1

    joezep1 Inactive Thread Starter

    Joined:
    2004/06/18
    Messages:
    85
    Likes Received:
    0
    Hi All,

    My 2nd PC on my Home Network has the incorrect IP address.
    For Some reason, unknown to me it is getting a windows generic
    address and I cannot get out to the internet. The IP is 169.254.86.125.
    This is what I know or have done which has not helped. Another nic card.
    Another lan cable.Tried my 2nd computer cable into the router port where the non-working PC is and it worked fine. I get a response pinging localhost or 127.0.0.1. Trying to ping Any other IP...including the router (192.168.0.1)
    i get error IP Destination Host unreachable. Losing patience, Not sure how, why or what shut this one down. Please help....God Bless !!!

    JJ
     
  2. 2004/11/11
    BillyBob Lifetime Subscription

    BillyBob Inactive

    Joined:
    2002/01/07
    Messages:
    6,048
    Likes Received:
    0
    I am assumming that both PCs are connected directly to the Router.

    Make sure the Internet Connection properties are set to "Never dial a Connection "

    And The LAN setting is set to Auto Detect.

    Shutdown all machines and the Router.

    Turn the Router on and then one machine at a time.

    A power outage did it to me awhile back. PLus other nasty things related to the LAN. I had to recheck settings on all three machine & the Printer.

    BillyBob
     

  3. to hide this advert.

  4. 2004/11/11
    Dez Bradley

    Dez Bradley Inactive

    Joined:
    2004/10/11
    Messages:
    246
    Likes Received:
    0
    HI.

    Firstly i am going to assume you are using Windows 2000 or XP. If you are using any other version of Windows, locations of these settings will vary and additional settings may be necessary. If you need help with other versions, specify what version of Windows you are using in your post.

    Because you have told me your router has an IP of 192.168.0.1, i also assume it is the internet gateway and the connection wont need to use ICS (internet conenction sharing) to work on other PCs.

    Do this and all should be ok.

    Go to Start-Control Panel-Network Connections

    Right click on your LAN connection and choose Properties

    Go into the settings for TCP/IP

    Select Use the following IP Address and type the following
    192.168.0.2 (or any number replacing the "2 ", that isnt in use by a PC or your router, up to 254)

    Subnet Mask is 255.255.255.0

    Default Gateway (is your router's IP) 192.168.0.1

    Primary DNS server is 192.168.0.1 also. If this doesnt work, find out your ISP's Primary and Secondary DNS IPs and fill them in here. If you use 192.168.0.1 as Primary DNS, leave the Secondary DNS blank.

    FILL OUT THIS SECTION ON ALL PCS ON YOUR NETWORK, of course each having a unique IP address in the same range.

    Thats all you should have to do in this area.

    If it still doesnt work,

    Turn DHCP OFF in your router

    Check your firewall software is allowing traffic in TCP range 192.168.0.1 to 192.168.0.254

    Make sure in Internet Options in Control Panel, on the Connections tab, Never Dial a Connection is checked, and via the LAN Settings button on the same page, make sure Auto Detect Settings is UNCHECKED

    Hope this helps.
     
  5. 2004/11/11
    BillyBob Lifetime Subscription

    BillyBob Inactive

    Joined:
    2002/01/07
    Messages:
    6,048
    Likes Received:
    0
    Why ???

    I have to keep it checked in order for things to work.

    One day this machine may be 198.162.1.101. the next day it may be 192.168.1.102.

    As I mentioned before. Every once in a while I have to power the Router down and let things get readjusted.

    BB
     
  6. 2004/11/11
    Dez Bradley

    Dez Bradley Inactive

    Joined:
    2004/10/11
    Messages:
    246
    Likes Received:
    0
    Just from my experience so far, in most cases it works best with this setting unchecked. My ISP even specifies it must be unchecked for it to work. I have tested this theory and confirmed it is true in my case and that of most of my clients.

    This setting is mostly used for networks with an internet proxy server available locally.
     
  7. 2004/11/11
    Dez Bradley

    Dez Bradley Inactive

    Joined:
    2004/10/11
    Messages:
    246
    Likes Received:
    0
    If the poster of this thread is unsure what to do with this conflicting advice, he/she can simply try both ways and see what result works best for them. Obviously in some cases this setting is needed to be on, or they wouldnt put it in Windows, just from my own experience more often it is needed to be off. In a lot of cases it wont make a difference if it is on or off.
     
  8. 2004/11/11
    Scott Smith

    Scott Smith Inactive Alumni

    Joined:
    2002/01/12
    Messages:
    1,950
    Likes Received:
    4
    Might want to give this great little tool a try.

    http://www.softpedia.com/public/cat/12/4/12-4-47.shtml


     
  9. 2004/11/12
    BillyBob Lifetime Subscription

    BillyBob Inactive

    Joined:
    2002/01/07
    Messages:
    6,048
    Likes Received:
    0
    Dez Bradley

    Thank you.

    That is what makes this job so tough at times

    One way works for you.
    The other way works for me.

    And then. Many times the ISP says another way.

    ssmith10pn

    Your suggestion fits too.

    BillyBob
     
  10. 2004/11/12
    BillyBob Lifetime Subscription

    BillyBob Inactive

    Joined:
    2002/01/07
    Messages:
    6,048
    Likes Received:
    0
    I was just doing some re-reading and saw this

    I just checked to be sure and I have those set to AUTO also.

    BillyBob
     
  11. 2004/11/12
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    Perhaps it would help if I explained how IP addressing works.

    IP addresses only really make sense when they are considered together with their subnet masks. The subnet mask is used to split the IP address into two parts:
    1. the subnet number - the number refering to a particular sub-network of points on the network. A network may have one subnet - where all the computers belong to the same network group - or many each with their own subnet number.
    2. and the node number - a node is a point on the network. It is a useful term as it does not differentiate between what is connected to that point. Computers, printers, servers, even routers are all nodes on the network.
    In basic networks the subnet mask consists of either 255 or 0. So the common masks are 255.0.0.0, 255.255.0.0, and 255.255.255.0. They show how to split the IP address into its subnet and node components. Basically the portions of the IP address corresponding to 255 portions of the mask make up the subnet number and the portions corresponding to the zeros make up the node number. Perhaps easier to show by example:

    Address: 192. 168. 1 . 1
    Mask: 255. 255. 255. 0

    Separates to:

    Subnet: 192. 168. 1. 0
    Node: 0. 0. 0. 1

    ----------------------

    Address: 10 . 123. 44 . 100
    Mask: 255. 255. 0 . 0

    Seperates to

    Subnet: 10 . 123. 0 . 0
    Node: 0 . 0 .44 . 100

    ------------------------

    For two computers to talk directly to one another, they must have the same subnet number, but different Node numbers. So

    Address: 192.168.1.1
    Mask: 255.255.255.0
    Subnet: 192.168.1.0
    Node: 0.0.0.1

    will talk directly to

    Address: 192.168.1.2
    Mask: 255.255.255.0
    Subnet: 192.168.1.0
    Node: 0.0.0.2

    Same subnet, different node.

    but will not talk directly to:

    Address: 192.168.0.3
    Mask: 255.255.255.0
    Subnet: 192.168.0.0
    Node: 0.0.0.3

    Different subnet.

    Nor will it talk to:

    Address: 192.168.1.1
    Mask: 255.255.255.0
    Subnet: 192.168.1.0
    Node: 0.0.0.1

    Same subnet, but same node number - this will cause an address conflict.

    So on the most basic of networks you have to manually set all you IP addresses to fit this scheme. So lets say we chose to have a subnet of 192.168.0.0 using a subnet mask of 255.255.255.0, we will assign each computer in turn with:

    192.168.0.1/255.255.255.0
    192.168.0.2/255.255.255.0
    192.168.0.3/255.255.255.0
    192.168.0.4/255.255.255.0
    192.168.0.5/255.255.255.0

    all the way up to

    192.168.0.254/255.255.255.0

    However, because there is a problem of conflicting addresses, it can be a headache keeping track of which IP address belongs to which PC (or strictly node). To overcome this an automated system was developed: initially this was BOOTP which was superceded by DHCP.

    With DHCP the IP address is given out automatically. You connect the PC to the network and it will broadcast out saying "I need an Address ". A DHCP server listens for these calls and responded by giving the PC a spare IP address from it's list. The server keeps a tally of which addresses it has given out so that it doesn't give the same address out to two nodes.

    Therefore, you can use automatic or manual IP addressing. They achieve the same result (giving each node its own IP address that complies with the rules set out above).

    However, avoid using both for the same address range as this will result in conflicts. If you go the manual/static route, turn DHCP off on your router.
     
  12. 2004/11/12
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    Oh and Billybob, there is something peculiar about your router's DHCP behaviour.

    Is not normal behaviour. The DHCP service should recognise that it is the same PC connecting to it and requesting an IP the next day, and give that PC the same IP again unless you have the lease time set to a very short time (it is commonly set to 3 to 5 days). Also the IP should expire releasing the assignment at the end of the lease period (unless the lease is re-established). The assignments should not fill up as you describe.

    You have a procedure that allows you to cope with the behaviour. The alternative would be to switch off DHCP and use static/manual IPs.

    {Also worth commenting that if you switch your computer off or remove it from the network for longer than the DHCP lease period (normally that means days at a time), there is a very good chance that it will be assigned a different IP address. This is normal, and I presume not what BillyBob is describing.

    Also DHCP will asign the addresses in the order the PC are connected. First one switched on will be 192.168.0.2, next one 192.168.0.3 etc (assuming the router is 192.168.0.1) if the addresses haven't already been assigned.}
     
  13. 2004/11/12
    BillyBob Lifetime Subscription

    BillyBob Inactive

    Joined:
    2002/01/07
    Messages:
    6,048
    Likes Received:
    0
    There is nothing peculiar about it. It is normal behavior. But it did take me awhile to figure out why the change.

    Under everyday circumstances you are correct. The machines do hold the same address.

    But, I just powered down the Router. Went to the Router ( using program provided by Linksys ) and it showed NO addresses asigned at all.
    I shut all three machines down.
    Re-started machine 3 first. Then machine 2. Then this machine.

    This machine now shows as 192.168.1.103. Because it was the 3rd one started.

    !92.168.1.100 is usually the Printer because it does not get shutdown. I do not know what it is now because I have not restarted it.

    I can produce the same results by going to the Router and deleteing all of the NICs. It then depends on which machine gets re-started first as to which address it gets.

    OOPS !! I am LATE for doing an errand. Be back later.

    BillyBob
     
  14. 2004/11/12
    Scott Smith

    Scott Smith Inactive Alumni

    Joined:
    2002/01/12
    Messages:
    1,950
    Likes Received:
    4

    I will add to this:

    If you have a subnet that runs from 192.168.1.1 to 192.168.1.254 generally if it was setup by default the DHCP service will give out addresses starting with 192.168.1.100. Therefore if you assighn static IPs below 192.168.100 there will be no conflicts.

    This would be true if your running most out of the box Cable/DSL Routers running there default DHCP scheme.

    If you setup a static IP within the DHCP scope (192.168.1.100 to 192.168.1.254 ) DHCP will still attempt to give out that address and there will be 2 PCs (nodes) fighting over that address.
     
  15. 2004/11/12
    Scott Smith

    Scott Smith Inactive Alumni

    Joined:
    2002/01/12
    Messages:
    1,950
    Likes Received:
    4
    Thats because "Deleting the NICs" is deleting the "Lease" so when the PC restarts it gets a new lease.

    If you were to not touch the router the PC would keep the same IP unless it was powered off long enough for the lease to expire.
     
  16. 2004/11/12
    BillyBob Lifetime Subscription

    BillyBob Inactive

    Joined:
    2002/01/07
    Messages:
    6,048
    Likes Received:
    0
    I agree. And by testing these things is how I found out WHY the addresses were changing.

    I have now shut down everything and restarted beginning with the Printer. It is now 192.168.1.100. And this machine is now back to 192.168.1.101.

    Printer=192.168.1.100
    Bob=192.168.1.101
    Nancy=192.168.1.102
    Rip=192.168.1.103

    Because that is the order in which the machines were re-started.

    And they will more than likely stay that way. :)-Untill I start messing around again.-:)

    But again. there is nothing peculiar about this, And under certain circumstances it is normal.

    The main reason I got into all this this AM is due to the fact that I installed an eight port switch between the machines and the Router.

    BillyBob
     
  17. 2004/11/12
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    I apologise. Your previous postings had led me to the impression that your IP addresses were gradually climbing, and changed from day to day. Not when you reset the router.
     
  18. 2004/11/12
    BillyBob Lifetime Subscription

    BillyBob Inactive

    Joined:
    2002/01/07
    Messages:
    6,048
    Likes Received:
    0
    No problem ReggieB

    Mis-understandings are not hard to come by.

    BillyBob
     
  19. 2004/11/12
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    I think the exact exclusion range does depend on the router. However, you are right to point out that there is often an exclusion range. I left that out as I thought I'd written more than enough as it was and for most people a simple 'use DHCP' or 'don't use DHCP' answers most queries.

    In fact the more I think about it, the more I think my advice would be: "if you don't know about exclusion ranges stick with either the automatic addresses the router gives you or switch off DHCP and use static IP ".
     
  20. 2004/11/12
    BillyBob Lifetime Subscription

    BillyBob Inactive

    Joined:
    2002/01/07
    Messages:
    6,048
    Likes Received:
    0
    OK. Now I AM confused. ( badly )

    I have no idea what " Exclusion Range " is all about. And I would have NO IDEA how to use Static IP.

    Because:
    All I have every done with any machine with an NIC in it, or even the Printer is to cable it to the Router and go. Some did not always show up in the workgroup but it was usually just a mis-spelling of the word " Mshome "

    I even had a Friends machine here the other day and it went right on line as ( 192.168.1.104 ) with no problem. ( did not show in the workgroup though ) Did not need to as it was not used on a LAN.

    BillyBob
     
  21. 2004/11/12
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    You have a DHCP server on your network. This will hand out an IP address to any device connected to it automatically. Windows systems (at least the latest ones) by default are setup to request an IP address automatically. So as you have found, all you have to do is connect a computer to the network and it will get an address.

    However, there are situation were you may want to, or you have to assign an IP address manually. Because it is manually assigned it will tend to remain the same, so an alternative name for a manually assigned IP address is "Static" address. Such situations are:

    1. You want to run a server on your network. In particular a web or SMTP mail server that is accessed from outside your network. For traffic to get to the server you have to forward it to the server from the router. That is done by IP address. You put rules in the router such as "pass all port 80 (HTTP) traffic to the server at 192.168.0.10 ". If the servers address changes (for example because the router loses power) the rule will point to the wrong address and access through the router for HTTP will fail. So it make sense to assign the servers IP address manually. That is give it a static address.
    2. The network device may not have an automatic IP client - in other words it has to be set manually and have a static address (not so common nowadays, but used to be the case with network printers.
    3. Printing to network printers can be a little quicker if you connect to them by IP address rather than by name. To make sure this always works, it makes sense to set the IP manually. However, nowaday systems are a little cleverer at connecting to printers by name and this isn't such an advantage, and it can be a little easier to manage the print by name, where you don't have to worry what the IP address is.
    I think from this list you will see that in larger networks it often makes sense to have some IP addresses dynamically assigned (typically client computers and workstations) and others statically assigned (typically servers). To avoid ip addresss conflicts a simple appoach is to use exclusion zones.

    Say you have a DHCP server serving the subnet 192.168.0.0/255.255.255.0. By default in a simple arrangement this server will automatically give out IP address all the way from 192.168.0.1 to 192.168.0.254 inclusive. Therefore, no mater which IP address you statically assign a server, at some point there is a good change the DHCP server will try to give the address to another PC and you'll get a conflict. To avoid this you set up an exclusion range. That is you tell the DHCP server not to give out IP address in part of the range. As ssmith10pn has stated this can commonly be 1 to 100. That is the exclusion range is from 192.168.0.1 to 192.168.0.100, and therefore the DHCP server will only give out addresses in the range 192.168.0.101 to 192.168.0.254. You would then be free to manually assign servers with IP address in the 192.168.0.1 to 192.168.0.100.

    There is one address that is always statically assigned. The internaladdress of your router.
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.