综合实验要求
按拓扑配置基本IP地址
内网交换机和接入层交换机配置以太网链路聚合,并使用lacp模式
所有PC.STA的网关都在核心交换机,核心交换机配置DHCP给地下PC.STA自动下发地址,基于接口下发
配置WLAN
配置PPPoE,并设置认证模式为chap认证,认证账号密码为huawei
配置NAT easy ip及ACL,让除管理部以外的部门都能访问外网设备
配置NAT server,让外网设备能够通过访问100.0.12.3地址访问内网研发部服务器FTP服务.
配置ACL,让访客中心的用户无法访问内部各个部门,只能访问外网.
要求一:配置基本IP地址
服务器配置
客户端配置
为AR1、AR2分配IP
AR1:
[R1-GigabitEthernet0/0/0]ip add 192.168.11.1 24
AR2:
[R2-GigabitEthernet0/0/1]ip add 9.9.9.254 24
//客户端网关
要求二:链路聚合
研发部
创建vlan10
配置g0/0/2和g0/0/3
port link-type access port default vlan 10
链路聚合:
创建逻辑接口
[yf-sw]interface Eth-Trunk 1
将聚合模式改为lacp
[js-sw-Eth-Trunk1]mode lacp-static
将物理接口放入
[js-sw-Eth-Trunk1]trunkport GigabitEthernet 0/0/5 to 0/0/6
配置如下
interface Eth-Trunk1 port link-type trunk port trunk allow-passvlan 10 mode lacp-static
技术部
创建vlan20
配置g0/0/2和g0/0/1
port link-type access port default vlan 20
链路聚合:
创建逻辑接口
[yf-sw]interface Eth-Trunk 2
将聚合模式改为lacp
[js-sw-Eth-Trunk2]mode lacp-static
将物理接口放入
[js-sw-Eth-Trunk2]trunkport GigabitEthernet 0/0/4 to 0/0/5
配置如下
interface Eth-Trunk2 port link-type trunk port trunk allow-pass vlan 20 mode lacp-static
管理部
创建vlan200
配置g0/0/1
port link-type access port default vlan 200
链路聚合:
创建逻辑接口
[yf-sw]interface Eth-Trunk 3
将聚合模式改为lacp
[js-sw-Eth-Trunk3]mode lacp-static
将物理接口放入
[js-sw-Eth-Trunk3]trunkport GigabitEthernet 0/0/3 to 0/0/4
配置如下
interface Eth-Trunk3 port link-type trunk port trunk allow-pass vlan 200 mode lacp-static
访客中心
全局创建vlan
[fk-sw]vlan batch 100 101
配置g0/0/1 和 g0/0/2
port link-type trunk port trunk pvid vlan 100 port trunk allow-pass vlan 100 to 101
链路聚合:
创建逻辑接口
[yf-sw]interface Eth-Trunk 4
将聚合模式改为lacp
[js-sw-Eth-Trunk2]mode lacp-static
将物理接口放入
[js-sw-Eth-Trunk2]trunkport GigabitEthernet 0/0/4 to 0/0/5
配置如下
interface Eth-Trunk4 port link-type trunk port trunk allow-pass vlan 100 101 mode lacp-static
核心交换机
tips :检查聚合链路是否正确配置:[main-sw]dis int e 4(聚合链路id)
创建vlan
[main-sw]vlan batch 10 20 200 11 101 100
链路聚合 访客及三个部门操作相同
将聚合模式改为lacp
将物理接口放入
配置如下
port link-type trunk port trunk allow-pass vlan ???
要求三:配置DHCP
tips : 访客以及三个部门的网关均在核心交换机
将PC机全部设置为DHCP
全局开启 dhcp
[main-sw]dhcp enable
分别创建三个部门逻辑接口,设置 ip 作为网关设备(4-7在核心交换机上配置)
研发部:
interface Vlanif10 ip address 192.168.1.254 255.255.255.0 dhcp select interface
技术部:
interface Vlanif20 ip address 192.168.2.254 255.255.255.0 dhcp select interface
管理部:
interface Vlanif200 ip address 192.168.200.254 255.255.255.0 dhcp select interface
访客中心 (暂时没有定义业务vlan,所以设置了不会生效,暂定业务vlan为101,这里是为连接wlan的设备配置dhcp)
interface Vlanif101 ip address 192.168.101.254 255.255.255.0 dhcp select interface
访客中心管理业务(在AC1上配置)
创建vlan101 100
配置物理接口
interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 to 101
创建逻辑接口 vlanif100 , 配置如下
interface Vlanif100 ip address 192.168.100.254 255.255.255.0 dhcp select interface
配置核心交换机物理接口g0/0/1
interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 to 101
在ap上使用
[Huawei]display ip interface brief
查看ip是否获取成功,若ip为169.xxx则获取失败
使用ipconfig检查是否配置正确
要求四:配置wlan
上线ap
配置 capwap 隧道建立连接
[AC6005]capwap source interface Vlanif 100
进入wlan视图
配置国家码
[AC6005-wlan-view]regulatory-domain-profile name huawei
创建domain模版[AC6005-wlan-regulate-domain-huawei]country-code CN
配置国家码
设置ap组
ap-group name huawei
创建并进入 huawei ap组[AC6005-wlan-ap-group-huawei]regulatory-domain-profile huawei
绑定domain模版
连接ap
在wlan视图下
使用
ap-id 1 ap-mac 00e0-fcad-01b0
上线对应apap-max的获取方式 在对应ap下 使用
[Huawei]dis int v1
获取配置ap
ap-name AP1 ap-group huawei
在对应ap cli中出现 ===== CAPWAP LINK IS UP!!! ===== 则表示上线成功
配置wlan
配置ssid
创建ssid模版
[AC6005-wlan-view]ssid-profile name huawei
设置ssid
[AC6005-wlan-ssid-prof-huawei]ssid huawei
配置安全模版
创建安全模版
[AC6005-wlan-view]security-profile name huawei
设置模版
[AC6005-wlan-sec-prof-huawei]security wpa-wpa2 psk pass-phrase 12345678 aes
配置vap模版
创建vap模版
[AC6005-wlan-view]vap-profile name huawei
\设置模版
service-vlan vlan-id 101 ssid-profile huawei security-profile huawei
在wlan视图中输入
[AC6005-wlan-view]ap-group name huawei
进入ap组绑定 vap 模版
[AC6005-wlan-ap-group-huawei]vap-profile huawei wlan 1 radio all
测试
sta设备是否能够通过设置的密码连接对应wlan
测试设备是否可以ping通网关
要求五:配置pppoe
在公网路由器创建aaa账户
local-user huawei password cipher %$%$N~Iu%~TspN"S1}YZ3ngIMtf[%$%$ local-user huawei service-type ppp
在公网路由器设置
interface Virtual-Template1 ppp authentication-mode chap remote address 10.0.1.1 ip address 10.0.1.2 255.255.255.0
在物理接口配置
[R2-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1
在私网路由器设置
interface Dialer1
link-protocol ppp ppp chap user huawei ppp chap password cipher ??? ip address ppp-negotiate dialer user huawei dialer bundle 1 dialer-group 1 nat outbound 2000
在物理接口配置
[R1-GigabitEthernet0/0/1]pppoe-client dial-bundle-number 1
配置dialer1 规则 输入
dialer-rule
配置dialer-rule 1 ip permit
要求六:除管理部门都能访问外网
配置核心交换机
创建vlanif11逻辑接口
interface Vlanif11 ip address 192.168.11.1 255.255.255.0
配置上行接口
interface GigabitEthernet0/0/2 port link-type access port default vlan 11
配置私网路由器
配置下行接口
[R1-GigabitEthernet0/0/0]ip address 192.168.11.2 24
配置acl 2000 规则 达到要求
配置静态路由
在私网路由器新建静态路由
ip route-static 0.0.0.0 0.0.0.0 Dialer1 ip route-static 192.168.1.0 255.255.255.0 192.168.11.1 ip route-static 192.168.2.0 255.255.255.0 192.168.11.1 ip route-static 192.168.101.0 255.255.255.0 192.168.11.1
要求七:客户端通过公网地址访问服务器
在私网路由器连接公网的逻辑接口配置 nat server protocol tcp global 100.0.12.3 ftp inside 192.168.1.1 ftp
重启服务器,客户端配置如下
要求八:配置ACL
创建acl3000,因为涉及到源目地址
配置acl3000
acl number 3000 rule 5 deny ip source 192.168.101.0 0.0.0.255 destination 192.168.1.0 0.0.0.255 rule 10 deny ip source 192.168.101.0 0.0.0.255 destination 192.168.2.0 0.0.0.255 rule 15 deny ip source 192.168.101.0 0.0.0.255 destination 192.168.200.0 0.0.0.255
在逻辑接口上应用acl
[main-sw-Eth-Trunk4]traffic-filter inbound acl 3000