7
新手RouteOS配置BGP并设置SIT隧道
source link: https://www.taterli.com/8021/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
新手RouteOS配置BGP并设置SIT隧道
- 由 TaterLi
- 2021年7月5日2021年7月5日
首先安装RouteOS,这一点不用教都会做了吧,我是通过dd安装的,但是注意要有VNC/IPMI权限,不然你什么都配置不了(如果你不理解下面每句指令用途,那么感觉可以从这里放弃,随着版本不同,文件名可能有所不同.)
apt update && apt install wget unzip -y
cd /tmp && wget https://download.mikrotik.com/routeros/6.47/chr-6.47.img.zip -O chr.img.zip
unzip chr.img.zip
echo 1 > /proc/sys/kernel/sysrq
echo u > /proc/sysrq-trigger
dd if=/tmp/chr-6.47.img of=/dev/vda bs=1024
reboot
echo b > /proc/sysrq-trigger
DD后立即就能好,然后打开IP开始配置.
然后进去启动IPv6功能并重启.
添加本机的IPv6:
设置下一跳路由:
进行公网ICMP测试.
配置BGP:
删除本身默认的.
添加自有网络.
根据上游ISP填写Peer内容,多个Peer依次填写,照抄你肯定过不了.
等一会就链接上了.
最后添加一个自己的IP,作为入口点.
测试可以通到外面了.
我们既可以图形配置也可以命令配置,为了方便就命令配置了.
/interface 6to4 add disabled=no local-address=107.189.6.9 mtu=1280 name=sit1 remote-address=23.95.246.215
/ipv6 address add address=2a0f:9400:770a:9a36::1/64 advertise=no disabled=no eui-64=no interface=sit1
再根据之前知识,另一个机器配置.
ip tunnel add tun0 mode sit remote 107.189.6.9 local 23.95.246.215 ttl 255
ip link set tun0 up
ip addr add 2a0f:9400:770a:9a36::2/64 dev tun0
ip route add ::/0 dev tun0
然后隧道就通了,从隧道另一端下载一个大文件,就看到流量了.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK