LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-04-2010, 08:28 PM   #1
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Rep: Reputation: Disabled
Question Network server (DHCP) and connectivity problems


Hi,

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.

Seems odd.... Any clue whats going on?

Last edited by lpallard; 05-04-2010 at 08:30 PM.
 
Old 05-05-2010, 02:11 AM   #2
stuart_cherrington
Member
 
Registered: Aug 2008
Location: Get back in your Cube Unix Boy!
Distribution: rh5, oel5, debian etch, solaris
Posts: 228

Rep: Reputation: 36
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).

Stuart.
 
Old 05-06-2010, 07:48 PM   #3
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Original Poster
Rep: Reputation: Disabled
Well I tried the routing stuff, and I have not succeded...

I am wondering how to do that... I think you are right when you say that the router doesn't know how to forward the packets..

Anybody uses slackware and setup a similar network structure?
 
Old 05-06-2010, 08:24 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,681

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Have you setup IP forwarding, NAT or a firewall yet?
 
Old 05-06-2010, 08:37 PM   #5
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Original Poster
Rep: Reputation: Disabled
michael,

do I did not setup anything... I tried IP routing, but since I am not very knowledgeable in network sciences, I failed (LOL)
 
Old 05-06-2010, 09:38 PM   #6
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 99

Rep: Reputation: 21
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.
 
Old 05-07-2010, 06:18 AM   #7
rajshekarj
LQ Newbie
 
Registered: Oct 2009
Posts: 3

Rep: Reputation: 0
Internet (ISP) --> Modem --> DHCP machine --> Router (no DHCP - acting as a switch) --> computers & printers

Can you please put the ip subnet at various stages in above diagram along with routes?
And how many NIC do you have in DHCP machine?
 
Old 05-07-2010, 11:59 AM   #8
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Original Poster
Rep: Reputation: Disabled
Hi! Thanks fo rthe many replies! I will definitely follow up and provide the requested information as soon as I get back home tonight!
 
Old 05-08-2010, 02:26 PM   #9
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Original Poster
Rep: Reputation: Disabled
Post

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:

Code:
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
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.....

As for the DHCP.conf file in the DHCP seever:

Code:
authoritative;
ddns-update-style none;
ignore bootp;
option domain-name-server 8.8.8.8;
subnet 192.168.0.0 netmask 255.255.255.0 {
   option domain-name "lp-domain"
   option broadcast-address 192.168.0.100;
   option subnet-mask 255.255.255.0;
and then the pool statements.......

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 hope this will help!!! Im clueless.....

Last edited by lpallard; 05-08-2010 at 02:34 PM.
 
Old 05-08-2010, 10:45 PM   #10
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 99

Rep: Reputation: 21
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.
 
Old 05-08-2010, 11:11 PM   #11
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-09-2010, 12:27 PM   #12
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Original Poster
Rep: Reputation: Disabled
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???
 
Old 05-09-2010, 09:32 PM   #13
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Original Poster
Rep: Reputation: Disabled
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...

Anybody have a clue whys that??
 
Old 06-06-2010, 06:34 PM   #14
lpallard
Senior Member
 
Registered: Nov 2008
Posts: 1,045

Original Poster
Rep: Reputation: Disabled
Ok the Smoothwall thing has been working, I simply not configured properly the options....
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Server should shutdown when network connectivity goes down. rhizopod Linux - Server 1 10-20-2009 12:22 AM
RHEL 5 server network connectivity very strange bajones Linux - Networking 7 06-25-2008 01:30 AM
Ubuntu 6.10-->DHCP problems, no network connectivity... borjag Linux - Newbie 4 12-28-2006 02:17 AM
Server connectivity problems Elrodin Linux - Networking 1 08-08-2006 05:13 PM
10 RC1 with PCMCIA on Laptop - X Server Breaks Network connectivity 1kyle SUSE / openSUSE 4 09-16-2005 05:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration