Translate

Sunday, 27 January 2013

Configuration of IP addresh in RHEL

How to assign IP address to RHEL machine

 
first to check the configuration file.
 
 # ls ifcfg-et*
    ifcfg-eth0
file will start with ifcfg-* , Here we have "ifcfg-eth0"
 
Now edit this file by using "vi editor" ( to know details about "vi" please read previous blog) .
 
# vi ifcfg-eth0
DEVICE=eth0                                                           : divice name of network card
HWADDR=08:00:27:25:f6:f0                                   : MAC address
ONBOOT=yes                                                            : It will start automatically after boot (yes)
IPADDR=192.168.80.10                                            : IP address of system
BOOTPROTO=none                                                  : DHCP off
NETMASK=255.255.255.0                                        : subnet mask of machine
TYPE=Ethernet                                                           : Type of LAN
GATEWAY=192.168.80.1                                         : Gateway of machine
IPV6INIT=no                                                              : IP version 6 disable
After this start/restart the network service
 
/etc/init.d/network restart
 
# /etc/init.d/network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:                                [  OK  ]
#
To check the assign IP address use "ifconfig"
 
# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 08:00:27:25:F6:F0
          inet addr:192.168.80.10  Bcast:192.168.80.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe25:f6f0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54022 errors:0 dropped:0 overruns:0 frame:0
          TX packets:936 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3276156 (3.1 MiB)  TX bytes:145609 (142.1 KiB)
 
 
 
 

No comments:

Post a Comment