hcl新华三 vlan实验
文章目錄
- 一題目分析
- 1.地址規(guī)劃
- 二. 實驗步驟
- 1.拓撲搭建
- 2.創(chuàng)建vlan接口劃分
- 3.trunk干道
- 4.vlan間路由(路由器上的子接口)
- (1)配置接口地址
- (2)創(chuàng)建子接口
- (3)啟用dhcp
- (4)靜態(tài)路由和空接口
- 三.實驗總結(jié)
題目:
一題目分析
1.地址規(guī)劃
左邊的vlan2和vlan3基于192.168.1.0/24劃分
右邊的vlan2和vlan3基于192.168.2.0/24劃分,這樣以便于匯總寫路由
二. 實驗步驟
1.拓撲搭建
2.創(chuàng)建vlan接口劃分
[sw1]vlan 2
[sw1-vlan2]port GigabitEthernet 1/0/2 (注意接口是1/0/2而不是顯示的0/2)
[sw1]vlan 3
[sw1-vlan3]port GigabitEthernet 1/0/3
[sw2]vlan 2
[sw2-vlan2]port g1/0/2
[sw2-vlan2]port g1/0/3
[sw2-vlan2]quit
[sw2]vlan 3
[sw2-vlan3]port g1/0/4
[sw2-vlan3]port g1/0/5
[sw3]vlan 2
[sw3-vlan2]port g1/0/1
[sw3-vlan2]quit
[sw3]vlan 3
[sw3-vlan3]port g1/0/2
3.trunk干道
[sw1]int g1/0/1
[sw1-GigabitEthernet1/0/1]port link-type trunk
[sw1-GigabitEthernet1/0/1]port trunk permit vlan 2 to 3
[sw2]int g1/0/6
[sw2-GigabitEthernet1/0/6]port link-type trunk
[sw2-GigabitEthernet1/0/6]port trunk permit vlan 2 to 3
[sw2-GigabitEthernet1/0/6]int g1/0/1
[sw2-GigabitEthernet1/0/1]port link-type trunk
[sw2-GigabitEthernet1/0/1]port trunk permit vlan 2 to 3
[sw3]int g1/0/3
[sw3-GigabitEthernet1/0/3]port link-type trunk
[sw3-GigabitEthernet1/0/3]port trunk permit vlan 2 to 3
4.vlan間路由(路由器上的子接口)
(1)配置接口地址
[r1]int g 0/0
[r1-GigabitEthernet0/0]ip ad 192.168.0.1 30
[r2]int g0/1
[r2-GigabitEthernet0/1]ip ad 192.168.0.2 30
(2)創(chuàng)建子接口
[r1]int g0/1.1
[r1-GigabitEthernet0/1.1]vlan-type dot1q vid 2
[r1-GigabitEthernet0/1.1]ip ad 192.168.1.1 25
[r1]int g0/1.2
[r1-GigabitEthernet0/1.2]vlan-type dot1q vid 3
[r1-GigabitEthernet0/1.2]ip ad 192.168.1.129 25
[r2]int g0/0.1
[r2-GigabitEthernet0/0.1]vlan-type dot1q vid 2
[r2-GigabitEthernet0/0.1]ip ad 192.168.2.1 25
[r2]int g0/0.2
[r2-GigabitEthernet0/0.2]vlan-type dot1q vid 3
[r2-GigabitEthernet0/0.2]ip ad 192.168.2.129 25
(3)啟用dhcp
[r1]dhcp server en
[r1]dhcp server ip-pool yzyss
[r1-dhcp-pool-yzyss]gateway-list 192.168.1.1
[r1-dhcp-pool-yzyss]network 192.168.1.0 25
[r1-dhcp-pool-yzyss]dns-list 114.114.114.114 8.8.8.8
[r1-dhcp-pool-yzyss]quit
[r1]int g0/1.1
[r1-GigabitEthernet0/1.1]dhcp select server (子接口需要啟用DHCP,物理接口不需要)
[r1]dhcp server ip-pool xx
[r1-dhcp-pool-xx]network 192.168.1.128 25
[r1-dhcp-pool-xx]gateway-list 192.168.1.129
[r1-dhcp-pool-xx]dns-list 114.114.114.114 8.8.8.8
[r1-dhcp-pool-xx]quit
[r1]int g0/1.2
[r1-GigabitEthernet0/1.2]dhcp select server
(4)靜態(tài)路由和空接口
[r1]ip route-static 192.168.2.0 24 192.168.0.2
[r1]ip route-static 192.168.2.0 24 NULL 0
[r2]ip route-static 192.168.1.0 24 192.168.0.1
[r2]ip route-static 192.168.1.0 24 NULL 0
測試:
三.實驗總結(jié)
1.同一個vlan并不是同一個網(wǎng)段
2.sw1和sw2上面連接路由器的接口也需要修改接口類型為trunk并且定義允許列表(這點常常忽略)
3.配置時路由器接口和顯示的是一樣的,交換機接口和顯示的不一樣。
到這里整個實驗就完成了。
總結(jié)
以上是生活随笔為你收集整理的hcl新华三 vlan实验的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 亚马逊成人用品巨头日本Aivrobta品
- 下一篇: 蓝牙标签操作流程