Hi to all,
I have been moving into the world of networking/mikrotik recently and there is an argument that I really can’t understand. I would appreciate very much if someone could remove my doubts or advise me on the right documentation.
I requested my ISP for a new optical fiber connectivity with an additional subnet of 8 ip. They sent me an email containing this information
pppoe authentication:
user = user
password = password
MTU = 1500
pppoe interface ip = xxx.xxx.xxx.xxx
additional 8 ip subnet= yyy.yyy.yyy.yyy/29
dns server = zzz.zzz.zzz.zzz
after receiving these data I set a basic configuration:
- Created the pppoe interface linked to the eth1-WAN and after succesfull autenticated I received the ip xxx.xxx.xxx.xxx
- Added to the eth2-LAN interface an ip 192.168.25.1/24
- Added into the nat a masquerade rule for my local lan 192.168.25.0/24
with this basic setup everything is working and all my hosts can surf internet using the pppoe interface’s ip xxx.xxx.xxx.xxx
now I want to understand what are the different ways to use the 8 ips subnet. Searching into mikrotik documentation I found this https://wiki.mikrotik.com/wiki/Manual:IP/Firewall/NAT#Forward_all_traffic_to_internal_host
and this way of mapping the ip address is working as expected.. I can use all of 8ips which is very good but I think that this still remains a sort of nat, and I want to understand how can I add directly these ips to my hosts without using NAT. I know that in this way I will not be able to use all 8ips but only five cause 3 of 8 ips will be used for gateway, broadcast and network.
So searching the forum about this I found a comment that opened a little my mind:
It’s not exactly true that you can use only five addresses, it depends on how exactly you use them. E.g. it you assigned all of them to router (doesn’t really matter to which interface), you can use all eight (with NAT or for services on router). Or you can route individual addresses (with /32 netmask) anywhere inside your network and also use all eight. Five is the limit when you assign whole subnet to internal interface. It’s probably also the most common way, and even when doing this, there is still a way to use more, because even though .240 and .247 are wasted on internal interface as network address and broadcast, when someone from internet tries to connect to them, you can catch that traffic using dstnat and forward it elsewhere. And the other way around, you can also use these addresses for srcnat.
now my doubts are:
- how can I use in my setup, after establishing pppoe connection, these 5 ips directly as ips for my internal hosts without using NAT/mapping things?
- Can I use both ways together, let’s say mapping a public ip to internal host but still be capable of using at least one of these ips directly in the nic config of the internal host?
- what is the meaning of this? “Or you can route individual addresses (with /32 netmask) anywhere inside your network and also use all eight”
the second question is for me the most important, cause I really like to use the mapping way, but in this particular case I need to add only to a cisco router(so only for one ip) a dedicated public IP without using NAT cause this cisco have an external company monitoring that needs this kind of setup, but as I said I don’t want to loose the ability to map all the other ips.
many many thanks l hope that someone can dedicate a minute to take away these doubts or at least pointing me to the right documentation