Answer the question
In order to leave comments, you need to log in
Mikrotik: how to assign external IPs to servers in the local network?
There is a server on freebsd, it is also used as a router. One cord comes from the provider, the provider issues one IP + /30 subnet. All these addresses are used by the server itself. The second lace goes to the local area for the distribution of the Internet.
The settings are:
defaultrouter="1.1.252.1"
gateway_enable="YES"
ifconfig_rl0="inet 1.1.252.244 netmask 255.255.255.0"
ifconfig_rl0_alias0="inet 2.2.138.172 netmask 255.255.255.252"
ifconfig_rl0_alias1="inet 2.2.138.173 netmask 255.255.255.252"
ifconfig_rl0_alias2="inet 2.2.138.174 netmask 255.255.255.252"
ifconfig_fxp0="inet 192.168.2.100 netmask 255.255.255.0"
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
inet 1.1.252.244 netmask 0xffffff00 broadcast 1.1.252.255
inet 2.2.138.172 netmask 0xfffffffc broadcast 2.2.138.175
inet 2.2.138.173 netmask 0xfffffffc broadcast 2.2.138.175
inet 2.2.138.174 netmask 0xfffffffc broadcast 2.2.138.175
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.2.100 netmask 0xffffff00 broadcast 192.168.2.255
Answer the question
In order to leave comments, you need to log in
Option without using an additional line: Use VLAN. I don’t know how things are with the latest windows, but versions of XP and around - nothing, VLAN only worked on cards whose drivers supported it.
Linux has no problems with vlan.
You simply connect the socket with the provider cable and the vlan server to the bridge, and configure the bridge interface as a router connection to the Internet.
Without VLAN, you do everything the same, only not vlan will go to the bridge, but another socket on the router, into which an additional cable will go.
Good afternoon.
If there is only one link from the provider, then use the ip-ip/ tunnel Like
this:
netwild.ru/linuxipip
(if I understand the condition of your task correctly =))
the interface is assigned the address of the local network and the address of the provider is forwarded to it. how to do this can be found here: www.lan23.ru/FAQ-Mikrotik-RouterOS-part2.html
The provider issues an address with a mask of 30, which means that you are given one address and not two, the second address is used as a gateway for the first one.
If the provider allows you to shine several MAC addresses into its link, then look in the direction of arp-proxy or bridge the provider's interface, and wrap the LAN in vlan
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question