Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After looking through the Linux->Networking forum, there is nothing to explain (in step by step instruction) on how to setup my Linux (RH9) machine to auto assign IP addresses such as 192.168.0.1.....2......3..... etc. to other windows machines connected to the network.
The windows machines do work with windows XP as the server with ICS (Internet Connection Sharing), but I'm trying to see how Linux stands up against windows for security. I can switch between XP and Linux, quite easily.
There are posts in the forum to say to type this and that and add this and that to whatever, but I would like to have a step by step instruction starting from as if Linux had just been installed, with the KDE desktop running, and nothing else added, and ending with a working network, with ICS and file sharing on the Linux server, and still be able to access the internet from the Linux server (all this can be setup in XP withn 5 minutes).
Everybody is referring to the /etc/dhcp.conf and /etc/dhcp.releases files but what do I do to the network configuration?, DNS? HOST? etc,etc. because when Linux boots it gets to the point where it open the network interface, then fails with something like 'Unable to determin IP address, no connection, check cable' then continues to the KDE desktop.
If someone can provide a step by step instruction based on a working model, it would be much appreciated, as ip addresses 192.168.0.1......2......3...... etc are common ip address for home networking, there shouldn't be any problem using a working model.
Originally posted by Usalabs
Everybody is referring to the /etc/dhcp.conf and /etc/dhcp.releases files but what do I do to the network configuration?, DNS? HOST? etc,etc. because when Linux boots it gets to the point where it open the network interface, then fails with something like 'Unable to determine IP address, no connection, check cable' then continues to the KDE desktop.
If someone can provide a step by step instruction based on a working model, it would be much appreciated, as ip addresses 192.168.0.1......2......3...... etc are common ip address for home networking, there shouldn't be any problem using a working model.
/etc/dcph.conf holds the main configuration of your DCHP server including which addresses to hand out to computers asking.
A working configuration might look like this:
option subnet-mask 255.255.255.0;
range 192.168.0.65 192.168.0.250;
option routers 192.168.0.1;
}
option domain-name-servers tell your clients which DNS server to use, in this case it tell them to use the router (the linux machine) as DNS server. You could echange this for your ISP's DNS servers if you donät have a caching DNS server on your linux machine.
range tell the server which addresses to hand out. option routers tell the clients which default gateway to use.
Now all you have to do is configure your clients for dynamic IP addresses.
The error you get while starting your linux box is due to that the linux box tries to get a dynamic IP address but fails. Are your ISP handing out dynamic IP's or do you have a static?
I'm using an internal modem to dial to my ISP, whom issues a dynamic address.
To write this reply, I'm using the linux box. What I would like is the Linux box to issue IP addresses to windows boxes connected to a LAN, without disturbing the dial-up, so that the windows boxe(s) can share that dial-up connection.
I tried a configuration similar to the one you posted, but it keeps saying to add 'ddns-update-style ad-hoc;' to the beginning of the file.
That's right you need that line for newer versions of DHCP server.
Also you will have to enable ip forwarding to enable your LAN clients access to internet.
run echo '1' > /proc/sys/net/ipv4/ip_forward
this will enable ip forwarding for this session. to make it last you will have to edit the file /etc/sysctl.conf and add the following line net.ipv4.ip_forward = 1
Last step is to configure IP Masquerading. Run: iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
Change the ppp0 to the device name your modem has.
Not 100% on the iptables command.
I tried what you suggested, and also disabled the Linux firewall, (enabled now to use internet), I get the error 'not configured to listen on any devices' when I start the DHCP server with DHCPD -f at the root shell, and it's still looking for an IP address at bootup, when it tries to open the eth0 interface.
I also tried changing the settings in the network configuration, using the RH net config program, from 'automatically obtain IP address settings from (pulldown box) DHCP, to 'statically set IP address' and entered these addresses:-
Manual IP address settting:-
Address=192.168.0.0
Subnet mask=255.255.255.0
Default Gateway Address=192.168.0.1
then I saved the config, then enabled the interface, then issued (from the root) dhcpd -f and this is the displayed results:-
Internet Software Consortium DHCP Server V3.0pl1
Copyright 1995-2001 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Wrote 0 leases to leases file.
Listening on LPF/eth0/00:20:18:d5:80:a7/192.168.1.0/24
Sending on LPF/eth0/00:20:18:d5:80:a7/192.168.1.0/24
Sending on Socket/fallback/fallback-net
then after turning on one of the windows machines, and tried ping 192.168.0.1 I get 'Host unreachable' I then tried ping 127.0.0.1 this worked ok on both machines.
There's something wrong somewhere, and I just can't figure it out.
i presume you realised that "/etc/dcph.conf" was a typo make sure it's "/etc/dhcpd.conf". there are some slight differences in standards, but dhcpd.conf is that most standard config file name
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.