Building configuration...
!
version 12.3
service password-encryption
!
hostname Router_0
!
!
!
!
interface FastEthernet0/0
ip address 192.168.1.254 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
!
ip dhcp excluded-address 192.168.1.240 192.168.1.254
!
ip dhcp pool tiger
network 192.168.1.0 255.255.255.0
default-router 192.168.1.254
dns-server 192.168.1.253
!
line con 0
password 7 0822455D
login
line vty 0 4
password 7 0822455D
login
!
!
end
我们会看到交换机的F0/3端口出现了3个MAC地址,说明该交换机端口上连接了HUB。该谁倒霉那也没辙了~
Building configuration...
!
version 12.1
no service password-encryption
!
hostname Switch
!
!
!
interface FastEthernet0/1
switchport mode access 要配置Port Security必须将需要配置的端口设置成ACCESS模式!
switchport port-security
!
interface FastEthernet0/2
switchport mode access
switchport port-security
!
interface FastEthernet0/3
switchport mode access
switchport port-security
!
interface FastEthernet0/4
switchport mode access
switchport port-security
!
interface FastEthernet0/5
switchport mode access
switchport port-security
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface Vlan1
no ip address
shutdown
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end
Port Security : Enabled
Port Status : Secure-up
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses : 1
Total MAC Addresses : 0
Configured MAC Addresses : 0
Sticky MAC Addresses : 0
Last Source Address:Vlan : 0000.0000.0000:0
Security Violation Count : 0
















