H3C路由器交换机多VLAN配置
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
[H3C]acl number 2000
[H3C-acl-basic-2000]rule 1 permit source 192.168.12.0 0.0.0.255
[H3C-acl-basic-2000]rule 2 permit source 192.168.14.0 0.0.0.255
[H3C-acl-basic-2000]rule 3 permit source 192.168.16.0 0.0.0.255
[H3C-acl-basic-2000]rule 100 deny
[H3C]dhcp server ip-pool dhcp-pool-01
[H3C-dhcp-pool-dhcp-pool-01]network 192.168.12.0 255.255.255.0 [H3C-dhcp-pool-dhcp-pool-01]gateway-list 192.168.12.1
[H3C-dhcp-pool-dhcp-pool-01]dns-list 211.139.29.170 211.139.29.150
[H3C]dhcp server ip-pool dhcp-pool-02
[H3C-dhcp-pool-dhcp-pool-02]network 192.168.14.0 24
[H3C-dhcp-pool-dhcp-pool-02]gateway-list 192.168.14.1
[H3C-dhcp-pool-dhcp-pool-02]dns-list 211.139.29.170 211.139.29.150
[H3C]dhcp server ip-pool dhcp-pool-03
[H3C-dhcp-pool-dhcp-pool-03]network 192.168.16.0 24
[H3C-dhcp-pool-dhcp-pool-03]gateway-list 192.168.16.1
[H3C-dhcp-pool-dhcp-pool-03]dns-list 211.139.29.170 211.139.29.150
[H3C]interface Ethernet 0/1.2
[H3C-Ethernet0/1.2]ip address 192.168.12.1 24
[H3C-Ethernet0/1.2]vlan-type dot1q vid 2
[H3C]interface Ethernet 0/1.4
[H3C-Ethernet0/1.4]ip address 192.168.14.1 24
[H3C-Ethernet0/1.4]vlan-type dot1q vid 4
[H3C]interface Ethernet 0/1.6
[H3C-Ethernet0/1.6]ip address 192.168.16.1 255.255.255.0
[H3C-Ethernet0/1.6]vlan-type dot1q vid 6
交换机:
[H3C]vlan 2
[H3C-vlan2]vlan 4
[H3C-vlan4]vlan 6
[H3C]interface range Ethernet 1/0/1 to Ethernet 1/0/12
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 2
[H3C-if-range]undo shutdown
[H3C]interface range Ethernet 1/0/13 to Ethernet 1/0/24
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 4
[H3C-if-range]undo shutdown
[H3C]interface range Ethernet 1/0/25 to Ethernet 1/0/36
[H3C-if-range]port link-type access
[H3C-if-range]port access vlan 6
[H3C-if-range]undo shutdown
[H3C]interfaceGigabitEthernet 1/0/50
[H3C-GigabitEthernet1/0/50]port link-type trunk
[H3C-GigabitEthernet1/0/50]port trunk permit vlan 2,4,6
[H3C-GigabitEthernet1/0/50]und shutdown
[H3C]interfaceVlan-interface 2
[H3C-Vlan-interface2]ip address 192.168.12.254 24
[H3C]dhcp-snooping
[H3C]interfaceGigabitEthernet 1/0/50
[H3C-GigabitEthernet1/0/50]dhcp-snooping trust
[H3C]local-user zhongguoyidong
[H3C-luser-zhongguoyidong]password cipher zhongguoyidong [H3C-luser-zhongguoyidong]authorization-attribute level 3
[H3C-luser-zhongguoyidong]service-type ssh telnet
[H3C]user-interface vty 0 15
[H3C-ui-vty0-15]authentication-mode scheme
[H3C]user-interface aux 0
[H3C-ui-aux0]authentication-mode password
[H3C-ui-aux0]set authentication password cipher zhongguoyidong