[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: routing setup question



Benedikt Eric Heinen wrote:
> 
> > My first question would be are these valid IP addresses or did you pick
> > arbitrary addresses for your local systems?
> As that question was asked by several people, the 192.168.101.x addresses
> are arbritrary addresses for my own subnet. The 193.135.252.47 and
> 193.135.252.179 were addresses assigned to me by my ISP. Both are routed
> from his machine, so if I try a traceroute from icemark to
> firefrancs new address without setting the host-route for .179 to my
> second machine first, the traceroute packets just 'run in circles' between
> icemark and lisa. Still, there's one host at thenet that still needs to be
> configured properly (traceroute from the outside currently stops before
> reaching lisa, but that will be fixed soon). The problem on my own system
> can't currently be solved by thenet, as their "linux guy" is on a
> holiday at the moment...
> 
> > >             lisa.thenet.ch  icemark.thenet.ch       firefranc
> > > ppp0        193.135.252.75  193.135.252.47
> > > eth0                        192.168.101.1           192.168.101.2
> [...]
> > > The new setup should look like:
> > >     ISP             My systems
> > >     lisa.thenet.ch  icemark.thenet.ch       firefranc.thenet.ch
> > >                  <--- ppp0 --->          <--- eth0 --->
> > >     193.135.252.75  193.135.252.47          193.135.252.179
> 
> Two people here suggested, that I might route the .179 address along the
> 192.168.101.0 network, but both couldn't tell me exactly how the icemark
> needs to be set up, so that packets leaving firefranc out to the internet
> have the proper sender address (193.135.252.179)...
> 

Ok, I'm not sure why Rick wanted to swap the IP addresses for icemark
and firefranc, but here's a setup that should work based upon the
info you provided.

Icemark will use 193.135.252.47 as the IP address for *both* the
ppp interface and the ethernet interface. That is, icemark's 
/etc/init.d/network should look like this:

#!/bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0
IPADDR=193.135.252.47
NETMASK=255.255.255.0
NETWORK=193.135.252.0
BROADCAST=193.135.252.255
#GATEWAY=none
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}
#route add default gw ${GATEWAY} metric 1

You won't set the default route at boot time since it doesn't exist.
Instead, make sure that you include the 'defaultroute' option in
your /etc/ppp/options or on the command line for pppd. Now, on
firefranc, you'll have the following for you /etc/init.d/network

#!/bin/sh
ifconfig lo 127.0.0.1
route add -net 127.0.0.0
IPADDR=193.135.252.179
NETMASK=255.255.255.0
NETWORK=193.135.252.0
BROADCAST=193.135.252.255
GATEWAY=193.135.252.47
ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
route add -net ${NETWORK}
route add default gw ${GATEWAY} metric 1

This should do the trick. Yes, this means that if you do an ifconfig -a
when the ppp link is up on icemark, you'll see that ppp0 and eth0 
*both* have 193.135.252.47 as their IP Address. This is ok, as long as
the netmasks are right. The reason you saw looping before when you 
tried a traceroute to firefranc from icemark was probably because 
you still had the eth0's IP address set to 192.168.101.1. Thus icemark
routed the packet for 193.135.252.179 to it's default route, the only
one it knew. lisa justly sent the packet back to icemark since it is
set up to route 193.135.179 to icemark. This behavior is as expected
from your settings. Now you know why IP packets have a Time-To-Live
field!

-- 
Jens B. Jorgensen
jjorgens@bdsinc.com


Reply to: