You don't need the att modem/gateway because its not really a modem at least for the internet, all it does is provide a ready made vlan setting for you. I have my MikroTik directly connected to the ONT, ONT to me means fiber to ethernet modem. Its this device that needs to be registered to your account for ethernet etc. If that is your case you should be able to do the same. For example our internet on bell uses VLAN35.
##################################################################################################
# ABOUT:
#
# AT&T Residential Gateway (BGW210-700 and friends) Bypass using only a single MikroTik. No
# separate hardware or switch needed. Automatic recovery from power loss feature too.
#
# Tested with: RouterOS 6.43.8 on the RB4011
#
# Date: 1-25-2018
##################################################################################################
##################################################################################################
# HOW TO:
#
# 1) Reset MikroTik (/system reset-configuration)
#
# 2) Boot MikroTik first and then apply this config file.
#
# 3) Next, turn everything else on and plug everything in.
# ONT <-> ether1
# ATT RG ONT Port <-> ether2
# Your PCs etc. <-> ether3~ether10
#
# 4) Reboot the MikroTik to start automatic ATT RG and ONT sycing.
##################################################################################################
# Create two bridges. One for your network and the other for the WAN.
/interface bridge
# LAN
add name=Bridge_LAN protocol-mode=none
# WAN
# Set the WAN MAC (admin-mac) to be your ATT's RG MAC.
# We set the pvid parameter to a unique VLAN tag. A cheap way to keep incoming ONT and outgoing ether1 packets from seeing duplicate MACs.
# This way, only the ONT and ATT RG will see each other, not the momma Bridge with the duplicate MAC.
# Recall that we don't have a separate switch, the MikroTik is the switch!
add name=Bridge_WAN admin-mac=00:00:00:00:00:00 pvid=111 auto-mac=no igmp-snooping=yes protocol-mode=none vlan-filtering=yes
# Will want a firewall, naturally
/interface bridge settings set use-ip-firewall=yes
# Add ports to each bridge
/interface bridge port
# WAN
add bridge=Bridge_WAN interface=ether1
add bridge=Bridge_WAN interface=ether2
# LAN
add bridge=Bridge_LAN interface=ether3
add bridge=Bridge_LAN interface=ether4
add bridge=Bridge_LAN interface=ether5
add bridge=Bridge_LAN interface=ether6
add bridge=Bridge_LAN interface=ether7
add bridge=Bridge_LAN interface=ether8
add bridge=Bridge_LAN interface=ether9
add bridge=Bridge_LAN interface=ether10
# Ready a DHCP client for the ATT ONT to provide your IP address to
/ip dhcp-client add dhcp-options=clientid disabled=no interface=Bridge_WAN use-peer-dns=no use-peer-ntp=no
# Setup automatic recovery from power loss
/system scheduler add name=OnRebootATT start-time=startup on-event=":delay 30\r\n/system script run OnRebootATT"
/system script add name=OnRebootATT source="#\_OnRebootATT\r\n\r\n:log info \"Script: Starting OnRebootStartATTRG\";\r\n:delay 5\r\n\r\n:log info \"Script: Enable Virtual switch for ONT and ATT RG\";\r\n/interface bridge set Bridge_WAN pvid=111\r\n\r\n:log info \"Script: Ensure ATT RG ether2 is visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=1\r\n/interface ethernet enable ether2\r\n\r\n:log info \"Script: Sleep for 3 minutes to allow ONT and ATT RG time to sync\";\r\n:delay 180\r\n\r\n:log info \"Script: Ensure ATT RG is NOT visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=222\r\n/interface ethernet disable ether2\r\n\r\n:log info \"Script: ONT and ATT RG should be in sync. Virtual Switch shutting down. Enjoy your router.\";\r\n/interface bridge set Bridge_WAN pvid=1\r\n"
# Standard MikroTik LAN configuration stuff. Modify to suit your LAN
/ip pool add name=pool_LAN ranges=192.168.88.10-192.168.88.254
/ip dhcp-server add add-arp=yes address-pool=pool_LAN always-broadcast=yes disabled=no interface=Bridge_LAN lease-time=2d name=dhcp_LAN
/ip address add address=192.168.88.1/24 interface=Bridge_LAN
/ip dhcp-server network add address=192.168.88.0/24 dns-server=192.168.88.1 gateway=192.168.88.1
/ip dns set allow-remote-requests=yes servers="9.9.9.9,8.8.8.8"
# Sample Firewall
/ip firewall filter
add action=accept chain=input comment="Allow established related" connection-state=established,related
add action=accept chain=input comment="Allow LAN" in-interface=Bridge_LAN
add action=accept chain=input comment="Allow Ping" protocol=icmp
add action=drop chain=input comment="Drop all other input"
add action=accept chain=forward comment="Allow established related" connection-state=established,related
add action=accept chain=forward comment="Allow LAN" connection-state=new in-interface=Bridge_LAN
add action=accept chain=forward comment="Allow port forwards" connection-nat-state=dstnat in-interface=Bridge_WAN
add action=drop chain=forward comment="Drop all other forward"
# Sample masquerade
/ip firewall nat add action=masquerade chain=srcnat comment="Default masq" out-interface=Bridge_WAN
# Example rule table switching for better performance.
/interface ethernet switch rule add switch=switch1 ports=ether1 mac-protocol=0x888E new-dst-ports=ether2
/interface ethernet switch rule add switch=switch1 ports=ether2 mac-protocol=0x888E new-dst-ports=ether1
Good news folks, you don't need anything else but a MikroTik to bypass the AT&T supplied Residential Gateway (ATT RG). No separate hardware needed!
The one downside (not really) is that the CPU is involved. Because the RB4011 uses the RTL8367 switch chip, it does not have a Rule table. I have a 100Mbps fiber plan which is no trouble for the 1.4Ghz CPU. Please test with your 1Gbps plan.
This working sample also has automatic recovery from power loss too!
A complete working, start to finish, example. Instructions and step by step included.
Code: Select all################################################################################################## # ABOUT: # # AT&T Residential Gateway (BGW210-700 and friends) Bypass using only a single MikroTik. No # separate hardware or switch needed. Automatic recovery from power loss feature too. # # Tested with: RouterOS 6.43.8 on the RB4011 # # Date: 1-25-2018 ################################################################################################## ################################################################################################## # HOW TO: # # 1) Reset MikroTik (/system reset-configuration) # # 2) Boot MikroTik first and then apply this config file. # # 3) Next, turn everything else on and plug everything in. # ONT <-> ether1 # ATT RG ONT Port <-> ether2 # Your PCs etc. <-> ether3~ether10 # # 4) Reboot the MikroTik to start automatic ATT RG and ONT sycing. ################################################################################################## # Create two bridges. One for your network and the other for the WAN. /interface bridge # LAN add name=Bridge_LAN protocol-mode=none # WAN # Set the WAN MAC (admin-mac) to be your ATT's RG MAC. # We set the pvid parameter to a unique VLAN tag. A cheap way to keep incoming ONT and outgoing ether1 packets from seeing duplicate MACs. # This way, only the ONT and ATT RG will see each other, not the momma Bridge with the duplicate MAC. # Recall that we don't have a separate switch, the MikroTik is the switch! add name=Bridge_WAN admin-mac=00:00:00:00:00:00 pvid=111 auto-mac=no igmp-snooping=yes protocol-mode=none vlan-filtering=yes # Will want a firewall, naturally /interface bridge settings set use-ip-firewall=yes # Add ports to each bridge /interface bridge port # WAN add bridge=Bridge_WAN interface=ether1 add bridge=Bridge_WAN interface=ether2 # LAN add bridge=Bridge_LAN interface=ether3 add bridge=Bridge_LAN interface=ether4 add bridge=Bridge_LAN interface=ether5 add bridge=Bridge_LAN interface=ether6 add bridge=Bridge_LAN interface=ether7 add bridge=Bridge_LAN interface=ether8 add bridge=Bridge_LAN interface=ether9 add bridge=Bridge_LAN interface=ether10 # Ready a DHCP client for the ATT ONT to provide your IP address to /ip dhcp-client add dhcp-options=clientid disabled=no interface=Bridge_WAN use-peer-dns=no use-peer-ntp=no # Setup automatic recovery from power loss /system scheduler add name=OnRebootATT start-time=startup on-event=":delay 30\r\n/system script run OnRebootATT" /system script add name=OnRebootATT source="#\_OnRebootATT\r\n\r\n:log info \"Script: Starting OnRebootStartATTRG\";\r\n:delay 5\r\n\r\n:log info \"Script: Enable Virtual switch for ONT and ATT RG\";\r\n/interface bridge set Bridge_WAN pvid=111\r\n\r\n:log info \"Script: Ensure ATT RG ether2 is visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=1\r\n/interface ethernet enable ether2\r\n\r\n:log info \"Script: Sleep for 3 minutes to allow ONT and ATT RG time to sync\";\r\n:delay 180\r\n\r\n:log info \"Script: Ensure ATT RG is NOT visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=222\r\n/interface ethernet disable ether2\r\n\r\n:log info \"Script: ONT and ATT RG should be in sync. Virtual Switch shutting down. Enjoy your router.\";\r\n/interface bridge set Bridge_WAN pvid=1\r\n" # Standard MikroTik LAN configuration stuff. Modify to suit your LAN /ip pool add name=pool_LAN ranges=192.168.88.10-192.168.88.254 /ip dhcp-server add add-arp=yes address-pool=pool_LAN always-broadcast=yes disabled=no interface=Bridge_LAN lease-time=2d name=dhcp_LAN /ip address add address=192.168.88.1/24 interface=Bridge_LAN /ip dhcp-server network add address=192.168.88.0/24 dns-server=192.168.88.1 gateway=192.168.88.1 /ip dns set allow-remote-requests=yes servers="9.9.9.9,8.8.8.8" # Sample Firewall /ip firewall filter add action=accept chain=input comment="Allow established related" connection-state=established,related add action=accept chain=input comment="Allow LAN" in-interface=Bridge_LAN add action=accept chain=input comment="Allow Ping" protocol=icmp add action=drop chain=input comment="Drop all other input" add action=accept chain=forward comment="Allow established related" connection-state=established,related add action=accept chain=forward comment="Allow LAN" connection-state=new in-interface=Bridge_LAN add action=accept chain=forward comment="Allow port forwards" connection-nat-state=dstnat in-interface=Bridge_WAN add action=drop chain=forward comment="Drop all other forward" # Sample masquerade /ip firewall nat add action=masquerade chain=srcnat comment="Default masq" out-interface=Bridge_WAN
Code: Select all# Example rule table switching for better performance. How to make this work on the RB4011? /interface ethernet switch rule add switch=switch1 ports=ether1 mac-protocol=0x888E new-dst-ports=ether2 /interface ethernet switch rule add switch=switch1 ports=ether2 mac-protocol=0x888E new-dst-ports=ether1
I tried this with gigabit internet using my RB3011 including your switch rule. Speed is still reduced (getting about 450/450 max), I'm not sure if it's a hardware limitation. CPU-used maxes at 50% during a speed test and cpu-used-per-cpu at up to 90%, 5%.
Good news folks, you don't need anything else but a MikroTik to bypass the AT&T supplied Residential Gateway (ATT RG). No separate hardware needed!
The one downside (not really) is that the CPU is involved. Because the RB4011 uses the RTL8367 switch chip, it does not have a Rule table. I have a 100Mbps fiber plan which is no trouble for the 1.4Ghz CPU. Please test with your 1Gbps plan.
This working sample also has automatic recovery from power loss too!
A complete working, start to finish, example. Instructions and step by step included.
Code: Select all################################################################################################## # ABOUT: # # AT&T Residential Gateway (BGW210-700 and friends) Bypass using only a single MikroTik. No # separate hardware or switch needed. Automatic recovery from power loss feature too. # # Tested with: RouterOS 6.43.8 on the RB4011 # # Date: 1-25-2018 ################################################################################################## ################################################################################################## # HOW TO: # # 1) Reset MikroTik (/system reset-configuration) # # 2) Boot MikroTik first and then apply this config file. # # 3) Next, turn everything else on and plug everything in. # ONT <-> ether1 # ATT RG ONT Port <-> ether2 # Your PCs etc. <-> ether3~ether10 # # 4) Reboot the MikroTik to start automatic ATT RG and ONT sycing. ################################################################################################## # Create two bridges. One for your network and the other for the WAN. /interface bridge # LAN add name=Bridge_LAN protocol-mode=none # WAN # Set the WAN MAC (admin-mac) to be your ATT's RG MAC. # We set the pvid parameter to a unique VLAN tag. A cheap way to keep incoming ONT and outgoing ether1 packets from seeing duplicate MACs. # This way, only the ONT and ATT RG will see each other, not the momma Bridge with the duplicate MAC. # Recall that we don't have a separate switch, the MikroTik is the switch! add name=Bridge_WAN admin-mac=00:00:00:00:00:00 pvid=111 auto-mac=no igmp-snooping=yes protocol-mode=none vlan-filtering=yes # Will want a firewall, naturally /interface bridge settings set use-ip-firewall=yes # Add ports to each bridge /interface bridge port # WAN add bridge=Bridge_WAN interface=ether1 add bridge=Bridge_WAN interface=ether2 # LAN add bridge=Bridge_LAN interface=ether3 add bridge=Bridge_LAN interface=ether4 add bridge=Bridge_LAN interface=ether5 add bridge=Bridge_LAN interface=ether6 add bridge=Bridge_LAN interface=ether7 add bridge=Bridge_LAN interface=ether8 add bridge=Bridge_LAN interface=ether9 add bridge=Bridge_LAN interface=ether10 # Ready a DHCP client for the ATT ONT to provide your IP address to /ip dhcp-client add dhcp-options=clientid disabled=no interface=Bridge_WAN use-peer-dns=no use-peer-ntp=no # Setup automatic recovery from power loss /system scheduler add name=OnRebootATT start-time=startup on-event=":delay 30\r\n/system script run OnRebootATT" /system script add name=OnRebootATT source="#\_OnRebootATT\r\n\r\n:log info \"Script: Starting OnRebootStartATTRG\";\r\n:delay 5\r\n\r\n:log info \"Script: Enable Virtual switch for ONT and ATT RG\";\r\n/interface bridge set Bridge_WAN pvid=111\r\n\r\n:log info \"Script: Ensure ATT RG ether2 is visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=1\r\n/interface ethernet enable ether2\r\n\r\n:log info \"Script: Sleep for 3 minutes to allow ONT and ATT RG time to sync\";\r\n:delay 180\r\n\r\n:log info \"Script: Ensure ATT RG is NOT visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=222\r\n/interface ethernet disable ether2\r\n\r\n:log info \"Script: ONT and ATT RG should be in sync. Virtual Switch shutting down. Enjoy your router.\";\r\n/interface bridge set Bridge_WAN pvid=1\r\n" # Standard MikroTik LAN configuration stuff. Modify to suit your LAN /ip pool add name=pool_LAN ranges=192.168.88.10-192.168.88.254 /ip dhcp-server add add-arp=yes address-pool=pool_LAN always-broadcast=yes disabled=no interface=Bridge_LAN lease-time=2d name=dhcp_LAN /ip address add address=192.168.88.1/24 interface=Bridge_LAN /ip dhcp-server network add address=192.168.88.0/24 dns-server=192.168.88.1 gateway=192.168.88.1 /ip dns set allow-remote-requests=yes servers="9.9.9.9,8.8.8.8" # Sample Firewall /ip firewall filter add action=accept chain=input comment="Allow established related" connection-state=established,related add action=accept chain=input comment="Allow LAN" in-interface=Bridge_LAN add action=accept chain=input comment="Allow Ping" protocol=icmp add action=drop chain=input comment="Drop all other input" add action=accept chain=forward comment="Allow established related" connection-state=established,related add action=accept chain=forward comment="Allow LAN" connection-state=new in-interface=Bridge_LAN add action=accept chain=forward comment="Allow port forwards" connection-nat-state=dstnat in-interface=Bridge_WAN add action=drop chain=forward comment="Drop all other forward" # Sample masquerade /ip firewall nat add action=masquerade chain=srcnat comment="Default masq" out-interface=Bridge_WAN
Code: Select all# Example rule table switching for better performance. How to make this work on the RB4011? /interface ethernet switch rule add switch=switch1 ports=ether1 mac-protocol=0x888E new-dst-ports=ether2 /interface ethernet switch rule add switch=switch1 ports=ether2 mac-protocol=0x888E new-dst-ports=ether1
@inmultec,
The configuration I've posted is exactly what I'm doing. Give it a try and I'll help you work out any issues. With regards to TV service, I don't have that. This posts seem to indicate that IGMP is needed to make that work.
Did you have to setup any vlan0 if so where, how?
Did you turn on fasttrak?
I am willing to go to a CCR1009 or CCR1016-12G if that's what it takes to make it to 1gbps, but I need to also run uverse TV...
So I'm only getting 450 mbps max on my desktops (see above posts) but 900mbps on the built-in bandwidth tester. If the Router could handle VLAN/switching more efficiently I think it wouldn't be a problem.You are considering buying a new device because it cannot saturate the connection using the built-in bandwith tester?
Even though RB3011 can handle 1Gpbs NAT traffic easily?
Keep in mind that the device has to actually generate the traffic and cannot use any of the hardware offload functions, therefore the bandwith test should not be used to measure traffic capacity of the device itself.
No worries medkit, since that RB3011 seems really underpowered for your Huge network and I have a much smaller network please feel free to send it my way, I will pay postage.
Do you still need to set the RG into bypass mode or should I reset that to defaults, too?
Thank you for this guide, unfortunately I am only getting 111mbps on the upload with my CCR-1009 bandwidth tests.Good news folks, you don't need anything else but a MikroTik to bypass the AT&T supplied Residential Gateway (ATT RG). No separate hardware needed!
The one downside (not really) is that the CPU is involved. Because the RB4011 uses the RTL8367 switch chip, it does not have a Rule table. I have a 100Mbps fiber plan which is no trouble for the 1.4Ghz CPU. Please test with your 1Gbps plan.
This working sample also has automatic recovery from power loss too!
A complete working, start to finish, example. Instructions and step by step included.
Code: Select all################################################################################################## # ABOUT: # # AT&T Residential Gateway (BGW210-700 and friends) Bypass using only a single MikroTik. No # separate hardware or switch needed. Automatic recovery from power loss feature too. # # Tested with: RouterOS 6.43.8 on the RB4011 # # Date: 1-25-2018 ################################################################################################## ################################################################################################## # HOW TO: # # 1) Reset MikroTik (/system reset-configuration) # # 2) Boot MikroTik first and then apply this config file. # # 3) Next, turn everything else on and plug everything in. # ONT <-> ether1 # ATT RG ONT Port <-> ether2 # Your PCs etc. <-> ether3~ether10 # # 4) Reboot the MikroTik to start automatic ATT RG and ONT sycing. ################################################################################################## # Create two bridges. One for your network and the other for the WAN. /interface bridge # LAN add name=Bridge_LAN protocol-mode=none # WAN # Set the WAN MAC (admin-mac) to be your ATT's RG MAC. # We set the pvid parameter to a unique VLAN tag. A cheap way to keep incoming ONT and outgoing ether1 packets from seeing duplicate MACs. # This way, only the ONT and ATT RG will see each other, not the momma Bridge with the duplicate MAC. # Recall that we don't have a separate switch, the MikroTik is the switch! add name=Bridge_WAN admin-mac=00:00:00:00:00:00 pvid=111 auto-mac=no igmp-snooping=yes protocol-mode=none vlan-filtering=yes # Will want a firewall, naturally /interface bridge settings set use-ip-firewall=yes # Add ports to each bridge /interface bridge port # WAN add bridge=Bridge_WAN interface=ether1 add bridge=Bridge_WAN interface=ether2 # LAN add bridge=Bridge_LAN interface=ether3 add bridge=Bridge_LAN interface=ether4 add bridge=Bridge_LAN interface=ether5 add bridge=Bridge_LAN interface=ether6 add bridge=Bridge_LAN interface=ether7 add bridge=Bridge_LAN interface=ether8 add bridge=Bridge_LAN interface=ether9 add bridge=Bridge_LAN interface=ether10 # Ready a DHCP client for the ATT ONT to provide your IP address to /ip dhcp-client add dhcp-options=clientid disabled=no interface=Bridge_WAN use-peer-dns=no use-peer-ntp=no # Setup automatic recovery from power loss /system scheduler add name=OnRebootATT start-time=startup on-event=":delay 30\r\n/system script run OnRebootATT" /system script add name=OnRebootATT source="#\_OnRebootATT\r\n\r\n:log info \"Script: Starting OnRebootStartATTRG\";\r\n:delay 5\r\n\r\n:log info \"Script: Enable Virtual switch for ONT and ATT RG\";\r\n/interface bridge set Bridge_WAN pvid=111\r\n\r\n:log info \"Script: Ensure ATT RG ether2 is visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=1\r\n/interface ethernet enable ether2\r\n\r\n:log info \"Script: Sleep for 3 minutes to allow ONT and ATT RG time to sync\";\r\n:delay 180\r\n\r\n:log info \"Script: Ensure ATT RG is NOT visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=222\r\n/interface ethernet disable ether2\r\n\r\n:log info \"Script: ONT and ATT RG should be in sync. Virtual Switch shutting down. Enjoy your router.\";\r\n/interface bridge set Bridge_WAN pvid=1\r\n" # Standard MikroTik LAN configuration stuff. Modify to suit your LAN /ip pool add name=pool_LAN ranges=192.168.88.10-192.168.88.254 /ip dhcp-server add add-arp=yes address-pool=pool_LAN always-broadcast=yes disabled=no interface=Bridge_LAN lease-time=2d name=dhcp_LAN /ip address add address=192.168.88.1/24 interface=Bridge_LAN /ip dhcp-server network add address=192.168.88.0/24 dns-server=192.168.88.1 gateway=192.168.88.1 /ip dns set allow-remote-requests=yes servers="9.9.9.9,8.8.8.8" # Sample Firewall /ip firewall filter add action=accept chain=input comment="Allow established related" connection-state=established,related add action=accept chain=input comment="Allow LAN" in-interface=Bridge_LAN add action=accept chain=input comment="Allow Ping" protocol=icmp add action=drop chain=input comment="Drop all other input" add action=accept chain=forward comment="Allow established related" connection-state=established,related add action=accept chain=forward comment="Allow LAN" connection-state=new in-interface=Bridge_LAN add action=accept chain=forward comment="Allow port forwards" connection-nat-state=dstnat in-interface=Bridge_WAN add action=drop chain=forward comment="Drop all other forward" # Sample masquerade /ip firewall nat add action=masquerade chain=srcnat comment="Default masq" out-interface=Bridge_WAN
Example rule table switching for better performance. If your hardware supports it.
Code: Select all# Example rule table switching for better performance. /interface ethernet switch rule add switch=switch1 ports=ether1 mac-protocol=0x888E new-dst-ports=ether2 /interface ethernet switch rule add switch=switch1 ports=ether2 mac-protocol=0x888E new-dst-ports=ether1
So you didn't have to use the scripts, etc from above? Just a simple, bridge + vlan + switch rules? We're looking at getting ATT Fiber in a couple months, and would like to make this work with an rb4011 at full gigabit. I'm assuming with the 4011's CPU will probably be closer to 60% under load compared to the rb3011 maxing out? I'd rather have the extra headroom if that's the case.Well was able to get mine going pretty easily on the RB3011. I am getting 900+ speeds, though it is taxing the CPU pretty hard. Would be awesome if we got VLAN/BONDING hw-offload in the furture.
My steps were pretty simple.
Kept my current Firewall configuration, which has fasttrak on the top and a pretty simple configuration, nothing to far out of stock other then my vpn tunnel stuff and some NAT firewall rules for some services.
Setup a bridge for wlan, placed both ether1 and ether 2 on. ONT into ether1, RB into ether2.
Setup vlan tagging on the bridge and placed pvid to 1. Frame type is admit all. STP set to none.
I then setup the switch rules as follows:
/interface ethernet switch rule add switch=switch1 ports=ether1 mac-protocol=0x888E new-dst-ports=ether2
/interface ethernet switch rule add switch=switch1 ports=ether2 mac-protocol=0x888E new-dst-ports=ether1
Works as expected. Survives reboots.
Only thing i am trying to possibly sort out, is to disable using vlan filtering on the bridge and somehow get it working on the switch chip level. One can hope.
Good news folks, you don't need anything else but a MikroTik to bypass the AT&T supplied Residential Gateway (ATT RG). No separate hardware needed!
The one downside (not really) is that the CPU is involved. Because the RB4011 uses the RTL8367 switch chip, it does not have a Rule table. I have a 100Mbps fiber plan which is no trouble for the 1.4Ghz CPU. Please test with your 1Gbps plan.
This working sample also has automatic recovery from power loss too!
A complete working, start to finish, example. Instructions and step by step included.
Code: Select all################################################################################################## # ABOUT: # # AT&T Residential Gateway (BGW210-700 and friends) Bypass using only a single MikroTik. No # separate hardware or switch needed. Automatic recovery from power loss feature too. # # Tested with: RouterOS 6.43.8 on the RB4011 # # Date: 1-25-2018 ################################################################################################## ################################################################################################## # HOW TO: # # 1) Reset MikroTik (/system reset-configuration) # # 2) Boot MikroTik first and then apply this config file. # # 3) Next, turn everything else on and plug everything in. # ONT <-> ether1 # ATT RG ONT Port <-> ether2 # Your PCs etc. <-> ether3~ether10 # # 4) Reboot the MikroTik to start automatic ATT RG and ONT sycing. ################################################################################################## # Create two bridges. One for your network and the other for the WAN. /interface bridge # LAN add name=Bridge_LAN protocol-mode=none # WAN # Set the WAN MAC (admin-mac) to be your ATT's RG MAC. # We set the pvid parameter to a unique VLAN tag. A cheap way to keep incoming ONT and outgoing ether1 packets from seeing duplicate MACs. # This way, only the ONT and ATT RG will see each other, not the momma Bridge with the duplicate MAC. # Recall that we don't have a separate switch, the MikroTik is the switch! add name=Bridge_WAN admin-mac=00:00:00:00:00:00 pvid=111 auto-mac=no igmp-snooping=yes protocol-mode=none vlan-filtering=yes # Will want a firewall, naturally /interface bridge settings set use-ip-firewall=yes # Add ports to each bridge /interface bridge port # WAN add bridge=Bridge_WAN interface=ether1 add bridge=Bridge_WAN interface=ether2 # LAN add bridge=Bridge_LAN interface=ether3 add bridge=Bridge_LAN interface=ether4 add bridge=Bridge_LAN interface=ether5 add bridge=Bridge_LAN interface=ether6 add bridge=Bridge_LAN interface=ether7 add bridge=Bridge_LAN interface=ether8 add bridge=Bridge_LAN interface=ether9 add bridge=Bridge_LAN interface=ether10 # Ready a DHCP client for the ATT ONT to provide your IP address to /ip dhcp-client add dhcp-options=clientid disabled=no interface=Bridge_WAN use-peer-dns=no use-peer-ntp=no # Setup automatic recovery from power loss /system scheduler add name=OnRebootATT start-time=startup on-event=":delay 30\r\n/system script run OnRebootATT" /system script add name=OnRebootATT source="#\_OnRebootATT\r\n\r\n:log info \"Script: Starting OnRebootStartATTRG\";\r\n:delay 5\r\n\r\n:log info \"Script: Enable Virtual switch for ONT and ATT RG\";\r\n/interface bridge set Bridge_WAN pvid=111\r\n\r\n:log info \"Script: Ensure ATT RG ether2 is visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=1\r\n/interface ethernet enable ether2\r\n\r\n:log info \"Script: Sleep for 3 minutes to allow ONT and ATT RG time to sync\";\r\n:delay 180\r\n\r\n:log info \"Script: Ensure ATT RG is NOT visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=222\r\n/interface ethernet disable ether2\r\n\r\n:log info \"Script: ONT and ATT RG should be in sync. Virtual Switch shutting down. Enjoy your router.\";\r\n/interface bridge set Bridge_WAN pvid=1\r\n" # Standard MikroTik LAN configuration stuff. Modify to suit your LAN /ip pool add name=pool_LAN ranges=192.168.88.10-192.168.88.254 /ip dhcp-server add add-arp=yes address-pool=pool_LAN always-broadcast=yes disabled=no interface=Bridge_LAN lease-time=2d name=dhcp_LAN /ip address add address=192.168.88.1/24 interface=Bridge_LAN /ip dhcp-server network add address=192.168.88.0/24 dns-server=192.168.88.1 gateway=192.168.88.1 /ip dns set allow-remote-requests=yes servers="9.9.9.9,8.8.8.8" # Sample Firewall /ip firewall filter add action=accept chain=input comment="Allow established related" connection-state=established,related add action=accept chain=input comment="Allow LAN" in-interface=Bridge_LAN add action=accept chain=input comment="Allow Ping" protocol=icmp add action=drop chain=input comment="Drop all other input" add action=accept chain=forward comment="Allow established related" connection-state=established,related add action=accept chain=forward comment="Allow LAN" connection-state=new in-interface=Bridge_LAN add action=accept chain=forward comment="Allow port forwards" connection-nat-state=dstnat in-interface=Bridge_WAN add action=drop chain=forward comment="Drop all other forward" # Sample masquerade /ip firewall nat add action=masquerade chain=srcnat comment="Default masq" out-interface=Bridge_WAN
Example rule table switching for better performance. If your hardware supports it.
Code: Select all# Example rule table switching for better performance. /interface ethernet switch rule add switch=switch1 ports=ether1 mac-protocol=0x888E new-dst-ports=ether2 /interface ethernet switch rule add switch=switch1 ports=ether2 mac-protocol=0x888E new-dst-ports=ether1
I didn't, thought it wasn't provided to the built in license types after 30 days. I'll give it a shot though.@wojo - I saw your other post earlier and figured out that you made some progress THANK YOU! Did you also file a ticket with support?
Would it be possible for you to release what you have? I wouldn't need IPv6, but interested to see if your method is better than the original one posted.I have successfully implemented the bypass method both to a stand-alone ONT (bypassing a BGW210) as well as using a SFP fiber module to a Ciena eMUX 5150 series (bypassing a NVG595) and it is running very well. Additionally, I have created a script that automates the startup in case of a reboot (e.g. running out of UPS power). Before I release the scripts (based heavily upon work by @pcunite, THANK YOU!) I would like to enhance the solution. I have two questions:
1) In v6.45.1 there is now support for 802.1x or dot1x. I found a solution for pfSense that allows the RD to stay connected at all times and provide the 802.1x authentication when the ISP e.g. sends a certificate update. https://github.com/aus/pfatt. Any suggestion how to achieve this in ROS?
2) On my network, I'm running IPv6 to support team members that cannot get static IPv4 addresses any longer. At the latest node, AT&T have implemented dual stack or native IPv6. The IPv6 address is assigned dynamically (appears to be tied to the base IPv4 address or MAC address), but has not changed for the entire time including replacing the BGW210. The address is not assigned via DHCP IPv6. I have taken the /60 found on the BGW210 and statically assigned the subnets including the router address (which in IPv4 world is assign by DHCP). However, I would like to let the Mikrotik obtain this address. I assume that registering the fe80:: address for the upstream router interface would be good enough(?), but how is the /60 subnet being detected? Any clues what is going on or how to find out?
Thanks for the recommendation! After obtaining the replacement modem, what hardware do you recommend? What do you have in your setup, note that I am just using INTERNET service. No need for TV or Telephone from AT&T.First thing Iwould do is call ATT and tell them to send new modem an ask for a 210-700.. I did this because yes the Pace one slows down after some use and you gotta be rebooting it. I think the process would be the same though.
I'll put together something over the weekend. What config/instruction are you looking for; the one for Cienna or ONT? For the Cienna we feed the traffic via fiber directly to our CCRs via the SFP port. The ONT version is connected on the direct ethernet CPU port (ports 5-8). Both versions now support IPv6 (though we need to use 6to4 for the Cienna due to the config on the MUX)Would it be possible for you to release what you have? I wouldn't need IPv6, but interested to see if your method is better than the original one posted.I have successfully implemented the bypass method both to a stand-alone ONT (bypassing a BGW210) as well as using a SFP fiber module to a Ciena eMUX 5150 series (bypassing a NVG595) and it is running very well. Additionally, I have created a script that automates the startup in case of a reboot (e.g. running out of UPS power). Before I release the scripts (based heavily upon work by @pcunite, THANK YOU!) I would like to enhance the solution. I have two questions:
1) In v6.45.1 there is now support for 802.1x or dot1x. I found a solution for pfSense that allows the RD to stay connected at all times and provide the 802.1x authentication when the ISP e.g. sends a certificate update. https://github.com/aus/pfatt. Any suggestion how to achieve this in ROS?
2) On my network, I'm running IPv6 to support team members that cannot get static IPv4 addresses any longer. At the latest node, AT&T have implemented dual stack or native IPv6. The IPv6 address is assigned dynamically (appears to be tied to the base IPv4 address or MAC address), but has not changed for the entire time including replacing the BGW210. The address is not assigned via DHCP IPv6. I have taken the /60 found on the BGW210 and statically assigned the subnets including the router address (which in IPv4 world is assign by DHCP). However, I would like to let the Mikrotik obtain this address. I assume that registering the fe80:: address for the upstream router interface would be good enough(?), but how is the /60 subnet being detected? Any clues what is going on or how to find out?
I would stay away from either boxes (though the BGW210-700 seems to be better). As you can observe from these discussions, bypassing is the way to go. If you are on a 1G plan, CCR is probably what you are looking for to handle VPN, firewall rules, etc. You will also need to need some good quality APs for your WiFi. Most folks turn off the WiFi on the T supplied equipment as it lacks range and device compatibility.Thanks for the recommendation! After obtaining the replacement modem, what hardware do you recommend? What do you have in your setup, note that I am just using INTERNET service. No need for TV or Telephone from AT&T.First thing Iwould do is call ATT and tell them to send new modem an ask for a 210-700.. I did this because yes the Pace one slows down after some use and you gotta be rebooting it. I think the process would be the same though.
Regards,
Does that mean you successfully do auth through RB and have the certs installed on the RB?I'm able to do the certification based authentication but not that survives a reboot or re-auth, will try to work with MikroTik on this.
Correct, the certs do authenticate but I'm unable to get traffic to also go at the same time unless I change how it is bridged. I'm going to continue to bang on this.Does that mean you successfully do auth through RB and have the certs installed on the RB?I'm able to do the certification based authentication but not that survives a reboot or re-auth, will try to work with MikroTik on this.
Seems the dot1x is what we need, just haven't tried it yet. I have certs now that I can use so definitely want to try it but since my internet connection is being used by the whole household - I may need to switch back to my old connection and a different router before I move forward with this.
Sounds interesting. Do you have a config you can share?Correct, the certs do authenticate but I'm unable to get traffic to also go at the same time unless I change how it is bridged. I'm going to continue to bang on this.Does that mean you successfully do auth through RB and have the certs installed on the RB?I'm able to do the certification based authentication but not that survives a reboot or re-auth, will try to work with MikroTik on this.
Seems the dot1x is what we need, just haven't tried it yet. I have certs now that I can use so definitely want to try it but since my internet connection is being used by the whole household - I may need to switch back to my old connection and a different router before I move forward with this.
I did verify that the RG is obtaining a DHCPv4 and v6 (native) address. The CCR is not, unfortunately. Would you mind sharing with me (privately) your configuration for your static block? I understand the theory but am brand new at Tik. Got my first device, CCR, today.You need to make sure that the BGW first has DHCPv4 working. The address obtained from the OLT (CO equipment) is a "dynamic" address that is actually bound to your profile and acts more like a static address.
I've assigned the static addresses given by AT&T (/29) to a VLAN and connect my fixed address gear to this. Since the OLT routes all the static traffic via the "dynamic" address you get full control and in fact gain an IP address since the router does not need to take up one of the static addresses.
However, all this is dependent upon that the RG is getting the "dynamic" IP address via DHCP. The MAC swap will not work unless this is possible. The DHCPv6 call typically takes a little longer, but you will get the link local address (fe80) eventually. The exception to this is when you are behind an eMUX (not ONT) where you have to do a 6-to-4 configuration.
Hope this helps.
Just now understood what you were saying. Your static block is a separate VLAN off to the side which is routed via the dynamic address learned via DHCP. Great. Will bang my head against this for a while longer tonight.I did verify that the RG is obtaining a DHCPv4 and v6 (native) address. The CCR is not, unfortunately. Would you mind sharing with me (privately) your configuration for your static block? I understand the theory but am brand new at Tik. Got my first device, CCR, today.You need to make sure that the BGW first has DHCPv4 working. The address obtained from the OLT (CO equipment) is a "dynamic" address that is actually bound to your profile and acts more like a static address.
I've assigned the static addresses given by AT&T (/29) to a VLAN and connect my fixed address gear to this. Since the OLT routes all the static traffic via the "dynamic" address you get full control and in fact gain an IP address since the router does not need to take up one of the static addresses.
However, all this is dependent upon that the RG is getting the "dynamic" IP address via DHCP. The MAC swap will not work unless this is possible. The DHCPv6 call typically takes a little longer, but you will get the link local address (fe80) eventually. The exception to this is when you are behind an eMUX (not ONT) where you have to do a 6-to-4 configuration.
Hope this helps.
# OnRebootATT_WAN
:log info "Script: Starting OnRebootATT_WAN";
:delay 1
:log info "Script: Enable Virtual switch for ONT port and ATT GW";
/interface bridge set bridge-att-wan auto-mac=yes pvid=1
:log info "Script: Ensure ATT GW port (ether7) is visible to ONT";
/interface ethernet enable e7-ATT-Modem
:log info "Script: Sleep for 2 minutes to allow fiber and ATT GW time to sync";
:delay 120
:log info "Script: Ensure ATT GW is NOT visible to ONT";
/interface ethernet disable e7-ATT-Modem
:log info "Script: Bridge interfaces fiber";
/interface bridge set bridge-att-wan admin-mac=<your BGW MAC> auto-mac=no
:log info "Script: Authentication and sync complete";
I ended up getting it to work last night. Your script gave me some insight as to what the issue was. For some reason PCUnite's script didn't work off the bat for me, I had to manually remove the "admin-mac" from the BRIDGE_WAN during authentication phase. Once the 180 seconds is up, and the port is disabled, manually add the "admin-mac" to the BRIDGE_WAN and it picks up a v4 address instantly. However, I am unable to get it to pull a v6 address. It did once, but without prefix. I added the with prefix /60 arguments and can't get it to pull anymore - even if I revert back.There is not much to it regarding configuration of the static block:
1) Create the bridge for the internal networks
2) Create a VLAN and name it whatever you want
3) Assign the AT&T provided subnet addresses to the VLAN
4) Create firewall rules to let whatever traffic you want to go to the static IP devices e.g. http/s
5) Create a srcnat rule that accepts the static traffic and not send it through your masquerade/nat table.
I'm still working on a pdf with the full explanation of all this. However, if you are behind an ONT, the original write up indicates using a VLAN on the WAN side. This is not correct for a residential ONT configuration (applies only in the eMUX case).
Here's the part that runs when the router boots ( I've also have scripts that verify every 5 minutes that it is working) (This script needs cleanup using variables for easier maintenance)
Code: Select all# OnRebootATT_WAN :log info "Script: Starting OnRebootATT_WAN"; :delay 1 :log info "Script: Enable Virtual switch for ONT port and ATT GW"; /interface bridge set bridge-att-wan auto-mac=yes pvid=1 :log info "Script: Ensure ATT GW port (ether7) is visible to ONT"; /interface ethernet enable e7-ATT-Modem :log info "Script: Sleep for 2 minutes to allow fiber and ATT GW time to sync"; :delay 120 :log info "Script: Ensure ATT GW is NOT visible to ONT"; /interface ethernet disable e7-ATT-Modem :log info "Script: Bridge interfaces fiber"; /interface bridge set bridge-att-wan admin-mac=<your BGW MAC> auto-mac=no :log info "Script: Authentication and sync complete";
I'm not able to take the internet down tonight, but I will check first thing tomorrow morning what the BGW (RG) is receiving. I do have a link-local address but it's just an EUI-64 - no route in the routing table. I know the one time my CCR pulled an address, it was a 2001 address on the BRIDGE_WAN. No prefix included. That's when I modified the request and have been broke since.No issues with the DHCPv6 on my end. Been running IPv6 for almost two years. Have you checked the "Rapid Commit" in the DHCPv6? I have it enabled, and I only ask for prefix (and I don't provide a hint). I've seen some instances where the OLT provides a 2001 address to the WAN interface. You should only have a link local address fe80 that your CCR use to route back to the CO.
Pls check in your routing table that you see ::/0 (default route) associated with the link local address.
[admin@MikroTik] /ipv6> export
# sep/28/2019 21:32:52 by RouterOS 6.45.6
# model = CCR1009-7G-1C
/ipv6 dhcp-client
add add-default-route=yes interface=BRIDGE_WAN pool-name=pool_LANv6 \
pool-prefix-length=60 request=prefix
/ipv6 firewall filter
add action=accept chain=input comment="Allow established related" \
connection-state=established,related
add action=accept chain=input comment="Allow LAN" in-interface=BRIDGE_LAN
add action=accept chain=input comment="Allow Ping" protocol=icmpv6
add action=drop chain=input comment="Drop all other input"
add action=accept chain=forward comment="Allow established related" \
connection-state=established,related
add action=accept chain=forward comment="Allow LAN" connection-state=new \
in-interface=BRIDGE_LAN
add action=drop chain=forward comment="Drop all other forward"
add action=accept chain=input comment="Allow established related" \
connection-state=established,related
add action=accept chain=input comment="Allow LAN" in-interface=BRIDGE_LAN
add action=accept chain=input comment="Allow Ping" protocol=icmpv6
add action=drop chain=input comment="Drop all other input"
add action=accept chain=forward comment="Allow established related" \
connection-state=established,related
add action=accept chain=forward comment="Allow LAN" connection-state=new \
in-interface=BRIDGE_LAN
[admin@MikroTik] /ipv6 address> print
Flags: X - disabled, I - invalid, D - dynamic, G - global, L - link-local
# ADDRESS FROM-POOL INTERFACE ADVERTISE
0 DL fe80::ca52:61ff:fe60:cc51/64 BRIDGE_WAN no
1 DL fe80::764d:28ff:fec7:6b5f/64 BRIDGE_LAN no
[admin@MikroTik] /ipv6 dhcp-client> print
Flags: D - dynamic, X - disabled, I - invalid
# INTERFACE STATUS REQUEST
0 BRIDGE_WAN searching... prefix
[admin@MikroTik] /ipv6 route> print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable
# DST-ADDRESS GATEWAY DISTANCE
Nevermind, I got it. Must have been a firewall rule blocking DHCPv6, because I removed them all and instantly pulled an address. I specified address + prefix (/60) [no hint] for those looking at this in the future. The address that I got assigned on the BRIDGE_WAN was a 2001:: address that only made it about two hops out, for whatever reason. I disabled the address request and just assigned a /64 out of the /60 to my BRIDGE_LAN and enabled advertisement for the LAN clients.You should also check your BGW status page to make sure that you are in an area where you have dual stack IP. In my area you will find both dual stack and 6RD. If you are in a 6RD, you need to configure the 6-to-4 interface on the Mikrotik.
My understanding is that AT&T uses the 2001:: address for some of the set top box communication. Your observation is correct, it does not go outside AT&T's network and is useless as a global address.The address that I got assigned on the BRIDGE_WAN was a 2001:: address that only made it about two hops out, for whatever reason.
I would not have been happy if I only got 300Mbps on a 1Gbps plan I've had the same problem and it has often come down to two issues. You will need to get a site tech to come out:No issues besides the fact I only get about 300Mbps down, while ~900Mbps up - for some reason.
Not sure why you would mess with the switch chip on the CCR1009. If you look at the block diagram, the switch is constrained by a 1Gbps path i.e. the 4 ports must share 1Gbps! Try instead one of the excellent 10G SFP+ cables to link up with a good switch and let the CCR1009 be the excellent router it can be.I wasn't able to get the "/interface ethernet switch" commands to work on my CCR1009.
All the suggested bypass solutions relies on using a bridge. The addressing scheme for the LAN or VLANs is chosen by the user, so yes.Could I use 10.10.10.1 as the MikroTik LAN address? The AT&T modem/gateway did not allow it. (I don't have TV or phone).
The whole point of bypassing the RG is to avoid the situation you are describing, and more. My recommendation for hosting servers is to buy one or more static IP addresses and configure a separate VLAN with this IP range. Since your account profile in the OLT and routing is using a separate "dynamic" address, you will gain one IP address and have complete control over the traffic to this external network segment via the firewall rules in ROS.I have a server that gets quite a good bit of traffic from a small IP range and that throws up DOS attack triggers that are causing problems with the AT&T device. Is that something that I can whitelist on the MikroTik? I would like that address to be 10.10.10.3 and have most if not all incoming traffic routed to it (route indicated in blue in diagram). I generally use DMZ with the internet service provider routers I have used in the past.
LAN side question, not relevant for this thread, but yes.The Ethernet runs drawn with orange lines are long runs to other parts of the house. I could not easily run more lines to those spots. is using multiple switches in the path ok?
Again, not specific to this thread, but yes, your router will perform better.I also read about fast track and wondered what it was and if I needed to modify the config file pcunite posted to use it.
# Begin Setup
local emailAddress "youremail@email.com"
local pingServer 9.9.9.9
# End Setup
:if ([/ping $pingServer interval=5 count=60]=0) do={
/tool e-mail send to="$emailAddress" subject=" Rebooted $[/system identity get name] $[/system clock get time] $[/system clock get date]" body="Ping server could not be contacted for 5 minutes";
log info "my ping watchdog is down";
/system reboot
} else={
log info "my ping watchdog is up"
}
Good news folks, you don't need anything else but a MikroTik to bypass the AT&T supplied Residential Gateway (ATT RG). No separate hardware needed!
The one downside (not really) is that the CPU is involved. Because the RB4011 uses the RTL8367 switch chip, it does not have a Rule table. I have a 100Mbps fiber plan which is no trouble for the 1.4Ghz CPU. Please test with your 1Gbps plan.
This working sample also has automatic recovery from power loss too!
A complete working, start to finish, example. Instructions and step by step included.
Code: Select all################################################################################################## # ABOUT: # # AT&T Residential Gateway (BGW210-700 and friends) Bypass using only a single MikroTik. No # separate hardware or switch needed. Automatic recovery from power loss feature too. # # Tested with: RouterOS 6.43.8 on the RB4011 # # Date: 1-25-2018 ################################################################################################## ################################################################################################## # HOW TO: # # 1) Reset MikroTik (/system reset-configuration) # # 2) Boot MikroTik first and then apply this config file. # # 3) Next, turn everything else on and plug everything in. # ONT <-> ether1 # ATT RG ONT Port <-> ether2 # Your PCs etc. <-> ether3~ether10 # # 4) Reboot the MikroTik to start automatic ATT RG and ONT sycing. ################################################################################################## # Create two bridges. One for your network and the other for the WAN. /interface bridge # LAN add name=Bridge_LAN protocol-mode=none # WAN # Set the WAN MAC (admin-mac) to be your ATT's RG MAC. # We set the pvid parameter to a unique VLAN tag. A cheap way to keep incoming ONT and outgoing ether1 packets from seeing duplicate MACs. # This way, only the ONT and ATT RG will see each other, not the momma Bridge with the duplicate MAC. # Recall that we don't have a separate switch, the MikroTik is the switch! add name=Bridge_WAN admin-mac=00:00:00:00:00:00 pvid=111 auto-mac=no igmp-snooping=yes protocol-mode=none vlan-filtering=yes # Will want a firewall, naturally /interface bridge settings set use-ip-firewall=yes # Add ports to each bridge /interface bridge port # WAN add bridge=Bridge_WAN interface=ether1 add bridge=Bridge_WAN interface=ether2 # LAN add bridge=Bridge_LAN interface=ether3 add bridge=Bridge_LAN interface=ether4 add bridge=Bridge_LAN interface=ether5 add bridge=Bridge_LAN interface=ether6 add bridge=Bridge_LAN interface=ether7 add bridge=Bridge_LAN interface=ether8 add bridge=Bridge_LAN interface=ether9 add bridge=Bridge_LAN interface=ether10 # Ready a DHCP client for the ATT ONT to provide your IP address to /ip dhcp-client add dhcp-options=clientid disabled=no interface=Bridge_WAN use-peer-dns=no use-peer-ntp=no # Setup automatic recovery from power loss /system scheduler add name=OnRebootATT start-time=startup on-event=":delay 30\r\n/system script run OnRebootATT" /system script add name=OnRebootATT source="#\_OnRebootATT\r\n\r\n:log info \"Script: Starting OnRebootStartATTRG\";\r\n:delay 5\r\n\r\n:log info \"Script: Enable Virtual switch for ONT and ATT RG\";\r\n/interface bridge set Bridge_WAN pvid=111\r\n\r\n:log info \"Script: Ensure ATT RG ether2 is visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=1\r\n/interface ethernet enable ether2\r\n\r\n:log info \"Script: Sleep for 3 minutes to allow ONT and ATT RG time to sync\";\r\n:delay 180\r\n\r\n:log info \"Script: Ensure ATT RG is NOT visible to ONT\";\r\n/interface bridge port set bridge=Bridge_WAN [find interface=ether2] pvid=222\r\n/interface ethernet disable ether2\r\n\r\n:log info \"Script: ONT and ATT RG should be in sync. Virtual Switch shutting down. Enjoy your router.\";\r\n/interface bridge set Bridge_WAN pvid=1\r\n" # Standard MikroTik LAN configuration stuff. Modify to suit your LAN /ip pool add name=pool_LAN ranges=192.168.88.10-192.168.88.254 /ip dhcp-server add add-arp=yes address-pool=pool_LAN always-broadcast=yes disabled=no interface=Bridge_LAN lease-time=2d name=dhcp_LAN /ip address add address=192.168.88.1/24 interface=Bridge_LAN /ip dhcp-server network add address=192.168.88.0/24 dns-server=192.168.88.1 gateway=192.168.88.1 /ip dns set allow-remote-requests=yes servers="9.9.9.9,8.8.8.8" # Sample Firewall /ip firewall filter add action=accept chain=input comment="Allow established related" connection-state=established,related add action=accept chain=input comment="Allow LAN" in-interface=Bridge_LAN add action=accept chain=input comment="Allow Ping" protocol=icmp add action=drop chain=input comment="Drop all other input" add action=accept chain=forward comment="Allow established related" connection-state=established,related add action=accept chain=forward comment="Allow LAN" connection-state=new in-interface=Bridge_LAN add action=accept chain=forward comment="Allow port forwards" connection-nat-state=dstnat in-interface=Bridge_WAN add action=drop chain=forward comment="Drop all other forward" # Sample masquerade /ip firewall nat add action=masquerade chain=srcnat comment="Default masq" out-interface=Bridge_WAN
Example rule table switching for better performance. If your hardware supports it.
Code: Select all# Example rule table switching for better performance. /interface ethernet switch rule add switch=switch1 ports=ether1 mac-protocol=0x888E new-dst-ports=ether2 /interface ethernet switch rule add switch=switch1 ports=ether2 mac-protocol=0x888E new-dst-ports=ether1
I have the Mikrotik CRS109-8G-1S-2hNd, with AT&T fiber. The script works perfectly ... I have a problem with my connection. My Internet service is 300MB, when I do a speed test I only received 120MB, and the CPU is 100%.
Thanks for the info, I need to buy a new one. Any progress with using wpa_supplicant (Dot1x) to completely remove the use of the AT&T RG gateway?
To be clear, you need to have a /29 block of static IPs on the AT&T fiber account the use this mode however.Public Subnet Mode: Using a public subnet means that IP addresses assigned to LAN clients will be public addresses.
Allow Inbound Traffic: When enabled, connections to LAN-side devices are allowed to be initiated from the WAN side. This opens the LAN devices on the Public Subnet to potentially malicious traffic, so care should be taken to ensure the LAN-side devices are properly protected. (Firewall-enabled)
@pcunite,
Great article. I've followed this thread for a while ... writing down the cleverness here isn't easy.
I'd suggest adding a third option, that of getting a /29 public IP block (5 IPs) from AT&T and adding that to the article. This solution has worked well for me - with the key being to use "Public Subnet Mode" with "Allow Inbound Traffic" enabled on the RG that's singularly connected to a MikroTik ... Anyway the option may be worth mentioning. I'd rather use the ONT directly myself, but the contortions needed, and added complexity, may not be for everyone. $5/month solved it well enough for me. To be clear, you need to have ordered a /29 block of static IPs on the AT&T fiber account the use this mode.
Think the RB2011 could handle gigabit fiber?