R0起两个地址池:
ip dhcp pool vlan10 network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
ip dhcp pool vlan20
network 10.0.0.0 255.255.255.0
default-router 10.0.0.1
路由器起子接口:interface FastEthernet0/0.1 encapsulation dot1Q 10
ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0.2
encapsulation dot1Q 20
ip address 10.0.0.1 255.255.255.0