Portfast là giải pháp của Cisco để làm việc cùng với TCN. Nếu bạn không biết spanning tree xử lý nhu thế nào với topology changes thì tôi khuyên bạn tìm bài viết về Spanning tree tại đây trước khi đọc. Nó giúp bạn thực sự hiểu tại sao chúng ta cần portfast.
Portfast làm 2 điều cho chúng ta:
- Cổng mà được cấu hình portfast sẽ up và ở trạng thái forwarding mode ngay lập tức, nó sẽ bỏ qua các trạng thái listening và learning
- Switch sẽ không tạo ra thông báo TCN mà có portfast enabled
Ta có thể dùng mô hình này để demo sự thay đổi của switch khi cắm 1 máy tính vào

Khi mà cắm như thế, khi ta chạy lệnh: debug spanning-tree events trên sw1, ta sẽ thấy SW1#
STP: VLAN0001 Fa0/1 -> listening STP: VLAN0001 Fa0/1 -> learning STP: VLAN0001 Fa0/1 -> forwarding
bên cạnh đó nó sẽ generate ra TCN
SW1#show spanning-tree detail VLAN0001 is executing the ieee compatible Spanning Tree protocol Bridge Identifier has priority 32768, sysid 1, address 0019.569d.5700 Configured hello time 2, max age 20, forward delay 15 Current root has priority 32769, address 0011.bb0b.3600 Root port is 26 (FastEthernet0/24), cost of root path is 19 Topology change flag not set, detected flag not set Number of topology changes 5 last change occurred 00:02:09 ago from FastEthernet0/1 Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15 Timers: hello 0, topology change 0, notification 0, aging 300
conf t
vlan 64
name Prod_VMs
exit
vlan 79
name Prod_VMs_under_LBs
exit
int te1/0/1
swi trunk allowed vlan add 64,79
end
int po3
swi trunk allowed vlan add 79
exit
int po4
swi trunk allowed vlan add 79
exit
int po10
swi trunk allowed vlan add 79
exit
int po11
swi trunk allowed vlan add 79
end