軟路由WAN口不夠,擴WAN口交換機設定

一、適用場景:

愛快、高恪、RouerOS等各類軟路由WAN口擴充套件,即路由器WAN口不夠用或需要多條ADSL撥號接入情況下前端交換機設定。

二、網路拓撲:

軟路由WAN口不夠,擴WAN口交換機設定

網路拓撲

三、配置規劃:

交換機1埠至23埠每個埠設定不同VLAN(例如VLAN1-VLAN23)供寬頻接入使用,24口連線路由器進行寬頻撥號。

四、裝置配置:

1、建立VLAN1-VLAN23

[Cnitdog-Huawei-Switch-Wan]vlan batch 1 to 23

2、將1埠至23口劃分至對應VLAN(以1埠為例,其他埠以此類推進行設定)

(1)進入1埠

[Cnitdog-Huawei-Switch-Wan]interface GigabitEthernet 0/0/1

(2)將1埠模式設定成ACCESS模式

[Cnitdog-Huawei-Switch-Wan-GigabitEthernet0/0/1]port link-type access

(3)將1埠設定為VLAN1

[Cnitdog-Huawei-Switch-Wan-GigabitEthernet0/0/1]port default vlan 1

4、設定24埠接入路由器

(1)進入24埠

[Cnitdog-Huawei-Switch-Wan]interface GigabitEthernet 0/0/24

(2)將24埠設定成TRUNK模式

[Cnitdog-Huawei-Switch-Wan-GigabitEthernet0/0/24]port link-type trunk

(3)將24埠設定成允許VLAN1-VLAN23透過

[Cnitdog-Huawei-Switch-Wan-GigabitEthernet0/0/24]port trunk allow-pass vlan 1 to 23

五、裝置配置檔案

[Cnitdog-Huawei-Switch-Wan]dis cu#sysname Cnitdog-Huawei-Switch-Wan#vlan batch 2 to 23#cluster enablentdp enablendp enable#drop illegal-mac alarm#diffserv domain default#drop-profile default#aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password simple admin local-user admin service-type http#interface Vlanif1#interface MEth0/0/1#interface GigabitEthernet0/0/1 port link-type access#interface GigabitEthernet0/0/2 port link-type access port default vlan 2#interface GigabitEthernet0/0/3 port link-type access port default vlan 3#interface GigabitEthernet0/0/4 port link-type access port default vlan 4#interface GigabitEthernet0/0/5 port link-type access port default vlan 5#interface GigabitEthernet0/0/6 port link-type access port default vlan 6#interface GigabitEthernet0/0/7 port link-type access port default vlan 7#interface GigabitEthernet0/0/8 port link-type access port default vlan 8#interface GigabitEthernet0/0/9 port link-type access port default vlan 9#interface GigabitEthernet0/0/10 port link-type access port default vlan 10#interface GigabitEthernet0/0/11 port link-type access port default vlan 11#interface GigabitEthernet0/0/12 port link-type access port default vlan 12#interface GigabitEthernet0/0/13 port link-type access port default vlan 13#interface GigabitEthernet0/0/14 port link-type access port default vlan 14#interface GigabitEthernet0/0/15 port link-type access port default vlan 15#interface GigabitEthernet0/0/16 port link-type access port default vlan 16#interface GigabitEthernet0/0/17 port link-type access port default vlan 17#interface GigabitEthernet0/0/18 port link-type access port default vlan 18#interface GigabitEthernet0/0/19 port link-type access port default vlan 19#interface GigabitEthernet0/0/20 port link-type access port default vlan 20#interface GigabitEthernet0/0/21 port link-type access port default vlan 21#interface GigabitEthernet0/0/22 port link-type access port default vlan 22#interface GigabitEthernet0/0/23 port link-type access port default vlan 23#interface GigabitEthernet0/0/24 port link-type trunk port trunk allow-pass vlan 2 to 23#interface NULL0#user-interface con 0user-interface vty 0 4#return[Cnitdog-Huawei-Switch-Wan]

六、注意事項:

1、設定完畢後記得注意儲存裝置配置,防止裝置重啟配置丟失(使用者檢視下設定)。

2、在路由器或軟路由上面撥號設定VLAN要和交換機的VLAN一致(1埠是VLAN1,那麼路由器也要設定成VLAN1,並且賬戶密碼為插入1埠的寬頻賬戶密碼),否則撥號會失敗!

3、交換機1埠不是沒有設定VLAN,因為VLAN1為預設VLAN不顯示,為了免得混淆交換機埠和VLAN的對應關係,故使用了VLAN1,生產環境不推薦使用VLAN1。