i need fixed IP address.
i have connected to DHCP address.
when the server is down i do not get IP adress.
[student@ws108 network-scripts]$ cat ifcfg-eth0
[student@ws108 network-scripts]$ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:11:09:18:ED:D9
inet addr:10.255.240.104 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::211:9ff:fe18:edd9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:362179 errors:0 dropped:0 overruns:0 frame:0
TX packets:16013 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:33387890 (31.8 Mb) TX bytes:2192496 (2.0 Mb)
Interrupt:11 Base address:0x9000
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:702 errors:0 dropped:0 overruns:0 frame:0
TX packets:702 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:49903 (48.7 Kb) TX bytes:49903 (48.7 Kb)
how to set my file to get a fixed ip addres even though the server is down.
If it is only for a temporary until the DHCP is up again you can always (as superuser/root) use the ifconfig command to set your IP for the desired interface.
ifconfig <interface> <ip-address>
ifconfig eth0 192.168.1.166
This is however temporary and if the dhcpcd suddenly receives an address your interface would most likely be updated. Also if you reboot the machine or do a network restart it will also revert back to the old settings.
okey just forget about DHCP
okey just forget about DHCP server.
i have only one standalone system.
i do not want to fix my IP address every time using "ifconfig"
but whenever my system boot's i have to have a fixed IP address.
this is what i need.
I am not using Mandrake any more, but I did a few years ago and the network configuration was very straightforward.
Actual programs may have changed a little since I used Mandrake but it should be pretty straight forward.
If you are using X then I suggest you find the Network & Internet settings in the menus of system configuration. When the application starts you should be given a choice to configure your interface as either DHCP assigned address or manual assigned addresses, then it should give you options to fill in IP address, netmask and anything else that you need. This change will be permanent even after reboot.
Otherwise you can most likely use drakconf or drakconnect (don't remember the exact name) to accomplish this just as well from the shell.
Of course you could bang the config files directly, assuming Mandrake still is quite similar to a RedHat box an example of how to do this would be something like below.
Please back up any settings before you change them, if you do a mistake you can always go back. Personally I use RCS on my settings to be able to revert to an older version if necessary.
in /etc/sysconfig/network-scripts/ifcfg-eth0 <--- or eth1 etc depending on which is your LAN interface
You then need to tell the system where your nameserver sits
Now all these IP's are just examples. You should of course change them to what is relevant for your system. After that a /etc/init.d/network restart command should bring them to effect.
yeah it works well.thanks.
|All times are GMT -5. The time now is 09:21 AM.|