博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Configure DHCP-relay on Cisco ASA
阅读量:6111 次
发布时间:2019-06-21

本文共 4045 字,大约阅读时间需要 13 分钟。

  1. The Cisco ASA support dhcp-relay function. The below lab is demonstrated on GNS3, ASA version is ASAv961

2.Topology:

Configure DHCP-relay on Cisco ASA

3.Configuration on ASA:
!
interface GigabitEthernet0/0
nameif dmz
security-level 95
ip address 198.51.100.1 255.255.255.0
!
interface GigabitEthernet0/1
nameif inside
security-level 90
ip address 192.0.2.1 255.255.255.0
dhcprelay server 198.51.100.2
!
dhcprelay server 198.51.100.2 dmz
dhcprelay enable inside
dhcprelay setroute inside
dhcprelay timeout 60
!
Configuration on DHCP Server:

!

interface Ethernet0/0
ip address 198.51.100.2 255.255.255.0
!
ip route 192.0.2.0 255.255.255.0 198.51.100.1

!

ip dhcp excluded-address 192.0.2.1 192.0.2.2
ip dhcp excluded-address 192.0.2.10 192.0.2.254
!
ip dhcp pool POOL1
import all
network 192.0.2.0 255.255.255.0
dns-server 192.0.2.10 192.0.2.11
domain-name cisco.com
default-router 198.51.100.2
!

4.Debugging

on DHCP server: # debug ip dhcp server packet

show ip dhcp binding

# clear ip dhcp binding *                                                     # show ip dhcp server statics

on ASA relay-agent: # debug dhcprelay event

debug dhcprelay packet

  1. Output
    ASA
    DHCPD/RA: Relay msg received, fip=ANY, fport=0 on inside interface
    DHCP: Received a BOOTREQUEST from interface 4 (size = 364)
    DHCPD/RA: Binding successfully added to hash table
    DHCPRA: relay binding created for client 0050.7966.6801.
    DHCPRA: setting giaddr to 192.0.2.1.
    dhcpd_forward_request: request from 0050.7966.6801 forwarded to 198.51.100.2.
    DHCPD/RA: Relay msg received, fip=ANY, fport=0 on dmz interface
    DHCP: Received a BOOTREPLY from relay interface 3 (size = 301, xid = 0xd48a2408) at 01:41:39 UTC Sun Jul 15 2018
    DHCPRA: relay binding found for client 0050.7966.6801.
    DHCPD/RA: creating ARP entry (192.0.2.3, 0050.7966.6801).
    DHCPRA: Adding rule to allow client to respond using offered address 192.0.2.3
    DHCPRA: forwarding reply to client 0050.7966.6801.
    DHCPD/RA: Relay msg received, fip=ANY, fport=0 on inside interface
    DHCP: Received a BOOTREQUEST from interface 4 (size = 364)
    DHCPRA: relay binding found for client 0050.7966.6801.
    DHCPRA: Server requested by client 198.51.100.2
    DHCPRA: setting giaddr to 192.0.2.1.
    DHCPRA: Server request counter 1
    dhcpd_forward_request: request from 0050.7966.6801 forwarded to 198.51.100.2.
    DHCPD/RA: Relay msg received, fip=ANY, fport=0 on dmz interface
    DHCP: Received a BOOTREPLY from relay interface 3 (size = 301, xid = 0xd48a2408) at 01:41:40 UTC Sun Jul 15 2018
    DHCPRA: relay binding found for client 0050.7966.6801.
    DHCPRA: exchange complete - relay binding deleted for client 0050.7966.6801.
    DHCPD/RA: Binding successfully deactivated
    DHCPRA: returned relay binding 192.0.2.1/0050.7966.6801 to address pool.
    dhcpd_destroy_binding() removing NP rule for client 192.0.2.1
    DHCPD/RA: free ddns info and binding
    DHCPD/RA: creating ARP entry (192.0.2.3, 0050.7966.6801).
    DHCPRA: forwarding reply to client 0050.7966.6801.

DHCP SERVER debugging output:

DHCPserver#
Jul 15 01:41:45.067: DHCPD: client's ××× is .
Jul 15 01:41:45.067: DHCPD: No option 125
Jul 15 01:41:45.067: DHCPD: DHCPDISCOVER received from client 0100.5079.6668.01 through relay 192.0.2.1.
Jul 15 01:41:45.067: DHCPD: Sending DHCPOFFER to client 0100.5079.6668.01 (192.0.2.3).
Jul 15 01:41:45.067: DHCPD: no option 125
Jul 15 01:41:45.067: DHCPD: unicasting BOOTREPLY for client 0050.7966.6801 to relay 192.0.2.1.
Jul 15 01:41:46.061: DHCPD: client's ××× is .
Jul 15 01:41:46.061: DHCPD: No option 125
Jul 15 01:41:46.061: DHCPD: DHCPREQUEST received from client 0100.5079.6668.01.
Jul 15 01:41:46.061: DHCPD: Appending default domain from pool
Jul 15 01:41:46.061: DHCPD: Using hostname 'PC-21.cisco.com.' for dynamic update (from hostname option)
Jul 15 01:41:46.061: DHCPD: Sending DHCPACK to client 0100.5079.6668.01 (192.0.2.3).DHCPD: Setting only requested parameters

Jul 15 01:41:46.061: DHCPD: no option 125

Jul 15 01:41:46.061: DHCPD: unicasting BOOTREPLY for client 0050.7966.6801 to relay 192.0.2.1.
DHCPserver#

Reference and Further reading:

转载于:https://blog.51cto.com/blade20/2142636

你可能感兴趣的文章
设计模式(十一):FACADE外观模式 -- 结构型模式
查看>>
iOS xcodebuile 自动编译打包ipa
查看>>
程序员眼中的 SQL Server-执行计划教会我如何创建索引?
查看>>
【BZOJ】1624: [Usaco2008 Open] Clear And Present Danger 寻宝之路(floyd)
查看>>
cmake总结
查看>>
数据加密插件
查看>>
linux后台运行程序
查看>>
win7 vs2012/2013 编译boost 1.55
查看>>
IIS7如何显示详细错误信息
查看>>
ViewPager切换动画PageTransformer使用
查看>>
coco2d-x 基于视口的地图设计
查看>>
C++文件读写详解(ofstream,ifstream,fstream)
查看>>
Android打包常见错误之Export aborted because fatal lint errors were found
查看>>
Tar打包、压缩与解压缩到指定目录的方法
查看>>
新手如何学习 jQuery?
查看>>
配置spring上下文
查看>>
Python异步IO --- 轻松管理10k+并发连接
查看>>
mysql-python模块编译问题解决
查看>>
熟练掌握doc命令下的文件操作
查看>>
Oracle中drop user和drop user cascade的区别
查看>>