IP ADDRESS
An IP address can be thought of as being similar to
a phone number. Just as every person who communicates with a telephone is using
a phone with a unique phone number, every computer that is on the internet has
a unique IP address. Not only on internet but within an organization every
computer is assigned an IP address so that they can communicate with each other.
Basically IP addressing is very deep concept. To understand the concept of IP
address we need to understand some important aspect of IP address which is
- IP address Classes
- Subnet mask
- Gateway
The above concepts in IP addressing are very
important to understand IP address clearly.
But in this tutorial we will learn about assigning
or changing the IP address in Linux.
Steps for changing the IP Address.
- To change or assign IP Address use the following utility.
- #setup or #system-config-network
- It will open a text base utility follow the steps below and change the IP Address
- Restart the network service to apply the changes
- Make the network service starts after reboot.
- Let’s start with setup
#setup
[root@rahul
Desktop]# setup
|
Move the cursor to Network configuration and press
Enter
Move the cursor to device configuration and press
Enter
Note:
If you system-config-network command
is used, it will directly take you to above position.
Now select the NIC adapter i.e. eth0 and press Enter
Assign the above IP address and other details as per
your requirement, move the cursor to “OK” and press Enter
Move the cursor to “save” to save the changes in
device configuration and press Enter.
Once again move the cursor to “Save&Quit” button
and press Enter
Finally Move the cursor to “Quit” button and Press
Enter to quit the utility.
Now restart the network service and check for the IP
Address
#service
network restart
If the change is not reflected with above service
restart, restart the network manager
#service
NetworkManger restart (N and M are case sensitive)
[root@rahul
Desktop]# service network restart
Shutting
down interface eth0: [ OK ]
Shutting
down loopback interface: [ OK ]
Bringing
up loopback interface: [ OK ]
[root@rahul
Desktop]# service NetworkManager restart
Stopping
NetworkManager daemon: [ OK ]
Setting
network parameters... [ OK ]
Starting
NetworkManager daemon: [ OK ]
[root@rahul
~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 08:00:27:0A:86:5B
inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr:
fd17:625c:f037:2:a00:27ff:fe0a:865b/64 Scope:Global
inet6 addr:
fe80::a00:27ff:fe0a:865b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
RX packets:7 errors:0 dropped:0
overruns:0 frame:0
TX packets:40 errors:0 dropped:0
overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:770 (770.0 b) TX bytes:5061 (4.9 KiB)
[root@rahul
~]#
|
The above table confirms that we have successfully
assigned an IP address to a machine.
If you Like post then share and comment please And
if you have any suggestion for me do comment ......
Post a Comment