![]() |
routing with dhcp dnsmasq
I know what you are thinking, there are countless posts on this topic, but I think I did a simple but a "should-working" configuration and it is somehow not working ;-) ... (I can't find the fault)
Well I have to laptops both running slackware 12.0. One is the server and is online via ppp0 (DSL so it uses eth0 - udev rules are making sure of that) this server has another card (eth1 - pcmcia) with a crossover cable to the client. So ifconfig of the server is: Code:
eth0 Link encap:Ethernet HWaddr 00:10:A4:8E:5B:98 Code:
# Others like "nat" must be explicitly stated.This line with clamp-mss-to-pmtu I found somewhere on the net, but it is not helping really - I could leave this away ... The rc.dnsmasq is also 755. If I do something like: Code:
cat /etc/dnsmasq.conf |grep -v "#"Code:
interface=eth1So my problem is that the internet connection of the client is sometimes ok, sometimes really bad. I can have good traffic on my lan (intern) with about 5000kb/s (rsync ssh) but it is also on the same day possible that irssi is giving Server Lags of 3 to 4, while connected to a chatserver on my server (intern) and surfing with a browser is a pain. Something is not working here and I can't find the fault, if someone could help me I would be really thankful. y0shi |
no, that's not what i'm thinking at all. i'm thinking since when did dnsmasq have anythign at all to do with routing...? you've mixed up a lot of unrelated things into a bit of a confusing mess... are you getting suitable IP addresses reguarly? if so then dnsmasq is totally irrelevant. divide and conquer!
|
slackware as a router using iptables and dnsmasq for dhcp
well you are absolutely right, the title is stupid it should be something like: "slackware as a router using iptables and dnsmasq for dhcp" ...
would be better I think. So I use dnsmasq as a dhcpd (on server) for my client, but to solve my connection problems it might be clever do switch to static ip on the client and stop rc.dnsmasq - I did this now. But it seems that it has nothing to do with dnsmasq, because my connection problem persists. Is my rc.firewall correct? Is there something else to edit/configure? Thanks in advance. y0shi |
Here's how I made my computer into a router:
http://www.linuxquestions.org/questi...4/#post2908609 I hope it's detailed enough. |
Thank you for that guide I will definitely try this out!
If I look at the output of http://www.slackware.com/~alien/efg/ it get's clear to me - the art of iptables is described far too easy in Pats mail to root ;-) |
well i tried this guide, i dont use dnsmasq anymore simply dhcpd and the iptables script from Alien Bob, but my connection problems persist.
as an example: i browse the net with firefox and it works kind of slow, but it works. than i open a terminal and try to login via ssh into that server'n'router, that works too, but it needs about 12 sec untill it logs in - so i have than a really slow connection also with firefox than. the same happens with other applications i really dont think its related to ssh or something. it is also not that my cable is too long, because i used the same cable with a normal router (some cheap box with a DSLmodem inside), now i just have a very short crossover cable in between too. the box i use for the server'n'router is a T20 with 700Mhz and 256MB RAM and the client has even more Mhz and RAM, so this should not be the issue i think? does anyone has experience with stuff like that? Tanks for your time! |
i have something to add, maybe numbers say more ...
i pinged from client (192.168.0.3) to server'n'router (192.168.0.1) and got this: --- 192.168.0.1 ping statistics ---as you can see sometimes it is fast as it should be (0.176) and sometimes it is slow as hell (13946.233) ... i really have no clue |
Whoah ... that's very odd. Is the cable you're using new and undamaged ? Are both cards new and in working order ? (clean, no dust all over them)
|
Quote:
One card is laptop internal (thinkpad X30) and the other one is a pcmcia card - i had the same problem with another pcmcia card i have (tested both). Also I tested a different laptop as a server'n'router with the same pcmcia cards and it was the same - thats why I thought it isnt a hardware problem ... If you look at http://amor.rz.hu-berlin.de/~rheinwaa/ping.png you see the ping statistics as a plot - as you can see on some times ping needs very long and on some times not, there is nothing much in between. The long ping times are to the same time where I try to access a website with pictures or so ... |
So the connection of the server to the internet is just fine, right ? It's only the connection of the internal network client to the server that is slow ?
It's interesting to note: Quote:
The fact that you get overruns and it drops many RX packets is really bad for the connection: http://uwsg.iu.edu/hypermail/linux/k...05.1/1725.html Now, they solved the problem by 'rmmod' ing some acpi modules, like 'processor'. Maybe try that on the server ? It may be all of ACPI that is the problem, in which case you may want to try APM. |
Thanks for your reply, I was not able to test it, now I am ...
... I recompiled my kernel on server'n'router with static apm and no acpi at all. At first it looked like performance would be better, so I opened up a rsync connection with bwlimit=999 to get some traffic and the good news is untill now there are no errors, overruns and dropped pakets, but the connection is as bad as before: Code:
eth1 Link encap:Ethernet HWaddr 00:00:21:5C:0B:22 Code:
--- 192.167.0.1 ping statistics ---Oh I wanted to press `Submit Reply' but thought maybe now is something interesting about 8139too in dmesg, after changing to apm and indeed there is nor a lot of stuff ... an excerpt: Code:
NETDEV WATCHDOG: eth1: transmit timed outLooks like from the firewall? I now use the one by Alien Bob ... |
I think it may be a hardware issue. Try looking through here:
http://lkml.org/lkml/2005/2/5/141 or http://www.ussg.iu.edu/hypermail/lin...02.0/1632.html |
Well this is not really solved and clear to me, but I have a work around for this problem.
I simply use my pcmcia ethernet as the outgoing connection to the internet (DSL modem) and use the internal networkcard for my intranet. All my connections seem to be perfect now ... Tank you guys ;-) |
| All times are GMT -5. The time now is 04:07 AM. |