How to bind services to exclusive nics?
internet
| | | Linksys-router(and switch) | | |--eth1---server (also connects to switch below on eth0) | |---Uplink----Switch(for clients) IPs: 192.168.1.0/24 Router: 192.168.1.1 Server: eth0-192.168.1.2 eth1-192.168.1.3 (RH8) clients : 192.168.1.100-150 (XP) thats my network setup. I want samba to run ONLY on eth0, and all internet services to run on eth1. i have bind interfaces only = yes interfaces = 192.168.1.2/24 127.0.0.1/8 socket address = 192.168.1.2 # programmers option, but it seems to be working It listens on eth0, but transmits on eth1!!! i don't want it to do that. I blocked outgoing packets on eth1 for samba and it just stops working then. I don't want samba clogging up my eth1 traffic, i do a minimun of 3gb TX/day. and it has an inpact on my internetsrvs. eth0 gets like no traffic what so ever. I want samba to be only on eth0. i really don't want to make the server a router to the clients because if it goes down (and it will, all servers do), my clients will be w/o internet access. on the doze boxes, i can only access samba via \\192.168.1.2, but data is still sent from eth1 to the clients. am i missing something? is their a way to do what i want? Its a switched network so having dual nics on network won't cause massive collisions. I have the same problem with the internet services, they all listen on eth0, but transmit on eth1. bah, i've searched the forums, my samba book, www.tldp.org and have found nothing yet. why can't i just make these network cards exclusive to certian services? Is it in the kernel to load balance like that? (not very balanced if you ask me) the internet service that i'm running (for now) is hlds (half life dedicated server). I can't get it so stay on eth0, but i got it to stick on eth1 exclusivly. samba on the other hand......well......anyway. some help? |
it sounds like the routing table is causing it to choose that interface as a route to the client
you may be able to change the routing |
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1 AHA!! you were right! (damnit, sorry about the formating) anyway.....looks like i just need to tell it that there is an eth0 after all ;) because it doesn't seem to. Blasted RH install scripts. |
Cool
Where do I get the custom game for server-1.covertoral.com |
I think I got it...
ns_install_v1 ?? |
yes, ns_install_v1.exe......its the best HL mod so far...but SOOO beta! Runs 100% cpu almost all the time! you can run 3-4 cstrike servers i belive.
i got stats up too! edit: forogt the url hehe. Stats |
great!
|
ok, help.....i'm use to freeBSD style booting...i can't find were sysv-init.
# ip route 192.168.1.0/24 dev eth1 scope link 192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.3 127.0.0.0/8 dev lo scope link default via 192.168.1.1 dev eth1 so were is eth0?! ifconfig eth0 Link encap:Ethernet HWaddr 00:07:95:AF:14:15 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:360584 errors:0 dropped:0 overruns:0 frame:0 TX packets:1025 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:30088235 (28.6 Mb) TX bytes:84973 (82.9 Kb) Interrupt:3 Base address:0xc800 eth1 Link encap:Ethernet HWaddr 00:50:BA:C8:A2:F0 inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6555352 errors:0 dropped:0 overruns:0 frame:0 TX packets:5386308 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:545349961 (520.0 Mb) TX bytes:1151236395 (1097.9 Mb) Interrupt:5 Base address:0x9f00 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:3792 errors:0 dropped:0 overruns:0 frame:0 TX packets:3792 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:508622 (496.7 Kb) TX bytes:508622 (496.7 Kb) its working, i swear!! just i'm an idiot and can't fix the routing table for some reason or another. ====================== new routing setup (on the fly, not in boot script) # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.3 * 255.255.255.255 UH 0 0 0 eth1 192.168.1.2 * 255.255.255.255 UH 0 0 0 eth0 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1 still no avail....if i remove all the nets (do route del 192.168.1.0/24 twice) then do route add -net 192.168.1.0/24 eth0 it will only transmit on eth0 and not eth1...but then eth1 doesn't work....when i add back it only transmits it on eth1. Should i just subnet or something?! |
yep, that's because it the first path in the routing table
which one did you bring up first |
/etc/rc.d/rc.inet1
/etc/rc.d/rc.inet2 |
new routing setup (on the fly, not in boot script)
# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1 still no avail....if i remove all the nets (do route del 192.168.1.0/24 twice) then do route add -net 192.168.1.0/24 eth0 it will only transmit on eth0 and not eth1...but then eth1 doesn't work....when i add back it only transmits it on eth1. Should i just subnet or something?! first i deleted everything.. route add -net 192.168.1.0/24 eth0 route add -net 192.168.1.0/24 eth1 route add default gw 192.168.1.1 eth0 eth1 still on top..... route add -net 192.168.1.0/24 eth1 route add -net 192.168.1.0/24 eth0 route add default gw 192.168.1.1 eth0 eth0 now on top....samba transmits on eth0 now (91mb test file) but now..... (even this hlds bound to eth1) it now transmits on eth0 and listens on eth1 !!!! is the only way to accomplish what i want via subnetting? because i really really don't wana have a 2nd router setup. |
Quote:
|
What's the reason for having the same ip address on both nics, it's not very logical.
A lot of things can be done with a linux router, but having it not knowing where to go is going to be a problem every time you try to do something |
Looks like I'm screwed, I installed the mod and got a dll error. Trying it again from scratch
|
Quote:
check the NS forums....that problem sounds common, but then again, my files end up corrupt from time to time. |
All times are GMT -5. The time now is 02:33 PM. |