电脑技术学习

把路由器做成dhcp server

dn001

  把路由器做成dhcp server
  拓扑 Linux---(e0)2514(e1)----XP
  
  
  把pc设为自动获得ip地址
  
  看来也可以把一个3层的交换机设为dhcp server分了几个网段(vlan)就设几个pool
  
  
  但若是在一个大的网络环境中,这显然是加重了3层交换机的负担,各位作售前的前辈,有过这样的设计吗?给分析分析这个解决方法好吗?
  
  
  Trace#sh ru
  
  Building configuration...
  
  
  Current configuration : 1035 bytes
  
  !
  
  version 12.1
  
  no service single-slot-reload-enable
  
  service timestamps debug uptime
  
  service timestamps log uptime
  
  no service passWord-encryption
  
  !
  
  hostname Trace
  
  !
  
  logging rate-limit console 10 except errors
  
  !
  
  ip subnet-zero
  
  no ip finger
  
  no ip domain-lookup
  
  !
  
  ip dhcp pool lan1
  
  network 192.168.1.0 255.255.255.0
  
  default-router 192.168.1.1
  
  dns-server 1.1.1.1
  
  lease 0 0 30
  
  !
  
  ip dhcp pool lan2
  
  network 192.168.2.0 255.255.255.0
  
  dns-server 1.1.1.1
  
  default-router 192.168.2.1
  
  lease 0 0 30
  
  !
  
  cns event-service server
  
  !
  
  !
  
  !
  
  interface Ethernet0
  
  ip address 192.168.1.1 255.255.255.0
  
  no keepalive
  
  !
  
  interface Ethernet1
  
  ip address 192.168.2.1 255.255.255.0
  
  no keepalive
  
  !
  
  interface Serial0
  
  no ip address
  
  shutdown
  
  no fair-queue
  
  !
  
  interface Serial1
  
  no ip address
  
  shutdown
  
  !
  
  ip kerberos source-interface any
  
  ip classless
  
  no ip http server
  
  !
  
  !
  
  alias exec sr sh ru
  
  alias exec ct conf t
  
  alias exec sir sh ip ro
  
  !
  
  line con 0
  
  exec-timeout 0 0
  
  logging synchronous
  
  transport input none
  
  line aux 0
  
  line vty 0 4
  
  !
  
  end
  
  
  Trace#debug ip dhcp server events
  
  00:42:23: DHCPD: assigned IP address 192.168.1.2 to client 0152.54ab.2a47.92.
  
  Trace#
  
  00:42:25: DHCPD: assigned IP address 192.168.2.2 to client 0100.000e.82e9.d4.
  
  
  Trace#sh ip dhcp binding
  
  IP address Hardware address Lease expiration Type
  
  192.168.1.2 0152.54ab.2a47.92 Mar 01 1993 01:12 AM Automatic
  
  192.168.2.2 0100.000e.82e9.d4 Mar 01 1993 01:12 AM Automatic
  
  
  Trace#sh ip dhcp server statistics
  
  Memory usage 14019
  
  Address pools 2
  
  Database agents 0
  
  Automatic bindings 2
  
  Manual bindings 0
  
  Expired bindings 0
  
  Malformed messages 0
  
  
  Message Received
  
  BOOTREQUEST 0
  
  DHCPDISCOVER 3
  
  DHCPREQUEST 4
  
  DHCPDECLINE 0
  
  DHCPRELEASE 0
  
  DHCPINform 0
  
  
  Message Sent
  
  BOOTREPLY 0
  
  DHCPOFFER 3
  
  DHCPACK 4
  
  DHCPNAK 0
  
  Trace#
  
  
  C:>ipconfig/all
  
  Ethernet adapter 本地连接:
  
  
  Connection-specific DNS Suffix . :
  
  Description . . . . . . . . . . . : Fujitsu FMV-J182A
  
  Physical Address. . . . . . . . . : 00-00-0E-82-E9-D4
  
  Dhcp Enabled. . . . . . . . . . . : Yes
  
  Autoconfiguration Enabled . . . . : Yes
  
  IP Address. . . . . . . . . . . . : 192.168.2.2
  
  Subnet Mask . . . . . . . . . . . : 255.255.255.0
  
  Default Gateway . . . . . . . . . : 192.168.2.1
  
  DHCP Server . . . . . . . . . . . : 192.168.2.1
  
  DNS Servers . . . . . . . . . . . : 1.1.1.1
  
  Lease OBTained. . . . . . . . . . : 2003年2月7日 11:47:01
  
  Lease Expires . . . . . . . . . . : 2003年2月7日 12:17:01
  
  
  C:>ping 192.168.1.2
  
  
  Pinging 192.168.1.2 with 32 bytes of data:
  
  
  Reply from 192.168.1.2: bytes=32 time=1ms TTL=254
  
  Reply from 192.168.1.2: bytes=32 time=1ms TTL=254
  
  Reply from 192.168.1.2: bytes=32 time=1ms TTL=254
  
  Reply from 192.168.1.2: bytes=32 time=1ms TTL=254
  
  
  Ping statistics for 192.168.1.2:
  
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
  
  Approximate round trip times in milli-seconds:
  
  Minimum = 1ms, Maximum = 1ms, Average = 1ms
  
  
  Trace#