Skip to main content

Establish Network Connectivity in Red Hat

The internet protocol, or IP, is the protocol used to send network traffic between hosts across the internet. It comes in two versions. IPv4 is what most system administrators think of as  "IP", in which 32-bit network addresses on variable sized networks are used to address hosts. The second version, IPv6, uses 128-bit network addresses to address hosts, and provides some other changes to the protocol.

IPv4 Networking Concepts
IP Address:
172.17.5.3 = 10101100, 00010001, 00000101, 00000011
Netmask:
255.255.255.0.0 = 11111111, 11111111, 00000000, 00000000

An IPv4 address is a 32-bit number, normally expressed in decimal as four octets ranging in value from 0 to 255, separated by dots. The address is divided into two parts; the network part and the host part. All host on the same sabnet, which can talk to each other directly without a router, have the smae network part; the host part identifies a particular host on a subnet.

In the modern internet, the size of a subnet is variable. To know which part of an IPv4 address is the network part and which the host part, you must know the netmask which the network administrator has assigned to the subnet. The netmask indicates how many bits of the IPv4 address belongs to the subnet. The more bits that are available for the host part, the more hosts can be on the subnet.

The lowest possible address on a subnet (host part is all zeros in binary) is sometimes called the network address. The highest possible address on a subnet (host part is all ones in binary) is used for broadcast messages in IPv4, and is called the broadcast address.

Network masks are expressed in two forms. The older syntex for a netmask which uses 24 bits for the network part would read 255.255.255.0. A newer syntax called CIDR notation. would specify a network prefix of /24. Both syntaxes convey the same information, namely, how many leading bits in the IP address contribute to its network address.


The special address 127.0.0.1 with the 255.0.0.0 netmask always points to the local system ("localhost"), so that it can talk to itself using network protocols.



Linux network Configuration
Method-1
The easiest way to configure networking in Red Hat Enterprise Linux is to use the Network Manager application. It can set system-wide defaults that affect all users, or it can be configured to activate certain network interfaces (perhaps connected to VPN tunnels) only when particular users are logged in.

Steps for configuring an IPv4 network interface:

1. Right click the Network Manager applet and select Edit Connections.
2. Click Add or select a profile and click Edit button.
3. Make sure Connect automatically is checked so that the interface comes up immediately.
4. Also make sure Available to all users is checked so that the interface comes up for all users at boot and is not just up when the current user is looged in.
5. Select IPv4 Settings tab.
6. Select method as Automatic (DHCP) or Manual.
7. With Manual, click Add and specify the IPv4 address, netmask, gateway, and DNS servers.
8. Click Apply.


Q1. Use Network Manager to create a static network configuration profile for your serverX machine
1. Right click on the Network Manager applet icon, and choose Edit Connections.
2. Select System etho and Edit.
3. Navigate to the IPv4 Settings pannel.
4. Choose a configuration Method of Manual.
5. Add a new address lines.
6. Fill in the following paramaters.

A. Address: 192.168.0.100+X
B. Netmask: 24 (or 255.255.255.0)
C. Gateway: 192.168.0.254
D. DNS Servers: 192.168.0.254
E. Search domains: example.com

Display current routing table:

[student@serverx ~]$ ip route
192.168.0.0/24 dev etho proto kernel scope link src 192.168.0.1 metric 1 default via 192.168.0.1 dev etho proto static

Note: This shows us that  we have a direct route to hosts on 192.168.0.0/24 out etho, and our source ip address is 192.168.0.1. Packets to host on other networks will be sent to the router at 192.168.0.1 which can be reached throught etho.

Confirm DNS operation:

[student@serverx ~]$ host instructor
instructor.example.com has address 192.168.0.254
[student@serverx ~]$ host instructor.example.com
instructor.example.com has address 192.168.0.254
[student@serverx ~]$ host 192.168.0.254
254.0.168.192.in-addr.arpa domain name pointer instructor.example.com

Confirm connectivity:

[student@serverx ~]$ ping instructor.example.com
[student@serverx ~]$ ping 192.168.0.254


Method-2
The normal network configuration files in /etc/sysconfig/network-scripts are updated and store the configuration settings.

Subnet Mask
Short for subnetwork mask, a subnet masksubnet, or subnetting is a method of dividing a network of IP addresses into groups. Subnetting allows each computer or networking device in its own subnet to communicate with each other and still allow communication between subnets by routing the traffic through the network router. By dividing a network into subnets, it can improve network security and keep overall network traffic balanced. A common example of a subnet mask for class C IP addresses is 255.255.255.0 and is the default subnet mask for many computers and network routers.

Netmask
A netmask is a 32-bit mask used to divide an IP address into subnets and specify the networks available hosts. In a netmask, two bits are always automatically assigned. For example, in 255.255.225.0, "0" is the assigned network address; and in 255.255.255.255, "255" is the assigned broadcast address. The 0 and 255 are always assigned and cannot be used.
Below is an example of a netmask and an example of its binary conversion.
Netmask:255.255.255.255
Binary:11111111111111111111111111111111
Netmask length8162432
Counting out the bits in the binary conversion allows you to determine the netmask length. In the above example, you have an example of a 32-bit address. However, this address is a broadcast address and does not allow any hosts (computers or other network devices) to be connected to it.
A commonly used netmask is a 24-bit netmask, as seen below.
Netmask:255.255.255.0
Binary:11111111111111111111111100000000
Netmask length81624--
Using a 24-bit netmask, the network would be capable of 2,097,150 networks or 254 different hosts with an IP range of 192.0.1.x - 223.255.254.x. This is commonly plenty of addresses for one network.
A simple formula can be used to determine the capable amount of networks a netmask is able to support. With the understanding that the netmask length is 24, subtract three from that number, e.g. 24-3 = 21. Once this number is determined, take 2 to the x power - 2 (where x is the number you just determined). Which would be 2^21 - 2 = 2,097,150. You are subtracting two from this number because of the broadcast and network addresses that are already being used.
To determine the amount of hosts a netmask is capable of supporting is similar to the above. As you see by the above chart, we have eight zeros. This number is similar to the 21 we determined earlier. Therefore, 2 to the x power - 2. (where x is the number of zeros in the netmask). This would be 2^8 - 2 = 254. Again, two is subtracted from this number to account for the broadcast and network addresses.
Below is a breakdown of each of the commonly used network classes.
ClassNetmask length# of networks# of hostsNetmask
Class A812616,777,214255.0.0.0
Class B1616,38265,534255.255.0.0
Class C242,097,150254255.255.255.0

Comments

Popular posts from this blog

Red Hat Enterprise version list

Red Hat Enterprise Linux 6 Release/Update General Availability Date redhat-release Errata Date* Kernel Version RHEL 6 Update 4 TBA TBA TBA RHEL 6 Update 3 2012-06-20 2012-06-19 RHSA-2012-0862 2.6.32-279 RHEL 6 Update 2 2011-12-06 2011-12-06 RHEA-2011:1743 2.6.32-220 RHEL 6 Update 1 2011-05-19 2011-05-19 RHEA-2011:0540 2.6.32-131.0.15 RHEL 6 GA 2010-11-09 - 2.6.32-71 Codename: Santiago (based on a mix of Fedora 12, Fedora 13, and several modifications) Red Hat Enterprise Linux 5 Release/Update General Availability Date redhat-release Errata Date* Kernel Version RHEL 5 Update 9 TBA TBA TBA RHEL 5 Update 8 02/20/2012 02/20/2012 RHEA-2012:0315 2.6.18-308 RHEL 5 Update 7 07/21/2011 07/20/2011 RHEA-2011:0977 2.6.18-274 RHEL 5 Update 6 01/13/2011 01/12/2011 RHEA-2011:0020 2.6.18-238 RHEL 5 Update 5 03/30/2010 03/30/2010 RHEA-2010:0207 2.6.18-194 RHEL 5 Update 4 09/02/2009 09/02/2009 ...

Installation Red Hat Enterprise & make standered partition

First of all select DVD and reboot your computer. After Booting from DVD you will get below screen. Select  Install or Upgrade an Existing System and press Enter. If you get the following screen then let Anaconda take another step. Select your preferred  Language and Select  Keyboard Layout . In Following Screen you will be able to see 4 Installation Methods, Let me explain Methods here:- Local CD/DVD – It is obvious that If you use CD/DVD media then Choose this option. Hard Drive – Select this if you have dumped your source into any other Linux partition. NFS Directory – You can select this option if you have configured NFS server. URL – Select this if you want to install using FTP or HTTP Source link. So for step by step installation of RHEL 6 I had  Local CD/DVD Installation Method. If you are not sure about your media then select  OK to verify else select  Skip . If your media is fine till now it will take ...

MBR, Primary, Extended & Logical partition in Red Hat

MBR, Primary, Extended & Logical partition in Red Hat Hard disk and storage device are normally divided up into smaller chunks called partitions. So that different parts of it can be formatted with different file system or used for different purposes. For example, one partition could contain user home directories while another could contain system data and logs; by placing the data in two separate file system on two separate partitions, even if a user fills up the home directories partition with data, the system data partition may have space. Most Red Hat Enterprise Linux system on the x86 and x86-64 processor architectures use the MBR partitioning format for their hard disk. This is the same format that is used by most Microsoft Windows systems, and dates back to the IBM PC.                              Storage device: /dev/sda In this format, the first sector of the disk is reser...