1. Current configuration : 1864 bytes  
  2. !  
  3. version 12.2  
  4. no service pad  
  5. service timestamps debug uptime  
  6. service timestamps log uptime  
  7. no service password-encryption  
  8. !  
  9. hostname Switch  
  10. !  
  11. !  
  12. no aaa new-model  
  13. system mtu routing 1500  
  14. ip subnet-zero  
  15. no ip domain-lookup  
  16. ip dhcp excluded-address 10.0.0.1  
  17. ip dhcp excluded-address 10.0.0.254  
  18. ip dhcp excluded-address 10.0.1.254  
  19. ip dhcp excluded-address 10.0.1.1  
  20. !  
  21. ip dhcp pool ccna  
  22.    network 10.0.0.0 255.255.255.0  
  23.    default-router 10.0.0.254   
  24.    dns-server 202.103.24.68   
  25.    lease 365  
  26. !           
  27. ip dhcp pool ccnp  
  28.    network 10.0.1.0 255.255.255.0  
  29.    default-router 10.0.1.254   
  30.    dns-server 202.103.24.68   
  31.    lease 365  
  32. !           
  33. !           
  34. !           
  35. !           
  36. !           
  37. !           
  38. !           
  39. !           
  40. !           
  41. spanning-tree mode pvst  
  42. spanning-tree extend system-id  
  43. !           
  44. vlan internal allocation policy ascending  
  45. !           
  46. !           
  47. !           
  48. !           
  49. interface FastEthernet0/1  
  50. no switchport  
  51. ip address 10.0.0.1 255.255.255.0  
  52. ip helper-address 10.0.0.1  
  53. !           
  54. interface FastEthernet0/2  
  55. no switchport  
  56. ip address 10.0.1.1 255.255.255.0  
  57. ip helper-address 10.0.1.1  
  58. !           
  59. interface FastEthernet0/3  
  60. !           
  61. interface FastEthernet0/4  
  62. !           
  63. interface FastEthernet0/5  
  64. !           
  65. interface FastEthernet0/6  
  66. !           
  67. interface FastEthernet0/7  
  68. !           
  69. interface FastEthernet0/8  
  70. !           
  71. interface FastEthernet0/9  
  72. !           
  73. interface FastEthernet0/10  
  74. !           
  75. interface FastEthernet0/11  
  76. !           
  77. interface FastEthernet0/12  
  78. !           
  79. interface FastEthernet0/13  
  80. !           
  81. interface FastEthernet0/14  
  82. !           
  83. interface FastEthernet0/15  
  84. !           
  85. interface FastEthernet0/16  
  86. !           
  87. interface FastEthernet0/17  
  88. !           
  89. interface FastEthernet0/18  
  90. !           
  91. interface FastEthernet0/19  
  92. !           
  93. interface FastEthernet0/20  
  94. !           
  95. interface FastEthernet0/21  
  96. !           
  97. interface FastEthernet0/22  
  98. !           
  99. interface FastEthernet0/23  
  100. no switchport  
  101. ip address 192.168.100.1 255.255.255.0  
  102. !           
  103. interface FastEthernet0/24  
  104. !           
  105.        
  106. Switch#sh arp   
  107. Protocol Address          Age (min) Hardware Addr   Type   Interface  
  108. Internet 10.0.0.2                0   001a.4b58.42a9 ARPA   FastEthernet0/1  
  109. Internet 10.0.1.1                -   001e.4a0a.2042 ARPA   FastEthernet0/2  
  110. Internet 10.0.0.1                -   001e.4a0a.2041 ARPA   FastEthernet0/1  
  111. Internet 192.168.100.1           -   001e.4a0a.2043 ARPA   FastEthernet0/23 

根据上面的配置,现在我们只要连接到f0/1口上,那么客户端分配到的地址将是0网段的地址 ,如果连接到f 0/2口上,那么客户端将分配到1网段的地址。

help-address的说明:

help-address 缺省转发的8个udp服务:time37 , tacacs49 , dns53 , boot/dhcp服务器67 , boot/dhcp客户端68 , tftp69 , netbios名字服务137, netbios数据报服务138 
 


相关内容