Serwer DHCP na routerze CISCO: Różnice pomiędzy wersjami
Przejdź do nawigacji
Przejdź do wyszukiwania
Linia 7: | Linia 7: | ||
[[Plik:ciscodhcp.png]] | [[Plik:ciscodhcp.png]] | ||
− | < | + | <pre> |
Router#conf t | Router#conf t | ||
− | |||
Enter configuration commands, one per line. End with CNTL/Z. | Enter configuration commands, one per line. End with CNTL/Z. | ||
− | |||
Router(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.10 | Router(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.10 | ||
− | |||
Router(config)#ip dhcp pool pula_dhcp | Router(config)#ip dhcp pool pula_dhcp | ||
− | |||
Router(dhcp-config)#network 192.168.0.0 255.255.255.0 | Router(dhcp-config)#network 192.168.0.0 255.255.255.0 | ||
− | |||
Router(dhcp-config)#default-router 192.168.0.1 | Router(dhcp-config)#default-router 192.168.0.1 | ||
Router(dhcp-config)#dns-server 192.168.0.1 | Router(dhcp-config)#dns-server 192.168.0.1 | ||
− | |||
Router(dhcp-config)#end | Router(dhcp-config)#end | ||
− | |||
Router# | Router# | ||
− | </ | + | </pre> |
==Sprawdzenie wydzierżawionych adresów== | ==Sprawdzenie wydzierżawionych adresów== |
Wersja z 14:23, 29 lis 2015
Konfiguracja serwera DHCP na ruterze CISCO
Skonfigurujemy router0 do pracy jako serwer DHCP. Router0 posiada adres ip 192.168.0.1/24.
Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.10 Router(config)#ip dhcp pool pula_dhcp Router(dhcp-config)#network 192.168.0.0 255.255.255.0 Router(dhcp-config)#default-router 192.168.0.1 Router(dhcp-config)#dns-server 192.168.0.1 Router(dhcp-config)#end Router#
Sprawdzenie wydzierżawionych adresów
Każdy z komputerów otrzymał adres.
Router#show ip dhcp binding IP address Client-ID/ Lease expiration Type Hardware address 192.168.0.11 0004.9A40.B2A5 -- Automatic 192.168.0.12 000A.F3B5.EB34 -- Automatic 192.168.0.13 000A.415A.965E -- Automatic