我想让192.168.1.2/24->192.168.1.1可以访问互联网,但是192.168.1.3/24->192.168.1.100不能访问互联网。
我不知道该怎么办。
[admin@RouterOS] /ip/route> print detail
Flags: D - dynamic; X - disabled, I - inactive, A - active;
c - connect, s - static, r - rip, b - bgp, o - ospf, d - dhcp, v - vpn, m - modem, y - bgp-mpls-vpn;
H - hw-offloaded; + - ecmp
0 As + dst-address=0.0.0.0/0 routing-table=main pref-src=192.168.1.2
gateway=192.168.1.1 immediate-gw=192.168.1.1%ether1 check-gateway=arp
distance=1 scope=30 target-scope=10 suppress-hw-offload=no
0 As + dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=192.168.1.1
immediate-gw=192.168.1.1%ether1 check-gateway=arp distance=1 scope=30
target-scope=10 suppress-hw-offload=no
DAc + dst-address=192.168.1.0/24 routing-table=main gateway=ether1
immediate-gw=ether1 distance=0 scope=10 suppress-hw-offload=no
local-address=192.168.1.3%ether1
DAc + dst-address=192.168.1.0/24 routing-table=main gateway=ether1
immediate-gw=ether1 distance=0 scope=10 suppress-hw-offload=no
local-address=192.168.1.2%ether1
1 As dst-address=0.0.0.0/0 routing-table=rtab-1 pref-src=192.168.1.3
gateway=192.168.1.100 immediate-gw=192.168.1.100%ether1 check-gateway=arp
distance=1 scope=30 target-scope=10 suppress-hw-offload=no
[admin@RouterOS] /ip/address> print
Columns: ADDRESS, NETWORK, INTERFACE
# ADDRESS NETWORK INTERFACE
0 192.168.1.2/24 192.168.1.0 ether1
1 192.168.1.3/24 192.168.1.0 ether1
[admin@RouterOS] /ip/address> /tool/traceroute src-address=192.168.1.3 8.8.8.8
Columns: ADDRESS, LOSS, SENT, LAST, AVG, BEST, WORST, STD-DEV
# ADDRESS LOSS SENT LAST AVG BEST WORST STD-DEV
1 192.168.1.1 0% 3 0.2ms 0.2 0.1 0.2 0
2 ... // more line
[admin@RouterOS] /ip/address> /tool/traceroute src-address=192.168.1.2 8.8.8.8
Columns: ADDRESS, LOSS, SENT, LAST, AVG, BEST, WORST, STD-DEV
# ADDRESS LOSS SENT LAST AVG BEST WORST STD-DEV
1 192.168.1.1 0% 2 0.2ms 0.2 0.1 0.2 0.1
2 ... // more line
这就是我希望看到的结果。
[admin@RouterOS] /ip/address> /tool/traceroute src-address=192.168.1.3 8.8.8.8
Columns: ADDRESS, LOSS, SENT, LAST, AVG, BEST, WORST, STD-DEV
# ADDRESS LOSS SENT LAST AVG BEST WORST STD-DEV
1 192.168.1.100 0% 3 0.2ms 0.2 0.1 0.2 0
2 ... // more line
[admin@RouterOS] /ip/address> /tool/traceroute src-address=192.168.1.2 8.8.8.8
Columns: ADDRESS, LOSS, SENT, LAST, AVG, BEST, WORST, STD-DEV
# ADDRESS LOSS SENT LAST AVG BEST WORST STD-DEV
1 192.168.1.1 0% 2 0.2ms 0.2 0.1 0.2 0.1
2 ... // more line