LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-05-2011, 06:15 AM   #1
vzxen
Member
 
Registered: Jul 2010
Posts: 126

Rep: Reputation: 4
DHCP IP not being brought up


Hi,

I have made a CentOS AMI Image for Amazon EC2
Now the network is starting but it doesnt even try to determine the IP :
Bringing up interface eth0: [ OK ]

BUT if I hit the ifconfig :
eth0 Link encap:Ethernet HWaddr 12:31:39:0A:99:F8
inet6 addr: fe80::1031:39ff:fe0a:99f8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:90 (90.0 b)

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:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:316 (316.0 b) TX bytes:316 (316.0 b)

What could be possibly wrong ?
The network script is not even trying to determine the IP.
Please help.
 
Old 06-05-2011, 08:45 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
How are you connecting to the network (wired or wireless)? And how are you getting your IP (DHCP or static)?

My guess is probably wired+DHCP, and if so, you probably just need to run "dhcpcd eth0" (or another DHCP client) in order to get assigned an IP address. If not, then tell us a bit more about your setup and we might have more chance of working out what's going wrong the "Bringing up the interface eth0" message doesn't say anything about actually connecting to the internet.

Hope this helps,
 
Old 06-05-2011, 02:14 PM   #3
vzxen
Member
 
Registered: Jul 2010
Posts: 126

Original Poster
Rep: Reputation: 4
Hi,

Its a VM on Amazons EC2.
So yes its wired and DHCP.

Isnt "dhcpcd eth0" supposed to run on startup ??
 
Old 06-06-2011, 01:01 AM   #4
sibe
Member
 
Registered: Apr 2011
Location: Jakarta, Indonesia
Distribution: Fedora, CentOS
Posts: 122

Rep: Reputation: 21
--
Quote:
Originally Posted by vzxen View Post
What could be possibly wrong ?
The network script is not even trying to determine the IP.
Nothing wrong with it; an UP and RUNNING interface without an IP is normal.
You should check the configuration to see if the interface is set with BOOTPROTO=dhcp. Otherwise, you can set it manually.

To make sure if there's a DHCP server running on the network segment, invoke the client to get an address :
Code:
# dhclient eth0
 
Old 06-06-2011, 10:14 AM   #5
vzxen
Member
 
Registered: Jul 2010
Posts: 126

Original Poster
Rep: Reputation: 4
Hi,

Is "dhclient eth0" to be called after NETWORK startup or before ?
 
Old 06-06-2011, 04:20 PM   #6
sibe
Member
 
Registered: Apr 2011
Location: Jakarta, Indonesia
Distribution: Fedora, CentOS
Posts: 122

Rep: Reputation: 21
Hi,

you can call dhclient at any time, if it succeeded, then your interface should be set with a valid address, a default gateway and DNS IP. You should see something like this :

Code:
~# dhclient eth0
--output cut--

DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 10.1.1.254
bound to 10.1.1.129 -- renewal in 769 seconds.
~#
From this point you should check the configuration file, /etc/sysconfig/network-scripts/ifcfg-eth0, and set it with BOOTPROTO=dhcp, and you're good to go.
 
  


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
Could XPDF be brought back into the distro? frenchn00b Debian 1 05-24-2010 08:10 AM
New-subnet brought hell to me TAAN Fedora 1 02-25-2006 07:37 AM
Interface not brought up on booting !! OneManArmy Linux - Networking 2 04-08-2004 06:10 PM
iv just brought a camcorder master Linux - General 4 03-13-2004 01:11 PM
Guess what Santa brought? equinox Mandriva 7 03-08-2004 02:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:40 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
Open Source Consulting | Domain Registration