Академический Документы
Профессиональный Документы
Культура Документы
Change IP, Gateway, Hostname and DNS Information (We need this changing
for
client-server communication in LAB)
- File containing IP, Gateway and DNS Information: /etc/sysconfig/networkscripts/ifcfg-eth0
- File containing Hostname Information: /etc/sysconfig/network
LAB Practice:
01. From Terminal
- Change IP, Gateway, DNS Information
# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.20
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
DNS1=192.168.0.254 -----------------------> introduced in RHEL6
- Change Hostname Information
# vim /etc/sysconfig/network
1 / 4
RH124-Day02
Written by Razib Shahriar Rubence
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=station20.example.com
- Restart the network service to make each of the above information
effective. Need to reboot
machine for hostname change
# service network restart (or # /etc/init.d/network restart)
- Check the changes took effect
# ifconfig (for IP Information)
# route -n (for Gateway Information)
# hostname (for hostname information)
# ping server1.example.com (checking your dns is resolving other computers'
hostname)
# dig server1.example.com (check the dns records )
02. Graphical Way:
Open "Network Configuration Window" from System->Administration->Network or
by typing
following in terminal
# system-config-network
Edit Information from "Devices"
GNOME Graphical Desktop and Editing File with gedit:
------------------------------------------------------------------
RH124-Day02
Written by Razib Shahriar Rubence
RH124-Day02
Written by Razib Shahriar Rubence