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> <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> My guess guess would be your DHCP client is not working right. <br> Is it suppose to be using DHCP? Is it really something else like <br> 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> You see, the problem is not that the network is unreachable. It <br> is that the default network is not DIRECTLY reachable. This is a <br> violation of basic routing principles...although many devices work <br> with that setup (Windows,Cisco,etc). FreeBSD does not allow you <br> to add a default route to a network that is not directly <br> connected.</blockquote> If windows can do it, freebsd probably can too, even if it takes a custom program ;) <blockquote TYPE=CITE> Why don't you dump your windows routing table `route -print` to <br> the list and we could put together a routing table for you or see <br> 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> Network Address Netmask Gateway Address Interface Metric <br> 0.0.0.0 0.0.0.0 10.17.56.12 208.59.162.242 1 <br> 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 <br> 208.59.162.0 255.255.255.0 208.59.162.242 208.59.162.242 1 <br> 208.59.162.242 255.255.255.255 127.0.0.1 127.0.0.1 1 <br> 208.59.162.255 255.255.255.255 208.59.162.242 208.59.162.242 1 <br> 224.0.0.0 224.0.0.0 208.59.162.242 208.59.162.242 1 <br> 255.255.255.255 255.255.255.255 208.59.162.242 208.59.162.242 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. 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). And it is also connected to the TV cable and <br>> a phone line. 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. 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" 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. 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". 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). I.E. the header of the packet has 4 bytes inserted between the <br>> source and destination MACs. 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" #<-- 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. You sort of need default route and netmask in order to <br>> >make things work. This should happen with the stock dhclient.conf <br>> >(which is empty). 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. Terminate it with Ctrl+C. You should <br>> >get a bunch of files in /tmp, containing values received from the <br>> >server. 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. Buy a tank.</blockquote> </html> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" 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>