You can easily setup network through linux command from terminal as root user(# prompt) :
system-config-network
But if you do not have this command installed then you have to setup network manually.
1. Check to see if kernel can see your network card by running the following command-
ifconfig
If it returns with "eth0:" which is ethernet interface 0 then your kernel can see network card . You will also see lo: local loopback interface. If you cannot see eth0 or eth1 then you will need to download network driver from internet.
2. Now, make sure your network cable is connected properly -check the link light (green light on the network socket) turns green on successful physical connection.
3. Setup IP address: If you are using dhcp (dynamic ip ) from your router/network(which is common) then you can setup ip address simply by running the following command from terminal:
dhclient eth0
But, if you are setting up ip address manually then run the following command (replace with proper ip address):
ifconfig eth0 192.168.0.100 netmask 255.255.255.0
4. Test connection by pinging your gateway(router) :
ping 192.168.0.1
If you can successfully ping your gateway then your box is connected to your local network.
Other things to check for successful internet connection are:
Default gateway - "route -n" will show all your gateway. If you have to set manually then you can set the default gateway as "route add default gateway 192.168.0.1 " (if 192.168.0.1 is your router/gateway address). Default gateway is required to route any packet outside your local network (IE to internet).
DNS - "cat /etc/resolv.conf" this will show your dns servers. You can edit the file /etc/resolv.conf to add dns server address. Your entry should be as "nameserver IP_address_of_dns_server". DNS server is required for your box to translate domain name to ip address.
If you have these setting then you should be able to access internet.
There is no need to install CentOS it is a ditto copy of Red Hat Enterprise Linux.
Good luck
Last edited: 04-Jan-10 07:19 PM
Last edited: 04-Jan-10 07:23 PM