Best Industrial Training in C,C++,PHP,Dot Net,Java in Jalandhar

Tuesday, 17 September 2013

Ip addressing in Linux

Every computer on network requires an IP address to communicate with other computer. Linux is developed for networking. To pass RHCE exam you must understand networking.
An IP is a 32-bit number comprised of a host number and a network prefix, both of which are used to uniquely identify each node within a network.
To make these addresses more readable, they are broken up into 4 bytes, or octets, where any 2 bytes are separated by a period. This is commonly referred to as dotted decimal notation.
The first part of an Internet address identifies the network on which the host resides, while the second part identifies the particular host on the given network. This creates the two-level addressing hierarchy.
All hosts on a given network share the same network prefix but must have a unique host number. Similarly, any two hosts on different networks must have different network prefixes but may have the same host number.
Here is a simple example of an IP address: 192.168.1.1
An additional value, called a subnet mask, determines the boundary between the network and host components of an address.
Subnet masks are 32 bits long and are typically represented in dotted-decimal (such as 255.255.255.0) or the number of networking bits (such as /24). The networking bits in a mask must be contiguous and the host bits in the subnet mask must be contiguous. 255.0.255.0 is an invalid mask. A subnet mask is used to mask a portion of the IP address, so that TCP/IP can tell the difference between the network ID and the host ID. TCP/IP uses the subnet mask to determine whether the destination is on a local or remote network.
  • Class A subnet mask 255.0.0.0
  • Class B subnet mask 255.255.0.0
  • Class C subnet mask 255.255.255.0
When dealing with IP addresses, the address is broken into two components:
  • Network component Defines on what segment, in the network, a device is located
  • Host component Defines the specific device on a particular network segment
The network number uniquely identifies a segment in the network and a host number uniquely identifies a device on a segment. The combination of these two numbers must be unique throughout the entire network.
IP addresses are divided in five class.
Class A addresses range from  1-126
Class B addresses range from 128-191
Class C addresses range from 192-223
Class D addresses range from 224-239
Class E addresses range from 240-254

0 is reserved and represents all IP addresses;
127 is a reserved address and is used for loop back tasting:
255 is a reserved address and is used for broadcasting purposes.
It is fairly easy to predict what address belongs to what class. Simply look at the first number in the dotted-decimal notation and see which range it falls into.
For example
  • IP address 159.123.12.2 belongs to class B because 159 [First number] falls in range 128 - 191
  • IP address 15.12.12.6 belongs to class A because 15 [First number] falls in range 1 - 126
  • IP address 192.168.1.2 belongs to class C because 192 [First number] falls in range 192 - 223
When you are dealing with IP addresses, two numbers are always reserved for each network number:
The first address in the network represents the network's address, and the last address in the network represents the broadcast address for this network, called directed broadcast.
When you look at IP itself, two IP addresses are reserved: 0.0.0.0 (the very first address), which represents all IP addresses, and 255.255.255.255 (the very last address), which is the local broadcast address.
As to assigning addresses to devices, two general types of addresses can be used: public and private.

Public addresses

Public addresses are Class A, B, and C addresses that can be used to access devices in other public networks, such as the Internet.

Private Addresses

Within the range of addresses for Class A, B, and C addresses are some reserved addresses, commonly called private addresses. Anyone can use private addresses; however, this creates a problem if you want to access the Internet. Remember that each device in the network (in this case, this includes the Internet) must have a unique IP address. If two networks are using the same private addresses, you would run into reachability issues. To access the Internet, your source IP addresses must have a unique Internet public address. This can be accomplished through address translation. Here is a list of private addresses.
Class A: 10.0.0.0–10.255.255.255 (1 Class A network)
Class B: 172.16.0.0–172.31.255.255 (16 Class B networks)
Class C: 192.168.0.0–192.168.255.255 (256 Class C networks)
IP (Internet Protocol) addressing methods:

Static /Dynamic

Each device in an IP network is either assigned a permanent address (static) by the network administrator or is assigned a temporary address (dynamic) via DHCP software. Routers, firewalls and proxy servers use static addresses as do most servers and printers that serve multiple users. Client machines may use static or dynamic IP addresses. The IP address assigned to your service by your cable or DSL Internet provider is typically dynamic IP. In routers and operating systems, the default configuration for clients is dynamic IP.

DHCP

DHCP stands for Dynamic Host Configuration Protocol. This protocol assigns network IP addresses to clients on the network at startup. With DHCP, each client workstation does not need to be set up with a static IP address. DHCP is recommended on large networks. It would be very time consuming to manually assign a static IP address to every workstation on your network. With static IP addressing, the IP address that you assign to a device never changes. A DHCP server contains a pool of IP addresses that it can draw from to assign to devices that are connecting to the network. Other TCP/IP properties, such as default gateways, DNS servers, and subnet masks can also be assigned automatically.

IPv6

Network industry is moving to adopt new version of IPv6. IPv6 have several new features. RHCE exam test you networking skills on IPv4 so we are not including IPv6 in this article. We have a separate section for IPv6.
IPv6 features concepts and configurations

No comments:

Post a Comment