关于Vultr开通BGP和怎么广播就不说了,网上一堆。
安装Mikrotik RouterOS
5、安装Mikrotik RouterOS
[root@sysresccd ~]# wget https://download2.mikrotik.com/routeros/6.44.3/chr-6.44.3.img.zip [root@sysresccd ~]# unzip chr-6.44.3.img.zip [root@sysresccd ~]# dd if=chr-6.44.3.img of=/dev/vda [root@sysresccd ~]# mount /dev/vda1 /mnt/ [root@sysresccd ~]# cat > /mnt/rw/autorun.scr << EOF # Auto configure script on RouterOS first boot # feel free to customize it if you really need /ip address add address=45.32.46.203/22 interface=ether1 network=45.32.44.0 /ip route add distance=1 gateway=45.32.44.1 /ip service set telnet port=23023 set ftp disabled=yes set ssh disabled=yes set api disabled=yes set api-ssl disabled=yes /ip dns set servers=139.99.18.82,139.99.18.83 EOF [root@sysresccd ~]# umount /mnt/
6、卸载镜像重启,启动RouterOS系统
3、开始配置IPV6
/ipv6 settings set forward=no /ipv6 address add interface=ether1 address=2001:19f0:7002:527:5400:02ff:fe24:8603/64 /ipv6 route add dst-address=::/0 gateway=fe80::fc00:ff:fe60:fff%ether1 /ipv6 nd set [ find default=yes ] hop-limit=64 interface=ether1 managed-address-configuration=yes other-configuration=yes
4、测试
[admin@MikroTik] > /ping count=3 2001:4860:4860::8888 SEQ HOST SIZE TTL TIME STATUS 0 2001:4860:4860::8888 56 56 2ms echo reply 1 2001:4860:4860::8888 56 56 1ms echo reply 2 2001:4860:4860::8888 56 56 1ms echo reply sent=3 received=3 packet-loss=0% min-rtt=1ms avg-rtt=1ms max-rtt=2ms [admin@MikroTik] > /ping count=3 2404:eb40:100::1 SEQ HOST SIZE TTL TIME STATUS 0 2404:eb40:100::1 56 59 1ms echo reply 1 2404:eb40:100::1 56 59 1ms echo reply 2 2404:eb40:100::1 56 59 1ms echo reply sent=3 received=3 packet-loss=0% min-rtt=1ms avg-rtt=1ms max-rtt=1ms [admin@MikroTik] >
三、配置BGP
# 2404:eb40:100::/48 你广播到Vultr的IP # DWHD.ORG 你在Vultr设置的广播密码 # 2001:19f0:ffff::1 Vultr节点的IPV6网关 # BGP instance setup /routing bgp instance add as=139205 client-to-client-reflection=no name=bgpVultrV6-1 router-id=1.2.3.4 add as=139205 client-to-client-reflection=no name=bgpVultrV4-1 router-id=1.2.3.5 /routing bgp network add network=2404:eb40:100::/48 synchronize=no add network=103.139.201.0/24 synchronize=no # ROUTING FILTERS - Install these routes as blackholes, does NOT receive or announce anything else #/routing filter #add action=accept bgp-communities=65323:888 chain=bgp-vultr-in set-type=blackhole #add action=discard chain=bgp-vultr-in #add action=discard chain=bgp-vultr-out # Peering #1 IPV6 /routing bgp peer add address-families=ip,ipv6 disabled=no instance=bgpVultrV6-1 multihop=yes \ name=bgpVultr-V6-1 remote-address=2001:19f0:ffff::1 remote-as=64515 ttl=default tcp-md5-key=DWHD.ORG # Peering #2 IPV4 /routing bgp peer add address-families=ip,ipv6 disabled=no instance=bgpVultrV4-1 multihop=yes \ name=bgpVultr-V4-1 remote-address=169.254.169.254 remote-as=64515 ttl=default tcp-md5-key=DWHD.ORG # Add IPV6 Address /ipv6 address add address=2404:eb40:100::1/48 advertise=no interface=ether1
给MikroTik RouterOS本身添加一点IP
/ipv6 address add address=2404:eb40:100::1/48 advertise=no interface=ether1 add address=2404:eb40:100::100/48 advertise=no interface=ether1 add address=2404:eb40:100::110/48 advertise=no interface=ether1 add address=2404:eb40:100::120/48 advertise=no interface=ether1 add address=2404:eb40:100::130/48 advertise=no interface=ether1 add address=2404:eb40:100::140/48 advertise=no interface=ether1 add address=2404:eb40:100::150/48 advertise=no interface=ether1 add address=2404:eb40:100::160/48 advertise=no interface=ether1 add address=2404:eb40:100::200/48 advertise=no interface=ether1 add address=2404:eb40:100::190/48 advertise=no interface=ether1 add address=2404:eb40:100::180/48 advertise=no interface=ether1 add address=2404:eb40:100::170/48 advertise=no interface=ether1 add address=2404:eb40:100::222/48 advertise=no interface=ether1
测试:
https://tools.ipip.net/newping.php
https://tools.ipip.net/traceroute.php?ip=2404:eb40:100::1&id=641&v=6
您可以选择一种方式赞助本站
支付宝扫一扫赞助
微信钱包扫描赞助
赏