Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have just installed Fedora Core 10 on my PC(intel 945 G). Somehow my system is not able to boot in init 5(I am ok with it). So I am using text based mode of linux.
I want to set up this computer on lan. So I used utility system-config-network and gave the ipaddress and appropriate netmask.
after this when I am doing ifconfig -a , It is showing eth0 as having Ip given by me.At this point of time I tried to ping other computer on lan,But it did not work and system told me that destination is unreachable. I tried making down eth0 again,
Ifdown eth0
after that when I am trying to up it again
with ifup eth0, It is showing that
ADDRCONF(NETDEV_UP):eth0: link is not ready .
further ifconfig -a , Also does not show ip address given by me for eth0 device.
I have made entry in /etc/sysconfig/network-scripts/ifcfg-eth0 for IPADDRESS and netmask also have bootoption there as yes.
Can Someone please help me,Where exactly I am getting it wrong.
NETWORKING=yes
HOSTNAME=yourhostname
GATEWAY=1.2.3.4. <--- whatever your gateway is
in /etc/sysconfig/network-scripts/ifcfg-eth0
Code:
DEVICE=eth0
BOOTPROTO=static
HWADDR= 00:00:00:00:00 <--- whatever your MAC address is
IPADDR=1.2.3.4<--- whatever your ip us
NETMASK=255.255.255.255 <---whatever your subnet mask is
ONBOOT=yes
TYPE=Ethernet
Since you are using a text console then I would setup a static IP first, do as root from cli;
Code:
~#ifconfig -a #get recognized devices
~#ifconfig eth0 192.168.0.10 #set to a available IP
~#route add default gw 192.168.0.1 #set to your gateway
~#route -n #show the route table
~#ifconfig eth0 up #should be up already
~#ping 192.168.0.1 #ping your gateway
~#ping 208.69.32.130 #google.com IP
~#ping google.com #test DNS, if fail then
#check /etc/resolv.conf
You should have your '/etc/resolv.conf' setup with your 'ISP DNS' nameservers.
Code:
sample '/etc/resolv.conf';
search 192.168.0.1
nameserver xxx.xxx.xxx.xxx #ISP DSN 'replace xxx.xxx.xxx.xxx
#with IP from your ISP
nameserver 4.2.2.1 #Verizon third level DNS
nameserver 4.2.2.2 #to use as fallback
nameserver 4.2.2.3
nameserver 4.2.2.4
If you are wanting to use name resolution on your LAN then as stated you will need to setup your 'hosts' file(s);
Quote:
excerpt from 'man hosts'
hosts - The static table lookup for host names
SYNOPSIS
/etc/hosts
DESCRIPTION
This manual page describes the format of the /etc/hosts file. This file is a simple text file that associates IP addresses with hostnames, one line per IP address. For each host a single line should be present with the following information:
IP_address canonical_hostname aliases
Fields of the entry are separated by any number of blanks and/or tab characters. Text from a "#" character until the end of the line is a comment, and is ignored. Host names may contain only alphanumeric characters, minus signs ("-"), and periods ("."). They must begin with an alphabetic character and end with an alphanumeric character. Aliases provide for name changes, alternate spellings, shorter hostnames, or generic hostnames (for example, localhost). The format of the host table is described in RFC 952.
The Berkeley Internet Name Domain (BIND) Server implements the Internet name server for UNIX systems. It augments or replaces the /etc/hosts file or host name lookup, and frees a host from relying on /etc/hosts being up to date and complete.
Code:
sample;
~# cat /etc/hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
#
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine. It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#
# For loopbacking.
127.0.0.1 localhost
#04-09-07 09:52 renew
#
192.168.1.1 modem.workgroup modem #dsl modem
192.168.1.2 server.workgroup server #server
192.168.1.3 someuser.workgroupr someuser #some user
You can do a LQ search as this has been covered a lot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.