[SOLVED] Network server (DHCP) and connectivity problems
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.
I decided to open my own thread, thinking my problem is too vague and I cant really pin point the source of the problem. Basically, I wanted to use the Bootp (PXE) protocol to boot a machine (my laptop) from my network instead of using USB/DVD boot medias to reinstall if need be.
My router being a piece of crap, I couldnt setup the DHCP server to allow PXE packets... Confirmed from the manufacturer that it is not possible. Well for a $140 router, you would expect the opposite... well...
Anyways, here I am with a small machine setup with Slack, no desktop enviroment (only CLI) and connected to my router (which I deactivated the DHCP) so the machine can act as a DHCP server. It works very well. However, I would like to install a few other utilities into that machine and for them to work, I need to put the machine between my cable modem and my router. Basically, heres the topology from outside):
Internet (ISP) --> Modem --> DHCP machine --> Router (no DHCP - acting as a switch) --> computers & printers
THe problem is that I cant connect to the modem from the computers on the network. Also I cannot access the internet (go on the WAN side) from the computers.
From the computers (namely my laptop), I can ping the router, but cannot ping the interface where DHCP broadcast. Also I cannot ping the modem. From the router (using the web config page), I can ping the DHCP broadcast. From the DHCP machine, I can ping the modem...
In the DHCP server, I setup the eth0 (the interface where the modem connect to) as a DHCP assigned IP so it can obtain the IP from the modem. THe eth1 (the interface where DHCP broadcast) is static. All my machines obtains a IP from the DHCP machine without a hiccup.
Not going to be a lot of help but this sounds like Network routing issue.
When you ping from the 'computer' the router has no idea how to handle the onward packet progression, are the DHCP and static IP's in the same range? if not, you need to add 'route's to the network table to allow them to speak with each other and allow them to speak to the outside worlds (both modem and computer side).
If your slax box is serving DHCP, and your router is acting as a switch, what device is doing the routing/NATing? What do you define as your default gateway in your configs?
Does your modem NAT? Or does it assign a public IP to your slax box?
Ideally, I'd say your best bet is to configure your slax box as not only DHCP, but as the gateway (Firewall, router, NAT and DHCP) although you may need another interface to do so (internal network, external network, and management iface). I also think that you're going to have to bypass the WAN port and strictly use the switchports in order for your router to truly act as a switch. At least that was the case with my 40 dollar Linksys. I had to use a crossover cable on one of the switchports to "connect" it, not the WAN port.
I modified my setup, but I'm still experiencing major problems... From the machines past the switch (I replaced the router by a plain switch to eliminate the potential of a problem from the router) and basically, I cant ping past the switch.... From the DHCP server, I can ping the DSL modem. Pinging the DHCP broadcast IP (eth1 from the DHCP server) from the laptop (past the switch) will say Do "you want to ping broadcast? Then -b" and will not succeed. Pinging the eth0 (on the other side of the DHCP server (WAN side) will say "NETWORK UNREACHABLE" and same thing for pinging the DSL modem (at 192.168.2.1).... It really looks like the DHCP server cant route correctly.
Ok now the way it is configured is simpler (hardware perspective at least):
Internet -> Modem (192.168.2.1) -> eth0(DHCP from modem with 192.168.2.12/255.255.255.0) / eth1 (static in server's inet1.conf with 192.168.0.100) -> switch (not router) -> laptop (IP from DHCP with reservation in DHCP server as 192.168.0.100)
I created a NAT/forwarding in the DHCP machine from a tutorial at: http://www.zonemikel.com/wordpress/?p=209 and basically created a /etc/rc.d/rc.iptables script (activated at boot time) and its content is:
My setup is pretty much the same as the one from the person who wrote the tutorial but in my case I only have 2 NIC's on the DHCP server (eth0 on the WAN side) and eth1 on the LAN side.
I also had to replace the ">" with ">" because I was receiving an error like wrong command or bad argument.....
ifconfig for both NIC's in the DHCP server:
eth0
inet addr:192.168.2.12 Bcast:192.168.2.255 Mask:255.255.255.0
eth1
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
I'm no dhcpd guru, but I think you need a "option routers" statement in there somewhere to specify the default gateway. The default gateway being the box that's going to route/forward packets onto the ISP. Manually setting all this up is going to be pretty involving. You'll learn alot tho!
But if you're looking for a quick fix, you should try reimaging the box with a distro that does what you're trying to do right out of the box. This would definitely be the easiest route. Untangle, smoothwall, ipcop, pfsense, m0n0wall are a few distros to check out. The only one I've personally used is Untangle and it's pretty awesome.
LVsFINEST, all of the software you suggested are, as far as I know, firewalls. Does it mean that installing such applications on my machine would at the same time act as a router and/or provide necessary functions, hence eliminating or correcting the problems I am currently experiencing???
In the meantime, I will definitely try the "options-router" in the DHCP.conf file and see what happens.
I added option-routers = 192.168.0.100 (the IP of the NIC on the LAN side) and also I realized that there is already a packet forwarding script in /etc/rc.d named rc.ip_forward.....
Could my manually created rc.iptables script interfere with the ip_forward script? Which one should I use???
Well, what happened, is that I installed smoothwall and everything was working fine until, for absolutely no reasons, I stopped having access to the web and could no longer access the web interface on the smoothwall machine.... I can pingeverything on the network even the IP's past the machine...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.