Serwer DHCP na routerze CISCO: Różnice pomiędzy wersjami
(Nie pokazano 4 pośrednich wersji utworzonych przez tego samego użytkownika) | |||
Linia 33: | Linia 33: | ||
<code>end</code> zakończenie konfiguracji | <code>end</code> zakończenie konfiguracji | ||
− | == | + | ==Inne dostępne opcje== |
− | + | ===Ustawienie nazwy domeny=== | |
+ | <code> | ||
+ | Router(dhcp-config)# domain-name soisk.info | ||
+ | </code> | ||
+ | |||
+ | ==Inne przydatne polecenia== | ||
+ | ===show ip dhcp binding=== | ||
+ | |||
+ | Sprawdzenie wydzierżawionych adresów | ||
<pre> | <pre> | ||
Linia 46: | Linia 54: | ||
</pre> | </pre> | ||
− | + | ===show ip dhcp pool=== | |
+ | Wyświetla informacje o puli. | ||
+ | <pre> | ||
+ | Router# show ip dhcp pool | ||
+ | |||
+ | Pool pula_dhcp : | ||
+ | Utilization mark (high/low) : 100 / 0 | ||
+ | Subnet size (first/next) : 0 / 0 | ||
+ | Total addresses : 254 | ||
+ | Leased addresses : 3 | ||
+ | Excluded addresses : 1 | ||
+ | Pending event : none | ||
+ | |||
+ | 1 subnet is currently in the pool | ||
+ | Current index IP address range Leased/Excluded/Total | ||
+ | 192.168.0.1 192.168.0.1 - 192.168.0.254 3 / 1 / 254 | ||
+ | </pre> | ||
+ | |||
+ | ===show ip dhcp conflict=== | ||
+ | |||
+ | Wyświetla listę adresów IP w konflikcie | ||
+ | |||
+ | ===ip helper-address=== | ||
+ | |||
+ | Przekazuje zapytanie DHCP w tym przypadku na inny adres ('''DHCP relay'''). Jak widać poniżej musimy wejść w konfigurację interfejsu sieciowego. | ||
+ | <pre> | ||
+ | Router(config-if)#ip helper-address 192.168.0.2 | ||
+ | </pre> | ||
+ | |||
+ | [[Plik:pt-dhcp.png]] | ||
+ | Zobacz też: [https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_dhcp/configuration/xe-3se/3850/dhcp-xe-3se-3850-book/config-dhcp-server.html#GUID-6AB64F85-D3DB-461E-BBD6-5193CC36D27F] | ||
[[Category:Cisco Packet Tracer]] | [[Category:Cisco Packet Tracer]] | ||
[[Category:Sieci komputerowe]] | [[Category:Sieci komputerowe]] |
Aktualna wersja na dzień 21:59, 13 gru 2018
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#
Wyjaśnienie:
ip dhcp excluded-address 192.168.0.1 192.168.0.10
wykluczenie z rozdawania adresów z zakresu 192.168.0.1 - 192.168.0.10
ip dhcp pool pula_dhcp
Stworzenie puli o nazwie pula_dhcp
network 192.168.0.0 255.255.255.0
pula jest dla sieci 192.168.0.0/24
default-router 192.168.0.1
brama 192.168.0.1
dns-server 192.168.0.1
serwer DNS 192.168.0.1
end
zakończenie konfiguracji
Inne dostępne opcje
Ustawienie nazwy domeny
Router(dhcp-config)# domain-name soisk.info
Inne przydatne polecenia
show ip dhcp binding
Sprawdzenie wydzierżawionych adresów
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
show ip dhcp pool
Wyświetla informacje o puli.
Router# show ip dhcp pool Pool pula_dhcp : Utilization mark (high/low) : 100 / 0 Subnet size (first/next) : 0 / 0 Total addresses : 254 Leased addresses : 3 Excluded addresses : 1 Pending event : none 1 subnet is currently in the pool Current index IP address range Leased/Excluded/Total 192.168.0.1 192.168.0.1 - 192.168.0.254 3 / 1 / 254
show ip dhcp conflict
Wyświetla listę adresów IP w konflikcie
ip helper-address
Przekazuje zapytanie DHCP w tym przypadku na inny adres (DHCP relay). Jak widać poniżej musimy wejść w konfigurację interfejsu sieciowego.
Router(config-if)#ip helper-address 192.168.0.2
Zobacz też: [1]