Cấu hình DHCP Server trên Cisco Router 2811.
Router>enable
Router#conf t
Router(config)#hostname DHCPServer
DHCPServer(config)#interface F0/1
DHCPServer(config-if)#no shutdown
DHCPServer(config-if)#ip address 192.168.1.1 255.255.255.0
DHCPServer(config-if)#exit
DHCPServer(config)#
//Dùng scope: 192.168.1.0/24
DHCPServer(config)#ip dhcp pool LAN-DTU
DHCPServer(dhcp-config)#network 192.168.1.0 255.255.255.0
DHCPServer(dhcp-config)#default-router 192.168.1.1
DHCPServer(dhcp-config)#dns-server 8.8.8.8
DHCPServer(dhcp-config)#exit
//Không cấp các IP từ 192.168.1.1 đến 192.168.1.100
DHCPServer(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.100
DHCPServer#show ip dhcp binding
DHCPServer(config)#interface F0/0
DHCPServer(config-if)#no shutdown
DHCPServer(config-if)#ip address 200.1.1.1 255.255.255.252
DHCPServer(config-if)#exit
DHCPServer(config)#
DTU2(config)#interface F0/0
DTU2(config-if)#no shutdown
DTU2(config-if)#ip address 200.1.1.2 255.255.255.252
DTU2(config-if)#exit
DTU2(config)#
DTU2(config)#interface F0/1
DTU2(config-if)#no shutdown
DTU2(config-if)#ip address 172.16.0.1 255.255.0.0
DTU2(config-if)#exit
DTU2(config)#
DHCPServer(config)#ip dhcp pool LAN2-DTU
DHCPServer(dhcp-config)#network 172.16.0.0 255.255.0.0
DHCPServer(dhcp-config)#default-router 172.16.0.1
DHCPServer(dhcp-config)#dns-server 8.8.8.8
DHCPServer(dhcp-config)#exit
DHCPServer(config)#ip dhcp excluded-address 172.16.0.1 172.16.0.100
DTU2(config)#interface F0/1
DTU2(config-if)#ip helper-address 200.1.1.1
DTU2(config-if)#exit
DHCPServer(config)#ip route 172.16.0.0 255.255.0.0 F0/0
DTU2(config)#ip route 192.168.1.0 255.255.255.0 200.1.1.1
DTU2#show running-config
DHCPServer#show running-config
» Tin mới nhất:
» Các tin khác: