LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-23-2010, 01:33 AM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
unable activating eth0


My box is centos x86 5.4.

I changed lan card and tried to enable eth0 with command "ifconfig eth0 up", but not worked.

Code:
[root:localhost:~]# ifconfig eth0 up
[root:localhost:~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 08:00:27:9A:7B:6F
          inet6 addr: fe80::a00:27ff:fe9a:7b6f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:7276 (7.1 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4335 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4335 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5417372 (5.1 MiB)  TX bytes:5417372 (5.1 MiB)
Pleaase let me know how to enable eth0 and see "inet4 address".

Thanks in advance.
 
Old 09-23-2010, 01:39 AM   #2
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Hi,

Please let us know if your network has dhcp server.

you get ipaddress from dhcp server or you have to do it manually?


do this:
Run as root

Code:
system-config-network
Double click on ethO and see that
Activate Device when Computer starts id Checked

(here you can give static ip or configure it to get ip from dhcp)

also disable firewall and selinux
 
Old 09-23-2010, 01:53 AM   #3
leejohnli
Member
 
Registered: Sep 2010
Posts: 66

Rep: Reputation: 2
"dhclient eth0" if it is dynamically assigned address.
 
Old 09-23-2010, 03:14 AM   #4
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
About dhcp, I got these results.

Quote:
[root:localhost:~]# service dhcpd start
starting dhcpd: [failed]
[root:localhost:~]# dhclient eth0
Internet Systems Consortium DHCP Client V3.0.5-RedHat
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/08:00:27:9a:7b:6f
Sending on LPF/eth0/08:00:27:9a:7b:6f
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 15
No DHCPOFFERS received.
No working leases in persistent database - sleeping
 
Old 09-23-2010, 03:23 AM   #5
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Quote:
Originally Posted by windstory View Post
About dhcp, I got these results.
DHCP server is the one which assigns IP address, gateway, netmask , DNS entries etc to your machine.

Please check weather DHCP Server is configured properly. Because you are getting No DHCPOFFERS received. as error. You have told that you have changed the LAN card. So MAC address might have got changed.

Change your old MAC address entry in DHCP server to new one.

Paste your /etc/dhcp.conf configuration file contents here.

Last edited by vinaytp; 09-23-2010 at 03:26 AM.
 
Old 09-23-2010, 03:29 AM   #6
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
This is "/etc/dhcp.conf".

Quote:
authoritative;
include "/etc/rndc.key";
# Server configuration:

server-identifier server;
ddns-domainname "best.dyndns.org.";
ddns-rev-domainname "in-addr.arpa.";
ddns-update-style interim;
ddns-updates on;
ignore client-updates;

# This is the communication zone
zone best.dyndns.org. {
primary 127.0.0.1;
key rndckey;
}
default-lease-time 21600; # 6 hours
max-lease-time 43200; # 12 hours

# Client configuration:
option domain-name "best.dyndns.org.";
option ip-forwarding off;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option routers 192.168.0.1; # default gateway
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option domain-name-servers 192.168.0.1;
zone 0.168.192.in-addr.arpa. {
primary 192.168.0.4;
key rndckey;
}
zone localdomain. {
primary 192.168.0.4;
key rndckey;
}
}
 
Old 09-23-2010, 04:02 AM   #7
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
hi,

What are you trying to do?
You need ip to your system or want to configure dhcp server?
From dhcp server you will get ip?
You dont need to configure your system as dhcp server to get ip on your own system.
From some one get the details of how you get ip's to other system on network ...is it manually set or you get it through dhcp?
 
Old 09-23-2010, 04:12 AM   #8
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Dear windstory,

I did not ask you DHCP configuration file of your local system. I asked DHCP configuration of DHCP server in the network.

You have to worry about DHCP if you are getting IP from DHCP server. Else you can assign static ip address manually and check for connectivity
.

This will come to your help.

http://www.centos.org/docs/5/html/De...rk-config.html
 
Old 09-23-2010, 04:38 AM   #9
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7
Posts: 872

Rep: Reputation: 112Reputation: 112
You are posting info to run a dhcp server. What they (above) are asking how do you connect to a network. Do you connect to a dhcp server with a dhcp client (which pulls IP from a dhcp server).

What does your

/etc/sysconfig/network-scripts/ifcfg-eth0

look like Post it please and put xx on the last to sets of your externel ip if ou are configured with it to keep it private.
 
Old 09-23-2010, 08:00 AM   #10
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
I added ip to "/etc/sysconfig/network-scripts/ifcfg-eth0", but same result.

Quote:
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
HWADDR=08:00:27:4ha:7b:3f
TYPE=Ethernet
IPADDR=192.168.0.4
NETMASK=255.255.255.0
 
Old 09-23-2010, 08:06 AM   #11
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Quote:
Originally Posted by windstory View Post
I added ip to "/etc/sysconfig/network-scripts/ifcfg-eth0", but same result.
First confirm how are you getting IP address. DHCP or manually assigning the IP (static)?

If your BOOTPROTO is dhcp then you do not have to assign IP and Netmask explicitly.

What is your default gateway ? Add it to GATEWAY= and restart network service

Make changes this way.
Code:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
HWADDR=08:00:27:4ha:7b:3f
TYPE=Ethernet
IPADDR=192.168.0.4
NETMASK=255.255.255.0 
GATEWAY=
Code:
# /sbin/service network restart

Last edited by vinaytp; 09-23-2010 at 08:08 AM.
 
Old 09-24-2010, 07:45 PM   #12
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
vinaytp/

I added GATEWAY like this, but same result.

Quote:
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
HWADDR=08:00:27:4ha:7b:3f
TYPE=Ethernet
IPADDR=192.168.0.4
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
Quote:
[root:localhost:~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:4ha:7b:3f
inet6 addr: fe80::a00:27ff:fe9a:7b6f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:3352 (3.2 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1888 errors:0 dropped:0 overruns:0 frame:0
TX packets:1888 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2789480 (2.6 MiB) TX bytes:2789480 (2.6 MiB)

Last edited by windstory; 09-25-2010 at 12:21 AM.
 
Old 09-25-2010, 02:10 PM   #13
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Quote:
Originally Posted by windstory View Post
vinaytp/

I added GATEWAY like this, but same result.
Hi,

What does following command shows ? Please paste the output here.

Code:
cat /etc/sysconfig/network
Make sure NETWORKING=yes in the above output.
 
Old 09-27-2010, 04:50 AM   #14
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by vinaytp View Post
Hi,

What does following command shows ? Please paste the output here.

Code:
cat /etc/sysconfig/network
Make sure NETWORKING=yes in the above output.
The result of "cat /etc/sysconfig/network" is here.

Quote:
DOMAINNAME=master
NETWORKING=yes
HOSTNAME=master
FORWARD_IPV4=false
 
Old 09-27-2010, 05:08 AM   #15
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
Quote:
Originally Posted by windstory View Post
The result of "cat /etc/sysconfig/network" is here.
Could you please tell us how you managed to resolve the issue ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in activating eth0 gaurav1146 Linux - Newbie 19 07-07-2008 07:43 AM
eth0 not activating on boot gummybearx Debian 13 05-08-2007 01:10 PM
eth0 not activating on boot pxumsgdxpcvjm Linux - Networking 7 08-10-2006 03:05 PM
eth0 not activating during bootup nigma Linux - Networking 1 02-13-2004 05:23 AM
Activating eth0 causes problems/delays in login... Why? And how to remediate? patapon Linux - Newbie 4 12-14-2001 07:18 AM


All times are GMT -5. The time now is 06:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration