成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

CCNA認證:交換機配置和端口安全

網(wǎng)絡 路由交換
從基本原理上講,Port Security特性記住的是連接到交換機端口的以太網(wǎng)MAC地址即網(wǎng)卡號,并只答應某個MAC地址通過本端口通信。假如任何其它MAC地址試圖通過此端口通信,端口安全特性會阻止它。使用端口安全特性可以防止某些設備訪問網(wǎng)絡,并增強安全性。

交換機配置實例拓撲圖如下:

ccna-switch-configuration-and-port-security-1

交換機基本配置

  1. Switch> enable  Switch# config ter  
  2. Switch(config)# hostname Switch  Switch(config)# interface vlan 1  
  3. Switch(config-if)# ip address 192.168.1.10 255.255.255.0  Switch(config-if)# no shutdown  
  4. Switch(config-if)# exit  Switch(config)# ip default-gateway 192.168.1.1  
  5. Switch(config)# end  Switch#show int vlan 1  
  6. Vlan1 is administratively down, line protocol is down    Hardware is CPU Interface, address is 0001.9719.ab57 (bia 0001.9719.ab57)  
  7.   Internet address is 192.168.1.10/24    MTU 1500 bytes, BW 100000 Kbit, DLY 1000000 usec,  
  8.      reliability 255/255, txload 1/255, rxload 1/255    Encapsulation ARPA, loopback not set  
  9.   ARP type: ARPA, ARP Timeout 04:00:00    Last input 21:40:21, output never, output hang never  
  10.   Last clearing of “show interface” counters never    Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0  
  11.   Queueing strategy: fifo    Output queue: 0/40 (size/max)  
  12.   5 minute input rate 0 bits/sec, 0 packets/sec    5 minute output rate 0 bits/sec, 0 packets/sec  
  13.      1682 packets input, 530955 bytes, 0 no buffer       Received 0 broadcasts (0 IP multicast)  
  14.      0 runts, 0 giants, 0 throttles       0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored  
  15.      563859 packets output, 0 bytes, 0 underruns       0 output errors, 23 interface resets  
  16.      0 output buffer failures, 0 output buffers swapped out  Switch# 

配置各臺PC 的設置

  1. a) PC1       IP ADDRESS:192.168.1.100  
  2.      SUBMASK: 255.255.255.0       DEFAULT-GATEWAY: 192.168.1.1  
  3. b) PC2       IP ADDRESS:192.168.1.101  
  4.      SUBMASK: 255.255.255.0       DEFAULT-GATEWAY: 192.168.1.1  
  5. c) PC3       IP ADDRESS:192.168.1.102  
  6.      SUBMASK: 255.255.255.0       DEFAULT-GATEWAY: 192.168.1.1 

驗證

  1. d) PC1       
  2. ping 192.168.1.101  
  3. ping 192.168.1.102 

能通

  1. e) PC2       
  2. ping 192.168.1.100  
  3. ping 192.168.1.102 

能通

查看交換機動態(tài)學習到的MAC 表

因為我們通過ping 命令互相訪問,交換機會動態(tài)學習到各個PC 的MAC 地址!

  1. Switch#show mac-address-table             Mac Address Table  
  2. ——————————————-   
  3. Vlan    Mac Address       Type        Ports  —-    ———–       ——–    —–  
  4.     1    0001.4246.a36c    DYNAMIC      Fa0/3  
  5.    1    0009.7c35.7001   DYNAMIC     Fa0/24     1    00d0.58b6.24da    DYNAMIC     Fa0/2  
  6.    1    00d0.bc37.3d6b    DYNAMIC     Fa0/1  

現(xiàn)在配置交換機的F0/1 接口只允許PC0 的接入,其它PC 非法接入該接口會關閉無法使。

  1. Switch# config term  Switch(config)# interface f0/1  
  2. Switch(config-if)# switchport mode access //將接口設置為訪問接口  Switch(config-if)# switchport port-security //在該接口上啟動端口安全  
  3. Switch(config-if)# switchport port-security mac 00d0.58b6.24da                                        //將PC0 的MAC 地址和該接口綁定,該MAC 地址可以通過第三步查看到  
  4. Switch(config-if)# switchport port-security maximum 1                                        //因為我們只允許PC0 訪問,這里將訪問量設置為1  
  5. Switch(config-if)# switchport port-security violation shutdown                                        //將非法用戶接入后的動作為關閉接口 

驗證:

  1. Switch# show port-security interface f0/1  Port Security : Enabled  
  2. Port Status : Secure-up  Violation Mode : Shutdown  
  3. Aging Time : 0 mins  Aging Type : Absolute  
  4. SecureStatic Address Aging : Disabled  Maximum MAC Addresses : 1  
  5. Total MAC Addresses : 1  Configured MAC Addresses : 1  
  6. Sticky MAC Addresses : 0  Last Source Address:Vlan : 00D0.58B6.24DA:1  
  7. Security Violation Count : 0 

#p#

測試端口安全

a) PC1

ping 192.168.1.101

能PING 通

b) 重新配置新的PC,IP 地址配置為192.168.1.103,子網(wǎng)掩碼為255.255.255.0,將原PC0 從交換機的f0/1 口移出,將新的PC 接入到交換機的F0/1 口(如下)

ccna-switch-configuration-and-port-security-2

c) PC4 中

Ping 192.168.1.101

d) 結果發(fā)現(xiàn)交換機出現(xiàn)如下提示:

  1. %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down  %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state todown 

因為交換機的F0/1 口配置了端口安全,只允許MAC 為00d0.58b6.24da 訪問該接口,新的PC 機的MAC 地址不符合條件,交換機就會按照配置將該接口shutdown。

e) PC4 中再次訪問PC1 和PC2 都無法正常訪問

  1. Switch#Ping 192.168.1.101  Pinging 192.168.1.101 with 32 bytes of data:  
  2. Request timed out.  Request timed out.  
  3. Request timed out.  Request timed out.  
  4. Ping statistics for 192.168.1.101: Packets: Sent = 4Received = 0Lost = 4 (100% loss) 

f) 交換機中驗證:

  1. Switch# show port-security interface F0/1  Port Security : Enabled  
  2. Port Status : Secure-shutdown  Violation Mode : Shutdown  
  3. Aging Time : 0 mins  Aging Type : Absolute  
  4. SecureStatic Address Aging : Disabled  Maximum MAC Addresses : 1  
  5. Total MAC Addresses : 1  Configured MAC Addresses : 1  
  6. Sticky MAC Addresses : 0  Last Source Address:Vlan : 00E0.F961.D8C7:1  
  7. Security Violation Count : 1 //安全動作統(tǒng)計為1 

配置交換機的靜態(tài)MAC

a) 配置靜態(tài)綁定

  1. Switch# config termi  Switch(config)# mac-address-table static 0001.4246.a36c vlan 1 interface f0/2  //將MAC 地址為0001.4246.a36c 靜態(tài)綁定到vlan1 中的接口F0/2  
  2. SW1# show mac  Mac Address Table  
  3. ——————————————-  Vlan Mac Address Type Ports  
  4. —- ———– ——– —–  1 0001.4246.a36c STATIC Fa0/2 

b) 靜態(tài)指定的MAC 地址,交換機重新啟動后不會從MAC 表中丟失,動態(tài)學習到MAC地址交換機重新啟動后會丟失將交換機重新啟動驗證靜態(tài)綁定MAC

  1. SW1# write  Destination filename [startup-config]?  
  2. Building configuration…  [OK]  
  3. SW1# reload 

c) 啟動后,查看交換機的MAC 地址表

  1. SW1# show mac  Mac Address Table  
  2. ——————————————-  Vlan Mac Address Type Ports  
  3. —- ———– ——– —–  1 0001.4246.a36c STATIC Fa0/2  
  4. 1 00d0.58b6.24da STATIC Fa0/1 

交換機是組網(wǎng)設備中關鍵角色之一,所以它的配置是非常關鍵的,本文意在讓初學者能夠掌握基本的交換機配置方法,在CCNA認證時也是至關重要的。

責任編輯:佚名 來源: 咦哇噢博客
相關推薦

2011-03-09 14:00:21

trunkVLAN

2011-09-02 14:59:15

2010-01-18 15:52:33

多層千兆交換機配置

2010-01-14 10:43:18

交換機配置交換機種類

2011-07-29 09:56:28

2010-03-18 17:01:52

Cisco交換機

2009-07-20 09:59:35

華為交換機端口限速華為認證

2010-09-25 13:34:19

2013-10-09 10:44:14

交換機配置802.1X認證

2011-03-08 10:17:14

VLAN

2009-07-16 09:37:37

CCNA思科交換機

2010-01-06 16:05:10

交換機端口設置

2010-01-04 16:52:51

2011-09-13 11:14:12

端口鏡像配置交換機華為交換機

2010-01-04 13:25:59

交換機端口監(jiān)聽配置

2010-01-07 14:48:28

交換機端口鏡像配置

2013-04-09 15:36:19

交換機交換機端口設備端口模式

2010-02-03 10:10:48

2010-01-11 16:03:03

交換機端口

2011-12-06 10:06:12

交換機端口
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 久久成人综合 | 国产免费观看一区 | 一区二区三区不卡视频 | 色久五月 | 九九热久久免费视频 | 亚洲精品一区二区三区蜜桃久 | 美日韩精品 | 日韩a在线 | 天天操天天射天天 | 男人的天堂中文字幕 | 国产精品视频在线播放 | 黄色一级毛片 | 国产网站在线播放 | 国产精品一区在线 | 色婷婷精品久久二区二区蜜臂av | 伊人网站视频 | 亚洲国产成人精品女人久久久 | 一区二区不卡视频 | 欧美成人一区二区三区 | 少妇一级淫片aaaaaaaaa | 在线观看亚洲 | 国产精品一区网站 | 国产精品一区一区三区 | 91成人影院 | 欧美淫 | 国产精品久久久久久久久久久新郎 | 一区视频在线播放 | 国产日韩精品在线 | 北条麻妃99精品青青久久主播 | 久久久久国产精品一区二区 | 欧美爱爱视频网站 | 在线观看成年视频 | 国产精品18hdxxxⅹ在线 | 国产免费av在线 | 久久99视频 | 亚洲一区二区三区视频免费观看 | 欧美极品一区二区 | 在线播放中文字幕 | 特黄特黄a级毛片免费专区 av网站免费在线观看 | 紧缚调教一区二区三区视频 | 亚洲精品国产第一综合99久久 |