config network

Send Snippet To: Save this snippet to Code Collector Pro -- view all onlin85's snippets
language: Other
license: Other

Code for Snippet:

                
Method 1: using GUI tool:
#setup
or
#system-config-network
or
#system-config-network-tui
or
#redhat-config-network
 
Method 2: manually by command UI
 
***********************************************************
	step 1: change directory to /etc/sysconfig/network-scripts/
***********************************************************
#cd /etc/sysconfig/network-scripts/
 
***********************************************************
	step 2: create/edit files in /etc/sysconfig/network-scripts/
***********************************************************
# vi ifcfg-eth0
 
DEVICE=eth0
BOOTPROTO=static
DHCPCLASS=
IPADDR=x.x.x.x
NETMASK=x.x.x.x
ONBOOT=yes
 
***********************************************************
	step 3: define gateway (router IP) and hostname
***********************************************************
#vi /etc/sysconfig/network
 
NETWORKING=yes
HOSTNAME=www.sample.in
GATEWAY=x.x.x.x
 
***********************************************************
	step 4: reset network service
***********************************************************
#/etc/init.d/network restart
 
***********************************************************
	step 5: make sure u have correct DNS server
***********************************************************
#vi /etc/resolv.conf
nameserver x.x.x.x
nameserver y.y.y.y
nameserver z.z.z.z
 
 
comments powered by Disqus

Info

Tags: linux network bash-shell

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 433
Date Added: 2013-01-25 04:31:42
Last Modified: 2014-05-05 20:39:29

Web Analytics