2013年11月18日 星期一

routeros IPIP 連線 EIOP 連線的第一步

參考
http://wiki.mikrotik.com/wiki/Manual:Interface/IPIP



winbox 6.6 設定ipip 為IP Tunnel 另有ipv6的ipipv6 tunnel ,一個是v4 一個是v6

說明
10.0.0.1 和 22.63.11.6 各是雙方的WAN

1.1.1.1/24, and 1.1.1.2/24 是自己設定是Peer IP網址 /24 是網段 (不知道是什麼,像是alias 給他一個代號,而這個代號,剛好是網址是一個介面的所有設定的代號 而這個代號要套用在routes , 意思是將這個代號的所有資訊都運用在routers 表中,看要走去哪.

/24為如果有需要到1.1.1.1-1.1.1.254 個路由要建立 連線(在這指ipip tunnel)




後面的實例中為 10.0.0.1/30 and 10.0.0.2/30 即網段是30 忘了能設定幾台,互聯

主要要知道為什麼要設定這個,意義是什麼




另一參考資訊
http://www.mobile01.com/topicdetail.php?f=110&t=3205444&p=31#42624362

=====
IPIP Tunnel

IPIP - IP within IP Tunnel 和 GRE Tunnel 用法相當類似, 可以用於多點間建立 intranet 之用.


官方文件: IPIP Tunnel


# IPIP Tunnel
# Home subnet: 192.168.22.0/24
# Office subnet: 192.168.38.0/24
# Home WAN IP: 114.32.xxx.xxx
# Office WAN IP: 114.34.xxx.xxx
# Peer IP: 10.0.0.1 & 10.0.0.2

# HOME side
/interface ipip
add disabled=no local-address=114.32.xxx.xxx name=ipip1 remote-address=114.34.xxx.xxx

/ip address
add address=10.0.0.2/30 interface=ipip1

/ip route
add distance=1 dst-address=192.168.38.0/24 gateway=10.0.0.1


# OFFICE side
/interface ipip
add disabled=no local-address=114.34.xxx.xxx name=ipip1 remote-address=114.32.xxx.xxx

/ip address
add address=10.0.0.1/30 interface=ipip1

/ip route
add distance=1 dst-address=192.168.22.0/24 gateway=10.0.0.2


做法和之前的 GRE Tunnel 完全相同, 而 IPIP 實際上也是在封包前面冠上 WAN IP 後直接往 remote site 送出, 只要 Internet 上兩 site subnet 不同, 就可以透過 IPIP 建立 intranet.

GRE, IPIP Tunnel 這些都是未加密的, 建議在使用時必須輔以其他加密協定(例如 IPSEC).

=====

如果是routeros 6.6 ,在設定第三個 ip route 會自己設定,即"代號" 
但是,在450g 的設定上會自己帶錯,應該要帶10.0.2 帶成 10.0.0.20
改一下即可

而官方文件的設定並沒有提到/ip route 的設定

註:ipip mtu 是1480. 

官方滿偷懶的嘛


routeros 設定 Hurricane ELECTRIC 6to4



進入
http://www.tunnelbroker.net
登入帳號
在ipv6 tunnel 中看到自己的設定
第二選項有一個 "Example configurations"
選了之後,還有一個可以選"Mikrotik"

會出現已經打好的 Scripts

copy下來,

打開winbox
System>Script
加一個新的,名字亂打
內容貼上去
add.
ok .
再按
Run Script

完成!


2013年11月8日 星期五

router os 設定 設計概念

routeros 產品的使用概念

組合


=底=

vpn EX

PPP >Secret

local address   . server 的LAN GW ( if . 192.168.88.1)
Remote address. 欲連過來的 機器的LAN GW ip
Routers    192.168.x.0/24 218.161.66.xx 1

218 是Remote 的 WAN ip .

1 是不知道為什麼要加,官方的sample

=中=
Profile
加密,和DNS
這地方也有上述的資訊,但 底是最重要的
注意dns server 沒設定,會套用 server 設定好的dns

=上=
vpn server (不管是pptp or l2tp 等)

--

底加中加上 串起來 就是vpn 聯起來的關鍵

底可以加很多資訊,多個帳號
加中 加上 形成另一個vpn 連線點

一如密碼筒


注: 二台同樣都是router os 設計概念即參考cisco
給予虛擬的ip 當成介面