pppoe gateway routing issues
First off if this shows up as html, I apologize, I'm temporarily using a web based client. This email contains my configuration files so is kind of long but I hope this will give as much information as possible. I just got DSL after riding myself of my cable modem. The DSL I have is using pppoe. I was able to get this up and running on my laptop. I am now working on my gateway machine to get my LAN back up and running. I have used the how-to's listed in the freebsd diary ( http://www.freebsddiary.org/pppoe.php ) I also tried http://www.daemonnews.org/200101/pppoe.html These worked fine on my laptop and I was able to surf the web no problem. I then went to configure my gateway box. I added the appropriate options to the kernel and recompiled. I added the neccesary "ppp" lines to my rc.conf. I also created my ppp.conf. When I boot the machine I get the IP addresses but when I try to pass any traffic I get "no route to host" messages. I make sure my default gateway is setup correctly (which it appears to be as such). I delete the the default route and add it myself but this does not work either. I've tried using the routed daemon but I get the following error messages when I do that: (IP_ADD_MEMBERSHIP RIP) can't assign requested address setsockopt(IP_ADD_MEMBERSHIP RIP): Can't assign requested address After looking at my config files is there anything I am missing? Any other offers and suggestions? Thank you in advanced. Please CC: me as I am no longer on this list until I start my new job later this week. Rob UNAME -A: FreeBSD PITA.the-rob.com 4.5-RC FreeBSD 4.5-RC #2 Sat Jan 19 13:35:26 GMT 2002 [EMAIL PROTECTED]:/usr/src/sys/compile/FIREWALL i386 RC.CONF: # -- sysinstall generated deltas -- # # Created: Thu Jul 26 10:02:13 2001 # Enable network daemons for user convenience. # This file now contains just the overrides from /etc/defaults/rc.conf # please make all changes to this file. gateway_enable="YES" hostname="PITA.the-rob.com" network_interfaces="xl0 dc0 lo0" ifconfig_dc0="inet 192.168.1.1 netmask 255.255.255.0" ifconfig_lo0="inet 127.0.0.1" ifconfig_xl0="inet 10.0.0.1 netmask 255.255.255.0" #ifconfig_xl0="DHCP" inetd_enable="YES" kern_securelevel_enable="NO" linux_enable="YES" sshd_enable="YES" # -- sysinstall generated deltas -- # ntpdate_flags="time.nist.gov" ntpdate_enable="YES" portmap_enable="NO" update_motd="NO" font8x8="/usr/share/syscons/fonts/iso02-8x8.fnt" allscreens_flags="132x43" syslogd_flags="-ss" sshd_flags="-4" ipfilter_enable="YES" ipmon_enable="YES" ipmon_flags="-Dsvn" ipnat_enable="YES" #router_flags="-q" #router="routed" #router_enable="YES" ppp_enable="YES" ppp_mode="ddial" ppp_profile="tds" ppp_nat="YES" PPP.CONF: # # ppp.conf: pppoe configuration # from http://www.daemonnews.org/200101/pppoe.html # default: #ppp over ethernet set device PPPoE:xl0: set speed sync set mru 1492 set mtu 1492 set ctsrts off # monitor line quality enable lqr # log just a bit set log Phase tun # insert default route upon connection add default HISADDR # download /etc/resolv.conf enable dns tds: set authname USERNAME set authkey PASSWORD IFCONFIG: dc0: flags=8843 mtu 1500 inet 192.168.1.1 netmask 0xff00 broadcast 192.168.1.255 inet6 fe80::220:78ff:fe08:5e76%dc0 prefixlen 64 scopeid 0x1 ether 00:20:78:08:5e:76 media: Ethernet autoselect (100baseTX ) status: active xl0: flags=8843 mtu 1500 options=3 inet 10.0.0.1 netmask 0xff00 broadcast 10.0.0.255 inet6 fe80::204:76ff:feb8:267c%xl0 prefixlen 64 scopeid 0x2 ether 00:04:76:b8:26:7c media: Ethernet autoselect (10baseT/UTP) status: active lo0: flags=8049 mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff00 faith0: flags=8002 mtu 1500 tun0: flags=8051 mtu 1492 inet6 fe80::220:78ff:fe08:5e76%tun0 prefixlen 64 scopeid 0x5 inet 216.170.184.59 --> 216.170.184.1 netmask 0xff00 Opened by PID 59 NETSTAT -R: Routing tables Internet: DestinationGatewayFlagsRefs Use Netif Expire default216.170.184.1 UGSc21 tun0 10/24 link#2 UC 00xl0 localhost localhost UH 00lo0 192.168.1 link#1 UC 00dc0 216.170.184.1 216.170.184.59 UH 30 tun0 IPX: DestinationGatewayFlags Netif Expire Internet6: DestinationGatewayFlags Netif Expire localhost localhost UH lo0 fe80::%dc0 link#1 UC dc0 fe80::220:78ff:fe0 0:20:78:8:5e:76UHL lo0 fe80::%xl0 link#2 UC xl0 fe80::204:76ff:feb 0:4:76:b8:26:7cUHL lo0 fe80::%lo0 fe80::1%lo0
Re: pppoe gateway routing issues
At 04:58 20-1-2002 -0600, [EMAIL PROTECTED] wrote: >First off if this shows up as html, I apologize, I'm temporarily using a >web based client. This email contains my configuration files so is kind of >long but I hope this will give as much information as possible. MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Think it came out just fine =) >I just got DSL after riding myself of my cable modem. The DSL I have is >using pppoe. I was able to get this up and running on my laptop. I am now >working on my gateway machine to get my LAN back up and running. > >I have used the how-to's listed in the freebsd diary ( >http://www.freebsddiary.org/pppoe.php ) I also tried >http://www.daemonnews.org/200101/pppoe.html These worked fine on my laptop >and I was able to surf the web no problem. I then went to configure my >gateway box. I added the appropriate options to the kernel and >recompiled. I added the neccesary "ppp" lines to my rc.conf. I also >created my ppp.conf. When I boot the machine I get the IP addresses but >when I try to pass any traffic I get "no route to host" messages. I make >sure my default gateway is setup correctly (which it appears to be as >such). I delete the the default route and add it myself but this does not >work either. ---SNIP--- >gateway_enable="YES" good >hostname="PITA.the-rob.com" >network_interfaces="xl0 dc0 lo0" >ifconfig_dc0="inet 192.168.1.1 netmask 255.255.255.0" >ifconfig_lo0="inet 127.0.0.1" >ifconfig_xl0="inet 10.0.0.1 netmask 255.255.255.0" still looking good >ipfilter_enable="YES" >ipmon_enable="YES" >ipmon_flags="-Dsvn" >ipnat_enable="YES" Yikes... note you have NAT here. >#router_flags="-q" >#router="routed" >#router_enable="YES" >ppp_enable="YES" >ppp_mode="ddial" >ppp_profile="tds" >ppp_nat="YES" ...and here. more config snipped I'm not familiar with ipfilter I'm afraid, but since the rest of your config looks good to me at first glance, try removing the ipfilter/mon/nat settings, try connecting again, and if it works, then add those settings back one by one. DocWilco To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message
Re: pppoe gateway routing issues (with updates)
> ---SNIP--- > >>gateway_enable="YES" > > good > >>hostname="PITA.the-rob.com" >>network_interfaces="xl0 dc0 lo0" >>ifconfig_dc0="inet 192.168.1.1 netmask 255.255.255.0" >>ifconfig_lo0="inet 127.0.0.1" >>ifconfig_xl0="inet 10.0.0.1 netmask 255.255.255.0" > > still looking good > >>ipfilter_enable="YES" >>ipmon_enable="YES" >>ipmon_flags="-Dsvn" >>ipnat_enable="YES" > > Yikes... note you have NAT here. > --SNIP--- Thanks for the help, I tried that earlier to no avale. New stuff. I left my laptop plugged into my internal lan and I was able to jump onto the internet fine, so here's the new deal. Configs have NOT changed at all. I can pass traffic from anything behind the gateway to the outside world just fine. But the gateway still cannot reach the internet. it cannot even ping the local IP address assigned to it (216.170.184.161) Also people are not able to ping my IP or reach any of my services. Disabling either of the ipnat or ppp_nat in the rc.conf makes no difference same results, I can get on the net, no one can ping/ftp/ssh to me. Any other suggestions? Anyone? To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message
Re: pppoe gateway routing issues (with updates)
sometimes the modem will refuse to talk to a second MAC address, once one has been used.. you need to turn such modems off and on again when changng machines.. (It could be talking to your laptop only) On Sun, 20 Jan 2002 [EMAIL PROTECTED] wrote: > > > ---SNIP--- > > > >>gateway_enable="YES" > > > > good > > > >>hostname="PITA.the-rob.com" > >>network_interfaces="xl0 dc0 lo0" > >>ifconfig_dc0="inet 192.168.1.1 netmask 255.255.255.0" > >>ifconfig_lo0="inet 127.0.0.1" > >>ifconfig_xl0="inet 10.0.0.1 netmask 255.255.255.0" > > > > still looking good > > > >>ipfilter_enable="YES" > >>ipmon_enable="YES" > >>ipmon_flags="-Dsvn" > >>ipnat_enable="YES" > > > > Yikes... note you have NAT here. > > > > > --SNIP--- > > Thanks for the help, I tried that earlier to no avale. > > New stuff. I left my laptop plugged into my internal lan and I was able to > jump onto the internet fine, so here's the new deal. > > Configs have NOT changed at all. I can pass traffic from anything behind > the gateway to the outside world just fine. But the gateway still cannot > reach the internet. it cannot even ping the local IP address assigned to > it (216.170.184.161) Also people are not able to ping my IP or reach any > of my services. > > Disabling either of the ipnat or ppp_nat in the rc.conf makes no difference > same results, I can get on the net, no one can ping/ftp/ssh to me. > > Any other suggestions? Anyone? > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message
Re: netgraph: how to setsockopt on ksocket node ?
Florent Parent writes: > This is what I did to make it work for me. A better fix would probably be > around the struct proc definition. If fact, you had noted "broken" > probably as a memo to fix something here... > > struct proc *p = curproc ? curproc : &proc0;/* XXX broken */ > > > *** ng_ksocket.c.orig Sat Jan 19 11:05:28 2002 > --- ng_ksocket.cSat Jan 19 11:45:23 2002 > *** > *** 759,765 > sopt.sopt_name = ksopt->name; > sopt.sopt_val = ksopt->value; > sopt.sopt_valsize = valsize; > ! sopt.sopt_p = p; > error = sosetopt(so, &sopt); > break; > } > --- 759,765 > sopt.sopt_name = ksopt->name; > sopt.sopt_val = ksopt->value; > sopt.sopt_valsize = valsize; > ! sopt.sopt_p = 0; > error = sosetopt(so, &sopt); > break; > } Wow, didn't know you could do that :-) My understanding of the use of that parameter is very incomplete. I just copied what was found in the NFS code at the time (since it also makes use of a socket in the kernel). So this 'struct proc' argument can be NULL now? What about when calling other socket functions like socreate(), et. al.? If so, your fix looks like the right onw. -Archie __ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message
Re: netgraph: how to setsockopt on ksocket node ?
--On 2002-01-20 11:30:01 -0800 [EMAIL PROTECTED] wrote: > > So this 'struct proc' argument can be NULL now? > What about when calling other socket functions like socreate(), et. al.? 'struct proc' member in the struct sockopt can be NULL. As per the comment in that structure, NULL means that the calling entity is the kernel, not a user process (my interpretation): struct sockopt { enumsopt_dir sopt_dir; /* is this a get or a set? */ int sopt_level; /* second arg of [gs]etsockopt */ int sopt_name; /* third arg of [gs]etsockopt */ void *sopt_val; /* fourth arg of [gs]etsockopt */ size_t sopt_valsize; /* (almost) fifth arg of [gs]etsockopt */ struct proc *sopt_p; /* calling process or null if kernel */ }; This doesn't apply to socreate() since it isn't passed a 'struct sockopt' as argument. From a quick glance, the socket functions that are concerned are sosetopt() and sogetopt(). > If so, your fix looks like the right onw. I will test the NGM_KSOCKET_GETOPT code path as I suspect that a similar fix will be required. Florent. -- Florent Parent Viagénie http://www.viagenie.qc.ca To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message
Re: netgraph: how to setsockopt on ksocket node ?
Florent Parent writes: > 'struct proc' member in the struct sockopt can be NULL. As per the comment > in that structure, NULL means that the calling entity is the kernel, not a > user process (my interpretation): > > struct sockopt { > enumsopt_dir sopt_dir; /* is this a get or a set? */ > int sopt_level; /* second arg of [gs]etsockopt */ > int sopt_name; /* third arg of [gs]etsockopt */ > void *sopt_val; /* fourth arg of [gs]etsockopt */ > size_t sopt_valsize; /* (almost) fifth arg of [gs]etsockopt */ > struct proc *sopt_p; /* calling process or null if kernel */ > }; > > This doesn't apply to socreate() since it isn't passed a 'struct sockopt' > as argument. From a quick glance, the socket functions that are concerned > are sosetopt() and sogetopt(). But socreate() does take a struct proc directly... perhaps it can be NULL too..? [ looks at code ... ] Nope, it doesn't appear that it can... > int > socreate(dom, aso, type, proto, p) > int dom; > struct socket **aso; > register int type; > int proto; > struct proc *p; > { > register struct protosw *prp; > register struct socket *so; > register int error; > > if (proto) > prp = pffindproto(dom, proto, type); > else > prp = pffindtype(dom, type); > > if (prp == 0 || prp->pr_usrreqs->pru_attach == 0) > return (EPROTONOSUPPORT); > > if (p->p_prison && jail_socket_unixiproute_only && > prp->pr_domain->dom_family != PF_LOCAL && > prp->pr_domain->dom_family != PF_INET && > prp->pr_domain->dom_family != PF_ROUTE) { > return (EPROTONOSUPPORT); > } > > if (prp->pr_type != type) > return (EPROTOTYPE); > so = soalloc(p != 0); > if (so == 0) > return (ENOBUFS); > > TAILQ_INIT(&so->so_incomp); > TAILQ_INIT(&so->so_comp); > so->so_type = type; > so->so_cred = p->p_ucred; > crhold(so->so_cred); > so->so_proto = prp; > error = (*prp->pr_usrreqs->pru_attach)(so, proto, p); > if (error) { > so->so_state |= SS_NOFDREF; > sofree(so); > return (error); > } > *aso = so; > return (0); > } But it's interesting the soalloc() is called with 'p != 0' as an argument. p is never 0 or else you would have already panic'd... you'd panic later on, too, referencing 'p->p_ucred'. -Archie __ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message
Re: netgraph: how to setsockopt on ksocket node ?
< said: > But it's interesting the soalloc() is called with 'p != 0' > as an argument. p is never 0 or else you would have already > panic'd... you'd panic later on, too, referencing 'p->p_ucred'. All of the credential frobbing stuff was added much later. At the time I wrote that `p != 0', it was definitely possible for socreate() to be called from interrupt context, and thus without any idea of a `current process'. -GAWollman To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message
Re: netgraph: how to setsockopt on ksocket node ?
Florent Parent writes: > 'struct proc' member in the struct sockopt can be NULL. As per the comment > in that structure, NULL means that the calling entity is the kernel, not a > user process (my interpretation): > > struct sockopt { > enumsopt_dir sopt_dir; /* is this a get or a set? */ > int sopt_level; /* second arg of [gs]etsockopt */ > int sopt_name; /* third arg of [gs]etsockopt */ > void *sopt_val; /* fourth arg of [gs]etsockopt */ > size_t sopt_valsize; /* (almost) fifth arg of [gs]etsockopt */ > struct proc *sopt_p; /* calling process or null if kernel */ > }; Ah.. it's Julian's fault :-) Your fix (setting sopt.sopt_p to NULL) is already implemented in -current by Julian in revision 1.20, but he never MFC'd it. Julian: any reason 1.20 was not MFC'd? Thanks, -Archie __ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-net" in the body of the message