3.1 問題
如何使用三層交換機和路由配置實現全網互通?
配置思路:
1.終端設備pc
2.交換機
-sw1.2.4 接口設置
3.三層交換
-sw3創建vlan
-與交換機鏈接設置trunk容許全部
-vlanif 設置ip地址
-建立vlan 300 接口0/0/3設置acce模式
加入vlan 300 進入vlanif 300 設置ip地址
-設置靜態路由60 70網段下一跳
4.路由器
-子接口設置ip地址 打開ARP廣播
-g0/0/2接口設置IP地址
-設置默認靜態路由
5.驗證與測試ide
SW1
SW2測試
[SW4]vlan batch 10 20 30 40 50 60 70
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW4]int e0/0/1
[SW4-Ethernet0/0/1]port link-type access
[SW4-Ethernet0/0/1]port default vlan 60
[SW4-Ethernet0/0/1]int e0/0/2
[SW4-Ethernet0/0/2]port link-type access
[SW4-Ethernet0/0/2]port default vlan 70
[SW4-Ethernet0/0/2]int e0/0/3
[SW4-Ethernet0/0/3]port link-type trunk
[SW4-Ethernet0/0/3]port trunk allow-pass vlan all3d
[SW3]vlan batch 10 20 30 40 50 60 70
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW3]port-group 1
[SW3-port-group-1]group-member g0/0/1 g0/0/2
[SW3-port-group-1]port link-type trunk
[SW3-port-group-1]port trunk allow-pass vlan all
[SW3]int vlanif 10
[SW3-Vlanif10]ip add 192.168.10.1 24
[SW3-Vlanif10]int v20
[SW3-Vlanif20]ip add 192.168.20.1 24
[SW3-Vlanif20]int v30
[SW3-Vlanif30]ip add 192.168.30.1 24
[SW3-Vlanif30]int v40
[SW3-Vlanif40]ip add 192.168.40.1 24
[SW3-Vlanif40]int v50
[SW3-Vlanif50]ip add 192.168.50.1 24
[SW3-Vlanif50]q
[SW3]vlan 300
[SW3-vlan300]q
[SW3]int g0/0/3
[SW3-GigabitEthernet0/0/3]port link-type access
[SW3-GigabitEthernet0/0/3]port default vlan 300
[SW3-GigabitEthernet0/0/3]q
[SW3]int vlanif 300
[SW3-Vlanif300]ip add 192.168.3.3 24
[SW3-Vlanif300]q
[SW3]ip route-static 192.168.60.0 24 192.168.3.1
[SW3]ip route-static 192.168.70.0 24 192.168.3.1blog
[R1]int g0/0/0.1
[R1-GigabitEthernet0/0/0.1]dot1q termination vid 60
[R1-GigabitEthernet0/0/0.1]ip add 192.168.60.1 24
[R1-GigabitEthernet0/0/0.1]arp broadcast enable
[R1-GigabitEthernet0/0/0.1]int g0/0/0.2
[R1-GigabitEthernet0/0/0.2]dot1q termination vid 70
[R1-GigabitEthernet0/0/0.2]ip add 192.168.70.1 24
[R1-GigabitEthernet0/0/0.2]arp broadcast enable
[R1-GigabitEthernet0/0/0.2]q
[R1]int g0/0/02
[R1-GigabitEthernet0/0/2]ip add 192.168.3.1 24接口
g0/0/0.1 192.168.60.1 24
g0/0/0.2 192.168.70.1 24
進入子接口 設置ip地址 開啓arp廣播ip