Tải bản đầy đủ (.pdf) (5 trang)

Giáo trình Advanced Certificate in Information Technology - Sanlein part 95 docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (151.37 KB, 5 trang )

Thông báo trên màn hình khi thực hiện xong lệnh
00:17:58: %LINK-5-CHANGED: Interface FastEthernet0/1,
changed state to administratively down
00:18:00: %LINK-3-UPDOWN: Interface FastEthernet0/1,
changed state to up
00:18:01: %LINEPROTO-5-UPDOWN: Line protocol on
Interface FastEthernet0/1, changed state to up
Quá trình trên giống như bạn cho phép port hoạt động
lại bình thường, tuy nhiên cần chú ý rằng các cấu hình
trước đó cho port này vẫn không thay đổi, kể cả
port-security.
Cách 2: khôi phục tự động, thiết lập lệnh để switch
tự động dò tìm lỗi và khôi phục.
Với cách này giả sử như bạn không hề biết nguyên
nhân vì sao port bị down.
Bước 2-1: Tiến hành tìm lỗi trên port
Cấu trúc lệnh:
Switch(config)#errdisable detect cause
[all | cause-name ]
+ all có nghĩa là tìm tất cả các lỗi xảy ra
+ cause-name : chỉ tìm lỗi có tên là cause-name,
gồm có:
all Enable error detection
on all cases
dhcp-rate-limit Enable error detection
on dhcp-rate-limit
dtp-flap Enable error detection
on dtp-flapping
(Cấu trúc lệnh - tiếp theo)

gbic-invalid Enable error detection


on gbic-invalid
link-flap Enable error detection
on linkstate-flapping
loopback Enable error detection
on loopback
pagp-flap Enable error detection
on pagp-flapping
Trong bài lab này sẽ cho switch tìm tất cả các lỗi:
Switch(config)#errdisable detect cause all
Bước 2-2: cho switch khôi phục trạng thái
Switch(config)#errdisable recorvery cause all
Bước 2-3: cài đặt thông số thời gian cho quá trình khôi phục.
Mặc định port sẽ được khôi phục sau 300 giây khi bạn đã thực
hiện lệnh ở bước 2-2. Tuy nhiên bạn có thể can thiệp vào thông
số thời gian này bằng cách dùng lệnh:
Switch(config-if)#errdisable recorvery second
Thông số thời gian second có đơn vị là giây bạn cần phải chú ý
điều này để tránh nhầm lẫn.
Bây giờ bạn cài đặt thông số thời gian khôi phục cho switch là
30 giây
Switch(config-if)#errdisable recorvery 30
Switch(config-if)#^Z
Bước 2-4: Quan sát
+ Quan sát đèn trên port f0/1 của switch : sau 30 giây sẽ
sáng lại
+ Quan sát trên giao diện:
- Quan sát thông số thời gian do lệnh debug tạo ra.
00:55:54: %PM-4-ERR_RECOVER: Attempting to recover
from psecure-violation err-disable state on Fa0/1
00:55:55: PSECURE: psecure_linkchange: Fa0/1

hwidb=0x807D6C98
00:55:55: PSECURE: Link is coming up
00:55:55: PSECURE: psecure_linkup_init_internal:
Fa0/1 hwidb = 0x807D6C98
00:55:55: PSECURE: No change in violation_mode
00:55:55: PSECURE: psecure_vlan_linkchange invoked: Vlan 1
00:55:55: PSECURE: Activating port-security feature
00:55:55: PSECURE: port_activate: status is 1
(Tiếp theo)
00:55:55: PSECURE:
PSECURE: Deleting all dynamic addresses from h/w tables.
00:55:55: PSECURE: psecure_platform_delete_all_addrs:
deleting all addresses on vlan 1
00:55:55: PSECURE: psecure_delete_address_not_ok
address <1,00e0.4d01.2978> allowed
00:55:55: PSECURE: skipping Fa0/1 while searching
<1,00e0.4d01.2978>
00:55:55: PSECURE: Adding entry to HA table from
port-security sub block
00:55:55: PSECURE: psecure_platform_add_mac_addrs:
Do nothing, called to add <1,00e0.4d01.2978>
to FastEthernet0/1
00:55:57: %LINK-3-UPDOWN: Interface FastEthernet0/1,
changed state to up
00:55:58: %LINEPROTO-5-UPDOWN: Line protocol
on Interface FastEthernet0/1, changed state to up
- Dùng lệnh :
Switch#show interface f0/1
FastEthernet0/1 is up, line protocol is up (connected)
Hardware is Fast Ethernet, address is 000f.239d.c641

(bia 000f.239d.c641)
MTU 1500 bytes, BW 100000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)

IV. Cấu hình toàn bộ
Cấu hình của switch:
Current configuration : 1727 bytes
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
hostname Switch
errdisable recovery cause udld
errdisable recovery cause bpduguard
errdisable recovery cause security-violation
errdisable recovery cause channel-misconfig
errdisable recovery cause pagp-flap
errdisable recovery cause dtp-flap
errdisable recovery cause link-flap
errdisable recovery cause psecure-violation
errdisable recovery cause gbic-invalid
errdisable recovery cause dhcp-rate-limit
errdisable recovery cause unicast-flood
errdisable recovery cause vmps
errdisable recovery cause loopback
errdisable recovery interval 30
ip subnet-zero

spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
interface FastEthernet0/1
switchport mode access
switchport port-security
switchport port-security mac-address 00e0.4d01.2978
interface FastEthernet0/2
interface FastEthernet0/3
interface FastEthernet0/4
interface FastEthernet0/5
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
no ip route-cache
shutdown
ip http server
line con 0
line vty 0 4
login
line vty 5 15
login
end
V. Đánh giá
Đến đây bạn đã có một khái niệm cơ bản và thao tác cấu hình
tương đối về port security. Bạn có thể thay đổi các thông số
trong các câu lệnh để tìm hiểu rõ các đặc tính của chúng

×