Fedora Linux Support Community & Resources Center
  #1  
Old 26th April 2007, 01:58 PM
cheesefarmer Offline
Registered User
 
Join Date: Apr 2007
Posts: 1
Defining a static ip in dhclient.conf

Hi

i'm trying to setup eth0 so that dhcp is tried first, but if a lease cannot be obtained, then to use a static ip for my home network.

The dhclient.conf man page states that this is possible but i cannot work out the options or find an example! Putting the following in /etc/dhclient.conf doesnt produce the desired result:

timeout 30;
alias{
interface "eth0";
fixed-address 192.168.100.10;
subnet-mask 255.255.255.0;
}

Any help would be much appreciated!

Thanks

Chris
Reply With Quote
  #2  
Old 3rd May 2007, 10:19 AM
alpha645 Offline
Registered User
 
Join Date: Jul 2006
Posts: 740
I have wlan0 as my default device.

Look at this file: /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=Charlie
GATEWAY=192.168.2.1
BOOTPROTO=static # I added this

And in /etc/sysconfig/network-scripts/ifcfg-wlan0:

# Broadcom Wireless 4311
DEVICE=wlan0
BOOTPROTO=static
DHCPCLASS=
HWADDR=00:1A:73:2C:73:A1
ONBOOT=no
DHCP_HOSTNAME=Charlie
IPADDR="192.168.2.103"
NETMASK=255.255.255.0
NETWORK=192.168.2.0
BROADCAST=192.168.2.255

After inserting these files, connecting with encryption was enough. Negotiation went automatically I didn't even had to execute dhclient wlan0...

You should be able to understand this by reading (I think, you seem quite experienced). If you have anymore questions, post it .
Reply With Quote
Reply

Tags
defining, dhclientconf, static

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot find dhclient.conf nspmangalore Servers & Networking 3 19th September 2008 03:33 PM
Defining static IP if DHCP doesn't work IK81 Servers & Networking 1 16th September 2007 10:08 AM
Dhclient and resolv.conf crossmr Using Fedora 0 11th October 2006 03:37 AM
NTP problem: dhclient-script changes ntp.conf SoldierSvejk Servers & Networking 2 7th September 2006 12:17 AM


Current GMT-time: 09:30 (Saturday, 25-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Kingsport - Toyokawa Photos on Instagram - Emmendingen Travel Photos on Instagram