Ip adresses

This is a discussion on Ip adresses within the Networking/Device Communication forums, part of the General Programming Boards category; I know a little about IP adresses and what they is, and what they are used for. But i wonder, ...

  1. #1
    Politics&Cpp geek Da-Nuka's Avatar
    Join Date
    Oct 2004
    Posts
    104

    Ip adresses

    I know a little about IP adresses and what they is, and what they are used for.

    But i wonder, what is controlling what computer to have which IP adress?

    What is the difference between local ip and extern ip?
    If nothing is controlling the worlds IP adresses, what will happen if two servers have the same IP, and someone try to connect to that IP?

    And finally, when you type a IPAdress to connect to using winsock,
    and GetHostByAddr(), is it reffering to local or external IP adresses?

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Check out getnameinfo().

    In general, the address from getnameinfo() depends on what host is passed in.

    Kuphryn

  3. #3
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    >>But i wonder, what is controlling what computer to have which IP adress?

    On a private network, the IP addresses can be set by the administrator. They have to be non-routable (eg 10.0.0.20). Also they can be issues by a DCHP server (dynamic host configuration protocol) where permitted IP addresses are issued to clients.

    The DHCP system is widely used by internet service providers to assign clients an IP address.

    At the next level up, i believe it is the country registar that is responsible for issuing IP blocks to service providers, then ICANN

    >>local ip and extern ip?

    A local ip is typically non routable, external ip addresses are routable and globally accessable.

    >>If nothing is controlling the worlds IP adresses

    they are controlled. No two systems should ever be assigned the same IP. I dont know if it is theoretically possible or not, i dont believe it is.
    Monday - what a way to spend a seventh of your life

  4. #4
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    allot of it has to do with routing. Its a bit to complecated for one post though.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

  5. #5
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    IP addresses resolve to the MAC address using the Address Resolution Protocol , although IP addresses do uniquely identify machines, packets are not routed just using the octet notated ip address.

    some extran info: http://www.scit.wlv.ac.uk/~jphb/comms/iproute.html
    Monday - what a way to spend a seventh of your life

  6. #6
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    Quote Originally Posted by iain
    >>But i wonder, what is controlling what computer to have which IP adress?

    On a private network, the IP addresses can be set by the administrator. They have to be non-routable (eg 10.0.0.20). Also they can be issues by a DCHP server (dynamic host configuration protocol) where permitted IP addresses are issued to clients.

    The DHCP system is widely used by internet service providers to assign clients an IP address.

    At the next level up, i believe it is the country registar that is responsible for issuing IP blocks to service providers, then ICANN
    That pretty much sums it up.
    Quote Originally Posted by iain
    >>local ip and extern ip?

    A local ip is typically non routable, external ip addresses are routable and globally accessable.
    Umm, actually all addresses are routable, just depends on the routing table in the host and later routers as to where it goes. only if their is no default route, and no other rule to cover it does it become non-routable. I think by local he means the hosts address, not private ip ranges, as not all networks use NAT, and even then those are routable, just not once you go outside the NAT'ed network.
    Quote Originally Posted by iain

    >>If nothing is controlling the worlds IP adresses

    they are controlled. No two systems should ever be assigned the same IP. I dont know if it is theoretically possible or not, i dont believe it is.
    Yea, you can set the host to be whatever IP you want, but the main routers (The ones that interconnect various companies backbones, such as Sprint, AT&T, Worldcom, Level3, etc.) control what goes where, based on the BGP protocol. I haven't had a chance to study it in depth, but it is the standard protocol to use when your connected to more then on Autonoumus System. It can get a bit complicated if you don't already understand routing. Now they aren't the ones in complete control though, their is a group that determines who gets what ip segments, even AT&T and the rest work with them to allocate their ranges. ICANN is basicly at the top, although I believe its IANA (a subdevision I think) that dirrectly deals with the IP address allocation, and even then they work with the ones below them (ARIN for the americas) that allocate to the actually companies in their region.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

  7. #7
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    Quote Originally Posted by iain
    IP addresses resolve to the MAC address using the Address Resolution Protocol , although IP addresses do uniquely identify machines, packets are not routed just using the octet notated ip address.

    some extran info: http://www.scit.wlv.ac.uk/~jphb/comms/iproute.html
    Umm, via the internet, yes, the IP address is the only thing routers normally look at, unless they do QoS, they don't do any thing more then read that nice address, their routing table, and send it down the link that is considered the best one for the job (how that is determined is depended on the routing protocol used) ARP is only for Ethernet, and that is only common in LAN applications, not WAN. The physical and media layer don't do the routing, its layer 3 that does. Now yes some routers do go up the stack about to layer 4 some times, but mostly that just when doing NAT in order to do connection tracking, but thats another story.

    one thing that pages missed is what is used to route between the Autonomus systems, and thats BGP. I don't know alot about it though, as I haven't really had the chance to work with it.
    Last edited by Xipher; 02-27-2005 at 02:18 PM.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

  8. #8
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    I realise that any address is routable, but what i meant was that the private ip blocks aren't routed by the major routers. Can see how it may have been misleading though

    RFC 1957 - Address Allocation for Private Internets
    http://www.faqs.org/rfcs/rfc1597.html
    Monday - what a way to spend a seventh of your life

  9. #9
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    Quote Originally Posted by iain
    I realise that any address is routable, but what i meant was that the private ip blocks aren't routed by the major routers. Can see how it may have been misleading though

    RFC 1957 - Address Allocation for Private Internets
    http://www.faqs.org/rfcs/rfc1597.html

    Yea, just wanted to clear that up just in case.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Converting 32 bit binary IP to decimal IP (vice-versa)
    By Mankthetank19 in forum C Programming
    Replies: 15
    Last Post: 12-28-2009, 07:17 PM
  2. IP address network order to string?
    By pobri19 in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-19-2009, 06:15 AM
  3. Replies: 6
    Last Post: 06-08-2006, 05:11 PM
  4. resolving names and ip addresses
    By dicky in forum Networking/Device Communication
    Replies: 5
    Last Post: 07-01-2004, 04:32 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21