command: system-config-network
Once if ip address is set, restart the network service
 service network restart
How to verify IP Address of our machine
 # ifconfig
 # ip addr show eth0
How to activate ethernet device:    ifup eth0
How to deactivate ethernet device:  ifdown eth0
Configuration file for 'eth0' device:
 /etc/sysconfig/network-scripts/ifcfg-eth0
 DEVICE=eth0
 BOOTPROTO=static
 HWADDR=00:0c:29:66:73:a8
 ONBOOT=yes
 IPADDR=192.168.42.100
 NETMASK=255.255.255.0
ping: To check wether the machine is accessable or not
 ping 192.168.42.100
hostname: shows the hostname of ur server
 # hostname
 To change hostname temporarily
 # hostname server.example.com
/etc/hosts: Location in our machine where hostnames are resolved. We can add all hostnames in this file as follows:
192.168.42.100 server.example.com server
192.168.42.200 client.example.com client
/etc/resolv.conf: this is the file where DNS server IP is set
search example.com
nameserver 192.168.42.127
hostname -i: to view ipaddress of a machine.(works only when entry in 'hosts' file or in DNS server
 
 
Comments
Post a Comment