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

    Newer Version of the dhclient-script

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    29 Posts 4 Posters 9.8k Views
    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.
    • B
      Beerman
      last edited by

      @Beerman:

      With the original script i got this for the Interface in

      System:Gateways:

      
      Name 	           Interface 	Gateway 	        Monitor IP 	        Description
      ------------------------------------------------------------------------------------------------------------------
      GW_OPT3 	        IPTV 	        255.255.255.255 	255.255.255.255 	Interfaceopt3dynamic gateway
      

      With the script from the cvs server i get:

      
      Name 	   Interface 	    Gateway 	        Monitor IP 	        Description
      -----------------------------------------------------------------------------------------------------------
      GW_OPT3  IPTV  	       dynamic 	        dynamic 	        Interfaceopt3dynamic gateway
      
      

      Maybe this informations is useful for you…

      Is this Information helpful to you? Or do need another Infos / Tests?

      1 Reply Last reply Reply Quote 0
      • B
        Beerman
        last edited by

        Any news, regarding this topic?

        1 Reply Last reply Reply Quote 0
        • B
          Beerman
          last edited by

          Will this Issue be fixed in the final version?

          1 Reply Last reply Reply Quote 0
          • T
            the6thday
            last edited by

            I second the request to update the dhclient-script!

            Everyone using T-Home IPTV in Germany is going to have issues if its not updated…

            To clarify this problem:

            T-Home is using vlans to seperate Web and IPTV traffic. The Web traffic is using PPPoE on Vlan 7, the IPTV traffic is using dhcp on Vlan8.
            IPTV is using unicast for the first 10 seconds of the stream and then switches to multicast which is working very good with the new igmp proxy(which is still spamming the main systemlog making it unusable btw!!!)

            The problem which is fixed by the new dhclient script is that the old script sets a gateway to 255.255.255.255 which is useless and causes the first 10 seconds of unicast to fail which in turn makes switching channels very slow because the STB has to wait for the multicast to begin(1-2 seconds...)

            This is a packetcapture for the iptv interface dhcp reply:

            07:30:37.027153 00:19:db:e3:89:6a > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: (tos 0x10, ttl 16, id 0, offset 0, flags [none], proto UDP (17), length 328)
                93.228.4.94.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:19:db:e3:89:6a, length 300, xid 0x8113a23f, Flags [none] (0x0000)
            	  Client-Ethernet-Address 00:19:db:e3:89:6a
            	  Vendor-rfc1048 Extensions
            	    Magic Cookie 0x63825363
            	    DHCP-Message Option 53, length 1: Request
            	    Requested-IP Option 50, length 4: 93.228.4.94
            	    Client-ID Option 61, length 7: ether 00:19:db:e3:89:6a
            	    Hostname Option 12, length 8: "dayroute"
            	    Parameter-Request Option 55, length 8: 
            	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
            	      Default-Gateway, Domain-Name, Domain-Name-Server, Hostname
            07:30:37.093868 00:15:c7:22:89:00 > 00:19:db:e3:89:6a, ethertype IPv4 (0x0800), length 375: (tos 0x0, ttl 255, id 17300, offset 0, flags [none], proto UDP (17), length 361)
                93.228.31.254.67 > 93.228.4.94.68: [no cksum] BOOTP/DHCP, Reply, length 333, xid 0x8113a23f, Flags [none] (0x0000)
            	  Your-IP 93.228.4.94
            	  Server-IP 193.158.137.14
            	  Gateway-IP 93.228.31.254
            	  Client-Ethernet-Address 00:19:db:e3:89:6a
            	  sname "DHSTG001"
            	  Vendor-rfc1048 Extensions
            	    Magic Cookie 0x63825363
            	    Subnet-Mask Option 1, length 4: 255.255.224.0
            	    Default-Gateway Option 3, length 4: 255.255.255.255
            	    Lease-Time Option 51, length 4: 86400
            	    DHCP-Message Option 53, length 1: ACK
            	    Server-ID Option 54, length 4: 193.158.137.14
            	    RN Option 58, length 4: 43200
            	    RB Option 59, length 4: 75600
            	    Classless-Static-Route Option 121, length 51: (193.158.137.14/32:93.228.31.254),(87.140.255.0/25:93.228.31.254),(87.141.128.0/17:93.228.31.254),(193.158.34.0/23:93.228.31.254),(212.184.168.0/24:93.228.31.254),(217.6.167.160/27:93.228.31.254)
            

            old script log entrys:

            Feb 25 07:30:37 	dhclient: PREINIT
            Feb 25 07:30:37 	dhclient[14532]: DHCPREQUEST on em1_vlan8 to 255.255.255.255 port 67
            Feb 25 07:30:37 	dhclient[14532]: DHCPACK from 93.228.31.254
            Feb 25 07:30:37 	dhclient: REBOOT
            Feb 25 07:30:37 	dhclient: Starting add_new_address()
            Feb 25 07:30:37 	dhclient: ifconfig em1_vlan8 inet 93.228.4.94 netmask 255.255.224.0 broadcast 93.228.31.255
            Feb 25 07:30:37 	dhclient: New IP Address (em1_vlan8): 93.228.4.94
            Feb 25 07:30:37 	dhclient: New Subnet Mask (em1_vlan8): 255.255.224.0
            Feb 25 07:30:37 	dhclient: New Broadcast Address (em1_vlan8): 93.228.31.255
            Feb 25 07:30:37 	dhclient: New Routers (em1_vlan8): 255.255.255.255
            Feb 25 07:30:37 	dhclient: Adding new routes to interface: em1_vlan8
            Feb 25 07:30:37 	dhclient: New Classless Static Routes (em1_vlan8): 193.158.137.14/32 93.228.31.254 87.140.255.0/25 93.228.31.254 87.141.128.0/17 93.228.31.254 193.158.34.0/23 93.228.31.254 212.184.168.0/24 93.228.31.254 217.6.167.160/27 93.228.31.254
            Feb 25 07:30:37 	dhclient: Creating resolv.conf
            Feb 25 07:30:37 	dhclient[14532]: bound to 93.228.4.94 -- renewal in 43200 seconds.
            

            new script log entrys:

            Feb 25 07:45:23 	dhclient[22251]: DHCPREQUEST on em1_vlan8 to 255.255.255.255 port 67
            Feb 25 07:45:23 	dhclient[22251]: DHCPACK from 93.228.31.254
            Feb 25 07:45:23 	dhclient: New IP Address (em1_vlan8): 93.228.4.94
            Feb 25 07:45:23 	dhclient: New Subnet Mask (em1_vlan8): 255.255.224.0
            Feb 25 07:45:23 	dhclient: New Broadcast Address (em1_vlan8): 93.228.31.255
            Feb 25 07:45:23 	dhclient: New Routers (em1_vlan8): 255.255.255.255
            Feb 25 07:45:23 	dhclient: New Classless Static Routes (em1_vlan8): 193.158.137.14/32 93.228.31.254 87.140.255.0/25 93.228.31.254 87.141.128.0/17 93.228.31.254 193.158.34.0/23 93.228.31.254 212.184.168.0/24 93.228.31.254 217.6.167.160/27 93.228.31.254
            Feb 25 07:45:23 	dhclient[22251]: bound to 93.228.4.94 -- renewal in 43200 seconds.
            

            Which results in this:

            @Beerman:

            With the original script i got this for the Interface in

            System:Gateways:

            
            Name 	           Interface 	Gateway 	        Monitor IP 	        Description
            ------------------------------------------------------------------------------------------------------------------
            GW_OPT3 	        IPTV 	        255.255.255.255 	255.255.255.255 	Interfaceopt3dynamic gateway
            

            With the script from the cvs server i get:

            
            Name 	   Interface 	    Gateway 	        Monitor IP 	        Description
            -----------------------------------------------------------------------------------------------------------
            GW_OPT3  IPTV  	       dynamic 	        dynamic 	        Interfaceopt3dynamic gateway
            
            

            Maybe this informations is useful for you…

            Both scripts however create the same routing entrys so this is aparently not a routing issue…:

            1 Reply Last reply Reply Quote 0
            • T
              the6thday
              last edited by

              push

              1 Reply Last reply Reply Quote 0
              • B
                Beerman
                last edited by

                Will this Issue be fixed in Version 2?

                I think with the logs and the explanation inside this thread the problem is reasonably  specified.

                But if you need another tests/logs, I will give it to you.

                Thx!

                1 Reply Last reply Reply Quote 0
                • E
                  eri--
                  last edited by

                  Its not a dhclient issue.
                  Try this https://rcs.pfsense.org/projects/pfsense/repos/mainline/commits/5766add89187bf47c225f67697e37ca25b0dbc71 or wait for the next snapshots.

                  1 Reply Last reply Reply Quote 0
                  • B
                    Beerman
                    last edited by

                    sorry, this doesn´t fix it:

                    I tried this Build:

                    2.0-RC1 (i386)  built on Wed Apr 6 11:10:23 EDT 2011

                    Your changes are included in this Build:

                    if [ "$new_ip_address" = "$router" -o "$router" = "255.255.255.255" ]; then
                                                    $ROUTE add default -iface $interface
                                                    echo $ROUTE add default -iface $interface | $LOGGER
                                                    # NOTE: Do not activate this for all ones address since pf(4) will try to forward packets to it.
                                                    if [ "$new_ip_address" = "$router" ]; then
                                                            echo $router > /tmp/${interface}_router
                                                    fi
                                            else
                                                    $ROUTE add default $router
                                                    echo $ROUTE add default $router | $LOGGER
                                                    echo $router > /tmp/${interface}_router
                                            fi
                    
                    

                    But for the Interface I still got:

                    
                    System: Gateways
                    GW_OPT3 	IPTV 	255.255.255.255 	255.255.255.255 	Interfaceopt3dynamic gateway
                    

                    and I got the same Problems…

                    1 Reply Last reply Reply Quote 0
                    • E
                      eri--
                      last edited by

                      Can you remove the /tmp/*_router and try dhclient or Save button on the interface page and see if you will get the same?
                      Maybe making sure that a remnant file is not causing issues.

                      Otherwise something is not matching in that if statement.

                      1 Reply Last reply Reply Quote 0
                      • B
                        Beerman
                        last edited by

                        Sorry, no difference…

                        after removing the *_router files in /tmp and renewing DHCP-Lease GW is still 255.255.255.255

                        /tmp(20): cat vr2_vlan8_router 
                        255.255.255.255
                        
                        ----
                        
                        GW_OPT3 	IPTV 	255.255.255.255 	255.255.255.255 	Interfaceopt3dynamic gateway
                        
                        
                        1 Reply Last reply Reply Quote 0
                        • E
                          eri--
                          last edited by

                          Can you try by changing that section from

                          if [ "$new_ip_address" = "$router" -o "$router" = "255.255.255.255" ]; then
                                                         $ROUTE add default -iface $interface
                                                         echo $ROUTE add default -iface $interface | $LOGGER
                                                         # NOTE: Do not activate this for all ones address since pf(4) will try to forward packets to it.
                                                         if [ "$new_ip_address" = "$router" ]; then
                                                                 echo $router > /tmp/${interface}_router
                                                         fi
                                                 else
                                                         $ROUTE add default $router
                                                         echo $ROUTE add default $router | $LOGGER
                                                         echo $router > /tmp/${interface}_router
                                                 fi

                          to

                          if [ "$router" = "255.255.255.255" ]; then
                                                         $ROUTE add default -iface $interface
                                                         echo $ROUTE add default -iface $interface | $LOGGER
                                                         # NOTE: Do not activate this for all ones address since pf(4) will try to forward packets to it.
                                                 elif [ "$new_ip_address" = "$router" ]; then
                                                        $ROUTE add default -iface $interface
                                                         echo $ROUTE add default -iface $interface | $LOGGER
                                                         echo $router > /tmp/${interface}_router
                                                 else
                                                         $ROUTE add default $router
                                                         echo $ROUTE add default $router | $LOGGER
                                                         echo $router > /tmp/${interface}_router
                                                 fi

                          Also please check which of the messages from the above are in your system log.

                          1 Reply Last reply Reply Quote 0
                          • B
                            Beerman
                            last edited by

                            Hi,

                            I changed the script to:

                            for router in $new_routers; do
                                                    if [ "$router" = "255.255.255.255" ]; then
                                                            $ROUTE add default -iface $interface
                                                            echo $ROUTE add default -iface $interface | $LOGGER
                                                            $LOGGER "TEST1"
                                                            # NOTE: Do not activate this for all ones address since pf(4) will try to forward packets to it.
                                                    elif [ "$new_ip_address" = "$router" ]; then
                                                           $ROUTE add default -iface $interface
                                                            echo $ROUTE add default -iface $interface | $LOGGER
                                                            $LOGGER "TEST2"
                                                            echo $router > /tmp/${interface}_router
                                                    else
                                                            $ROUTE add default $router
                                                            echo $ROUTE add default $router | $LOGGER
                                                            $LOGGER "TEST3"
                                                            echo $router > /tmp/${interface}_router
                                                    fi
                            
                            

                            You see, for testing I added $LOGGER "TEST1", $LOGGER "TEST2" and $LOGGER "TEST3" in each If, elif and else block.

                            But in System-Log i can´t see any TEST1, TEST2 or TEST3

                            Apr 8 00:02:03 	dhclient[4730]: bound to 84.142.199.75 -- renewal in 43200 seconds.
                            Apr 8 00:02:03 	dhclient: Creating resolv.conf
                            Apr 8 00:02:02 	dhclient: New Classless Static Routes (vr2_vlan8): 193.158.137.14/32 84.142.255.254 87.140.255.0/25 84.142.255.254 87.141.128.0/17 84.142.255.254 193.158.34.0/23 84.142.255.254 212.184.168.0/24 84.142.255.254 217.6.167.160/27 84.142.255.254
                            Apr 8 00:02:02 	dhclient: Adding new routes to interface: vr2_vlan8
                            Apr 8 00:02:02 	dhclient: New Routers (vr2_vlan8): 255.255.255.255
                            Apr 8 00:02:02 	dhclient: New Broadcast Address (vr2_vlan8): 84.142.255.255
                            Apr 8 00:02:02 	dhclient: New Subnet Mask (vr2_vlan8): 255.255.192.0
                            Apr 8 00:02:02 	dhclient: New IP Address (vr2_vlan8): 84.142.199.75
                            Apr 8 00:02:02 	dhclient: ifconfig vr2_vlan8 inet 84.142.199.75 netmask 255.255.192.0 broadcast 84.142.255.255
                            Apr 8 00:02:02 	dhclient: Starting add_new_address()
                            Apr 8 00:02:02 	dhclient: BOUND
                            Apr 8 00:02:02 	dhclient[4730]: DHCPACK from 84.142.255.254
                            Apr 8 00:02:02 	dhclient[4730]: DHCPREQUEST on vr2_vlan8 to 255.255.255.255 port 67
                            Apr 8 00:02:02 	dhclient: ARPCHECK
                            Apr 8 00:02:00 	dhclient: ARPSEND
                            Apr 8 00:02:00 	dhclient[4730]: DHCPOFFER from 84.142.255.254
                            Apr 8 00:02:00 	dhclient[4730]: DHCPDISCOVER on vr2_vlan8 to 255.255.255.255 port 67 interval 2
                            Apr 8 00:01:54 	dhclient[4730]: DHCPREQUEST on vr2_vlan8 to 255.255.255.255 port 67
                            Apr 8 00:01:51 	dhclient[4730]: DHCPREQUEST on vr2_vlan8 to 255.255.255.255 port 67
                            Apr 8 00:01:49 	dhclient[4730]: DHCPREQUEST on vr2_vlan8 to 255.255.255.255 port 67
                            Apr 8 00:01:47 	dhclient[4730]: DHCPREQUEST on vr2_vlan8 to 255.255.255.255 port 67
                            Apr 8 00:01:47 	dhclient: PREINIT
                            Apr 8 00:01:46 	dhclient[61966]: exiting.
                            Apr 8 00:01:46 	dhclient[61966]: exiting.
                            Apr 8 00:01:46 	dhclient[61966]: connection closed
                            Apr 8 00:01:46 	dhclient[61966]: connection closed
                            Apr 8 00:01:46 	dhclient[61832]: bound to 84.142.199.75 -- renewal in 43200 seconds.
                            Apr 8 00:01:46 	dhclient: Creating resolv.conf
                            Apr 8 00:01:46 	dhclient: New Classless Static Routes (vr2_vlan8): 193.158.137.14/32 84.142.255.254 87.140.255.0/25 84.142.255.254 87.141.128.0/17 84.142.255.254 193.158.34.0/23 84.142.255.254 212.184.168.0/24 84.142.255.254 217.6.167.160/27 84.142.255.254
                            Apr 8 00:01:46 	dhclient: Adding new routes to interface: vr2_vlan8
                            Apr 8 00:01:46 	dhclient: New Routers (vr2_vlan8): 255.255.255.255
                            Apr 8 00:01:46 	dhclient: New Broadcast Address (vr2_vlan8): 84.142.255.255
                            Apr 8 00:01:46 	dhclient: New Subnet Mask (vr2_vlan8): 255.255.192.0
                            Apr 8 00:01:46 	dhclient: New IP Address (vr2_vlan8): 84.142.199.75
                            Apr 8 00:01:46 	dhclient: ifconfig vr2_vlan8 inet 84.142.199.75 netmask 255.255.192.0 broadcast 84.142.255.255
                            Apr 8 00:01:46 	dhclient: Starting add_new_address()
                            Apr 8 00:01:46 	dhclient: BOUND
                            Apr 8 00:01:46 	dhclient[61832]: DHCPACK from 84.142.255.254
                            Apr 8 00:01:46 	dhclient[61832]: DHCPREQUEST on vr2_vlan8 to 255.255.255.255 port 67
                            Apr 8 00:01:46 	dhclient: ARPCHECK
                            Apr 8 00:01:44 	dhclient: ARPSEND
                            Apr 8 00:01:43 	dhclient[61832]: DHCPOFFER from 84.142.255.254
                            Apr 8 00:01:43 	dhclient[61832]: DHCPDISCOVER on vr2_vlan8 to 255.255.255.255 port 67 interval 1
                            Apr 8 00:01:38 	dhclient[61832]: DHCPREQUEST on vr2_vlan8 to 255.255.255.255 port 67
                            Apr 8 00:01:33 	dhclient[61832]: DHCPREQUEST on vr2_vlan8 to 255.255.255.255 port 67
                            Apr 8 00:01:31 	dhclient[61832]: DHCPREQUEST on vr2_vlan8 to 255.255.255.255 port 67
                            Apr 8 00:01:29 	dhclient[61832]: DHCPREQUEST on vr2_vlan8 to 255.255.255.255 port 67
                            Apr 8 00:01:28 	dhclient[61832]: DHCPREQUEST on vr2_vlan8 to 255.255.255.255 port 67
                            Apr 8 00:01:28 	dhclient: PREINIT
                            
                            

                            Gateway is still 255.255.255.255

                            GW_OPT3 	IPTV 	255.255.255.255 	255.255.255.255 	Interfaceopt3dynamic gateway
                            
                            1 Reply Last reply Reply Quote 0
                            • E
                              eri--
                              last edited by

                              I made a fix that will be in latest snapshots which should fix this by not having a gateway declared from dhcp and so no PBR will be done from pfSense and routes will be followed.

                              Please test latest snapshots and let me know.

                              1 Reply Last reply Reply Quote 0
                              • B
                                Beerman
                                last edited by

                                This fixed my issue!

                                GW_OPT3 	IPTV 	dynamic 	dynamic 	Interfaceopt3dynamic gateway
                                

                                Thank you, very much!

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