Difference between revisions of "Cisco: DHCP"

From OnnoWiki
Jump to navigation Jump to search
Line 1: Line 1:
 +
 +
Single subnet
 +
 +
enable
 +
configure terminal
 +
  ip dhcp excluded-address 192.168.1.1 192.168.1.3
 +
  ip dhcp pool DHCPPool
 +
    network 192.168.1.0 255.255.255.0
 +
    domain-name cisco.com
 +
    dns-server 192.168.1.1 192.168.1.21
 +
    dns-server 192.168.1.102 192.168.2.102
 +
    netbios-name-server 192.168.1.103 192.168.2.103
 +
    netbios-node-type h-node
 +
    default-router 192.168.1.1
 +
    lease 0 0 10
 +
    exit
 +
  exit
 +
 +
Multi subnet-address
 +
 +
enable
 +
configure terminal
 +
  ip dhcp excluded-address 172.30.1.100 172.30.1.103
 +
  ip dhcp excluded-address 172.30.2.100 172.30.2.103
 +
  ip dhcp pool 0
 +
    network 172.30.0.0 /16
 +
    domain-name edtetz.net
 +
    dns-server 172.30.1.102 172.30.2.102
 +
    netbios-name-server 172.30.1.103 172.30.2.103
 +
    netbios-node-type h-node
 +
  ip dhcp pool 1
 +
    network 172.30.1.0 /24
 +
    default-router 172.30.1.100 172.30.1.101
 +
    lease 30
 +
    exit
 +
  ip dhcp pool 2
 +
    network 172.30.2.0 /4
 +
    default-router 172.30.2.100 172.30.2.101
 +
    lease 30
 +
    exit
 +
  exit
 +
  
 
==Konfigurasi==
 
==Konfigurasi==

Revision as of 04:16, 28 December 2018

Single subnet

enable
configure terminal
  ip dhcp excluded-address 192.168.1.1 192.168.1.3
  ip dhcp pool DHCPPool
    network 192.168.1.0 255.255.255.0
    domain-name cisco.com
    dns-server 192.168.1.1 192.168.1.21
    dns-server 192.168.1.102 192.168.2.102
    netbios-name-server 192.168.1.103 192.168.2.103
    netbios-node-type h-node
    default-router 192.168.1.1
    lease 0 0 10
    exit
  exit

Multi subnet-address

enable
configure terminal
  ip dhcp excluded-address 172.30.1.100 172.30.1.103
  ip dhcp excluded-address 172.30.2.100 172.30.2.103
  ip dhcp pool 0
    network 172.30.0.0 /16
    domain-name edtetz.net
    dns-server 172.30.1.102 172.30.2.102
    netbios-name-server 172.30.1.103 172.30.2.103
    netbios-node-type h-node
  ip dhcp pool 1
    network 172.30.1.0 /24
    default-router 172.30.1.100 172.30.1.101
    lease 30
    exit
  ip dhcp pool 2
    network 172.30.2.0 /4
    default-router 172.30.2.100 172.30.2.101
    lease 30
    exit
  exit


Konfigurasi

ip dhcp excluded-address 192.168.1.254
ip dhcp pool ippool1417
   network 192.168.1.0 255.255.255.0
   dns-server 206.13.28.12 206.13.31.12
   default-router 192.168.1.254
!
interface Ethernet0
 ip address 192.168.1.254 255.255.255.0
 no ip directed-broadcast
 ip nat inside
!

Pranala Menarik