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

    Having same gateway addres for all interfaces.

    Scheduled Pinned Locked Moved DHCP and DNS
    14 Posts 4 Posters 1.6k 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.
    • N Offline
      nicolaj
      last edited by

      So i'm just getting pfsense up and running. Internet and wired machine is running fine. But i want to add wifi as well. But it appears i can't have the same gateway address for both em0 and em1. Is there a way around this, i'd like having the wired and wifi on the same subnet.

      1 Reply Last reply Reply Quote 0
      • chpalmerC Offline
        chpalmer
        last edited by

        Not sure how this fits in this particular forum subject..  "DHCP and DNS".

        You should not have a "Gateway" address assigned to any of your LAN ports. Although Im betting that's not really what you mean.

        Id move this to "General Questions" and start by explaining your setup.

        ;)

        Triggering snowflakes one by one..
        Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

        1 Reply Last reply Reply Quote 0
        • JKnottJ Offline
          JKnott
          last edited by

          I assume you mean the default gateway and the 2 interfaces have different network addresses, such as 192.168.1.0/24 and 192.168.2.0/24?  If so, no.  The gateway address must be within the address range of that network.  As for having both WiFi and Ethernet on the same subnet, what's stopping you?  That's a very common configuration.

          PfSense running on Qotom mini PC
          i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel 1 Gb Ethernet ports.
          UniFi AC-Lite access point

          I haven't lost my mind. It's around here...somewhere...

          1 Reply Last reply Reply Quote 0
          • N Offline
            nicolaj
            last edited by

            The reason i put it under dhcp was because em1 is 192.168.1.1 and em0 is 192.168.2.1, but i wanted em0 to also be 192.168.1.1 so em0 and em1 is running the same dhcp ip pool and same subnet. Meaning both the wired and wireless devices would be on the same network, just like a normal router.
            And i thought it was about merging the dhcp servers somehow. But i've found it's not.
            And the reason i used "gateway" was because 192.168.1.1 is the gateway for em1 etc.

            1 Reply Last reply Reply Quote 0
            • JKnottJ Offline
              JKnott
              last edited by

              Why do you have 2 DHCP servers?  You only need one.  That said, you can have 2 within the same subnet range, provided there's a means to prevent them from handing out the same addresses.  While modern DHCP clients are supposed to do a gratuitous arp, before accepting an address, you can just configure the DHCP servers to hand out separate blocks within the subnet.

              Now back to your problem.  Why is the access point not just connected to the LAN.  That is what I have here and is the usual configuration.  If you're using a router as an access point, then just connect the LAN side of it to your network.  You might have to configure the WAN side with a dummy static address, as some routers won't work without an address on the WAN side.  Some routers can even be specifically configured for use as a plain access point.

              PfSense running on Qotom mini PC
              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel 1 Gb Ethernet ports.
              UniFi AC-Lite access point

              I haven't lost my mind. It's around here...somewhere...

              1 Reply Last reply Reply Quote 0
              • N Offline
                nicolaj
                last edited by

                Because if i try to set em0 to 192.168.1.2 it'll give an error. I was forced to give each interface it's own ip range from a different subnet.

                My ap is connected to lan. But i read that to be able to have two interfaces on the same subnet you need to bridge them and doing that costs some performance. Also that it apparently can be quite a bitch to get working properly.

                1 Reply Last reply Reply Quote 0
                • JKnottJ Offline
                  JKnott
                  last edited by

                  Why do you have those 2?  You only need a single LAN and you connect the WiFi to it.

                  It appears to me you're making things more complicated than they should be.  In my network here, on the LAN side of pfSense, I have an Ethernet switch, which everything else, including the access point, plugs into.  Why do you need 2 interfaces???

                  PfSense running on Qotom mini PC
                  i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel 1 Gb Ethernet ports.
                  UniFi AC-Lite access point

                  I haven't lost my mind. It's around here...somewhere...

                  1 Reply Last reply Reply Quote 0
                  • N Offline
                    nicolaj
                    last edited by

                    Because my pc is connected to em1. em1 is wired, em0 is wireless.

                    1 Reply Last reply Reply Quote 0
                    • JKnottJ Offline
                      JKnott
                      last edited by

                      I must be missing something.  Is the wireless access point you're using built into the computer?

                      PfSense running on Qotom mini PC
                      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel 1 Gb Ethernet ports.
                      UniFi AC-Lite access point

                      I haven't lost my mind. It's around here...somewhere...

                      1 Reply Last reply Reply Quote 0
                      • DerelictD Offline
                        Derelict LAYER 8 Netgate
                        last edited by

                        Put a switch on LAN and connect your wired devices and the access point to that.

                        Chattanooga, Tennessee, USA
                        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                        Do Not Chat For Help! NO_WAN_EGRESS(TM)

                        1 Reply Last reply Reply Quote 0
                        • N Offline
                          nicolaj
                          last edited by

                          @Derelict:

                          Put a switch on LAN and connect your wired devices and the access point to that.

                          But that's not what i wanted to do, i didn't want to add more devices. But i guess i'll have to rethink the setup.

                          @JKnott:

                          I must be missing something.  Is the wireless access point you're using built into the computer?

                          No, it's just a regular wifi ap.

                          1 Reply Last reply Reply Quote 0
                          • DerelictD Offline
                            Derelict LAYER 8 Netgate
                            last edited by

                            The best answer (for the moment) is to use an external switch.

                            Chattanooga, Tennessee, USA
                            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                            Do Not Chat For Help! NO_WAN_EGRESS(TM)

                            1 Reply Last reply Reply Quote 0
                            • N Offline
                              nicolaj
                              last edited by

                              @Derelict:

                              The best answer (for the moment) is to use an external switch.

                              Seems like i'd have to do it anyway. Only two of the three nics are intel, the onboard one is a RTL8111GR which apparently is bad for business as i've experienced it loosing connection. So i'll change the setup to only use the intel nics.

                              1 Reply Last reply Reply Quote 0
                              • JKnottJ Offline
                                JKnott
                                last edited by

                                The best answer (for the moment) is to use an external switch.

                                +1

                                PfSense running on Qotom mini PC
                                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel 1 Gb Ethernet ports.
                                UniFi AC-Lite access point

                                I haven't lost my mind. It's around here...somewhere...

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