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

    pfSense on Watchguard M270

    Scheduled Pinned Locked Moved Hardware
    133 Posts 18 Posters 42.9k 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.
    • stephenw10S
      stephenw10 Netgate Administrator @shaker
      last edited by stephenw10

      All the ports are in state DISABLED so the script did not set them to FORWARDING correctly.

      Otherwise it looks good.

      1 Reply Last reply Reply Quote 0
      • S
        shaker
        last edited by

        This is the script:

        #!/bin/sh
        #
        
        echo "Configuring switch..."
        logger Configuring switch...
        
        etherswitchcfg config vlan_mode DOT1Q
        
        etherswitchcfg vlangroup1 vlan 110 members 1,9t
        etherswitchcfg vlangroup2 vlan 120 members 2,10t
        etherswitchcfg vlangroup3 vlan 130 members 3,10t
        etherswitchcfg vlangroup4 vlan 140 members 4,10t
        etherswitchcfg vlangroup5 vlan 150 members 5,10t
        etherswitchcfg vlangroup6 vlan 160 members 6,10t
        etherswitchcfg vlangroup7 vlan 170 members 7,10t
        etherswitchcfg vlangroup8 vlan 180 members 8,10t
        
        etherswitchcfg port1 pvid 110
        etherswitchcfg port2 pvid 120
        etherswitchcfg port3 pvid 130
        etherswitchcfg port4 pvid 140
        etherswitchcfg port5 pvid 150
        etherswitchcfg port6 pvid 160
        etherswitchcfg port7 pvid 170
        etherswitchcfg port8 pvid 180
        
        
        echo "done"
        logger done
        
        

        Do I need some forwardings too?

        R 1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Yes all the switch ports are disabled by default, you still need the section to set each port to forwarding. You might be able to combine that with the pvid. I've not tried that in one command.

          1 Reply Last reply Reply Quote 0
          • S
            shaker
            last edited by

            Ok, now it looks like this:

            etherswitch0: VLAN mode: DOT1Q
            port1:
                    pvid: 110
                    state=8<FORWARDING>
                    flags=0<>
                    media: Ethernet autoselect (none)
                    status: no carrier
            port2:
                    pvid: 120
                    state=8<FORWARDING>
                    flags=0<>
                    media: Ethernet autoselect (1000baseT <full-duplex>)
                    status: active
            port3:
                    pvid: 130
                    state=8<FORWARDING>
                    flags=0<>
                    media: Ethernet autoselect (none)
                    status: no carrier
            port4:
                    pvid: 140
                    state=8<FORWARDING>
                    flags=0<>
                    media: Ethernet autoselect (none)
                    status: no carrier
            port5:
                    pvid: 150
                    state=8<FORWARDING>
                    flags=0<>
                    media: Ethernet autoselect (none)
                    status: no carrier
            port6:
                    pvid: 160
                    state=8<FORWARDING>
                    flags=0<>
                    media: Ethernet autoselect (none)
                    status: no carrier
            port7:
                    pvid: 170
                    state=8<FORWARDING>
                    flags=0<>
                    media: Ethernet autoselect (none)
                    status: no carrier
            port8:
                    pvid: 180
                    state=8<FORWARDING>
                    flags=0<>
                    media: Ethernet autoselect (none)
                    status: no carrier
            port9:
                    pvid: 1
                    state=8<FORWARDING>
                    flags=1<CPUPORT>
                    media: Ethernet 2500Base-KX <full-duplex>
                    status: active
            port10:
                    pvid: 1
                    state=8<FORWARDING>
                    flags=1<CPUPORT>
                    media: Ethernet 2500Base-KX <full-duplex>
                    status: active
            vlangroup0:
                    vlan: 1
                    members 1,2,3,4,5,6,7,8,9,10
            vlangroup1:
                    vlan: 110
                    members 1,9t
            vlangroup2:
                    vlan: 120
                    members 2,10t
            vlangroup3:
                    vlan: 130
                    members 3,10t
            vlangroup4:
                    vlan: 140
                    members 4,10t
            vlangroup5:
                    vlan: 150
                    members 5,10t
            vlangroup6:
                    vlan: 160
                    members 6,10t
            vlangroup7:
                    vlan: 170
                    members 7,10t
            vlangroup8:
                    vlan: 180
                    members 8,10t
            

            I am going ahead and give it a try!
            Thank you from here!

            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              Hmm, probably should remove VLAN1 from the switch. That's interesting, I guess that must be a default. You could probably just change the vlan groups you're defining to start at 0 so it gets replaced. However it won't affect anything since the PVID on the ports is set something other than 1.

              Steve

              1 Reply Last reply Reply Quote 0
              • S
                shaker
                last edited by

                It works fine for now. I didn't connect everything at the moment. But I am able to connect now, receiving IP and can organize the VLANs.
                As next I need to configure pfsense. Will take some time. thanks guys

                1 Reply Last reply Reply Quote 1
                • V
                  verbatim419
                  last edited by

                  sorry to start the topic again.

                  I got an m270 and installed pfsense on it. I have inserted the hints for the switch but I can't insert the scripts, keeps throwing me an error No such file or directory when run comand chmod +x for sript
                  I new and sory for my english

                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    You need to create those files.

                    How are you running those commands exactly?

                    V 1 Reply Last reply Reply Quote 0
                    • V
                      verbatim419 @stephenw10
                      last edited by verbatim419

                      @stephenw10 I downloaded one file from the system that has the extension "sh" and modified it with the script gave in previous posts, after which I transferred the file to the "/usr/local/etc/rc.d/" folder. After saving, I tried to start the shell both via the console and via the guia, but it threw out the above error. I writen script in notepad++. I'm a beginner when it comes to these things, so I apologize for some banalities.

                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        Ok I assume you mean the switch configuration script as shown here?: https://forum.netgate.com/post/990474

                        You should create that file not add the code to a existing script.

                        In my setup I run that script using a shellcmd not via rc.d.

                        Steve

                        R V 2 Replies Last reply Reply Quote 0
                        • R
                          reiter_f @stephenw10
                          last edited by

                          hi, i'm running the M270 too, it works when i switch the ports to forwarding "etherswitchcfg port# forwarding", but it loos the information after rebooting. after the reboot, the ports are disabled

                          stephenw10S 1 Reply Last reply Reply Quote 0
                          • P
                            psp
                            last edited by

                            In my setup, I'm running the script @startup in Cron.

                            1 Reply Last reply Reply Quote 0
                            • stephenw10S
                              stephenw10 Netgate Administrator @reiter_f
                              last edited by

                              @reiter_f said in pfSense on Watchguard M270:

                              but it loos the information after rebooting. after the reboot, the ports are disabled

                              Yes the switch is reset to defaults at boot. You have to reconfigure it at boot each time. It's easiest to do that using a script.

                              R 1 Reply Last reply Reply Quote 0
                              • R
                                reiter_f @stephenw10
                                last edited by reiter_f

                                @stephenw10
                                ha, there is no default config
                                file that you are able to write in? i'm a little bit confused of this strategy,. because there is no ROM storage or something like that..... do you know where the config ist writen temporaly?
                                how do i link the skript to the boot config, that it will run automatical at booting? ... the best would be to Clean all switch-configs before running the skript...

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  When the switch is powered on it comes up with all the ports disabled by default. That's how the switch chip has been configured in hardware.

                                  There are several way to run a script. As discussed above I use a shellcmd to do it.

                                  1 Reply Last reply Reply Quote 0
                                  • V
                                    verbatim419 @stephenw10
                                    last edited by

                                    @stephenw10 I created a file with the script that was given before, but it gives me the above problem when I want to run the command. could you (if you are able) write how it is formed exactly and started, I looked for it on the forum but I didn't succeed. Thank you

                                    1 Reply Last reply Reply Quote 0
                                    • stephenw10S
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      It depends where the script is and what it's named. But here I would use:

                                      [23.05-RELEASE][admin@6100.stevew.lan]/root: ls
                                      .cshrc                     .k5login                   .profile                   .ssh                       backup                     switch_config.sh
                                      .hushlogin                 .login                     .shrc                      .tcshrc                    realtek-re-kmod-197.00.pkg
                                      [23.05-RELEASE][admin@6100.stevew.lan]/root: chmod +x switch_config.sh 
                                      [23.05-RELEASE][admin@6100.stevew.lan]/root: ls
                                      .cshrc                     .k5login                   .profile                   .ssh                       backup                     switch_config.sh
                                      .hushlogin                 .login                     .shrc                      .tcshrc                    realtek-re-kmod-197.00.pkg
                                      
                                      R 1 Reply Last reply Reply Quote 0
                                      • R
                                        reiter_f @stephenw10
                                        last edited by

                                        @stephenw10
                                        thank you for the explanation, i will run the skript while booting

                                        R 1 Reply Last reply Reply Quote 0
                                        • R
                                          reiter_f @reiter_f
                                          last edited by

                                          i have done the boot precedure alsow with cron, and run the sript with an crontab

                                          *corntab -e

                                          @reboot /usr/local/bin/setup_switch.sh*

                                          an it runs :)
                                          the most tricky thing was the commands of the vi-editor in the crontab :(

                                          for all who arn't using vi-editor (like me):
                                          (i ... for text input | ESC ... for changing to commandline | w: ... for write out | x: ... for exit the Vi-editor)

                                          1 Reply Last reply Reply Quote 0
                                          • stephenw10S
                                            stephenw10 Netgate Administrator
                                            last edited by

                                            For mere mortals like most of us use the included EasyEditor ee.

                                            Or for cron just install the cron package and use the gui.

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