LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Debian Router/DHCP server, Machines on LAN can't see eachother (https://www.linuxquestions.org/questions/linux-networking-3/debian-router-dhcp-server-machines-on-lan-cant-see-eachother-4175418818/)

trrpip 07-26-2012 01:06 PM

Debian Router/DHCP server, Machines on LAN can't see eachother
 
Hello everyone. I have a question that should be fairly simple to solve, but I just can't figure it out. I am running a Debian 6.0 x64 on a machine with 2 NICs. The first nic is a built in Intel gigabit one(eth1), the second one is a PCI myson NIC (eth0) that I found hanging around. I tested both nics, and I know they work.

So here is what I'm trying to do: eth0 (the myson one) is connected to my existing network, and to the internet. eth1 (the onboard intel one) is connected to a 24 port netgear switch (unmanaged), with other computers connected to it. I want my debian box to manage DHCP for the 24 port switch by assigning IPs for me. The ultimate goal of this project is to allow my debian box to be the gateway/firewall/router/vpn server for my work network, where eth0 is connected to the internet and eth1 is connected to the network.

So far, this is kinda working. The issue I'm having is that the two boxes (box1 and box2, both windows 7) I have connected to the switch get assigned IPs, but cant see each other, and my debian box cant see them. Box1 and Box2 can ping the Debian box and get a reply, but Debian box can't ping Box1 or Box2, and Box1 cant ping Box2 and vice versa. Now, I know that ping is an unreliable tool, and should only really be used for quick and dirty testing, so I also tried sharing a folder on box1, but box2 cant find box1 to connect. This leads me to believe the issue is with my debian box. When I am using ping, I am pinging the IP.

What I did so far:
1. edited /etc/network/interfaces, and added:
Code:

allow-hotplug eth1
iface eth1 inet static
address 10.10.2.1
netmask 255.255.255.0
boradcast 10.10.2.255
gateway 10.10.2.1

so now my ifconfig looks like:
Code:

eth0      Link encap:Ethernet  HWaddr 00:40:95:90:01:ac
          inet addr:192.168.1.139  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::240:95ff:fe90:1ac/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1954 errors:0 dropped:0 overruns:0 frame:0
          TX packets:546 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:254600 (248.6 KiB)  TX bytes:52249 (51.0 KiB)
          Interrupt:17 Base address:0xcc00

eth1      Link encap:Ethernet  HWaddr 00:0f:1f:96:f2:ac
          inet addr:10.10.2.1  Bcast:10.10.2.255  Mask:255.255.255.0
          inet6 addr: fe80::20f:1fff:fe96:f2ac/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:870 errors:0 dropped:0 overruns:0 frame:0
          TX packets:195 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:68413 (66.8 KiB)  TX bytes:21174 (20.6 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)

after that, I installed dhcp3-server, told it to listen on eth1, and edited /etc/dhcp/dhcpd.conf so it looks like:
Code:

authoritative;

subnet 10.10.2.0 netmask 255.255.255.0 {
range 10.10.2.3 10.10.2.200;
option domain-name "testa.com";
option domain-name-servers 208.67.222.222, 208.67.220.220;
option netbios-name-servers 10.10.2.1;
option broadcast-address 10.10.2.255;
option routers 10.10.2.1;
default-lease-time 600;
max-lease-time 7200;
}

I cant figure out why the computers cant see each other, but I need them to be able to, because we have a file server on my work network and a network printer. What am I doing wrong?

Also, more info, if it is helpful: I dont think its the switch, I tried my old linksys wired router with DHCP turned off and it set to router mode and it still wouldnt work. I also know all the ports on the switch are enabled. Ive been googleing this for hours and I cant find anything

Harryrat 07-27-2012 10:50 AM

hm...what happens if you directly connect box1(and in turn box2) to eth1 and try pinging eachother (and same with box2).

Also, try running tcpdump on the debian box to see what packets can be seen on the interface (especially in case of ping debian -> box1/2)

trrpip 07-29-2012 04:56 PM

Harryrat,

Good suggestion! Apparently some of my windows boxes are having some issue with the firewall or something. When I directly connect box1 to the server I can ping it, but when i directly connect box2, box2 doesnt respond (but it can still ping the server). So I played around with windows settings a bit, and apparently windows 7 has a setting called "network discovery" that makes your computer invisible on the network. Enable network discovery and the computer responds to ping, and is also able to see other computers. It also seems that in some versions of windows 7, the computer network has to be set as "home network" for it to respond to ping too, and be able to see other machines.

I guess the lesson here is: Dont trust windows to be configured correctly.

Thank you for your help


All times are GMT -5. The time now is 03:12 AM.