Chinaunix首页 | 论坛 | 博客
  • 博客访问: 450236
  • 博文数量: 21
  • 博客积分: 6636
  • 博客等级: 准将
  • 技术积分: 1006
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-08 11:10
文章分类
文章存档

2011年(11)

2010年(4)

2009年(4)

2008年(2)

分类: 系统运维

2010-12-03 08:40:59

Summary:
Configuration and verification of DHCP relay for the EX-series switch.
Problem or Goal:

Solution:
The purpose of this document is to configure the DHCP relay and verify proper operation.

Topology:

[Client PC] --- ge-0/0/0 [EX Switch] ge0/0/1 --- [DHCP Server]
  • Client PC is in VLAN 10
  • DHCP Server is in VLAN 20 with IP 10.10.20.20
  • EX Switch is configured as DHCP relay and performs inter-vlan routing between VLANs 10 and 20

Configuration:
set vlans vlan10 vlan-id 10
set vlans vlan10 l3-interface vlan.10
set vlans vlan20 vlan-id 20
set vlans vlan20 l3-interface vlan.20
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members vlan10
set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members vlan20
set interfaces vlan unit 10 family inet address 10.10.10.1/24
set interfaces vlan unit 20 family inet address 10.10.20.1/24
set forwarding-options helpers bootp server 10.10.20.20
set forwarding-options helpers bootp interface vlan.20
NOTE: The 4 packets shown are packets relayed from client to server (Discover, Request), and from server to client (Offer, Ack) by the EX switch.

To see DHCP packets entering or exiting an interface, "monitor traffic interface " can be used.

To debug relay agent activity on EX :
[edit]
set forwarding-options helpers traceoptions file helper
set forwarding-options helpers traceoptions flag bootp
set forwarding-options helpers traceoptions level level

After forwarding activity, the file /var/log/helper can be viewed. By default, helper activity is logged in /var/log/fud, which is viewed using "show log fud".

Troubleshooting Tip: Once the debugs and show commands verify bootp packets are being relayed or forwarded, if the IP address is still not obtained, please check the path between the client's gateway and the DHCP server... ensure that routes are in place and no firewall rules are blocking these bootp packets.

 Cautions:
Debugs using traceoptions should be used with care, especially on a busy router or switch.  It is advisable to turn them on only for specific feature(s) at any given time, and for specific flag and level options of interest, and turn them off when no longer needed. Else, this can cause high CPU activity and affect other processes.

Monitoring live output using "monitor start " can generate excess network traffic if there is too much data, so avoid it in a busy production environment and use the trace files for viewing later.


Acquire DHCP IP addresss through dhcp server
# dhclient eth0








阅读(3168) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-12-03 15:21:04

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com