ensp小实验走起来(路由下发、MSTP、VRRP、DHCP、DHCP中继、NAT、链路聚合)之配置
生活随笔
收集整理的這篇文章主要介紹了
ensp小实验走起来(路由下发、MSTP、VRRP、DHCP、DHCP中继、NAT、链路聚合)之配置
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
華為小實驗(路由下發(fā)、MSTP、VRRP、DHCP、DHCP中繼、NAT、鏈路聚合)
- 前言
- 一、題目及需求
- 二、每個配置
- 1、R1
- 2、R2
- 3、R3
- 4、R4
- 5、LSW1
- 6、LSW2
- 7、LSW3
- 總結(jié)
前言
華為ensp小實驗走起來。
一、題目及需求
要求按照拓撲圖配置相關(guān)命令使得圖中所有終端能夠網(wǎng)絡(luò)互通。
(1)MSTP+鏈路聚合:在SW1和SW2之間配置鏈路聚合,要求正常情況下有2條鏈路活躍、一條鏈路備份。常情況下各VLAN流量路徑要求:VLAN10:SW3->SW2->R1;VLAN20:SW3->SW1->R1
(2)VRRP:正常情況下要求VLAN10的Master為SW2;VLAN20的Master為SW1
(3)DHCP:R3為DHCP中繼代理,R2為DHCP服務(wù)器,為PC4、PC5提供動態(tài)分配IP服務(wù)。
(4)按照拓撲圖中的要求在各三層交換機和路由器上配置路由,使得所有PC終端能夠網(wǎng)絡(luò)互通(10分)。
(5)NAT:使用EasyIp進行轉(zhuǎn)換使得Client1能夠使用R1的外網(wǎng)口IP訪問外網(wǎng);并使用NAT-Server使得Client1訪問Server1的web服務(wù)時能夠使用目標網(wǎng)址23.0.0.3/24的8080端口進行訪問
二、每個配置
1、R1
sysname R1 # acl number 3000 rule 5 permit ip source 192.168.10.0 0.0.0.255 # interface GigabitEthernet0/0/0ip address 10.0.0.1 255.255.255.0 # interface GigabitEthernet0/0/1ip address 11.0.0.1 255.255.255.0 # interface GigabitEthernet0/0/2ip address 12.0.0.1 255.255.255.0 nat outbound 3000 # ospf 1 area 0.0.0.0 network 10.0.0.0 0.0.0.255 network 11.0.0.0 0.0.0.255 network 12.0.0.0 0.0.0.255 # user-interface con 0authentication-mode password2、R2
sysname R2 # dhcp enable # ip pool 1gateway-list 192.168.40.1 network 192.168.40.0 mask 255.255.255.0 dns-list 8.8.8.8 # interface GigabitEthernet0/0/0ip address 12.0.0.2 255.255.255.0 # interface GigabitEthernet0/0/1ip address 23.0.0.2 255.255.255.0 dhcp select global # interface GigabitEthernet0/0/2ip address 24.0.0.2 255.255.255.0 # ospf 1 import-route directimport-route staticimport-route rip 1 cost 1 type 1area 0.0.0.0 network 12.0.0.0 0.0.0.255 # rip 1undo summarydefault-route originateversion 2network 23.0.0.0import-route ospf 1 cost 3 # ip route-static 192.168.30.0 255.255.255.0 24.0.0.4 # user-interface con 0authentication-mode passwordidle-timeout 0 03、R3
sysname R3 # dhcp enable # interface GigabitEthernet0/0/0ip address 23.0.0.1 255.255.255.0 nat server protocol tcp global 23.0.0.3 8080 inside 192.168.50.100 www # interface GigabitEthernet0/0/1ip address 192.168.40.1 255.255.255.0 dhcp select relaydhcp relay server-ip 23.0.0.2 # interface GigabitEthernet0/0/2ip address 192.168.50.1 255.255.255.0 # rip 1undo summaryversion 2network 23.0.0.0network 192.168.40.0network 192.168.50.0 # user-interface con 0authentication-mode passwordidle-timeout 0 04、R4
sysname R4 # interface GigabitEthernet0/0/0ip address 192.168.30.1 255.255.255.0 # interface GigabitEthernet0/0/1 # interface GigabitEthernet0/0/2ip address 24.0.0.4 255.255.255.0 # ip route-static 0.0.0.0 0.0.0.0 24.0.0.2 # user-interface con 0authentication-mode passwordidle-timeout 0 05、LSW1
sysname sw1 # vlan batch 10 20 100 # stp instance 1 root secondary stp instance 2 root primary # lacp priority 1000 # stp region-configurationregion-name huaweirevision-level 1instance 1 vlan 10instance 2 vlan 20active region-configuration # interface Vlanif10ip address 192.168.10.10 255.255.255.0vrrp vrid 1 virtual-ip 192.168.10.1 # interface Vlanif20ip address 192.168.20.10 255.255.255.0vrrp vrid 2 virtual-ip 192.168.20.1vrrp vrid 2 priority 120vrrp vrid 2 track interface GigabitEthernet0/0/5 reduced 30 # interface Vlanif100ip address 10.0.0.10 255.255.255.0 # interface Eth-Trunk1port link-type trunkport trunk allow-pass vlan 2 to 4094mode lacp-staticmax active-linknumber 2 # interface GigabitEthernet0/0/1port link-type accessport default vlan 20 # interface GigabitEthernet0/0/2eth-trunk 1 # interface GigabitEthernet0/0/3eth-trunk 1 # interface GigabitEthernet0/0/4eth-trunk 1 # interface GigabitEthernet0/0/5port link-type accessport default vlan 100 # ospf 1area 0.0.0.0network 10.0.0.0 0.0.0.255network 192.168.20.0 0.0.0.2556、LSW2
sysname sw2 # vlan batch 10 20 100 # stp instance 1 root primary stp instance 2 root secondary # cluster enable ntdp enable ndp enable # drop illegal-mac alarm # diffserv domain default # stp region-configurationregion-name huaweirevision-level 1instance 1 vlan 10instance 2 vlan 20active region-configuration # interface Vlanif10ip address 192.168.10.20 255.255.255.0vrrp vrid 1 virtual-ip 192.168.10.1vrrp vrid 1 priority 120vrrp vrid 1 track interface GigabitEthernet0/0/5 reduced 30 # interface Vlanif20ip address 192.168.20.20 255.255.255.0vrrp vrid 2 virtual-ip 192.168.20.1 # interface Vlanif100ip address 11.0.0.20 255.255.255.0 # interface Eth-Trunk1port link-type trunkport trunk allow-pass vlan 2 to 4094mode lacp-staticmax active-linknumber 2 # interface GigabitEthernet0/0/1port link-type accessport default vlan 10 # interface GigabitEthernet0/0/2eth-trunk 1 # interface GigabitEthernet0/0/3eth-trunk 1 # interface GigabitEthernet0/0/4eth-trunk 1 # interface GigabitEthernet0/0/5port link-type accessport default vlan 100 # ospf 1area 0.0.0.0network 11.0.0.0 0.0.0.255network 192.168.10.0 0.0.0.2557、LSW3
sysname sw3 # vlan batch 10 20 100 # stp region-configurationregion-name huaweirevision-level 1instance 1 vlan 10instance 2 vlan 20active region-configuration # interface Ethernet0/0/1port link-type accessport default vlan 10 # interface Ethernet0/0/2port link-type accessport default vlan 20 # interface Ethernet0/0/3port link-type accessport default vlan 10 # interface GigabitEthernet0/0/1port link-type accessport default vlan 20 # interface GigabitEthernet0/0/2port link-type accessport default vlan 10總結(jié)
題目不難,東西也不多,練練手的。
總結(jié)
以上是生活随笔為你收集整理的ensp小实验走起来(路由下发、MSTP、VRRP、DHCP、DHCP中继、NAT、链路聚合)之配置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 纳米世界内存秘密:从奇妙纳米到技术突破
- 下一篇: 玩转ddr3内存超频:三招教你轻松提升电