• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Scripting the behaviour of Status --> Interfaces --> DHCP renew button

General pfSense Questions
4
42
6.6k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    stephenw10 Netgate Administrator
    last edited by Aug 9, 2019, 1:34 PM

    I would be surprised if there's any difference between the 32bit and 64bit versions as far as this modem is concerned. The available tools should be identical.

    Steve

    J 1 Reply Last reply Aug 9, 2019, 1:47 PM Reply Quote 0
    • J
      jly2680 @stephenw10
      last edited by stephenw10 Aug 10, 2019, 3:56 PM Aug 9, 2019, 1:47 PM

      @stephenw10 said in Scripting the behaviour of Status --> Interfaces --> DHCP renew button:

      I would be surprised if there's any difference between the 32bit and 64bit versions as far as this modem is concerned. The available tools should be identical.

      Steve

      I test this modem through vm pfsense 2.4 , ue0 and cdc showed up..I wonder if there is any new patch from 2.4 if_cdce.ko that was not included in 2.3.5

      can you look at this: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192345

      1 Reply Last reply Reply Quote 0
      • S
        stephenw10 Netgate Administrator
        last edited by Aug 9, 2019, 11:28 PM

        There are many, many differences between FreeBSD 10.3 and 11.1 which is what you're comparing there.

        That link is broken.

        Steve

        J 1 Reply Last reply Aug 10, 2019, 3:39 PM Reply Quote 0
        • J
          jly2680 @stephenw10
          last edited by Aug 10, 2019, 3:39 PM

          @stephenw10 said in Scripting the behaviour of Status --> Interfaces --> DHCP renew button:

          There are many, many differences between FreeBSD 10.3 and 11.1 which is what you're comparing there.

          That link is broken.

          Steve

          the patch includes

          head/sys/dev/usb/net/if_cdce.c
          head/sys/dev/usb/serial/u3g.c
          head/sys/dev/usb/serial/umodem.c
          

          hope someone could port this patch on 2.3.5

          1 Reply Last reply Reply Quote 0
          • S
            stephenw10 Netgate Administrator
            last edited by Aug 10, 2019, 4:04 PM

            Your link was actually good, the bug server was down at that exact moment I tested.

            Porting that is non trivial. You would have to rebuild a whole number of things there. You cannot just load a replacement module. And even after you had done that you would still be running unsupported, unpatched, 2.3.5.

            Is there some reason you cannot just replace that ALIX with something vaguely current?

            Steve

            J 1 Reply Last reply Aug 12, 2019, 4:40 PM Reply Quote 0
            • J
              jly2680 @stephenw10
              last edited by jly2680 Aug 12, 2019, 4:41 PM Aug 12, 2019, 4:40 PM

              @stephenw10 said in Scripting the behaviour of Status --> Interfaces --> DHCP renew button:

              Your link was actually good, the bug server was down at that exact moment I tested.

              Porting that is non trivial. You would have to rebuild a whole number of things there. You cannot just load a replacement module. And even after you had done that you would still be running unsupported, unpatched, 2.3.5.

              Is there some reason you cannot just replace that ALIX with something vaguely current?

              Steve

              This alix will be deployed on our client’s remote area maybe this end of the month.I’ll convince him if he can rather buy a new hardware..I may use openwrt with this 4g stick if he refuse to shell out some $

              1 Reply Last reply Reply Quote 0
              • S
                stephenw10 Netgate Administrator
                last edited by Aug 12, 2019, 6:36 PM

                If you need to use the ALIX that is what I would do. At least you can have a current build on there that will be relatively secure.

                Steve

                J 1 Reply Last reply Aug 12, 2019, 7:16 PM Reply Quote 0
                • J
                  jly2680 @stephenw10
                  last edited by jly2680 Aug 12, 2019, 7:37 PM Aug 12, 2019, 7:16 PM

                  @stephenw10 said in Scripting the behaviour of Status --> Interfaces --> DHCP renew button:

                  If you need to use the ALIX that is what I would do. At least you can have a current build on there that will be relatively secure.

                  Steve

                  hmm can you please look at this,,upon setting this modem AT^SETPORT="FF;16,12,10" suddenly I have this in my log:

                  ugen1.2: <HUAWEIMOBILE> at usbus1
                  u3g0: <NCM Network Control Model> on usbus1
                  u3g0: Found 2 ports.
                  
                  

                  previously I dont have this log when I set this AT^SETPORT="FF;10,12,16" on my modem..But still no ue0 interface![alt text]

                  on my vm pf 2.4.4 :
                  login-to-view

                  1 Reply Last reply Reply Quote 0
                  • S
                    stephenw10 Netgate Administrator
                    last edited by Aug 12, 2019, 8:07 PM

                    You probably still need the newer cdce driver.

                    Steve

                    J 1 Reply Last reply Aug 12, 2019, 8:19 PM Reply Quote 0
                    • J
                      jly2680 @stephenw10
                      last edited by Aug 12, 2019, 8:19 PM

                      @stephenw10
                      I compare 2.3.5 dev.d/usb.conf from 2.4.4 , my modem intsubclass and intproto is included on 2.4.4 usb conf and missing on 2.3.5 ..can I add this on my 2.3.5 usbconf??

                      nomatch 32 {
                      	match "bus" "uhub[0-9]+";
                      	match "mode" "host";
                      	match "vendor" "0x12d1";
                      	match "intclass" "0xff";
                      	match "intsubclass" "0x03";
                      	match "intprotocol" "0x16";
                      	action "kldload -n if_cdce";
                      
                      1 Reply Last reply Reply Quote 0
                      • S
                        stephenw10 Netgate Administrator
                        last edited by Aug 12, 2019, 11:14 PM

                        As a test I can't see why not. I've never tried that myself though...

                        J 1 Reply Last reply Aug 13, 2019, 8:45 AM Reply Quote 0
                        • J
                          jly2680 @stephenw10
                          last edited by jly2680 Aug 13, 2019, 9:01 AM Aug 13, 2019, 8:45 AM

                          @stephenw10 said in Scripting the behaviour of Status --> Interfaces --> DHCP renew button:

                          As a test I can't see why not. I've never tried that myself though...

                          it didn’t work..I think there’s no ncm kernel module for 0x12d1 Sub=03 Prot=16..

                          --- /usr/src/sys/dev/usb/net/if_cdce.c	(revision 326479)
                          +++ /usr/src/sys/dev/usb/net/if_cdce.c	(working copy)
                          @@ -276,14 +276,13 @@
                           	{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC750, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
                           
                           	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
                          -		USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x16),
                          -		USB_DRIVER_INFO(0)},
                          +		USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x16)},
                           	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
                          -		USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x46),
                          -		USB_DRIVER_INFO(0)},
                          +		USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x46)},
                           	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
                          -		USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x76),
                          -		USB_DRIVER_INFO(0)},
                          +		USB_IFACE_SUBCLASS(0x02), USB_IFACE_PROTOCOL(0x76)},
                          +	{USB_VENDOR(USB_VENDOR_HUAWEI), USB_IFACE_CLASS(UICLASS_VENDOR),
                          +		USB_IFACE_SUBCLASS(0x03), USB_IFACE_PROTOCOL(0x16)},
                          

                          Is there any possibility I can recompile and patch this cdc driver?

                          1 Reply Last reply Reply Quote 0
                          • S
                            stephenw10 Netgate Administrator
                            last edited by Aug 13, 2019, 10:59 AM

                            You can try it in a FreeBSD 10.3 box. I have done so with other drivers and loaded them as kernel modules.

                            I've never seen it done with a USB device though.

                            Steve

                            J 1 Reply Last reply Aug 13, 2019, 11:11 AM Reply Quote 0
                            • J
                              jly2680 @stephenw10
                              last edited by Aug 13, 2019, 11:11 AM

                              @stephenw10 said in Scripting the behaviour of Status --> Interfaces --> DHCP renew button:

                              You can try it in a FreeBSD 10.3 box. I have done so with other drivers and loaded them as kernel modules.

                              I've never seen it done with a USB device though.

                              Steve

                              If you dont mind can you guide me , I already made an svn checkout on 10.3 , no idea how to apply the patch,and if I compile it succcessfully , I can donate a little some beers..

                              1 Reply Last reply Reply Quote 0
                              • S
                                stephenw10 Netgate Administrator
                                last edited by Aug 13, 2019, 12:41 PM

                                Basically as I described here: https://forum.netgate.com/post/712896

                                But obviously not for urndis as was that case.

                                Steve

                                J 1 Reply Last reply Aug 14, 2019, 5:13 AM Reply Quote 0
                                • J
                                  jly2680 @stephenw10
                                  last edited by Aug 14, 2019, 5:13 AM

                                  @stephenw10 said in Scripting the behaviour of Status --> Interfaces --> DHCP renew button:

                                  Basically as I described here: https://forum.netgate.com/post/712896

                                  But obviously not for urndis as was that case.

                                  Steve

                                  login-to-view

                                  I applied the patch and compiled it..test the driver on vm freebsd 10.3 and it was detected and ue0 interface came up..but when I use this driver on pfsense ,, still same issue .. Do I need more drivers to be copy to pfsense?

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    stephenw10 Netgate Administrator
                                    last edited by Aug 14, 2019, 1:06 PM

                                    Maybe. You compiled just the cdce module in FreeBSD?

                                    Maybe it didn't load as expected in pfSense? You have to load it at boot time to replace the in kernel driver.

                                    Steve

                                    J 1 Reply Last reply Aug 14, 2019, 1:26 PM Reply Quote 0
                                    • J
                                      jly2680 @stephenw10
                                      last edited by Aug 14, 2019, 1:26 PM

                                      @stephenw10 said in Scripting the behaviour of Status --> Interfaces --> DHCP renew button:

                                      Maybe. You compiled just the cdce module in FreeBSD?

                                      Maybe it didn't load as expected in pfSense? You have to load it at boot time to replace the in kernel driver.

                                      Steve

                                      yup only the cdce driver..I add this line if_cdce_load="YES" on boot/loader.conf and copy the compiled driver at boot/kernel..I can see the message that it is loaded on boot

                                      Loading /boot/defaults/loader.conf
                                      /boot/kernel/kernel text=0x122025a data=0x84738c+0xd9688 syms=[0x4+0xf3aa0+0x4+0                                                                                        x16b822]
                                      /boot/kernel/if_cdce.ko text=0x35e0 data=0x164+0x4 syms=[0x4+0x920+0x4+0x9ff]
                                      

                                      and to be sure , I fresh install 10.3 , imported the compiled driver,and eu0 interface came up..but not with pfsense

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        stephenw10 Netgate Administrator
                                        last edited by Aug 14, 2019, 3:11 PM

                                        Hmm, well something is different there then.

                                        You could check what we were using at that time which I believe is here: https://github.com/pfsense/FreeBSD-src/tree/RELENG_2_3

                                        Steve

                                        1 Reply Last reply Reply Quote 0
                                        • J
                                          jly2680 @bradtpt
                                          last edited by jly2680 Aug 15, 2019, 3:46 PM Aug 15, 2019, 11:30 AM

                                          @bradtpt said in Scripting the behaviour of Status --> Interfaces --> DHCP renew button:

                                          @jly2680 unfortunately no.

                                          On other client sites I've used a netgear nighthawk in bridge mode for this and it's a solid solution... although for that to work you need to make pfsense override the subnet mask the dhcp passthrough from the nighthawk issues, it issues a /32 and needs to be changed to a /24 otherwise it can't contact the default gateway to actually get traffic out. To do this you need to add "supersede subnet-mask 255.255.255.0" to the "DHCP Option Modifiers" under the "Lease Requirements and Requests" portion of your interface connected to the nighthawk.

                                          I follow your suggestion but with e3372 plug at ddwrt (ncm-wwan interface bridge with wan port vlan 2 ) bridge with pfsense interface. pfsense as a dhcp client to 4g interface of ddwrt and it will pick up ISP IP which will avoid double nat issue .works pretty solid too..

                                          @stephenw10 said in Scripting the behaviour of Status --> Interfaces --> DHCP renew button:

                                          Hmm, well something is different there then.

                                          You could check what we were using at that time which I believe is here: https://github.com/pfsense/FreeBSD-src/tree/RELENG_2_3

                                          Steve

                                          Hope it does end well..

                                          1 Reply Last reply Reply Quote 0
                                          31 out of 42
                                          • First post
                                            31/42
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.