自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

代碼示例:IP dhcp snooping配置

網(wǎng)絡(luò) 網(wǎng)絡(luò)管理
下面我們主要講解了IP dhcp snooping的內(nèi)容。包括:3750配置DHCP服務(wù),配置DHCP snooping、靜態(tài)IP dhcp snooping和IP Source Guard、啟動(dòng)dai、DHCP設(shè)置,分配固定IP

前面的文章中我們也講解過dhcp snooping的有關(guān)知識(shí),對(duì)于它的理解,配置以及相關(guān)的調(diào)制,應(yīng)用我們都介紹過了。這里我們?cè)賮韺?duì)IP dhcp snooping的具體配置以及案例分析進(jìn)行一下介紹,希望對(duì)大家能夠有所幫助。

1、3750配置DHCP服務(wù),配置DHCP snooping

  1. 如下:(無用的部分已經(jīng)刪除了)  
  2. clock timezone WST 8  
  3. switch 1 provision ws-c3750g-48ts  
  4. system mtu routing 1500  
  5. ip subnet-zero  
  6. ip dhcp excluded-address 192.168.1.1 (保留地址)  
  7. !  
  8. ip dhcp pool test                            (啟動(dòng)DHCP)  
  9. network 192.168.1.0 255.255.255.0  
  10. default-router 192.168.1.1   
  11. dns-server 192.168.1.1   
  12. !  
  13. ip dhcp snooping vlan 1                (指定DHCP snooping防護(hù)的vlan)  
  14. ip dhcp snooping information option allow-untrusted  
  15. ip dhcp snooping database flash:snooping   (指定數(shù)據(jù)庫路徑)   
  16. ip dhcp snooping                      (啟動(dòng)DHCP snooping)  
  17. !  
  18. !  
  19. interface GigabitEthernet1/0/1  
  20. !  
  21. interface GigabitEthernet1/0/31 (正常的端口)  
  22. switchport mode access  
  23. spanning-tree portfast  
  24. !  
  25. interface GigabitEthernet1/0/32  
  26. !  
  27. interface GigabitEthernet1/0/42  
  28. !  
  29. interface GigabitEthernet1/0/43   (啟用IP DHCP snooping端口)  
  30. switchport mode access  
  31. switchport port-security  
  32. spanning-tree portfast  
  33. ip verify source   

             

(啟用IP地址效驗(yàn),此端口用戶不能自己設(shè)置地址,只能通過DHCP獲得,但沒有mac層安全控制。
測(cè)試發(fā)現(xiàn),假如g1/0/43口的用戶分得地址=192.168.1.2,g1/0/42用戶故意修改IP為192.168.1.2,也會(huì)影響 g1/0/43的用戶,雖然g1/0/42修改IP不能訪問網(wǎng)絡(luò),但g1/0/43會(huì)提示IP沖突,所以必須結(jié)合DAI才能保護(hù)mac層)

  1. !  
  2. interface GigabitEthernet1/0/44  
  3. !  
  4. interface GigabitEthernet1/0/45  
  5. switchport mode access  
  6. switchport port-security  
  7. switchport port-security violation restrict  
  8. spanning-tree portfast  
  9. ip verify source port-security      
  10. (啟用后此端口無法DHCP注冊(cè)地址,分析原因由于port-security的安全限制無法注冊(cè)MAC)  
  11. (ip verify source port-security是配合啟動(dòng)IP soure binding使用  
  12. ip source binding 001b.a111.5e11 vlan 1 192.168.1.200 interface Gi1/0/45,注意ip source binding和動(dòng)態(tài)DHCP不能同時(shí)用)  
  13. !  
  14. interface GigabitEthernet1/0/46  
  15. !   

#p#2、靜態(tài)IP dhcp snooping和IP Source Guard

  1. clock timezone WST 8  
  2. switch 1 provision ws-c3750g-48ts  
  3. system mtu routing 1500  
  4. ip subnet-zero  
  5. !  
  6. ip dhcp snooping vlan 1                (指定DHCP snooping防護(hù)的vlan)  
  7. ip dhcp snooping information option allow-untrusted  
  8. ip dhcp snooping database flash:snooping   (指定數(shù)據(jù)庫路徑)  
  9. ip dhcp snooping database write-delay 15   
  10. ip dhcp snooping                      (啟動(dòng)DHCP snooping)  
  11. !  
  12. !  
  13. !  
  14. interface GigabitEthernet1/0/45   (啟動(dòng)IP Source Guard的端口)  
  15. switchport mode access  
  16. switchport port-security  
  17. switchport port-security violation restrict  
  18. spanning-tree portfast  
  19. ip verify source port-security      
  20. (ip verify source port-security是配合啟動(dòng)IP soure binding使用  
  21. ip source binding 000A.E439.5F55 vlan 1 192.168.1.200 interface Gi1/0/45,說明ip source binding和動(dòng)態(tài)DHCP不能同時(shí)用)  
  22. !  
  23. !  
  24. interface Vlan1  
  25. ip address 192.168.1.1 255.255.255.0  
  26. !  
  27. ip classless  
  28. ip http server  
  29. ip http secure-server  
  30. !  
  31. !  
  32. ip source binding 000A.E439.5F55 vlan 1 192.168.1.200 interface Gi1/0/45  
  33. !  
  34. control-plane  
  35. !  
  36. !  
  37.  
  38. 注意使用如下命令查看工作狀態(tài):  
  39. Switch#sh ip ver source               
  40. Switch#sh ip dhcp binding   
  41. Switch#sh ip dhcp snooping binding  

#p#3、啟動(dòng)dai

  1. ip subnet-zero  
  2. ip dhcp excluded-address 192.168.1.1  
  3. !  
  4. ip dhcp pool test  
  5. network 192.168.1.0 255.255.255.0  
  6. default-router 192.168.1.1   
  7. dns-server 192.168.1.1   
  8. lease infinite  
  9. !  
  10. ip dhcp snooping vlan 1                             (需要DHCP為基礎(chǔ))  
  11. ip dhcp snooping information option allow-untrusted  
  12. ip dhcp snooping database flash:snooping(指定snooping 數(shù)據(jù)保存位置)  
  13. ip dhcp snooping                                   (啟動(dòng)DHCP snooping)  
  14. ip arp inspection vlan 1                         (啟動(dòng)DAI)  
  15. ip arp inspection validate src-mac dst-mac ip    (檢測(cè)項(xiàng)目)  
  16. !  
  17. !  
  18. !  
  19. interface GigabitEthernet1/0/31  
  20. switchport mode access  
  21. ip arp inspection trust          (如果設(shè)置trust可以改IP,設(shè)置untrust不可以改IP,因?yàn)镈AI檢測(cè))  
  22. spanning-tree portfast  
  23. !  
  24. interface GigabitEthernet1/0/32  
  25. !  
  26. nterface GigabitEthernet1/0/44  
  27. !  
  28. interface GigabitEthernet1/0/45  
  29. switchport mode access  
  30. switchport port-security  
  31. switchport port-security violation restrict  
  32. spanning-tree portfast  
  33. ip verify source port-security  
  34. !  
  35. !  
  36. Switch#sh ip arp inspection  

#p#4、DHCP設(shè)置,分配固定IP

有時(shí)我們需要控制IP分配,可以使用下面方法!

  1. system mtu routing 1500  
  2. ip subnet-zero  
  3. ip dhcp excluded-address 192.168.1.1  
  4. !  
  5. ip dhcp pool test  
  6. host 192.168.1.18 255.255.255.0 (分給用戶的IP)  
  7. client-identifier 0101.0bf5.395e.55(用戶端mac)  
  8. client-name test  
  9. !  
  10. ip dhcp pool go  
  11. network 192.168.1.0 255.255.255.0 (啟動(dòng)網(wǎng)內(nèi)DHCP)  
  12. !  
  13.  
  14. Switch#sh ip dhcp binding   
  15. IP address    Client-ID/                Lease expiration        Type  
  16.                   Hardware address  
  17. 192.168.1.18     0101.0bf5.395e.55    Infinite             Manual 

時(shí)間倉促,沒能進(jìn)行很好的測(cè)試,希望大家能夠討論,給與指正! 
 

責(zé)任編輯:佟健 來源: hi.baidu.com
相關(guān)推薦

2010-09-03 11:21:57

2010-09-26 14:52:22

DHCP Snoopi

2010-08-31 10:25:31

2010-09-27 12:42:31

靜態(tài)IP dhcp s

2010-08-31 17:01:31

dhcp snoopi

2010-09-01 09:31:15

2010-09-27 10:40:21

DHCP Snoopi

2010-09-02 14:39:34

2010-09-01 15:32:02

DHCP Snoopi

2011-03-09 15:01:30

DHCP-snoopiDHCP

2010-08-30 17:27:43

DHCP Snoopi

2010-09-01 09:26:08

2010-08-31 10:17:14

2010-09-27 12:37:55

3750配置DHCP

2010-08-30 09:15:37

DHCP Snoopi

2010-09-01 16:03:51

DHCP Snoopi

2010-09-01 16:11:46

顯示DHCP snoo

2010-09-06 14:46:43

2010-09-01 15:42:39

DHCP SnoopiARP

2010-08-31 16:57:13

DHCP SNOOPI
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)