實驗設備:
1臺routeros5.24版路由器
1臺思科2960交換機
2條100M電信帶寬:1條下行100M 上行8M,另一條下行100M上行4M
實驗目的:
疊加多條上網寬帶,以增大公司用網需求。本實驗中只有兩條寬帶,實際可能到達百條寬帶接入,這時再用網卡接入就不太現實了。故用交換機擴展來增加帶寬接入端口
實驗步驟:
一:先做wan口交換機擴展
1.在2960上做Vlan,並加入端口,每端口一個Vlan
En
Conf t
Vlan 2
Exit
Vlan 3
Exit
Inter f0/1
Sw mode trunk
exit
Inter f 0/2
Sw acc vlan 2
Exit
Inter f 0/3
Sw acc vlan 3
End
Write
並將ADSL1、ADSL2從貓分別接入交換機端口2、3(貓的撥號模式要爲橋接模式),
Routeros的wan1口接到交換機的端口1,
2.在routeros上做Vlan端口,橋接端口,pppoe
添加VLAN
新建Vlan2和Vlan3(必須和交換機上設置的Vlan號對應)
Vlan的對應端口都是wan1口
打開網橋窗口,添加網橋
選擇網橋窗口中的協議選項卡並增加網橋和VLAN的對應端口
建好後就可以在接口中添加pppoe撥號了
ADSL1的撥號設置
ADSL2的撥號設置
防火牆設置NAT
至此routeros的wan口交換機擴展配置已經完成,端口匯聚還沒有做,雖然兩條線路已經撥通,但只有一條線路有數據
二,現在開始做帶寬疊加實驗,WAN口交換機擴展的疊加和多網卡的疊加設置方法是不同的。
winbox上直接設置有些地方不能正常選擇,直接上命令
1.設置多線疊加標記及PCC
/ip firewall mangle
add action=change-mss chain=forward comment="" disabled=no new-mss=1400 protocol=tcp tcp-flags=syn
:for i from=2 to=3 do= {/ip firewall mangle add action=mark-connection chain=input comment="" disabled=no\\
in-interface=("pppoe-out".$i) new-connection-mark=("pppoe-out".$i) passthrough=yes}
:for i from=2 to=3 do= {/ip firewall mangle add action=mark-routing chain=output comment="" connection-mark=("pppoe-out".$i)\\
disabled=no new-routing-mark=("to_pppoe-out".$i) passthrough=yes}
:for i from=2 to=3 do= {/ip firewall mangle add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local\\
new-connection-mark=("pppoe-out".$i) passthrough=yes per-connection-classifier=("both-addresses:2/".($i-1)) src-address=192.168.0.0/24}
:for i from=2 to=3 do= {/ip firewall mangle add action=mark-routing chain=prerouting comment="" connection-mark=("pppoe-out".$i)\\
disabled=no new-routing-mark=("to_pppoe-out".$i) passthrough=yes src-address=192.168.0.0/24}
2.添加路由
:for i from=2 to=3 do= {/ip route add comment=("ADSL".$i) disabled=no distance=1 dst-address=0.0.0.0/0\\
gateway=("pppoe-out".$i) routing-mark=("to_pppoe-out".$i)}
:for i from=2 to=3 do= {/ip route add check-gateway=ping comment=("ADSL".$i) disabled=no distance=10 dst-address=0.0.0.0/0\\
gateway=("pppoe-out".$i)}
設置完畢,上面的代碼的代碼自己做時,自行修改
。現在看看我們的兩個撥號寬帶情況
兩個寬帶都有數據了,再看看帶寬大小,因網卡最大速率是100M所有下行最大還是100M,就看上行帶寬是否爲12M左右
上行實際測試可達14M,說明寬帶疊加實驗成功。