• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 212
  • Last Modified:

Linux DHCP question

How do I correctly configure my linix anaconda-ks.cfg file so that it tries to acquire a ip address from my router via dhcp????????

Just to give an idea - it looks like this:


netrowk --device eth0 -- bootproto static --ip 10.10.10.20 --ntmask 255.255.255.0 --gateway 10.10.10.254 --hostname mypc
 
** I am going through a vmware session and I am current getting this from my ipconfig from windows:

PLEASE HELP.
THanks

Ethernet adapter Local Area Connection 2:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.111.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet1:

        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 192.168.48.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :

Ethernet adapter Wireless Network Connection:

        Connection-specific DNS Suffix  . : Belkin
        IP Address. . . . . . . . . . . . : 192.168.2.3
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.2.1

Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :
        Autoconfiguration IP Address. . . : 169.254.27.95
        Subnet Mask . . . . . . . . . . . : 255.255.0.0
        Default Gateway . . . . . . . . . :
0
pjjc
Asked:
pjjc
  • 2
1 Solution
 
wesly_chenCommented:
Hi,

   Assume the IP address, default gateway and DNS server are assigned by DHCP server:

netrowk --device eth0 -- bootproto dhcp --hostname mypc

Wesly
0
 
pjjcAuthor Commented:
I tried this and it still does not work - it appears to pick up the same static values from above.

rebooted and checked the file to make sure it was updated and IT WAS.
But the IP address was the same static as above.

I then tried to do an ifup eth0 and it came back with the following:
RTNETLINK answere: file exists

I then tried to do a ifconfig eth0 up  and then check the ip address and the same DAMN static ip address - ANY CLUE?

Thanks

0
 
wesly_chenCommented:
Hi,

   anaconda-ks.cfg is the system configuration file of your system includes which packages you have installed.
It's for Kickstart installation reference. The setting in there will not affect your IP addressing.

   The IP address is configured in /etc/sysconfig/network-scripts/ifcfg-eth0.
You can use "netconfig" to config eth0 using dhcp. Or change "bootproto=dhcp" in /etc/sysconfig/network-scripts/ifcfg-eth0.

Wesly
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now