You are not logged in.
Hi all!
I have a problem with static routes and was wondering if anyone can help me. Despite turning off the network daemon and setting up my interfaces with dhcpcd -G, something keeps writing a default gateway to the wrong interface in my routing table. Does anyone have any idea why this happens?
My topology is thus:
(((INTERNET)))
| DSL link
Router (IP 192.168.1.1)
| Wireless
wlan0: 192.168.1.* (DHCP)
Desktop
eth0: 192.168.2.* (DHCP)
| Cat5 UTP link
Router (IP 192.168.2.1)
| Cat5 UTP link
Laptop 192.168.2.* (DHCP)
Something keeps setting the default gateway to both interfaces on the desktop - but it sets eth0 first, which means all requests outside 192.168.1.0 get sent the wrong way - makes surfing a pain! I've tried setting routes up manually with:
route add default gw 192.168.1.1 dev wlan0
route add -net 192.168.2.0 netmask 255.255.255.0 dev eth0
which works for a while until something resets the table and gives me something along the lines of:
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 * 255.255.255.0 U 202 0 0 eth0
192.168.1.0 * 255.255.255.0 U 303 0 0 wlan0
default 192.168.2.1 0.0.0.0 UG 202 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 303 0 0 wlan0
Any ideas out there?
Mark.
Offline
if these are all static connections, you could set them through rc.conf
there is an entry to setup your default gw.
dont forget to edit /etc/resolv.conf and add some nameservers too
Offline