Server listens to UDP 67 port
Client listens to UDP 68 port
Default cisco client requests
DNS nameserver (6)
Domain name (15)
NETBIOS nameserver (44)
Default router option (3)
Static route option (33)
TFTP server address (150)
Vendor specific option (43)
R1(SERVER)
INTERFACE FA0/0
IP ADDRESS 192.168.1.1 255.255.255.0
IP DHCP POOL MYPOOL (Create a pool)
NETWORK 192.168.1.0 /24 (this is my ip range)
DEFAULT-ROUTER 192.168.1.1
DNS-SERVER 8.8.8.8
LEASE 0 0 1
IP DHCP EXCULDED ADDRESS 192.168.1.19
R2 CLIENT
INT FA00
IP ADDRESS DHCP
NO SH
veya
ip dhcp pool R101
host 192.168.1.100 255.255.255.0
client-identifier 0112.34cc.0056.78 (01 mac adresi basına linux disinda cisco ve windows cihazlarda 01 alır basına)
default-router 192.168.1.1
interface Ethernet0/0
mac-address 1234.cc00.5678
ip address dhcp client-id Ethernet0/0
------
R3:
ip dhcp pool SUBNET-0-VLAN10
network 10.126.0.0 255.255.255.224
default-router 10.126.0.1
ip dhcp pool SUBNET-1-VLAN20
network 10.126.0.32 255.255.255.224
default-router 10.126.0.33
ip dhcp pool SUBNET-2-VLAN30
network 10.126.0.64 255.255.255.224
default-router 10.126.0.65
ip dhcp pool SUBNET-3-VLAN40
network 10.126.0.96 255.255.255.224
default-router 10.126.0.97
And R1, who is directly connected to the VLANs, could use the ip-helper command:
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 10.126.0.1 255.255.255.224
ip helper-address 55.13.0.3
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 10.126.0.33 255.255.255.224
ip helper-address 55.13.0.3
interface FastEthernet0/0.30
encapsulation dot1Q 30
ip address 10.126.0.65 255.255.255.224
ip helper-address 55.13.0.3
interface FastEthernet0/0.40
encapsulation dot1Q 40
ip address 10.126.0.97 255.255.255.224
ip helper-address 55.13.0.3
-------
----
option
ap icin 43 portu kullanılır.
ip dhcp pool telefon1
host 10.171.115.3 255.255.255.0
client-identifier 01C4.143C.97F1.5D
default-router 10.171.115.1
option 150 ip 10.7.254.230
for juniper;
set vlans satinalma vlan-id 10
set vlans finans vlan-id 20
commit
set interfaces ge-0/0/8 unit 0 family ethernet-switching vlan members satinalma
set interfaces ge-0/0/9 unit 0 family ethernet-switching vlan members finans
commit
set interface vlan unit 10 family inet address 192.168.1.1/24
set interface vlan unit 20 family inet address 192.168.2.1/24
Lets configure for VLAN 10 first,
set system services dhcp pool 192.168.1.0/24
set system services dhcp pool 192.168.1.0/24 address-range low 192.168.1.11 high 192.168.1.20
set system serivces dhcp pool 192.168.1.0/24 router 192.168.1.1
set system services dhcp pool 192.168.1.0/24 exclude-address 192.168.1.50set system services dhcp pool 192.168.1.0/24 name-server 8.8.8.8
set system services dhcp pool 192.168.1.0/24 name-server 8.8.4.4
set system services dhcp pool 192.168.1.0/24 domain-name xyz.com
set system services dhcp pool 192.168.1.0/24 default-lease-time 3600
set vlan satinalma l3-interface vlan.10
Now configure for VLAN 20,
set system services dhcp pool 192.168.2.0/24
set system services dhcp pool 192.168.2.0/24 address-range low 192.168.2.11 high 192.168.2.20
set system serivces dhcp pool 192.168.2.0/24 router 192.168.2.1
set vlan finans l3-interface vlan.20
---
set system services dhcp pool 192.168.1.0/24 address-range low 192.168.1.2
set system services dhcp pool 192.168.1.0/24 address-range high 192.168.1.254
set system services dhcp pool 192.168.1.0/24 router 192.168.1.1
set interfaces fe-0/0/6 unit 0 family inet address 192.168.1.1/24
.
To view the various statistics of DHCP server issue any of following commands.
show system services dhcp
show system services dhcp pool
show system services dhcp binding
-------------
HUAWEI
<Huawei>system-view
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.0.12.1 24
[R1-GigabitEthernet0/0/1]quit
[R1]dhcp enable
[R1]ip pool pool1
[R1-ip-pool-pool1]network 10.0.12.0 mask 24
[R1-ip-pool-pool1]gateway-list 10.0.12.1
[R1-ip-pool-pool1]lease day 1 hour 12
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]dhcp select global
Hiç yorum yok:
Yorum Gönder