Internet Protocol & IP address

download Internet Protocol & IP address

of 14

Transcript of Internet Protocol & IP address

  • 8/2/2019 Internet Protocol & IP address

    1/14

    Internet Protocol & IPaddressComputer Networking Research Project

    2012

    Batch 03

    Java Robotics and Intelligent Systems Research Center

    3/19/2012

  • 8/2/2019 Internet Protocol & IP address

    2/14

    ACKNOWLEDGEMENT

    We owe a great many thanks to a great many people who helped and

    Supported us during the completing of this project.

    My deepest thanks to

    MR. Nirodha Rupasingha

    for guiding and correcting our work

    with attention and care.

    We express my thanks to MR. Bhathiya Thisera

    Managing Director of Java Robotics and Intelligent Systems

    Research Center

    for extending his support.

    Our deep sense of gratitude to MR. R.K. Bandara (Lecturer of Network

    Engineering)

    For his support and guidance.

    We would also thank our Institution, without whom this project would

    have been a distant reality. We also extend our heartfelt thanks to our families

    and well wishers.

    *****************

  • 8/2/2019 Internet Protocol & IP address

    3/14

    What is an IP address?

    Every machine on a network has a unique identifier. Just as you would address a letterto send in the mail, computers use the unique identifier to send data to specific

    computers on a network. Most networks today, including all computers on the Internet,

    use the TCP/IP protocol as the standard for how to communicate on the network. In the

    TCP/IP protocol, the unique

    identifier for a computer is called its

    IP address.

    There are two standards for IP

    addresses: IP Version 4 (IPv4) and

    IP Version 6 (IPv6). All computers

    with IP addresses have an IPv4

    address, and many are starting to

    use the new IPv6 address system

    as well. Here's what these two address types mean:

    IPv4 uses 32 binary bits to create a single unique address on the network. An IPv4address is expressed by four numbers separated by dots. Each number is the decimal

    (base-10) representation for an eight-digit binary (base-2) number, also called an octet.

    For example: 216.27.61.137

    IPv6 uses 128 binary bits to create a single unique address on the network. An IPv6

    address is expressed by eight groups of hexadecimal (base-16) numbers separated by

    colons, as in 2001:cdba:0000:0000:0000:0000:3257:9652. Groups of numbers that

    contain all zeros are often omitted to save space, leaving a colon separator to mark thegap (as in 2001:cdba::3257:9652).

    At the dawn of IPv4 addressing, the Internet was not the large commercial sensation it

    is today, and most networks were private and closed off from other networks around the

    world. When the Internet exploded, having only 32 bits to identify a unique Internet

  • 8/2/2019 Internet Protocol & IP address

    4/14

    address caused people to panic that we'd run out of IP addresses. Under IPv4, there

    are 232 possible combinations, which offers just under 4.3 billion unique addresses.

    IPv6 raised that to a panic-relieving 2128 possible addresses. Later, we'll take a closer

    look at how to understand your computer's IPv4 or IPv6 addresses.

    How does your computer get its IP address? An IP address can be either dynamic or

    static. A static address is one that you configure yourself by editing your computer's

    network settings. This type of address is rare, and it can create network issues if you

    use it without a good understanding of TCP/IP. Dynamic addresses are the most

    common. They're assigned by the Dynamic Host Configuration Protocol (DHCP), a

    service running on the network. DHCP typically runs on network hardware such

    as routers or dedicated DHCP servers.

    Dynamic IP addresses are issued using a leasing system, meaning that the IP address

    is only active for a limited time. If the lease expires, the computer will automatically

    request a new lease. Sometimes, this means the computer will get a new IP address,

    too, especially if the computer was unplugged from the network between leases. This

    process is usually transparent to the user unless the computer warns about an IP

    address conflict on the network (two computers with the same IP address). An address

    conflict is rare, and today's technology typically fixes the problem automatically.

    Next, let's take a closer look at the important parts of an IP address and the special

    roles of certain addresses.

  • 8/2/2019 Internet Protocol & IP address

    5/14

    IP Classes

    Earlier, you read that IPv4 addresses represent four eight-digit binary numbers. That

    means that each number could be 00000000 to 11111111 in binary, or 0 to 255 in

    decimal (base-10). In other words, 0.0.0.0 to 255.255.255.255. However, somenumbers in that range are reserved for specific purposes on TCP/IP networks. These

    reservations are recognized by the authority on TCP/IP addressing, the Internet

    Assigned Numbers Authority (IANA). Four specific reservations include the following:

    0.0.0.0 -- This represents the default

    network, which is the abstract concept of

    just being connected to a TCP/IP

    network. 255.255.255.255 -- This address is

    reserved for network broadcasts, or

    messages that should go to all

    computers on the network.

    127.0.0.1 -- This is called the loopback

    address, meaning your computer's way

    of identifying itself, whether or not it has

    an assigned IP address.

    169.254.0.1 to 169.254.255.254 -- This

    is the Automatic Private IP Addressing

    (APIPA) range of addresses assigned

    automatically when a computer's

    unsuccessful getting an address from a

    DHCP server.

    The other IP address reservations are for

    subnet classes. A subnet is a smaller network of computers connected to a larger

    network through a router. The subnet can have its own address system so computerson the same subnet can communicate quickly without sending data across the larger

    network. A router on a TCP/IP network, including the Internet, is configured to recognize

    one or more subnets and route network traffic appropriately. The following are the IP

    addresses reserved for subnets:

    HOW DHCP ASSIGNS ADDRESSES

    When you add a computer to a network, thatcomputer uses a four-step process to get an

    IP address from DHCP:

    Discover -- The computer sends out abroadcast message on the network,hoping to discover a DHCP serviceprovider.

    Offer -- Each DHCP provider hears themessage, recognizes the uniquehardware address of the computer, andsends a message back offering itsservices to that computer.

    Request -- The computer selects a DHCPprovider from its offerings and then sendsa request to that provider asking for an IPaddress assignment.

    Acknowledge -- The targeted DHCPprovider acknowledges the request andissues an IP address to the computer thatdoesn't match any other IP addressescurrently active on the network.

  • 8/2/2019 Internet Protocol & IP address

    6/14

    10.0.0.0 to 10.255.255.255 -- This falls within the Class A address range of 1.0.0.0 to

    127.0.0.0, in which the first bit is 0.

    172.16.0.0 to 172.31.255.255 -- This falls within the Class B address range of 128.0.0.0

    to 191.255.0.0, in which the first two bits are 10.

    192.168.0.0 to 192.168.255.255 -- This falls within the Class C range of 192.0.0.0

    through 223.255.255.0, in which the first three bits are 110.

    Multicast (formerly called Class D) -- The first four bits in the address are 1110, with

    addresses ranging from 224.0.0.0 to 239.255.255.255.

    Reserved for future/experimental use (formerly called Class E) -- addresses 240.0.0.0

    to 254.255.255.254.

    The first three (within Classes A, B and C) are those most used in creating subnets.

    Later, we'll see how a subnet uses these addresses. The IANA has outlined specific

    uses for multicast addresses within Internet Engineering Task Force (IETF)

    documentRFC 5771. However, it hasn't designated a purpose or future plan for Class E

    addresses since it reserved the block in its 1989 document RFC 1112. Before IPv6, the

    Internet was filled with debate about whether the IANA should release Class E for

    general use.

    Next, let's see how subnets work and find out who has those non-reserved IP

    addresses out on the Internet.

    http://tools.ietf.org/html/rfc5771http://tools.ietf.org/html/rfc5771http://tools.ietf.org/html/rfc5771http://tools.ietf.org/html/rfc5771
  • 8/2/2019 Internet Protocol & IP address

    7/14

    Internet Addresses and Subnets

    The following is an example of a subnet IP address you might have on your computer at home if

    you're using a router (wireless or wired) between your ISP connection and your computer:

    IP address: 192.168.1.102

    Subnet mask: 255.255.255.0

    Twenty-four bits (three octets) reserved for network identity

    Eight bits (one octet) reserved for nodes

    Subnet identity based on subnet mask (first address): 192.168.1.0

    The reserved broadcast address for the subnet (last address): 192.168.1.255

    Example addresses on the same network: 192.168.1.1, 192.168.1.103

    Example addresses not on the same network: 192.168.2.1, 192.168.2.103

    Besides reserving IP addresses, the IANA is also responsible for assigning blocks of IP

    addresses to certain entities, usually commercial or government organizations. Your Internet

    service provider (ISP) may be one of these entities, or it may be part of a larger block under the

    control of one of those entities. In order for you to connect to the Internet, your ISP will assign

    you one of these addresses.

  • 8/2/2019 Internet Protocol & IP address

    8/14

    IANA-reserved private IPv4 network ranges

    Start EndNo. of

    addresses

    24-bit block (/8 prefix, 1 A) 10.0.0.0 10.255.255.255 16777216

    20-bit block (/12 prefix, 16 B) 172.16.0.0 172.31.255.255 1048576

    16-bit block (/16 prefix, 256 C) 192.168.0.0 192.168.255.255 65536

    If you only connect one computer to the Internet, that computer can use the address from your

    ISP. Many homes today, though, use routers to share a single Internet connection between

    multiple computers. Wireless routers have become especially popular in recent years, avoiding

    the need to run network cables between rooms.

    If you use a router to share an Internet connection, the router gets the IP address issued directly

    from the ISP. Then, it creates and manages a subnet for all the computers connected to that

    router. If your computer's address falls into one of the reserved subnet ranges listed earlier,

    you're going through a router rather than connecting directly to the Internet.

    IP addresses on a subnet have two parts: network and node. The network part identifies the

    subnet itself. The node, also called the host, is an individual piece of computer equipment

    connected to the network and requiring a unique address. Each computer knows how to

    separate the two parts of the IP address by using a subnet mask. A subnet mask looks

    somewhat like an IP address, but it's actually just a filter used to determine which part of an IPaddress designates the network and node.

    A subnet mask consists of a series of 1 bits followed by a series of 0 bits. The 1 bits indicate

    those that should mask the network bits in the IP address, revealing only those that identify a

    unique node on that network. In the IPv4 standard, the most commonly used subnet masks

    have complete octets of 1s and 0s as follows:

  • 8/2/2019 Internet Protocol & IP address

    9/14

    255.0.0.0.0 = 11111111.00000000.00000000.00000000 = eight bits for networks, 24 bits for

    nodes

    255.255.0.0 = 11111111.11111111.00000000.00000000 = 16 bits for networks, 16 bits for

    nodes

    255.255.255.0 = 11111111. 11111111.11111111.00000000 = 24 bits for networks, eight bits for

    nodes

    People who set up large networks determine what subnet mask works best based on the

    number of desired subnets or nodes. For more subnets, use more bits for the network; for more

    nodes per subnet, use more bits for the nodes. This may mean using non-standard mask

    values. For instance, if you want to use 10 bits for networks and 22 for nodes, your subnet mask

    value would require using 11000000 in the second octet, resulting in a subnet mask value of

    255.192.0.0.

    Another important thing to note about IP addresses in a subnet is that the first and last

    addresses are reserved. The first address identifies the subnet itself, and the last address

    identifies the broadcast address for systems on that subnet.

    IPv4 address exhaustion

    IPv4 address exhaustion is the decreasing supply of unallocated Internet Protocol Version

    4 (IPv4) addresses available at the Internet Assigned Numbers Authority (IANA) and

    the regional Internet registries (RIRs) for assignment to end users and local Internet registries,

    such as Internet service providers. IANA's primary address pool was exhausted on February 3,

    2011 when the last 5 blocks were allocated to the 5 RIRs. APNIC was the first RIR to exhaust

    its regional pool on 15 April 2011, except for a small amount of address space reserved for the

    transition to IPv6, intended to be allocated in a restricted process

  • 8/2/2019 Internet Protocol & IP address

    10/14

    IPv6 addresses

    Decomposition of an IPv6 address from hexadecimal representation to its binary value.

    The rapid exhaustion of IPv4 address space, despite conservation techniques, prompted

    the Internet Engineering Task Force (IETF) to explore new technologies to expand the Internet's

    addressing capability. The permanent solution was deemed to be a redesign of the Internet

    Protocol itself. This next generation of the Internet Protocol, intended to replace IPv4 on the

    Internet, was eventually named Internet Protocol Version 6(IPv6) in 1995 The address size was

    increased from 32 to 128 bits or 16 octets. This, even with a generous assignment of network

    blocks, is deemed sufficient for the foreseeable future. Mathematically, the new address space

    provides the potential for a maximum of 2128, or about3.4031038 unique addresses.

    The new design is not intended to provide a sufficient quantity of addresses on its own, but

    rather to allow efficient aggregation of subnet routing prefixes to occur at routing nodes. As a

    result, routing table sizes are smaller, and the smallest possible individual allocation is a subnet

    for 264hosts, which is the square of the size of the entire IPv4 Internet. At these levels, actual

    address utilization rates will be small on any IPv6 network segment. The new design also

    provides the opportunity to separate the addressing infrastructure of a network segment that

    is the local administration of the segment's available space from the addressing prefix used

    to route external traffic for a network. IPv6 has facilities that automatically change the routing

    prefix of entire networks, should the global connectivity or the routing policy change, without

    requiring internal redesign or renumbering.

    The large number of IPv6 addresses allows large blocks to be assigned for specific purposes

    and, where appropriate, to be aggregated for efficient routing. With a large address space, there

    is not the need to have complex address conservation methods as used in Classless Inter-

    Domain Routing (CIDR).

    http://en.wikipedia.org/wiki/File:Ipv6_address.svghttp://en.wikipedia.org/wiki/File:Ipv6_address.svghttp://en.wikipedia.org/wiki/File:Ipv6_address.svghttp://en.wikipedia.org/wiki/File:Ipv6_address.svg
  • 8/2/2019 Internet Protocol & IP address

    11/14

    Many modern desktop and enterprise server operating systems include native support for the

    IPv6 protocol, but it is not yet widely deployed in other devices, such as home networking

    routers, voice over IP (VoIP) and multimedia equipment, and network peripherals.

    IPv6 private addresses

    Just as IPv4 reserves addresses for private or internal networks, blocks of addresses are set

    aside in IPv6 for private addresses. In IPv6, these are referred to as unique local

    addresses (ULA). RFC 4193 sets aside the routing prefix fc00::/7 for this block which is divided

    into two /8 blocks with different implied policies The addresses include a 40-bit pseudorandom

    number that minimizes the risk of address collisions if sites merge or packets are misrouted.

    Early designs used a different block for this purpose (fec0::), dubbed site-local

    addresses. However, the definition of what constituted sitesremained unclear and the poorly

    defined addressing policy created ambiguities for routing. This address range specification was

    abandoned and must not be used in new systems.

    Addresses starting with fe80:, called link-local addresses, are assigned to interfaces for

    communication on the link only. The addresses are automatically generated by the operating

    system for each network interface. This provides instant and automatic network connectivity for

    any IPv6 host and means that if several hosts connect to a common hub or switch, they have a

    communication path via their link-local IPv6 address. This feature is used in the lower layers of

    IPv6 network administration (e.g. Neighbor Discovery Protocol).

    None of the private address prefixes may be routed on the public Internet.

    IP Subnetworks

    IP networks may be divided into subnetworks in both IPv4 and IPv6. For this purpose, an IP

    address is logically recognized as consisting of two parts: the network prefixand the host

    identifier, orinterface identifier(IPv6). The subnet mask or the CIDR prefix determines how the

    IP address is divided into network and host parts.

    The term subnet maskis only used within IPv4. Both IP versions however use the Classless

    Inter-Domain Routing (CIDR) concept and notation. In this, the IP address is followed by a slash

    and the number (in decimal) of bits used for the network part, also called the routing prefix. For

    example, an IPv4 address and its subnet mask may be 192.0.2.1 and 255.255.255.0,

    respectively. The CIDR notation for the same IP address and subnet is 192.0.2.1/24, because

    the first 24 bits of the IP address indicate the network and subnet.

  • 8/2/2019 Internet Protocol & IP address

    12/14

    IP address assignment

    Internet Protocol addresses are assigned to a host either anew at the time of booting, or

    permanently by fixed configuration of its hardware or software. Persistent configuration is alsoknown as using astatic IP address. In contrast, in situations when the computer's IP address is

    assigned newly each time, this is known as using a dynamic IP address.

    Methods

    Static IP addresses are manually assigned to a computer by an administrator. The exact

    procedure varies according to platform. This contrasts with dynamic IP addresses, which are

    assigned either by the computer interface or host software itself, as in Zeroconf, or assigned by

    a server using Dynamic Host Configuration Protocol (DHCP). Even though IP addresses

    assigned using DHCP may stay the same for long periods of time, they can generally change. In

    some cases, a network administrator may implement dynamically assigned static IP addresses.

    In this case, a DHCP server is used, but it is specifically configured to always assign the same

    IP address to a particular computer. This allows static IP addresses to be configured centrally,

    without having to specifically configure each computer on the network in a manual procedure.

    In the absence or failure of static or stateful (DHCP) address configurations, an operating

    system may assign an IP address to a network interface using state-less auto-configuration

    methods, such asZeroconf.

    Uses of dynamic addressing

    Dynamic IP addresses are most frequently assigned on LANs and broadband networksby Dynamic Host Configuration Protocol (DHCP) servers. They are used because it avoids the

    administrative burden of assigning specific static addresses to each device on a network. It also

    allows many devices to share limited address space on a network if only some of them will be

    online at a particular time. In most current desktop operating systems, dynamic IP configuration

    is enabled by default so that a user does not need to manually enter any settings to connect to a

    network with a DHCP server. DHCP is not the only technology used to assign dynamic IP

    addresses. Dialup and some broadband networks use dynamic address features of the Point-to-

    Point Protocol.

    Sticky dynamic IP address

    A sticky dynamic IP addressis an informal term used by cable and DSL Internet access

    subscribers to describe a dynamically assigned IP address which seldom changes. The

    addresses are usually assigned with DHCP. Since the modems are usually powered on for

    extended periods of time, the address leases are usually set to long periods and simply

    renewed. If a modem is turned off and powered up again before the next expiration of the

    address lease, it will most likely receive the same IP address.

  • 8/2/2019 Internet Protocol & IP address

    13/14

    Address autoconfiguration

    RFC 3330 defines an address block, 169.254.0.0/16, for the special use in link-local addressing

    for IPv4 networks. In IPv6, every interface, whether using static or dynamic addressassignments, also receives a local-link address automatically in the block fe80::/10.

    These addresses are only valid on the link, such as a local network segment or point-to-point

    connection, that a host is connected to. These addresses are not routable and like private

    addresses cannot be the source or destination of packets traversing the Internet.

    When the link-local IPv4 address block was reserved, no standards existed for mechanisms of

    address autoconfiguration. Filling the void, Microsoft created an implementation that is called

    Automatic Private IP Addressing (APIPA). Due to Microsoft's market power, APIPA has been

    deployed on millions of machines and has, thus, become a de facto standard in the industry.

    Many years later, the IETF defined a formal standard for this functionality, RFC 3927,entitled Dynamic Configuration of IPv4 Link-Local Addresses.

    Uses of static addressing

    Some infrastructure situations have to use static addressing, such as when finding the Domain

    Name System (DNS) host that will translate domain names to IP addresses. Static addresses

    are also convenient, but not absolutely necessary, to locate servers inside an enterprise. An

    address obtained from a DNS server comes with a time to live, or caching time, after which it

    should be looked up to confirm that it has not changed. Even static IP addresses do change as

    a result of network administration (RFC 2072)

    Public addresses

    A public IP addressin common parlance is synonymous with a, globally routable unicast IP

    address.

    Both IPv4 and IPv6 define address ranges that are reserved for private networks and link-local

    addressing. The term public IP address often used excludes these types of addresses.

  • 8/2/2019 Internet Protocol & IP address

    14/14

    Modifications to IP addressing

    IP blocking and firewalls

    Firewalls perform Internet Protocol blocking to protect networks from unauthorized access. Theyare common on today's Internet. They control access to networks based on the IP address of a

    client computer. Whether using a blacklist or a whitelist, the IP address that is blocked is the

    perceived IP address of the client, meaning that if the client is using a proxy server or network

    address translation, blocking one IP address may block many individual computers.

    IP address translation

    Multiple client devices can appear to share IP addresses: either because they are part of

    a shared hosting web server environment or because an IPv4 network address translator (NAT)

    or proxy serveracts as an intermediary agent on behalf of its customers, in which case the real

    originating IP addresses might be hidden from the server receiving a request. A common

    practice is to have a NAT hide a large number of IP addresses in a private network. Only the

    "outside" interface(s) of the NAT need to have Internet-routable addresses.[11]

    Most commonly, the NAT device maps TCP or UDP port numbers on the outside to individual

    private addresses on the inside. Just as a telephone number may have site-specific extensions,

    the port numbers are site-specific extensions to an IP address.

    In small home networks, NAT functions usually take place in a residential gateway device,

    typically one marketed as a "router". In this scenario, the computers connected to the router

    would have 'private' IP addresses and the router would have a 'public' address to communicate

    with the Internet. This type of router allows several computers to share one public IP address.

    Diagnostic toolsComputer operating systems provide various diagnostic tools to examine their network interface

    and address configuration. Windows provides the command-line

    interface tools ipconfig and netsh and users of Unix-like systems can

    use ifconfig, netstat, route, lanstat, ifstat, or iproute2 utilities to accomplish the task.

    http://en.wikipedia.org/wiki/IP_address#cite_note-10http://en.wikipedia.org/wiki/IP_address#cite_note-10http://en.wikipedia.org/wiki/IP_address#cite_note-10http://en.wikipedia.org/wiki/IP_address#cite_note-10