Announcement

Collapse
No announcement yet.

Private and Public IP ranges in same physical network DHCP

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Private and Public IP ranges in same physical network DHCP

    So I have two sets of IP addresses I'm using in my network.

    The private range: 192.168.0.0/16 gateway 192.168.0.1 to comcast residential internet

    The public range 96.79.212.209/28 gateway 96.79.212.222 to comcast business internet

    I want to be able to hand out both ranges using dhcp, but separated somehow, can't use MAC addresses as I won't know those ahead of time.

    Would be nice if I could hand out addresses based on which physical switch port the request came from.

    I haven't played with VLANs up till now, but I'm wondering if they might hold the answer.

    Any time spent thinking about this is much appreciated.
    https://madmage999.blogspot.com/

    #2
    You could use two routers.

    IF you had a wifi router that allowed the configuration of two simultaneous ESSID's you could hook up your residential computer to one and your business computer to the other.

    You could use your wifi router IF it has the appropriate firmware:


    Otherwise, you'll probably do best with a PBR, Policy Based Routing.
    http://www.fredcom.com/linux-pbr
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Thanks, GreyGeek.

      I'm not sure I communicated what I need effectively. Let me try again.

      I have two routers already, one for the public IP space which acts as a gateway and dhcp server for public clients, and one that acts as a gateway and dhcp for private clients.

      What I need is for the public clients to get their IPs from the public DHCP and the Private clients to get their IPs from the private DHCP. Why not just physically separate them? Because the management interfaces of some of the gear physically attached to the public network is on private IP space and I want to access these from the private clients. I could separate them, but then I'd have to waste public IPs for the management interfaces.

      What I am currently experimenting with is using one physical machine with two NICs and iptables to forward packets from eth0 to eth1 and back effectively bridging the segments, but dropping any dhcp packets from crossing segments.
      https://madmage999.blogspot.com/

      Comment


        #4
        Does your isp provide you with more then one IP address? If not your not going to get additional IPs after your first device connects. What i would suggest doing is setting up a VLAN. when done correctly you will be able to do as you have described.
        Mark Your Solved Issues [SOLVED]
        (top of thread: thread tools)

        Comment


          #5
          Originally posted by sithlord48 View Post
          Does your isp provide you with more then one IP address? If not your not going to get additional IPs after your first device connects. What i would suggest doing is setting up a VLAN. when done correctly you will be able to do as you have described.
          Yes. I have multiple public IPs on the business connection. I may set up VLANs but I'm not familiar enough with them enough yet to know which kind I need or how exactly it needs to be configured.
          https://madmage999.blogspot.com/

          Comment


            #6
            perhaps this will help you understand vlan better . https://openwrt.org/docs/guide-user/...t_lede_routers
            Mark Your Solved Issues [SOLVED]
            (top of thread: thread tools)

            Comment


              #7
              Originally posted by sithlord48 View Post
              perhaps this will help you understand vlan better . https://openwrt.org/docs/guide-user/...t_lede_routers
              Thanks, sithlord48. I'll be sure and read up on it. I'd never had a reason to use VLANs so far. So when I started messing about in my switch GUI it was not explained well and I couldn't figure it out on such limited info.
              https://madmage999.blogspot.com/

              Comment

              Working...
              X