华为eNSP实验指南

  • 格式:doc
  • 大小:271.51 KB
  • 文档页数:64

VLAN的基础配置VLAN最基本实验,1和3属于VLAN2,相互不通;2和4属于VLAN3,可以ping通。

===================================================================== [SW1]di cu#sysname SW1#vlan batch 2 to 3#cluster enablentdp enablendp enable#drop illegal-mac alarm#diffserv domain default#drop-profile default#aaaauthentication-scheme default authorization-scheme default accounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password simple admin local-user admin service-type http#interface Vlanif1#interface MEth0/0/1#interface Ethernet0/0/1port link-type accessport default vlan 2#interface Ethernet0/0/2port link-type accessport default vlan 3#interface Ethernet0/0/3#interface Ethernet0/0/4#interface Ethernet0/0/5#interface Ethernet0/0/6##interface Ethernet0/0/8 #interface Ethernet0/0/9 #interface Ethernet0/0/10 #interface Ethernet0/0/11 #interface Ethernet0/0/12 #interface Ethernet0/0/13 #interface Ethernet0/0/14 #interface Ethernet0/0/15 #interface Ethernet0/0/16 #interface Ethernet0/0/17 #interface Ethernet0/0/18 #interface Ethernet0/0/19 #interface Ethernet0/0/20 #interface Ethernet0/0/21 #port link-type trunkport trunk allow-pass vlan 3#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface NULL0#user-interface con 0user-interface vty 0 4#Return===================================================================== [SW2]di cu#sysname SW2#vlan batch 2 to 3#cluster enablentdp enablendp enable#drop illegal-mac alarm#diffserv domain default#drop-profile default#aaaauthentication-scheme default authorization-scheme default accounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password simple admin local-user admin service-type http#interface Vlanif1#interface MEth0/0/1#interface Ethernet0/0/1port link-type accessport default vlan 2#interface Ethernet0/0/2port link-type accessport default vlan 3#interface Ethernet0/0/3#interface Ethernet0/0/4#interface Ethernet0/0/5#interface Ethernet0/0/6##interface Ethernet0/0/8 #interface Ethernet0/0/9 #interface Ethernet0/0/10 #interface Ethernet0/0/11 #interface Ethernet0/0/12 #interface Ethernet0/0/13 #interface Ethernet0/0/14 #interface Ethernet0/0/15 #interface Ethernet0/0/16 #interface Ethernet0/0/17 #interface Ethernet0/0/18 #interface Ethernet0/0/19 #interface Ethernet0/0/20 #interface Ethernet0/0/21 #port link-type trunkport trunk allow-pass vlan 3#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface NULL0#user-interface con 0user-interface vty 0 4#port-group link-type#returnVLAN间路由注:在pc1和pc2上面配置好ip地址和网关===================================================================== [SW1]di cu#sysname SW1#vlan batch 2 to 3#cluster enablentdp enablendp enable#drop illegal-mac alarm#diffserv domain default#drop-profile default#aaaauthentication-scheme default authorization-scheme default accounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password simple admin local-user admin service-type http#interface Vlanif1#interface Vlanif2ip address 192.168.2.254 255.255.255.0 #interface Vlanif3ip address 192.168.3.254 255.255.255.0 #interface MEth0/0/1#interface Ethernet0/0/1port link-type accessport default vlan 2#interface Ethernet0/0/2port link-type accessport default vlan 3#interface Ethernet0/0/3#interface Ethernet0/0/4#interface Ethernet0/0/5#interface Ethernet0/0/6#interface Ethernet0/0/7#interface Ethernet0/0/8#interface Ethernet0/0/9#interface Ethernet0/0/10#interface Ethernet0/0/11#interface Ethernet0/0/12#interface Ethernet0/0/13#interface Ethernet0/0/14#interface Ethernet0/0/15#interface Ethernet0/0/16#interface Ethernet0/0/17#interface Ethernet0/0/18#interface Ethernet0/0/19#interface Ethernet0/0/20#interface Ethernet0/0/21#interface Ethernet0/0/22#interface GigabitEthernet0/0/1 #interface GigabitEthernet0/0/2 #interface NULL0#user-interface con 0user-interface vty 0 4#return===================================================================== [R1]di cu#sysname R1#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0#interface Ethernet0/0/0.1vlan-type dot1q 2ip address 192.168.2.254 255.255.255.0 #interface Ethernet0/0/0.3vlan-type dot1q 3ip address 192.168.3.254 255.255.255.0 #interface Ethernet0/0/1#interface Serial0/0/0link-protocol ppp#interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#user-interface con 0user-interface vty 0 4user-interface vty 16 20#return===================================================================== [SW1]di cu#sysname SW1#vlan batch 2 to 3#cluster enablentdp enablendp enable#drop illegal-mac alarm#diffserv domain default#drop-profile default#aaaauthentication-scheme defaultauthorization-scheme default accounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password simple admin local-user admin service-type http#interface Vlanif1#interface MEth0/0/1#interface Ethernet0/0/1port link-type accessport default vlan 2#interface Ethernet0/0/2port link-type accessport default vlan 3#interface Ethernet0/0/3#interface Ethernet0/0/4#interface Ethernet0/0/5#interface Ethernet0/0/6#interface Ethernet0/0/7#interface Ethernet0/0/8#interface Ethernet0/0/9#interface Ethernet0/0/10#interface Ethernet0/0/11#interface Ethernet0/0/12#interface Ethernet0/0/13#interface Ethernet0/0/14#interface Ethernet0/0/15#interface Ethernet0/0/16#interface Ethernet0/0/17#interface Ethernet0/0/18#interface Ethernet0/0/19#interface Ethernet0/0/20#interface Ethernet0/0/21port link-type trunkport trunk allow-pass vlan 2 to 4094 #interface Ethernet0/0/22port link-type trunkport trunk allow-pass vlan 2 to 4094#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface NULL0#user-interface con 0user-interface vty 0 4#return===================================================================== [SW2]di cu#sysname SW2#vlan batch 3#cluster enablentdp enablendp enable#drop illegal-mac alarm#diffserv domain default#drop-profile default#authentication-scheme default authorization-scheme default accounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password simple admin local-user admin service-type http#interface Vlanif1#interface MEth0/0/1#interface Ethernet0/0/1port link-type accessport default vlan 3#interface Ethernet0/0/2#interface Ethernet0/0/3#interface Ethernet0/0/4#interface Ethernet0/0/5#interface Ethernet0/0/6#interface Ethernet0/0/7#interface Ethernet0/0/8interface Ethernet0/0/9#interface Ethernet0/0/10#interface Ethernet0/0/11#interface Ethernet0/0/12#interface Ethernet0/0/13#interface Ethernet0/0/14#interface Ethernet0/0/15#interface Ethernet0/0/16#interface Ethernet0/0/17#interface Ethernet0/0/18#interface Ethernet0/0/19#interface Ethernet0/0/20#interface Ethernet0/0/21#interface Ethernet0/0/22port link-type trunkport trunk allow-pass vlan 2 to 4094interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface NULL0#user-interface con 0user-interface vty 0 4#return静态路由===================================================================== [R1]di cu#sysname R1#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http #firewall zone Localpriority 16#interface Ethernet0/0/0ip address 12.1.1.1 255.255.255.0 #interface Ethernet0/0/1#interface Serial0/0/0link-protocol ppp#interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3##interface NULL0#interface LoopBack0#ip route-static 23.1.1.0 255.255.255.0 12.1.1.2#user-interface con 0user-interface vty 0 4user-interface vty 16 20#Return===================================================================== [R2]di cu#sysname R2#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16interface Ethernet0/0/0ip address 12.1.1.2 255.255.255.0 #interface Ethernet0/0/1ip address 23.1.1.1 255.255.255.0 #interface Serial0/0/0link-protocol ppp#interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0user-interface con 0user-interface vty 0 4user-interface vty 16 20#return===================================================================== [R3]di cu#sysname R3#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0ip address 23.1.1.2 255.255.255.0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol ppp#interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#ip route-static 12.1.1.0 255.255.255.0 23.1.1.1 #user-interface con 0user-interface vty 0 4user-interface vty 16 20#returnRIP===================================================================== [R1]di cu#sysname R1#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0ip address 192.168.1.254 255.255.255.0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol pppip address 12.1.1.1 255.255.255.0 #interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#rip 1undo summaryversion 2network 12.0.0.0network 192.168.1.0#user-interface con 0user-interface vty 0 4user-interface vty 16 20#return===================================================================== [R2]di cu#sysname R2#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0ip address 192.168.2.254 255.255.255.0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol pppip address 12.1.1.2 255.255.255.0 #interface Serial0/0/1link-protocol pppip address 23.1.1.1 255.255.255.0 #interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#rip 1undo summaryversion 2network 23.0.0.0network 12.0.0.0network 192.168.2.0#user-interface con 0user-interface vty 0 4user-interface vty 16 20===================================================================== [R3]di cu#sysname R3#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0ip address 192.168.3.254 255.255.255.0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol pppip address 23.1.1.2 255.255.255.0 #interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#rip 1undo summaryversion 2network 23.0.0.0network 192.168.3.0#user-interface con 0user-interface vty 0 4user-interface vty 16 20#ReturnOSPF基本的ospf配置====================================================================== [R1]di cu#sysname R1#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol pppip address 12.1.1.1 255.255.255.0 #interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0interface LoopBack0ip address 1.1.1.1 255.255.255.0#ospf 100 router-id 1.1.1.1area 0.0.0.1network 12.1.1.0 0.0.0.255network 1.1.1.0 0.0.0.255#user-interface con 0user-interface vty 0 4user-interface vty 16 20#return====================================================================== [R2]di cu#sysname R2#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16interface Ethernet0/0/0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol pppip address 12.1.1.2 255.255.255.0 #interface Serial0/0/1link-protocol pppip address 23.1.1.1 255.255.255.0 #interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0interface LoopBack0ip address 2.2.2.2 255.255.255.0#ospf 100 router-id 2.2.2.2area 0.0.0.1network 12.1.1.0 0.0.0.255network 23.1.1.0 0.0.0.255network 2.2.2.0 0.0.0.255#user-interface con 0user-interface vty 0 4user-interface vty 16 20#return====================================================================== [R3]di cu#sysname R3#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol pppip address 23.1.1.2 255.255.255.0 #interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#interface LoopBack0ip address 3.3.3.3 255.255.255.0#ospf 100 router-id 3.3.3.3area 0.0.0.1network 23.1.1.0 0.0.0.255network 3.3.3.0 0.0.0.255#user-interface con 0user-interface vty 0 4user-interface vty 16 20#return多区域的OSPF======================================================================[R1]di cu#sysname R1#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw# local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol ppp#interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0ip address 123.1.1.1 255.255.255.0 #interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#interface LoopBack0ip address 1.1.1.1 255.255.255.0#interface LoopBack1ip address 1.1.2.1 255.255.255.0#interface LoopBack2ip address 1.1.3.1 255.255.255.0#interface LoopBack3ip address 1.1.4.1 255.255.255.0#ospf 100 router-id 1.1.1.1area 0.0.0.2abr-summary 1.1.0.0 255.255.248.0network 123.1.1.0 0.0.0.255network 1.1.1.0 0.0.0.255#user-interface con 0user-interface vty 0 4user-interface vty 16 20#return====================================================================== [R2]di cu#sysname R2#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol ppp#interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0ip address 123.1.1.2 255.255.255.0 #interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#interface LoopBack0ip address 2.2.2.2 255.255.255.0 #ospf 100 router-id 2.2.2.2area 0.0.0.2network 2.2.2.0 0.0.0.255network 123.1.1.0 0.0.0.255#user-interface con 0user-interface vty 0 4user-interface vty 16 20#Return====================================================================== [R3]di cu#sysname R3#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol pppip address 34.1.1.3 255.255.255.0 #interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0ip address 123.1.1.3 255.255.255.0 #interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#interface LoopBack0ip address 3.3.3.3 255.255.255.0 #ospf 100 router-id 3.3.3.3area 0.0.0.0network 34.1.1.0 0.0.0.255area 0.0.0.2network 3.3.3.0 0.0.0.255network 123.1.1.0 0.0.0.255#user-interface con 0user-interface vty 0 4user-interface vty 16 20#return====================================================================== [R4]di cu#sysname R4#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol pppip address 34.1.1.4 255.255.255.0 #interface Serial0/0/1link-protocol pppip address 45.1.1.4 255.255.255.0 #interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#interface LoopBack0ip address 4.4.4.4 255.255.255.0 #ospf 100 router-id 4.4.4.4area 0.0.0.0network 34.1.1.0 0.0.0.255network 4.4.4.0 0.0.0.255area 0.0.0.1network 45.1.1.0 0.0.0.255#user-interface con 0user-interface vty 0 4user-interface vty 16 20#Return====================================================================== [R5]di cu#sysname R5#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0##interface Serial0/0/0link-protocol pppip address 45.1.1.5 255.255.255.0 #interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#interface LoopBack0ip address 5.5.0.5 255.255.255.0 #ip address 5.5.1.5 255.255.255.0#interface LoopBack2ip address 5.5.2.5 255.255.255.0#ospf 100 router-id 5.5.5.5area 0.0.0.1abr-summary 5.5.0.0 255.255.252.0network 45.1.1.0 0.0.0.255network 1.1.1.0 0.0.0.255network 5.5.0.0 0.0.0.255network 5.5.1.0 0.0.0.255network 5.5.2.0 0.0.0.255#user-interface con 0user-interface vty 0 4user-interface vty 16 20#return路由重分布这里只列举了一种,其他的都大概相似,不一一列举了左边RIPv2,右边OSPF====================================================================== [R1]dis cu#sysname R1#aaaauthentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain defaultdomain default_adminlocal-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw# local-user admin service-type http#firewall zone Localpriority 16#interface Ethernet0/0/0ip address 12.1.1.1 255.255.255.0#interface Ethernet0/0/1#interface Serial0/0/0link-protocol ppp#interface Serial0/0/1link-protocol ppp#interface Serial0/0/2link-protocol ppp#interface Serial0/0/3link-protocol ppp#interface GigabitEthernet0/0/0#interface GigabitEthernet0/0/1#interface GigabitEthernet0/0/2#interface GigabitEthernet0/0/3#wlan#interface NULL0#interface LoopBack0ip address 1.1.1.1 255.255.255.0#rip 1version 2network 1.0.0.0network 12.0.0.0#user-interface con 0user-interface vty 0 4user-interface vty 16 20#Return========================================================================= [R2] dis cu#。