Guest User

Untitled

a guest
Dec 23rd, 2015
108
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ip tunnel add gre1 mode gre local S1-ip remote main-ip ttl 255
  2. ip addr add 192.168.10.1/30 dev gre1
  3. ip link set gre1 up
  4.  
  5. ip tunnel add gre2 mode gre local S2-ip remote main-ip ttl 255
  6. ip addr add 192.168.168.1/24 dev gre2
  7. ip link set gre2 up
  8.  
  9. ip tunnel add gre1 mode gre local main-ip remote S1-ip ttl 255
  10. ip addr add 192.168.10.2/30 dev gre1
  11. ip link set gre1 up
  12.  
  13. ip tunnel add gre2 mode gre local main-ip remote S2-ip ttl 255
  14. ip addr add 192.168.168.2/30 dev gre2
  15. ip link set gre2 up
  16. echo 200 grea >> /etc/iproute2/rt_tables
  17. echo 201 greb >> /etc/iproute2/rt_tables
  18.  
  19. ip rule add from 192.168.10.0/30 table grea
  20. ip rule add from 192.168.168.0/30 table greb
  21.  
  22.  
  23. ip route add default via 192.168.10.1 table gre1
  24. ip route add default via 192.168.168.1 table gre2
RAW Paste Data