GRE
In WinBox you can configure GRE in Interfaces -> GRE, or you can use terminal with command /interface gre
GRE provides a simple tunneling mechanism that encapsulates packets inside IP packets, allowing different network protocols to be transported over IP networks.
GRE fundamentals
How GRE works
Key characteristics:
Protocol 47 - GRE uses IP protocol number 47
Stateless - No connection state maintained
Bidirectional - Traffic can flow in both directions
No encryption - GRE itself provides no security (use with IPSec for encryption)
Low overhead - Minimal encapsulation overhead
Common use cases:
Site-to-site connectivity - Connect remote networks
Routing protocol transport - Carry routing protocols over internet
MPLS over IP - Transport MPLS traffic over IP networks
Multicast distribution - Distribute multicast traffic across WAN
Remote network access - Provide access to remote subnets
Basic GRE configuration
Simple point-to-point GRE tunnel
Create a basic GRE tunnel between two RouterOS devices:
Router A (Local: 203.0.113.10, Remote: 203.0.113.20):
Router B (Local: 203.0.113.20, Remote: 203.0.113.10):
Test connectivity
Advanced GRE configuration
GRE with keepalive
Enable keepalive to detect tunnel failures:
GRE over dynamic IP
For scenarios where one end has dynamic IP:
Multiple GRE tunnels
Create multiple tunnels for redundancy or load balancing:
GRE with routing protocols
OSPF over GRE
Extend OSPF across WAN using GRE:
BGP over GRE
Use GRE for BGP peering across internet:
GRE security with IPSec
Encrypt GRE traffic with IPSec
Since GRE provides no encryption, use IPSec for security:
GRE over NAT
Handle GRE behind NAT
GRE can be problematic behind NAT due to protocol 47:
Monitoring and troubleshooting
Monitor GRE tunnels
Troubleshoot GRE issues
Performance optimization
Optimize GRE performance
Load balancing with multiple tunnels
Common use cases
Site-to-site network extension
Remote office connectivity
Best practices
Design recommendations
Use keepalives - Detect tunnel failures quickly
Implement redundancy - Multiple tunnels for critical connections
Secure tunnels - Use IPSec for encryption over untrusted networks
Monitor actively - Watch for tunnel state changes
Plan addressing - Use consistent tunnel addressing schemes
Security considerations
Always encrypt - GRE provides no security by itself
Firewall properly - Allow only necessary GRE traffic
Use authentication - IPSec or other authentication mechanisms
Monitor traffic - Watch for unusual patterns
Regular maintenance - Keep tunnel configurations updated
Performance tips
Optimize MTU - Account for GRE overhead
Use hardware acceleration - When available
Monitor bandwidth - Track utilization on tunnels
Load balance - Use multiple tunnels for high bandwidth needs
Minimize latency - Choose optimal routing paths
Last updated
Was this helpful?