Results 1 to 2 of 2
What am I doing wrong here... This is slackware 12. I'm trying to share my internet connection (on eth0) with a computer connected to eth1. eth0 is 192.168.0.101, eth1 is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-04-2011 #1
- Join Date
- Jul 2010
Can't set default gateway to different subnet
This is slackware 12. I'm trying to share my internet connection (on eth0) with a computer connected to eth1.
eth0 is 192.168.0.101, eth1 is 192.168.1.100 (different subnets).
But when I try to make eth1's default gateway the same as eth0's, see the error I get:
# route add default gw 192.168.0.1 dev eth1 SIOCADDRT: No such process
more informational output follows....
# ifconfig eth0 Link encap:Ethernet HWaddr 00:07:E9:5C:77:81 inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1 eth1 Link encap:Ethernet HWaddr 00:08:C7:E6:F2:04 inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1 # 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.0.0 * 255.255.255.0 U 0 0 0 eth0 loopback * 255.0.0.0 U 0 0 0 lo default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
- 02-04-2011 #2
As often google is really helpful:
How to setup the PC as the Router ? - FedoraForum.org
I blindly searched "howto configure computer as router". Your command above wouldn't work because it would add a second default route and one cannot have two default routes - think of it and you will understand why.