1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Best way to configure 2 public IPs on ERLite-3?

Discussion in 'Routers' started by aznphatb0i, May 16, 2018.

  1. aznphatb0i

    aznphatb0i Occasional Visitor

    Joined:
    Mar 20, 2015
    Messages:
    12
    Hello!

    I currently have an ERLite-3 with CogentCo internet and a single static public IP.

    I want to use 2 public IP addresses, and have one assigned to each LAN port on the ERLite-3.

    Is this possible and what is the easiest / best way to go about this? Are there any negatives to this configuration?

    Thanks in advance for your sage advice!
     
  2. Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!
  3. aznphatb0i

    aznphatb0i Occasional Visitor

    Joined:
    Mar 20, 2015
    Messages:
    12
    I just got my NanoHD and am ready to start configuring this. Does anyone have any ideal guide to follow?
     
  4. Cloud200

    Cloud200 Senior Member

    Joined:
    Aug 16, 2012
    Messages:
    474
    What do you mean by "I want to use 2 public IP addresses"?
    Did you get these addresses from Cogent already?
    Are you renting those additional addresses in a /29 or lower block?
    Is Cogent handing you out a /29 or lower or are they handing off a /30,/31 and expecting you to route the additional blocks?
    Do you want to NAT them?
    Do you want to hand them off directly?

    As an aside, it would be best to ask the question in the Ubiquiti forums as well.
    https://community.ubnt.com/t5/EdgeRouter/bd-p/EdgeMAX
     
  5. aznphatb0i

    aznphatb0i Occasional Visitor

    Joined:
    Mar 20, 2015
    Messages:
    12
    This was the information that was provided by my ISP:

    "Your request for IP information for your account is provided below.
    Along with your .XX2 you currently also have .XX3 through .XX6 to use

    The below is for order id - X-XXXXXXXXX

    Address: XX.XX.XXX.XX1
    Netmask: 255.255.255.248= 29
    Network: XX.XX.XXX.XX0/29
    Broadcast: XX.XX.XXX.XX7
    HostMin: XX.XX.XXX.XX1<<<<<<<<<< Cogent Uses this Address as your Gateway
    HostMax: XX.XX.XXX.XX6
    Hosts/Net: 6"​

    The ERLite-3 has two LAN ports. My goal is to have each LAN port be an isolated network with a different public facing IP address.
     
  6. kvic

    kvic Part of the Furniture

    Joined:
    Aug 11, 2014
    Messages:
    2,314
    Location:
    22.4399N 114.2222E
    If your ISP provisions two IPv4 over the same physical link, use two physical RJ45 ports for each IP is a waste of resource.

    That's what happened to me recently. And I figure there is a feature in Edgemax known as "pseudo-ethernet" that did exactly what I have imagined.

    Two IP addresses over the same physical interface. Can do both DHCP or static address assignment. Very nice. Search Ubiquiti forums for details.

    I feel a bit guilty of getting a second public IPv4 for a home network. No huge benefit but fun to experiment with limited usage scenarios.
     
  7. Cloud200

    Cloud200 Senior Member

    Joined:
    Aug 16, 2012
    Messages:
    474
    That's not what the OP is trying to achieve.
    They need to create a source NAT rule.

    Eg. Eth0 WAN
    Assign ip 1.1.1.2/29
    Assign ip 1.1.1.3/29

    Eth1 LAN A
    Assign ip 192.168.2.1/24
    Eth2 LAN B
    Assign ip 192.168.3.1/24

    Create a rule following this guide
    https://help.ubnt.com/hc/en-us/articles/115009504308-EdgeRouter-Routing-How-to-Distribute-Public-IPs
    Replace the file server with your subnets

    Edit:
    There are some great reasons why you want to split traffic between two public IPs with each assigned a subnets. One is for guests to not get you primary IP banned. Overlapping dnat ports from forwarding and keeping the external IP in line. Scalping tickets to a concert . . .
     
    Last edited: Jul 19, 2018
    sfx2000 likes this.
  8. kvic

    kvic Part of the Furniture

    Joined:
    Aug 11, 2014
    Messages:
    2,314
    Location:
    22.4399N 114.2222E
    My previous response describes one possible implementation under the hood in case (1) of the doc that you linked. Particularly useful if you have to get two IP addresses from ISP through DHCP.
     
  9. sfx2000

    sfx2000 Part of the Furniture

    Joined:
    Aug 11, 2011
    Messages:
    13,379
    Location:
    San Diego, CA
    CoxHSI still hands out /30's - so one can use both addresses if one wants to - as mentioned above, can either bind both IP's to a single MAC addr, or drop in a switch, and have two completely separate LAN's - @Cloud200 approach is the right approach, IMHO...

    OT - I think CoxHSI does this on purpose - legacy of the pre-router days when most folks would directly hook up more than one computer to the Cable Modem.

    As an example - using a documentation IP addr/mask for demonstration purposes...

    Code:
    ipcalc 192.0.2.80/30
    Address:   192.0.2.80           11000000.00000000.00000010.010100 00
    Netmask:   255.255.255.252 = 30 11111111.11111111.11111111.111111 00
    Wildcard:  0.0.0.3              00000000.00000000.00000000.000000 11
    =>
    Network:   192.0.2.80/30        11000000.00000000.00000010.010100 00
    HostMin:   192.0.2.81           11000000.00000000.00000010.010100 01
    HostMax:   192.0.2.82           11000000.00000000.00000010.010100 10
    Broadcast: 192.0.2.83           11000000.00000000.00000010.010100 11
    Hosts/Net: 2                     Class C
    
     
  10. kvic

    kvic Part of the Furniture

    Joined:
    Aug 11, 2014
    Messages:
    2,314
    Location:
    22.4399N 114.2222E
    Nor I find anything incorrect in my first response..

    While on server side, ISP can change to hand out more than one IPv4 per MAC, you still need two "interfaces" to bind the IPv4 addresses on client side. That was my point.
     
  11. sfx2000

    sfx2000 Part of the Furniture

    Joined:
    Aug 11, 2011
    Messages:
    13,379
    Location:
    San Diego, CA
    Yep, agreed - keep in mind that in linux, it's trivial to create virtual interfaces and bind them all to the same MAC addr...

    In fact, the cloud architectures generally rely on that one...
     
  12. kvic

    kvic Part of the Furniture

    Joined:
    Aug 11, 2014
    Messages:
    2,314
    Location:
    22.4399N 114.2222E
    Yes, I've been doing that for a long time. I believe I unleash this little trick to ASUS folks here in some posts, and also through the recommended setup of pixelserv-tls.

    I believe most ISP requires a different MAC for a 2nd IP. Interface alias won't work there. Hence, again my original point..

    Perhaps I've been not answering the OP as I didn't read the whole thread except a few words from the first post.
     
Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!