Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Oct 2000 15:17:44 -0400
From:      Marko Ruban <marko@tellurian.com>
To:        Nick Rogness <nick@rapidnet.com>
Cc:        FreeBSD questions <freebsd-questions@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Re: Routing issue with cable modem
Message-ID:  <39F09A58.5B2711BD@tellurian.com>
References:  <Pine.BSF.4.21.0010201218360.55477-100000@rapidnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
&nbsp;
<br>Nick Rogness wrote:
<blockquote TYPE=CITE>On Fri, 20 Oct 2000, Marko Ruban wrote:
<p>> I tried replicating my windows routing table in freebsd.
<br>> Only one entry didn't work... (guess)
<br>> "route add default 10.17.56.xx"
<br>>
<br>> I'm cursed !
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; My guess guess would be your
DHCP client is not working right.
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is it suppose to be using
DHCP?&nbsp; Is it really something else like
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PPPoE?</blockquote>
It definitely uses DHCP, because I update the setup with "winipcfg" whenever
I switch the modem over to windows machine.
<br>Also ethereal (for windows) shows DHCP packets being exchanged.
<blockquote TYPE=CITE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; You see,
the problem is not that the network is unreachable.&nbsp; It
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is that the default network
is not DIRECTLY reachable.&nbsp; This is a
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; violation of basic routing
principles...although many devices work
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with that setup (Windows,Cisco,etc).&nbsp;
FreeBSD does not allow you
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to add a default route to
a network that is not directly
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connected.</blockquote>
If windows can do it, freebsd probably can too, even if it takes a custom
program&nbsp; ;)
<blockquote TYPE=CITE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Why don't
you dump your windows routing table `route -print` to
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the list and we could put
together a routing table for you or see
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; what is acutally going on.</blockquote>
NOTE: table below best viewed in proportional font....
<br>('route print' and 'netstat -r' seem to yield identical results)
<br><pre>
<br>C:\WINDOWS>netstat -r
<br>Route Table
<br>Active Routes:
<p>&nbsp; Network Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Netmask&nbsp; Gateway Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Interface&nbsp; Metric
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10.17.56.12&nbsp;&nbsp; 208.59.162.242&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 127.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
255.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 127.0.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
127.0.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1
<br>&nbsp;&nbsp;&nbsp;&nbsp; 208.59.162.0&nbsp;&nbsp;&nbsp; 255.255.255.0&nbsp;&nbsp;
208.59.162.242&nbsp;&nbsp; 208.59.162.242&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1
<br>&nbsp;&nbsp; 208.59.162.242&nbsp; 255.255.255.255&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
127.0.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 127.0.0.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1
<br>&nbsp;&nbsp; 208.59.162.255&nbsp; 255.255.255.255&nbsp;&nbsp; 208.59.162.242&nbsp;&nbsp;
208.59.162.242&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 224.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
224.0.0.0&nbsp;&nbsp; 208.59.162.242&nbsp;&nbsp; 208.59.162.242&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1
<br>&nbsp; 255.255.255.255&nbsp; 255.255.255.255&nbsp;&nbsp; 208.59.162.242&nbsp;&nbsp;
208.59.162.242&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1
<br></pre>
<p>I also edited (a copy of) the dhclient-script to dump output of commands
to /tmp instead of /dev/null maybe I'll see something interesting there.
<p>*** old discussion follows
<blockquote TYPE=CITE>> > > > > Goal -- to add cable modem as the default
gateway to internet.
<br>> > > > > Symptom -- "add net default: gateway 10.17.56.XXX: Network
is
<br>> > > > > unreachable"
<br>> > > > > Problem -- I think modem gateway cannot be added because
it's on a
<br>> > > > > different subnet then my NICs.
<br>> > > > > Attempted -- aliasing ed0 to modem subnet.... all 10.17.56
IPs seem to
<br>> > > > > be occupied.
<br>> > > >
<br>> > > > It does sound like routing-
<br>> > > > A gateway, by definition, has to be on the same network as
your NIC.
<br>> > > > I'm guessing your cable modem is in bridging mode? (vs routing
mode)
<br>> > >
<br>> > > What would that mean in terms of my config changes ??
<br>>
<br>> > So is the cable modem in this computer, or is it some standalone
device?
<br>>
<br>> The cable modem is an external device.&nbsp; It is connected to one
of my two NICs.
<br>> The other NIC has been connected to a small LAN for a while (which
worked
<br>> perfect with dialup PPP and NAT).&nbsp; And it is also connected
to the TV cable and
<br>> a phone line.&nbsp; The uplink is handled automatically by the modem.
<br>>
<br>> > > > So it's presenting itself as some IP right?
<br>> > > > And you just have to use this IP as the default gateway for
all your
<br>> > other
<br>> > > > machines-
<br>> > >
<br>> > > > What is the subnet masking in place here?
<br>> > >
<br>> > > The modem works fine on my windows machine, and I looked up the
<br>> > configuration
<br>> > > there (winipcfg).
<br>> > > Windows sets 10.17.56.XXX as the default gateway (and DHCP server),
and
<br>> > assigns
<br>> > > 208.59.162.XXX (subnet 255.255.255.0) to me.&nbsp; DNS server
is set to
<br>> > 207.172.3.9.
<br>> > >
<br>> > > Seems like should be no difficulty setting up unix in the same
way... but
<br>> > unix
<br>> > > does like 10.17.56.XXX as gateway (because supposedly network
is
<br>> > unreachable).
<br>> > >
<br>> > > So that's the story... any suggestions?
<br>> >
<br>> > Ok, so the machine is being given a 208.59.162.xxx IP address (via
DHCP),
<br>> > and a default gateway of 10.17.56.xx.
<br>> >
<br>> > Ok I think I know what's going on-
<br>> >
<br>> > Try manually adding the default route, but specify the interface
that you
<br>> > want to use.
<br>> > It's something like:
<br>> >
<br>> > "route add default 10.17.56.xx netmask 255.255.255.0 interface
ed0"
<br>>
<br>> "route add default 10.17.56.xx -netmask 255.255.255.0 -interface
ed0"&nbsp; did not
<br>> work, probably because 10.17.56.xx was specifying a gateway for the
network
<br>> 0.0.0.0 and ed0 was trying to be a gateway as well.&nbsp; I can however
"route add
<br>> default -interface ed0" which is actually the closest I've gotten
to it working
<br>> (modem dials out when I ping 10.17.56.1).
<br>>
<br>> "route add default 10.17.56.xx" would not work under any circumstances
:(
<br>> tells me "Network is unreachable".&nbsp; I just wonder how windows
has no problem
<br>> adding it as gateway.
<br>>
<br>> > I think that because the machine doesnt have an interface on the
10.x.x.x
<br>> > network, it doesn't know how to get to the 10.x.x.0 network.
<br>> >
<br>> > I think you alternately could add a static route that looks like
this:
<br>> >
<br>> > "route add 10.0.0.0 208.59.162.xx"
<br>>
<br>> When route to 10.0.0.0 is added, outgoing packets are corrupted (checked
with
<br>> ethereal).&nbsp; I.E. the header of the packet has 4 bytes inserted
between the
<br>> source and destination MACs.&nbsp; Those 4 bytes always seem to be
part of the
<br>> destination MAC itself.
<br>>
<br>>
<br>> Following from another reply.....
<br>> >>>>>>>>>>>>>>>>>>>>>>
<br>> >> > > defaultrouter="10.17.56.12"&nbsp;&nbsp; #&lt;-- fails with
symptom previously
<br>> described
<br>> >> >
<br>> >> > DHCP will normally configure the default route for you -- try
setting
<br>> >> > this to NO.
<br>> >>
<br>> >> Tried setting to NO... DHCP doesn't seem to add a default route,
so in my
<br>> case it
<br>> >> makes no difference really.
<br>> >> Should it add default route?
<br>> >
<br>> >Normally, yes.&nbsp; You sort of need default route and netmask
in order to
<br>> >make things work.&nbsp; This should happen with the stock dhclient.conf
<br>> >(which is empty).&nbsp; You could try to run dhclient by hand, something
<br>> >like:
<br>> >
<br>> > # killall dhclient
<br>> > # dhclient -dD ed0
<br>> >
<br>> >Or whatever your interface is.&nbsp; Terminate it with Ctrl+C. You
should
<br>> >get a bunch of files in /tmp, containing values received from the
<br>> >server.&nbsp; You may also get some interesting error messages.
<br>>
<br>> Tried "dhclient -d -D ed0".... no files are written to /tmp dir.
<br>> Do you think it could be a problem with my dhclient ?
<br>> I tried using wide-dhcp client earlier, with even less success.
<br>>
<br>> Marko
<br>>
<br>>
<br>>
<br>> To Unsubscribe: send mail to majordomo@FreeBSD.org
<br>> with "unsubscribe freebsd-hackers" in the body of the message
<br>>
<p>Nick Rogness
<br>- Drive defensively.&nbsp; Buy a tank.</blockquote>
</html>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39F09A58.5B2711BD>