華為交換機(jī)AR18-22-8配置命令
華為做為網(wǎng)絡(luò)產(chǎn)品的著名廠商,一直享有很高的盛譽(yù)。AR 18-22-8路由器是華為3Com公司開發(fā)的新一代專業(yè)的寬帶路由器,它將路由和交換設(shè)備有機(jī)地結(jié)合在一起,為中小企業(yè)和網(wǎng)吧提供交換及接入的一體化解決方案。下面一起來看看這臺機(jī)器的配置命令吧!
一、vlan配置
1、vlan劃分方案
-------------------------------------------------- ------------------
| 部門 | vlan名 | ip地址 | 端口分配 |
-------------------------------------------------- ------------------
| J室 | vlan10 | 192.168.10.1/24 | ethernet 3/1 |
| K室 | vlan20 | 192.168.20.1/24 | ethernet 3/2 |
| C室 | vlan30 | 192.168.30.1/24 | ethernet 3/3 |
| Server | vlan40 | 192.168.0.1/24 | ethernet 3/{4,5,6} |
-------------------------------------------------- ------------------
2、顯示vlan信息的命令
顯示指定VLAN 的相關(guān)信息。display vlan vid
顯示指定VLAN 配置的最大處理報(bào)文數(shù)目。display vlan max-packet-process vid
顯式指定VLAN 的報(bào)文統(tǒng)計(jì)信息,包括接收和發(fā)送的報(bào)文數(shù)目。display vlan statistics vid vid
顯示某個接口的VLAN 配置信息。display vlan interface interface-type interface-num
清除指定VLAN 的'報(bào)文統(tǒng)計(jì)信息。reset vlan statistics vid vid
3、配置物理端口
配置路由器,進(jìn)入Ethernet 端口視圖,指定端口的鏈路類型,把端口加入到指定vlan中,注意access端口加入的vlan不能是vlan1。
# 配置Ethernet3/1
H3C interface ethernet 3/1 進(jìn)入端口1
H3C-Ethernet3/1 port link-type access 設(shè)置端口類型為access
H3C-Ethernet3/1 port access vlan 10 把該端口加到vlan10中
H3C-Ethernet3/1 quit
# 配置Ethernet3/2
H3C interface ethernet 3/2
H3C-Ethernet3/2 port link-type access
H3C-Ethernet3/2 port access vlan 20
H3C-Ethernet3/2 quit
# 配置Ethernet3/3
H3C interface ethernet 3/3
H3C-Ethernet3/3 port link-type access
H3C-Ethernet3/3 port access vlan 30
H3C-Ethernet3/3 quit
# 配置Ethernet3/4
H3C interface ethernet 3/4
H3C-Ethernet3/4 port link-type access
H3C-Ethernet3/4 port access vlan 40
H3C-Ethernet3/4 quit
# 配置Ethernet3/5
H3C interface ethernet 3/5
H3C-Ethernet3/5 port link-type access
H3C-Ethernet3/5 port access vlan 40
H3C-Ethernet3/5 quit
# 配置Ethernet3/6
H3C interface ethernet 3/6
H3C-Ethernet3/6 port link-type access
H3C-Ethernet3/6 port access vlan 40
H3C-Ethernet3/6 quit
4、配置虛擬端口
VLAN之間要實(shí)現(xiàn)互通,需要配置相應(yīng)的以太網(wǎng)子接口,即VLAN 對應(yīng)的路由接口,創(chuàng)建并進(jìn)入相應(yīng)的子接口視圖,為其配置相應(yīng)的封裝協(xié)議和關(guān)聯(lián)的VLAN ID,及IP 地址和掩碼,ethernet 3/0 是三層虛擬端口。
# 配置Ethernet 3/0.1
H3C interface ethernet 3/0.1 創(chuàng)建并進(jìn)入子接口
H3C-Ethernet3/0.1 vlan-type dot1q vid 10 設(shè)置以太網(wǎng)子接口的封裝類型以及相關(guān)聯(lián)的VLAN ID
H3C-Ethernet3/0.1 ip address 192.168.10.1 255.255.255.0
H3C-Ethernet3/0.1 quit
# 配置Ethernet 3/0.2
H3C interface ethernet 3/0.2
H3C-Ethernet3/0.2 vlan-type dot1q vid 20
H3C-Ethernet3/0.2 ip address 192.168.20.1 255.255.255.0
H3C-Ethernet3/0.2 quit
# 配置Ethernet 3/0.3
H3C interface ethernet 3/0.3
H3C-Ethernet3/0.3 vlan-type dot1q vid 30
H3C-Ethernet3/0.3 ip address 192.168.30.1 255.255.255.0
H3C-Ethernet3/0.3 quit
# 配置Ethernet 3/0.4
H3C interface ethernet 3/0.4
H3C-Ethernet3/0.4 vlan-type dot1q vid 40
H3C-Ethernet3/0.4 ip address 192.168.0.1 255.255.255.0
H3C-Ethernet3/0.4 quit
二、DHCP服務(wù)器配置
1、檢測DHCP服務(wù)器
display dhcp server ip-in-use 查看地址池動態(tài)地址綁定信息
display dhcp server conflict 查看DHCP地址沖突的統(tǒng)計(jì)信息
display dhcp server statistics 查看DHCP服務(wù)器的統(tǒng)計(jì)信息
display dhcp servertree 查看DHCP地址池結(jié)構(gòu)
2、具體配置
#公共配置(server和relay都適用)
H3C dhcp enable 使能DHCP服務(wù)
H3C dhcp server detect 使能偽DHCP服務(wù)器檢測功能
#全局地址池配置
H3C dhcp select global interface ethernet 3/0.1 to ethernet 3/0.4 配置接口工作在DHCP Server模式,從全局地址池分配地址
H3C dhcp server ip-pool vlan10 創(chuàng)建全局地址池vlan10(最多支持128個全局地址池/路由器)
H3C-ip-pool network 192.168.10.0 mask 255.255.255.0 配置動態(tài)分配的IP地址范圍(只可配置1個/地址池)
H3C-ip-pool expired day 7 hour 23 minute 59 配置租約
H3C-ip-pool domain-name pearl.cn 配置域名
H3C-ip-pool dns-list ip-address 192.168.0.6 202.106.0.20 202.106.196.115 配置DNS(最多8個/地址池)
H3C-ip-pool gateway-list ip-address 192.168.10.1 配置默認(rèn)網(wǎng)關(guān)(最多8個/地址池)
H3C dhcp server forbidden-ip 192.168.10.1 192.168.10.10 配置保留IP地址范圍(可配置多個/地址池)
H3C dhcp server relay information enable 使能DHCP Server支持option 82
#接口地址池配置
H3C dhcp select interface interface ethernet 3/0.1 to ethernet 3/0.4 (指虛擬接口還是指物理接口???)
配置多個接口工作在DHCP Server模式,從接口地址池分配地址,同時自動創(chuàng)建“接口地址池”
H3C dhcp server expired day 7 hour 23 minute 59 interface ethernet 3/0.1 to ethernet 3/0.4
H3C dhcp server domain-name pearl.cn interface ethernet 3/0.1 to ethernet 3/0.4
H3C dhcp server dns-list ip-address 192.168.0.6 202.106.0.20 202.106.196.115 interface ethernet 3/0.1 to ethernet 3/0.4
H3C interface ethernet 3/0.1
H3C-interface gateway-list ip-address 192.168.10.1
H3C dhcp server forbidden-ip 192.168.10.1 192.168.10.10 (是否接口模式下配??)
H3C dhcp server relay information enable
三、NAT配置
#配置地址池和訪問控制列表:
H3C nat address-group 1 222.128.28.172 222.128.28.174
H3C acl number 2001
H3C-acl-basic-2001rule permit source 192.168.0.0 0.0.0.255
#允許192.168.0.0/24網(wǎng)段地址轉(zhuǎn)換(ethernet3/0指路由器wan口):
H3C interface ethernet3/0
H3C-ethernet3/0 nat outbound 2001 address-group 1
#設(shè)置內(nèi)部FTP服務(wù)器:
H3C-ethernet3/0 nat server protocol tcp global 222.128.28.171 inside 192.168.0.8 ftp
#設(shè)置內(nèi)部www服務(wù)器1:
H3C-ethernet3/0 nat server protocol tcp global 222.128.28.171 inside 192.168.0.9 www
#設(shè)置內(nèi)部www服務(wù)器2:
H3C-ethernet3/0 nat server protocol tcp global 222.128.28.171 8080 inside 192.168.0.10 www
【華為交換機(jī)AR18-22-8配置命令】相關(guān)文章: