I get the following info from my ISP for my network:
IPv4 Subnet: x.y.z.0/28, Netmask: 255.255.255.240, Gateway: x.y.z.1
I also get a /64 IPv6 Prefix, but want to understand how to set up IPv4 first.
My Goal is to assign the /28 IPv4 Subnet to my WAN interface ether1, but I don't know where I can set the upstream gateway IP.
To Test this out, I am using the cgNAT IP Net 100.64.31.0/28 with 2 CHRs called ProviderEdge and CoreRouter connected like this:
Internet <==> [ether1] ProviderEdge [ether2] <==> [ether1] CoreRouter [ether2] <==> Client Server
Code: Select all
# ProviderEdge
/ip/address/add address=100.64.31.1/28 interface=ether2
# CoreRouter
/ip/address/add address=100.64.31.2/28 interface=ether1
Is this somehow detected automatically or assumed to be the first IP of the subnet?
How do I use the other 13 IPs from the /28 Subnet? On OPNsense I would simply create an IP alias and add a firewall rule for an IP of that subnet, for example 100.64.31.3.
Is there something similar to this in RouterOS? I added a Firewall Rule on the CoreRouter but am unable to ping that IP from ProviderEdge:
Code: Select all
/ip/firewall/filter/add action=accept chain=input dst-address=100.64.31.3 protocol=icmp src-address=0.0.0.0
Edit:
I found a way to use the additional subnet IPs using veth interface:
Code: Select all
/interface/veth/add address=100.64.31.3/28 gateway=100.64.31.2 name=ether1_ip3
/ip/address/add address=100.64.31.3 interface=ether1_ip3 network=100.64.31.0