Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.networking > #3200
| From | Moe Trin <ibuprofin@painkiller.example.tld.invalid> |
|---|---|
| Newsgroups | comp.os.linux.networking |
| Subject | Re: Gateway config eth0<->sl0 |
| Date | 2015-01-05 17:49 +0000 |
| Organization | Acme Orbital Anvil Delivery Service |
| Message-ID | <slrnmaljmp.tuq.ibuprofin@planck.phx.az.us> (permalink) |
| References | <m8c7dr$j27$1@news2.open-news-network.org> |
On Mon, 05 Jan 2015, in the Usenet newsgroup comp.os.linux.networking, in
article <m8c7dr$j27$1@news2.open-news-network.org>, mds wrote:
I should have explained further.
>I am trying to set up host waikouaiti (debian "lenny", k2.2.26) as a
>gateway between the 192.168.1.0 and 192.168.2.0 subnets:
>mds@waikouaiti:~$ /sbin/ifconfig
OK
>sl0 Link encap:VJ Serial Line IP
> inet addr:192.168.2.1 P-t-P:192.168.2.2 Mask:255.255.255.255
Note - point to point (host) route
>Destination Gateway Genmask Flags Metric Ref Use Iface
>192.168.2.2 0.0.0.0 255.255.255.255 UH 0 0 0 sl0
>192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
and this is reflected in the routing table
>waikouaiti:/home/mds# route add 192.168.2.0
>SIOCADDRT: No such device <--- this is the problem
and the kernel replies "I don't know how to get there"
You could change that to
/sbin/route add -net 192.168.2.0 netmask 255.255.255.0 -gw
192.168.2.2
which would add a network route using 192.168.2.2 as a gateway
192.168.2.0 192.168.2.2 255.255.255.0 UG 0 0 0 sl0
>192.168.2.2 0.0.0.0 255.255.255.255 UH 0 0 0 sl0
>192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
>0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
which is still somewhat confusing, but will work because the Host route
to 192.168.2.2 takes precedence over the network route to 192.168.2.0
because it's more precise (single host compared to a network). This is
the same line of thinking that allows traffic to use the serial-link
rather than sending traffic to 192.168.1.1 for forwarding (because
0.0.0.0 with a mask of 0.0.0.0 means "everything" IPv4). Mentioned in
my earlier reply, if there were any hosts hanging off a separate
network interface on 192.168.2.2, I'd suggest using a different address
range for them - such as 192.168.3.x.
>I have rtfm'ed the NAG and the linux-2.2.26/Documentation/* and duck
>duck go'ed on this. Seems like I maybe have to rebuild the kernel with
>ip forwarding but it's unclear to me which menuconfig option that is.
On _this_ host - forwarding would be needed for routing traffic between
the world (reachable via 192.168.1.1) and any other hosts on the
192.168.1.0 network and any host reachable via the serial link. On the
other end of the serial link, that host would also have to be forwarding
if there are hosts on a network card using an address OTHER THAN
192.168.2.1 and 192.168.2.2. It's been a LONG time since I used a 2.2.x
kernel, but I think that was done by
echo 1 > /proc/sys/net/ipv4/ip_forward
I've basically forgotten how to set up the 2.2.x firewall which is
IPCHAINS rather than the "iptables" tool introduced with the 2.4.x
kernel. Rusty Russel's 'netfilter.org' server may have enough data
to help - try "http://www.netfilter.org/documentation/HOWTO/", or
locate a copy of the "Security-Quickstart-HOWTO" at any LDP mirror.
>Please suggest how I can try to resolve this problem,
Any particular reason you need to be using such an old release? Wheezy
has been out for nearly two years, and should be replaced by jessie in
the next month or three.
Old guy
Back to comp.os.linux.networking | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Gateway config eth0<->sl0 mds <mds@none.foo> - 2015-01-05 09:22 +1300
Re: Gateway config eth0<->sl0 Moe Trin <ibuprofin@painkiller.example.tld.invalid> - 2015-01-05 06:29 +0000
Re: Gateway config eth0<->sl0 Moe Trin <ibuprofin@painkiller.example.tld.invalid> - 2015-01-05 17:49 +0000
Re: Gateway config eth0<->sl0 mds <mds@none.foo> - 2015-01-06 13:35 +1300
Re: Gateway config eth0<->sl0 Moe Trin <ibuprofin@painkiller.example.tld.invalid> - 2015-01-07 01:17 +0000
Re: Gateway config eth0<->sl0 mds <mds@none.foo> - 2015-01-11 12:23 +1300
Re: Gateway config eth0<->sl0 Moe Trin <ibuprofin@painkiller.example.tld.invalid> - 2015-01-11 20:31 +0000
csiph-web