- ADSL Router: Cisco 877 (172.16.0.254)
- PC1 (172.16.0.10) to port1 of router
- PC2 (172.16.0.20) to port2 of router
- Server, 2 NICs, eth0 to port0 of router. (172.16.0.240)
Everything is OK with the above setup.
Now, eth1 of Server connects to gigabit switch. DHCP3 on Server is serving requests on eth1, using this configuration
subnet 172.16.0.0 netmask 255.255.255.0 {
range 172.16.0.151 172.16.0.199;
option domain-name-servers 194.30.220.117,194.30.220.114;
option domain-name "XXXXXXXXXXXXXXX";
option routers 172.16.0.1;
option broadcast-address 172.16.0.255;
default-lease-time 600;
max-lease-time 7200;
}
and /etc/network/interfaces
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 172.16.0.240
netmask 255.255.255.0
auto eth0
allow-hotplug eth1
iface eth1 inet static
address 172.16.0.1
netmask 255.255.255.0
up route add -host 255.255.255.255 eth1
auto eth1
Clients get IP, but are unable to access other ports of the router (PC1 & PC2) or the Server itself (either on 172.16.0.1 or 172.16.0.240). Also, they are unable to access the internet.
I've enabled ipv4 forwarding echo "1" > /proc/sys/net/ipv4/ip_forward
also route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
255.255.255.255 0.0.0.0 255.255.255.255 UH 0 0 0 eth1
172.16.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
172.16.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
Ideas?
Thank you
The problem you're having is that you're trying to use routing, but you're not routing. Routing implies the passage of traffic between different networks. You have two interfaces that are on the same network. What you want is either: