首页 > 代码库 > CCNA 综合实验

CCNA 综合实验

技术分享

R1:
HQ#sh run
Building configuration...

Current configuration : 2433 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname HQ
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$Y6K/$lir0fGeg6iG58JyQ7A0lP.
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
ip cef
no ip domain lookup
no ip dhcp use vrf connected
ip dhcp excluded-address 10.1.10.1 10.1.10.99
ip dhcp excluded-address 10.1.20.1 10.1.20.99
!
ip dhcp pool VLAN10
   network 10.1.10.0 255.255.255.0
   default-router 10.1.10.254
   dns-server 8.8.8.8
!
ip dhcp pool VLAN20
   network 10.1.20.0 255.255.255.0
   default-router 10.1.20.254
   dns-server 8.8.8.8
!
username PC2 password 0 cisco
!
bba-group pppoe Cisco
 virtual-template 1
!
!
interface Loopback0
 ip address 172.16.1.1 255.255.255.0
!
interface Ethernet0/0
 no ip address
 half-duplex
!         
interface Ethernet0/1
 no ip address
 half-duplex
 pppoe enable group Cisco
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
interface FastEthernet1/0
!
interface FastEthernet1/1
!
interface FastEthernet1/2
!
interface FastEthernet1/3
!         
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Serial2/0
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/3
 no ip address
 shutdown
 serial restart-delay 0
!
interface Virtual-Template1
 ip address 192.168.1.2 255.255.255.0
 peer default ip address pool Ender
 ppp authentication chap
!
interface Vlan1
 no ip address
!
ip local pool Ender 192.168.1.1
no ip http server
no ip http secure-server
!
!
!
access-list 1 permit 10.1.10.100
access-list 1 permit 10.1.20.100
no cdp log mismatch duplex
!
!
!
control-plane
!
!
!
!         
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 access-class 1 in
 login local
!
!
end


R2:

Branch#sh ip n
*Mar  1 04:55:34.362: %SYS-5-CONFIG_I: Configured from console by console
Branch#sh ip nat tr
Branch#sh ip nat translations
Pro Inside global      Inside local       Outside local      Outside global
tcp 192.168.1.1:23     10.1.20.100:23     192.168.1.2:18695  192.168.1.2:18695
--- 192.168.1.1        10.1.20.100        ---                ---
Branch#
Branch#
Branch#
Branch#sh run
Building configuration...

Current configuration : 2528 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Branch
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$KcbH$slizQI6tuxAGXQ4cGl2ex/
enable password zhang
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
ip cef
no ip domain lookup
!         
!         
!         
!
!
!
!
!
!
!
!
!
!
!
!
!
!
username branch password 0 cisco
!
!
!
!
!
!
interface Ethernet0/0
 no ip address
 half-duplex
!
interface Ethernet0/0.10
 encapsulation dot1Q 10
 ip address 10.1.10.254 255.255.255.0
 ip helper-address 172.16.1.1
 ip nat inside
 ip virtual-reassembly
!
interface Ethernet0/0.20
 encapsulation dot1Q 20
 ip address 10.1.20.254 255.255.255.0
 ip helper-address 172.16.1.1
 ip nat inside
 ip virtual-reassembly
!
interface Ethernet0/1
 no ip address
 half-duplex
 pppoe enable group global
 pppoe-client dial-pool-number 1
!
interface Ethernet0/2
 no ip address
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
interface FastEthernet1/0
!
interface FastEthernet1/1
!
interface FastEthernet1/2
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!         
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Serial2/0
 no ip address
 shutdown
 serial restart-delay 0
!         
interface Serial2/1
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial2/3
 no ip address
 shutdown
 serial restart-delay 0
!
interface Vlan1
 no ip address
!
interface Dialer1
 mtu 1492
 ip address negotiated
 ip nat outside
 ip virtual-reassembly
 encapsulation ppp
 dialer pool 1
 ppp chap hostname PC2
 ppp chap password 0 cisco
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 Dialer1
!
!
ip nat inside source list 10 interface Dialer1 overload
ip nat inside source static 10.1.20.100 192.168.1.1
!
access-list 10 permit 10.1.20.0 0.0.0.255
access-list 10 permit 10.1.10.0 0.0.0.255
no cdp log mismatch duplex
!
!
!
control-plane
!
!
!         
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 password cisco
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end


R3:

PC1#sh run
Building configuration...

Current configuration : 1897 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PC1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$CbKj$FXp.bX34xG.QA5dfJuF9l0
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
no ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!         
interface Ethernet0/0
 ip address dhcp
 no ip route-cache
 half-duplex
!
interface Ethernet0/1
 ip address dhcp
 no ip route-cache
 half-duplex
!
interface Ethernet0/2
 no ip address
 no ip route-cache
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 no ip route-cache
 shutdown
 half-duplex
!
interface FastEthernet1/0
!
interface FastEthernet1/1
 shutdown
!
interface FastEthernet1/2
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Serial2/0
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Serial2/1
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Serial2/2
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Serial2/3
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Vlan1
 no ip address
 no ip route-cache
!
no ip http server
no ip http secure-server
!
!
!
no cdp log mismatch duplex
!
!
!         
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 password cisco
 login
!         
!
end


R4:


PC2#sh run
Building configuration...

Current configuration : 1895 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PC2
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$oQKK$zahYrRDP3azvF8lWXddy9.
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
no ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!         
interface Ethernet0/0
 ip address dhcp
 no ip route-cache
 half-duplex
!
interface Ethernet0/1
 no ip address
 no ip route-cache
 shutdown
 half-duplex
!
interface Ethernet0/2
 no ip address
 no ip route-cache
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 no ip route-cache
 shutdown
 half-duplex
!         
interface FastEthernet1/0
!
interface FastEthernet1/1
!
interface FastEthernet1/2
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Serial2/0
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Serial2/1
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Serial2/2
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Serial2/3
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Vlan1
 no ip address
 no ip route-cache
!
no ip http server
no ip http secure-server
!
!
!
no cdp log mismatch duplex
!
!
!         
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 password cisco
 login
!         
!
end


R5:


PC3#sh run
Building configuration...

Current configuration : 1832 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname PC3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
no ip cef
no ip domain lookup
!         
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
 ip address dhcp
 no ip route-cache
 half-duplex
!
interface Ethernet0/1
 no ip address
 no ip route-cache
 shutdown
 half-duplex
!
interface Ethernet0/2
 no ip address
 no ip route-cache
 shutdown
 half-duplex
!
interface Ethernet0/3
 no ip address
 no ip route-cache
 shutdown
 half-duplex
!
interface FastEthernet1/0
!
interface FastEthernet1/1
!
interface FastEthernet1/2
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!         
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Serial2/0
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Serial2/1
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Serial2/2
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Serial2/3
 no ip address
 no ip route-cache
 shutdown
 serial restart-delay 0
!
interface Vlan1
 no ip address
 no ip route-cache
!
no ip http server
no ip http secure-server
!
!
!
no cdp log mismatch duplex
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end


SW1:

SW1#sh run
Building configuration...

Current configuration : 3147 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no service dhcp
!
hostname SW1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
no ip cef
!
!
!
!         
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!         
!
!
macro name add_vlan
end
vlan database
vlan $v
exit
@
macro name del_vlan
end
vlan database
no vlan $v
exit
@
!
vtp file nvram:vlan.dat
archive
 log config
  hidekeys
!
!
!
!         
ip tcp synwait-time 5
!
!
!
!
interface Port-channel1
 switchport mode trunk
!
interface FastEthernet0/0
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 duplex full
 speed 100
!
interface FastEthernet1/1
 switchport access vlan 10
 duplex full
 speed 100
 spanning-tree portfast
!
interface FastEthernet1/2
 duplex full
 speed 100
!
interface FastEthernet1/3
 switchport mode trunk
 duplex full
 speed 100
 channel-group 1 mode on
!
interface FastEthernet1/4
 switchport mode trunk
 duplex full
 speed 100
 channel-group 1 mode on
!
interface FastEthernet1/5
 duplex full
 speed 100
!
interface FastEthernet1/6
 duplex full
 speed 100
!
interface FastEthernet1/7
 duplex full
 speed 100
!
interface FastEthernet1/8
 duplex full
 speed 100
!
interface FastEthernet1/9
 duplex full
 speed 100
!
interface FastEthernet1/10
 duplex full
 speed 100
!
interface FastEthernet1/11
 duplex full
 speed 100
!
interface FastEthernet1/12
 duplex full
 speed 100
!
interface FastEthernet1/13
 switchport mode trunk
 duplex full
 speed 100
!
interface FastEthernet1/14
 duplex full
 speed 100
!
interface FastEthernet1/15
 duplex full
 speed 100
!
interface Vlan1
 no ip address
 no ip route-cache
 shutdown
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
!
!
!
control-plane
!         
!
!
!
!
!
!
!
!
banner exec ^C

***************************************************************
This is a normal Router with a Switch module inside (NM-16ESW)
It has been pre-configured with hard-coded speed and duplex

To create vlans use the command "vlan database" in exec mode
After creating all desired vlans use "exit" to apply the config

To view existing vlans use the command "show vlan-switch brief"

Alias(exec)     : vl   - "show vlan-switch brief" command
Alias(configure): va X - macro to add vlan X
Alias(configure): vd X - macro to delete vlan X
***************************************************************

^C
alias configure va macro global trace add_vlan $v
alias configure vd macro global trace del_vlan $v
alias exec vl show vlan-switch brief
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end


SW2:


SW2(config)#do sh run
Building configuration...

Current configuration : 3124 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no service dhcp
!
hostname SW2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
no ip cef
!
!
!
!         
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!         
!
!
macro name add_vlan
end
vlan database
vlan $v
exit
@
macro name del_vlan
end
vlan database
no vlan $v
exit
@
!
vtp file nvram:vlan.dat
archive
 log config
  hidekeys
!
!
!
!         
ip tcp synwait-time 5
!
!
!
!
interface Port-channel1
 switchport mode trunk
!
interface FastEthernet0/0
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 duplex full
 speed 100
!
interface FastEthernet1/1
 switchport access vlan 20
 duplex full
 speed 100
 spanning-tree portfast
!
interface FastEthernet1/2
 duplex full
 speed 100
!
interface FastEthernet1/3
 switchport mode trunk
 duplex full
 speed 100
 channel-group 1 mode on
!
interface FastEthernet1/4
 switchport mode trunk
          
SW2(config)#end   
SW2#sh run
Building configuration...

*Mar  1 05:22:50.106: %SYS-5-CONFIG_I: Configured from console by console
Current configuration : 3124 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no service dhcp
!
hostname SW2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
no ip cef
!
!
!
!         
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!         
!
!
macro name add_vlan
end
vlan database
vlan $v
exit
@
macro name del_vlan
end
vlan database
no vlan $v
exit
@
!
vtp file nvram:vlan.dat
archive
 log config
  hidekeys
!
!
!
!         
ip tcp synwait-time 5
!
!
!
!
interface Port-channel1
 switchport mode trunk
!
interface FastEthernet0/0
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 duplex full
 speed 100
!
interface FastEthernet1/1
 switchport access vlan 20
 duplex full
 speed 100
 spanning-tree portfast
!
interface FastEthernet1/2
 duplex full
 speed 100
!
interface FastEthernet1/3
 switchport mode trunk
 duplex full
 speed 100
 channel-group 1 mode on
!
interface FastEthernet1/4
 switchport mode trunk
 duplex full
 speed 100
 channel-group 1 mode on
!
interface FastEthernet1/5
 duplex full
 speed 100
!
interface FastEthernet1/6
 duplex full
 speed 100
!
interface FastEthernet1/7
 duplex full
 speed 100
!
interface FastEthernet1/8
 duplex full
 speed 100
!
interface FastEthernet1/9
 duplex full
 speed 100
!
interface FastEthernet1/10
 duplex full
 speed 100
!
interface FastEthernet1/11
 duplex full
 speed 100
!
interface FastEthernet1/12
 duplex full
 speed 100
!
interface FastEthernet1/13
 duplex full
 speed 100
!
interface FastEthernet1/14
 duplex full
 speed 100
!
interface FastEthernet1/15
 duplex full
 speed 100
!
interface Vlan1
 no ip address
 no ip route-cache
 shutdown
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
!
!
!
control-plane
!
!         
!
!
!
!
!
!
!
banner exec ^C

***************************************************************
This is a normal Router with a Switch module inside (NM-16ESW)
It has been pre-configured with hard-coded speed and duplex

To create vlans use the command "vlan database" in exec mode
After creating all desired vlans use "exit" to apply the config

To view existing vlans use the command "show vlan-switch brief"

Alias(exec)     : vl   - "show vlan-switch brief" command
Alias(configure): va X - macro to add vlan X
Alias(configure): vd X - macro to delete vlan X
***************************************************************
          
^C
alias configure va macro global trace add_vlan $v
alias configure vd macro global trace del_vlan $v
alias exec vl show vlan-switch brief
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
endSW2(config)#do sh run
Building configuration...

Current configuration : 3124 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no service dhcp
!
hostname SW2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
no ip cef
!
!
!
!         
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!         
!
!
macro name add_vlan
end
vlan database
vlan $v
exit
@
macro name del_vlan
end
vlan database
no vlan $v
exit
@
!
vtp file nvram:vlan.dat
archive
 log config
  hidekeys
!
!
!
!         
ip tcp synwait-time 5
!
!
!
!
interface Port-channel1
 switchport mode trunk
!
interface FastEthernet0/0
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 duplex full
 speed 100
!
interface FastEthernet1/1
 switchport access vlan 20
 duplex full
 speed 100
 spanning-tree portfast
!
interface FastEthernet1/2
 duplex full
 speed 100
!
interface FastEthernet1/3
 switchport mode trunk
 duplex full
 speed 100
 channel-group 1 mode on
!
interface FastEthernet1/4
 switchport mode trunk
          
SW2(config)#end   
SW2#sh run
Building configuration...

*Mar  1 05:22:50.106: %SYS-5-CONFIG_I: Configured from console by console
Current configuration : 3124 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no service dhcp
!
hostname SW2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
no ip icmp rate-limit unreachable
no ip cef
!
!
!
!         
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!         
!
!
macro name add_vlan
end
vlan database
vlan $v
exit
@
macro name del_vlan
end
vlan database
no vlan $v
exit
@
!
vtp file nvram:vlan.dat
archive
 log config
  hidekeys
!
!
!
!         
ip tcp synwait-time 5
!
!
!
!
interface Port-channel1
 switchport mode trunk
!
interface FastEthernet0/0
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description *** Unused for Layer2 EtherSwitch ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 duplex full
 speed 100
!
interface FastEthernet1/1
 switchport access vlan 20
 duplex full
 speed 100
 spanning-tree portfast
!
interface FastEthernet1/2
 duplex full
 speed 100
!
interface FastEthernet1/3
 switchport mode trunk
 duplex full
 speed 100
 channel-group 1 mode on
!
interface FastEthernet1/4
 switchport mode trunk
 duplex full
 speed 100
 channel-group 1 mode on
!
interface FastEthernet1/5
 duplex full
 speed 100
!
interface FastEthernet1/6
 duplex full
 speed 100
!
interface FastEthernet1/7
 duplex full
 speed 100
!
interface FastEthernet1/8
 duplex full
 speed 100
!
interface FastEthernet1/9
 duplex full
 speed 100
!
interface FastEthernet1/10
 duplex full
 speed 100
!
interface FastEthernet1/11
 duplex full
 speed 100
!
interface FastEthernet1/12
 duplex full
 speed 100
!
interface FastEthernet1/13
 duplex full
 speed 100
!
interface FastEthernet1/14
 duplex full
 speed 100
!
interface FastEthernet1/15
 duplex full
 speed 100
!
interface Vlan1
 no ip address
 no ip route-cache
 shutdown
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
!
!
!
control-plane
!
!         
!
!
!
!
!
!
!
banner exec ^C

***************************************************************
This is a normal Router with a Switch module inside (NM-16ESW)
It has been pre-configured with hard-coded speed and duplex

To create vlans use the command "vlan database" in exec mode
After creating all desired vlans use "exit" to apply the config

To view existing vlans use the command "show vlan-switch brief"

Alias(exec)     : vl   - "show vlan-switch brief" command
Alias(configure): va X - macro to add vlan X
Alias(configure): vd X - macro to delete vlan X
***************************************************************
          
^C
alias configure va macro global trace add_vlan $v
alias configure vd macro global trace del_vlan $v
alias exec vl show vlan-switch brief
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end




本文出自 “消消” 博客,请务必保留此出处http://zhangxiaohua.blog.51cto.com/2321741/1598436

CCNA 综合实验