例图:
配置命令:
Router0:
Router0#show run
Building configuration...
Current configuration :
ip dhcp pool 1
network 192.168.2.0 255.255.255.0 default-router 192.168.2.1
dns-server 10.10.1.1
!
interface FastEthernet0/0
ip address 192.168.2.1 255.255.255.0 duplex auto
speed auto
!
interface Serial2/0
ip address 192.168.1.2 255.255.255.0 !
router eigrp 2
network 192.168.2.0
network 192.168.1.0
auto-summary
!
Router1:
outer1#show run
Building configuration...
Current configuration :
!
!
interface Serial2/0
ip address 192.168.1.3 255.255.255.0 !
interface Serial3/0
ip address 172.16.1.2 255.255.0.0
router eigrp 2
network 192.168.1.0
network 172.16.0.0
auto-summary
!
Router2:
Router2#show run
Building configuration...
Current configuration :
ip dhcp pool 2
network 10.1.1.0 255.255.255.0 default-router 10.1.1.1
dns-server 10.10.1.1
interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.0 duplex auto
speed auto
interface Serial3/0
ip address 172.16.1.1 255.255.0.0 !!
router eigrp 2
network 172.16.0.0
network 10.1.1.0 0.0.0.255
auto-summary
注意:
路由器DHCP服务,pc自动获得地址eigrp network,是邻居地址网段