1、 左侧交换机 vlan 100 IP:10.10.10.1 PC: 10.10.10.2 ,vlan1 IP:192.168.1.1右侧交换机 vlan200 IP: 172.16.10.1PC:192.168.10.2 vlan1 IP :192.168.1.2学习目:两台交换机不同 vlan 端的设备通信互访。重点 端口 0/0/24 配置 trunk 口 ,并允许所有 Vlan 通过,配置静态路由左侧交换机配置:dis cur#sysname Huawei#vlan batch 100#cluster enablentdp enablendp enable#drop illegal-ma
2、c alarm#diffserv domain default#drop-profile default#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password simple adminlocal-user admin service-type http#interface Vlanif1 /启用vlan1 交换地址ip address 192.168.1.1 2
3、55.255.255.0#interface Vlanif100ip address 10.10.10.1 255.255.255.0#interface MEth0/0/1#interface GigabitEthernet0/0/1port link-type accessport default vlan 100#interface GigabitEthernet0/0/2port link-type accessport default vlan 100#interface GigabitEthernet0/0/3port link-type accessport default vl
4、an 100#interface GigabitEthernet0/0/4port link-type accessport default vlan 100#interface GigabitEthernet0/0/5port link-type accessport default vlan 100#interface GigabitEthernet0/0/6port link-type accessport default vlan 100#interface GigabitEthernet0/0/7port link-type accessport default vlan 100#i
5、nterface GigabitEthernet0/0/8port link-type accessport default vlan 100#interface GigabitEthernet0/0/9port link-type accessport default vlan 100#interface GigabitEthernet0/0/10port link-type accessport default vlan 100#interface GigabitEthernet0/0/11port link-type accessport default vlan 100#interfa
6、ce GigabitEthernet0/0/12port link-type accessport default vlan 100#interface GigabitEthernet0/0/13port link-type accessport default vlan 100#interface GigabitEthernet0/0/14port link-type accessport default vlan 100#interface GigabitEthernet0/0/15port link-type accessport default vlan 100#interface G
7、igabitEthernet0/0/16port link-type accessport default vlan 100#interface GigabitEthernet0/0/17port link-type accessport default vlan 100#interface GigabitEthernet0/0/18port link-type accessport default vlan 100#interface GigabitEthernet0/0/19port link-type accessport default vlan 100#interface Gigab
8、itEthernet0/0/20port link-type accessport default vlan 100#interface GigabitEthernet0/0/21#interface GigabitEthernet0/0/22#interface GigabitEthernet0/0/23#interface GigabitEthernet0/0/24port link-type trunkport trunk allow-pass vlan 2 to 4094#interface NULL0#ip route-static 172.16.10.0 255.255.255.0
9、 192.168.1.2#user-interface con 0user-interface vty 0 4#port-group 1-20group-member GigabitEthernet0/0/1group-member GigabitEthernet0/0/2group-member GigabitEthernet0/0/3group-member GigabitEthernet0/0/4group-member GigabitEthernet0/0/5group-member GigabitEthernet0/0/6group-member GigabitEthernet0/0
10、/7group-member GigabitEthernet0/0/8group-member GigabitEthernet0/0/9group-member GigabitEthernet0/0/10group-member GigabitEthernet0/0/11group-member GigabitEthernet0/0/12group-member GigabitEthernet0/0/13group-member GigabitEthernet0/0/14group-member GigabitEthernet0/0/15group-member GigabitEthernet
11、0/0/16group-member GigabitEthernet0/0/17group-member GigabitEthernet0/0/18group-member GigabitEthernet0/0/19group-member GigabitEthernet0/0/20#returnHuawei右侧交换机配置文件Huaweidis cur #sysname Huawei#vlan batch 200#cluster enablentdp enablendp enable#drop illegal-mac alarm#diffserv domain default#drop-pro
12、file default#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password simple adminlocal-user admin service-type http#interface Vlanif1ip address 192.168.1.2 255.255.255.0 /启用vlan1 交换地址#interface Vlanif200ip addre
13、ss 172.16.10.1 255.255.255.0#interface MEth0/0/1#interface GigabitEthernet0/0/1port link-type accessport default vlan 200#interface GigabitEthernet0/0/2port link-type accessport default vlan 200#interface GigabitEthernet0/0/3port link-type accessport default vlan 200#interface GigabitEthernet0/0/4po
14、rt link-type accessport default vlan 200#interface GigabitEthernet0/0/5port link-type accessport default vlan 200#interface GigabitEthernet0/0/6port link-type accessport default vlan 200#interface GigabitEthernet0/0/7port link-type accessport default vlan 200#interface GigabitEthernet0/0/8port link-
15、type accessport default vlan 200#interface GigabitEthernet0/0/9port link-type accessport default vlan 200#interface GigabitEthernet0/0/10port link-type accessport default vlan 200#interface GigabitEthernet0/0/11port link-type accessport default vlan 200#interface GigabitEthernet0/0/12port link-type
16、accessport default vlan 200#interface GigabitEthernet0/0/13port link-type accessport default vlan 200#interface GigabitEthernet0/0/14port link-type accessport default vlan 200#interface GigabitEthernet0/0/15port link-type accessport default vlan 200#interface GigabitEthernet0/0/16port link-type acce
17、ssport default vlan 200#interface GigabitEthernet0/0/17port link-type accessport default vlan 200#interface GigabitEthernet0/0/18port link-type accessport default vlan 200#interface GigabitEthernet0/0/19port link-type accessport default vlan 200#interface GigabitEthernet0/0/20port link-type accesspo
18、rt default vlan 200#interface GigabitEthernet0/0/21#interface GigabitEthernet0/0/22#interface GigabitEthernet0/0/23#interface GigabitEthernet0/0/24port link-type trunkport trunk allow-pass vlan 2 to 4094#interface NULL0#ip route-static 10.10.10.0 255.255.255.0 192.168.1.1#user-interface con 0user-in
19、terface vty 0 4#port-group 1-20group-member GigabitEthernet0/0/1group-member GigabitEthernet0/0/2group-member GigabitEthernet0/0/3group-member GigabitEthernet0/0/4group-member GigabitEthernet0/0/5group-member GigabitEthernet0/0/6group-member GigabitEthernet0/0/7group-member GigabitEthernet0/0/8group
20、-member GigabitEthernet0/0/9group-member GigabitEthernet0/0/10group-member GigabitEthernet0/0/11group-member GigabitEthernet0/0/12group-member GigabitEthernet0/0/13group-member GigabitEthernet0/0/14group-member GigabitEthernet0/0/15group-member GigabitEthernet0/0/16group-member GigabitEthernet0/0/17group-member GigabitEthernet0/0/18group-member GigabitEthernet0/0/19group-member GigabitEthernet0/0/20#returnHuawei