Cisco DHCP

From HackerNet
Revision as of 11:10, 14 January 2016 by Helikopter (talk | contribs)
Jump to: navigation, search

Dynamic Host Configuration Protocol. Servrar lyssnar på UDP port 67 och klienter kommunicerar från UDP port 68.

IOS

Server

Exclude IP Addresses, Create DHCP Address Pool, Specify the Network, Set DNS Server, Set the Default Gateway

ip dhcp excluded-address [start ip-address] [end ip-address]
ip dhcp pool [poolname]
 network [ip-address] [subnet-mask]
 dns-server [ip-address of primary dns-server] [ip-address of secondary dns-server]
 default-router [ip-address]
exit

Client

interface Ethernet 1
 ip dhcp client hostname R1
 ip address dhcp

Renew

renew dhcp ethernet 3/1

Relay

interface Ethernet 1
 ip helper-address 10.0.0.10

Allows the DHCP relay agent to switch the gateway address (giaddr field of a DHCP packet) to secondary addresses when there is no DHCPOFFER message from a DHCP server.

ip dhcp smart-relay

Snooping

DHCP snooping is a DHCP security feature that provides network security by filtering untrusted DHCP messages and by building and maintaining a DHCP snooping binding database.

ip dhcp snooping
ip dhcp snooping vlan 10
ip dhcp snooping information option
interface gi1
ip dhcp snooping limit rate 100

Show

show ip dhcp snooping

NX-OS

feature dhcp

Relay

int vlan 15
 ip dhcp relay address 10.0.0.10