最近考試、測(cè)試的特別多,今天跟大家分享個(gè)以最少的設(shè)備數(shù)量,搭建一個(gè)多協(xié)議的網(wǎng)絡(luò)
需求如下:
1、路由器、交換機(jī)基本配置方法
2、靜態(tài)路由技術(shù)
3、虛擬局域網(wǎng)技術(shù)
4、鏈路聚合技術(shù)
5、三層交換技術(shù)
6、DHCP技術(shù)
7、動(dòng)態(tài)路由技術(shù)RIP或OSPF
8、ACL訪問(wèn)控制列表技術(shù)
一般來(lái)說(shuō)看到這些需求第一反應(yīng)就是小型企業(yè)網(wǎng)絡(luò),這里還缺了個(gè)nat的需求,但是沒(méi)有給出
拓?fù)鋱D如下:
配置思路
二層
二層中需要的技術(shù)就是stp、vlan,那么stp可以擴(kuò)展到mstp,vlan無(wú)非就是接口狀態(tài),acc和trunk,還可以開(kāi)啟邊緣端口,匯聚/核心交換機(jī)之間配置鏈路聚合
三層
三層網(wǎng)關(guān)利用vrrp主備優(yōu)先級(jí)和mstp的多實(shí)例進(jìn)行呼應(yīng),動(dòng)態(tài)路由選擇ospf
出口設(shè)備配置靜態(tài)路由,acl,ospf下發(fā)缺省路由
這么一來(lái)協(xié)議加起來(lái)差不多7-8種,所以基本可以滿足老師的任何需求,以上所說(shuō)的都是常見(jiàn)需求和技術(shù),如果老師稍微專業(yè),可能會(huì)提出一些偏特性的知識(shí),或是中高級(jí)的知識(shí),那么關(guān)注我,我會(huì)持續(xù)更新內(nèi)容哦
配置如下
接入交換機(jī)配置(sw3、sw4)
sw3交換機(jī)配置
sysname LSW3
vlan batch 10 20
stp region-configuration
region-name huawei
instance 1 vlan 10 20
instance 2 vlan 30 40
active region-configuration
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass vlan 30 40
interface Ethernet0/0/11
port link-type access
port default vlan 10
stp edged-port enable
interface Ethernet0/0/12
port link-type access
port default vlan 20
stp edged-port enable
sw4交換機(jī)配置
sysname LSW4
vlan batch 30 40
stp region-configuration
region-name huawei
instance 1 vlan 10 20
instance 2 vlan 30 40
active region-configuration
interface Ethernet0/0/2
port link-type trunk
port trunk allow-pass vlan 30 40
interface Ethernet0/0/3
port link-type trunk
port trunk allow-pass vlan 30 40
interface Ethernet0/0/11
port link-type access
port default vlan 30
stp edged-port enable
interface Ethernet0/0/12
port link-type access
port default vlan 40
stp edged-port enable
sw1交換機(jī)配置
sysname LSW1
二層配置
vlan batch 10 20 30 40 100
stp instance 1 root primary
stp instance 2 root secondary
stp region-configuration
region-name huawei
instance 1 vlan 10 20
instance 2 vlan 30 40
active region-configuration
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 30 40
interface GigabitEthernet0/0/11
eth-trunk 1
interface GigabitEthernet0/0/12
eth-trunk 1
dhcp配置
dhcp enable
ip pool vlan10
gateway-list 192.168.1.254
network 192.168.1.0 mask 255.255.255.0
ip pool vlan20
gateway-list 192.168.2.254
network 192.168.2.0 mask 255.255.255.0
ip pool vlan30
gateway-list 192.168.3.254
network 192.168.3.0 mask 255.255.255.0
ip pool vlan40
gateway-list 192.168.4.254
network 192.168.4.0 mask 255.255.255.0
三層網(wǎng)關(guān)及vrrp配置
interface Vlanif10
ip address 192.168.1.252 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.1.254
vrrp vrid 10 priority 120
dhcp select global
interface Vlanif20
ip address 192.168.2.252 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.2.254
vrrp vrid 20 priority 120
dhcp select global
interface Vlanif30
ip address 192.168.3.252 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.3.254
dhcp select global
interface Vlanif40
ip address 192.168.4.252 255.255.255.0
vrrp vrid 40 virtual-ip 192.168.4.254
dhcp select global
interface Vlanif100
ip address 192.168.100.2 255.255.255.252
三層路由配置
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
network 192.168.4.0 0.0.0.255
network 192.168.100.0 0.0.0.255
sw2交換機(jī)配置
sysname LSW2
二層vlan配置
vlan batch 10 20 30 40 100
stp instance 1 root secondary
stp instance 2 root primary
stp region-configuration
region-name huawei
instance 1 vlan 10 20
instance 2 vlan 30 40
active region-configuration
interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 10 20 30 40
interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 30 40
interface GigabitEthernet0/0/11
eth-trunk 1
interface GigabitEthernet0/0/12
eth-trunk 1
地址池配置
dhcp enable
ip pool vlan10
gateway-list 192.168.1.254
network 192.168.1.0 mask 255.255.255.0
ip pool vlan20
gateway-list 192.168.2.254
network 192.168.2.0 mask 255.255.255.0
ip pool vlan30
gateway-list 192.168.3.254
network 192.168.3.0 mask 255.255.255.0
ip pool vlan40
gateway-list 192.168.4.254
network 192.168.4.0 mask 255.255.255.0
三層網(wǎng)關(guān)及vrrp配置
interface Vlanif10
ip address 192.168.1.253 255.255.255.0
vrrp vrid 10 virtual-ip 192.168.1.254
dhcp select global
interface Vlanif20
ip address 192.168.2.253 255.255.255.0
vrrp vrid 20 virtual-ip 192.168.2.254
dhcp select global
interface Vlanif30
ip address 192.168.3.253 255.255.255.0
vrrp vrid 30 virtual-ip 192.168.3.254
vrrp vrid 30 priority 120
dhcp select global
interface Vlanif40
ip address 192.168.4.253 255.255.255.0
vrrp vrid 40 virtual-ip 192.168.4.254
vrrp vrid 40 priority 120
dhcp select global
interface Vlanif100
ip address 192.168.101.2 255.255.255.252
路由配置
ospf 1 router-id 1.1.1.2
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
network 192.168.4.0 0.0.0.255
network 192.168.101.0 0.0.0.255
sysname AR1
acl number 2000
rule 5 permit source 192.168.1.0 0.0.0.255
rule 10 permit source 192.168.2.0 0.0.0.255
rule 15 permit source 192.168.3.0 0.0.0.255
rule 20 permit source 192.168.4.0 0.0.0.255
interface GigabitEthernet0/0/0
ip address 100.1.1.1 255.255.255.252
nat outbound 2000
interface GigabitEthernet0/0/1
ip address 192.168.100.1 255.255.255.252
interface GigabitEthernet0/0/2
ip address 192.168.101.1 255.255.255.252
ospf 1 router-id 1.1.1.3
default-route-advertise
area 0.0.0.0
network 192.168.100.0 0.0.0.255
network 192.168.101.0 0.0.0.255
ip route-static 0.0.0.0 0.0.0.0 100.1.1.2
以上配置可直接復(fù)制到設(shè)備中,最后測(cè)試結(jié)果即可
MSTP驗(yàn)證
鏈路聚合驗(yàn)證
vrrp驗(yàn)證
dhcp驗(yàn)證
ospf驗(yàn)證文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-773685.html
nat驗(yàn)證文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-773685.html
到了這里,關(guān)于華為ensp基礎(chǔ)實(shí)驗(yàn)系列-小型網(wǎng)絡(luò)綜合實(shí)驗(yàn)的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!