免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2948 | 回复: 4
打印 上一主题 下一主题

DHCP+三层交换机?? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-01 13:10 |只看该作者 |倒序浏览
一台锐捷3550-24GE三层交换机
划了三个VLAN
VLAN1的IP为:192.168.1.111/24
VLAN2的IP为:192.168.20.1/24
VLAN3的IP为:192.168.30.1/24
现在想用DHCP来分配各子网所对应的IP地址。
下面是三层的配置文件:


Switch#sh run

System software version : 2.41(2)Build Oct 24 2005 Release

Building configuration...
Current configuration : 1304 bytes

!
version 1.0
!
hostname Switch
vlan 1
!
vlan 2
!
vlan 3
!
service dhcp     -----------------------打开DHCP RELAY
ip helper-address 192.168.1.214 -------------打开DHCP RELAY
interface FastEthernet 0/1
switchport access vlan 2
!
interface FastEthernet 0/2
switchport access vlan 2
!
interface FastEthernet 0/3
switchport access vlan 2
!
interface FastEthernet 0/4
switchport access vlan 2
!
interface FastEthernet 0/5
switchport access vlan 2
!
interface FastEthernet 0/6
switchport access vlan 2
!
interface FastEthernet 0/7
switchport access vlan 2
!
interface FastEthernet 0/8
switchport access vlan 2
!
interface FastEthernet 0/9
switchport access vlan 3
!
interface FastEthernet 0/10
switchport access vlan 3
!
interface FastEthernet 0/11
switchport access vlan 3
!
interface FastEthernet 0/12
switchport access vlan 3
!
interface FastEthernet 0/13
switchport access vlan 3
!
interface FastEthernet 0/14
switchport access vlan 3
!
interface FastEthernet 0/15
switchport access vlan 3
!
interface FastEthernet 0/16
switchport access vlan 3
!
interface Vlan 1
ip address 192.168.1.111 255.255.255.0
!
interface Vlan 2
ip address 192.168.20.1 255.255.255.0
!
interface Vlan 3
ip address 192.168.30.1 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 Vlan 1 192.168.1.1 1 enabled
end

Switch#

一台LINUX做的DHCP服务器。单网卡eth0:192.168.1.214/24
/etc/dhcpd.conf的内容如下:

ddns-update-style interim;
ignore client-updates;
option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 202.102.15.162;
option time-offset -18000;
default-lease-time 21600;
max-lease-time 43200;


subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
range dynamic-bootp 192.168.1.2 192.168.1.200;
}


subnet 192.168.20.0 netmask 255.255.255.0 {
#server-identifier 192.168.20.1;
option routers 192.168.20.1;
option broadcast-address 192.168.20.255;
range dynamic-bootp 192.168.20.2 192.168.20.200;
}

把DHCP的网线接到三层的E0/24
把测试机器接到VLAN1的任何端口都可以从DHCP服务器获取到地址。

问题:把测试机器接到VLAN2的相关端口。不能从DHCP服务器获取地址。
下面是DHCP的日志。不知道是什么原因????
Apr  1 12:45:49 firewall dhcpd: DHCPDISCOVER from 00:e0:4c:a0:51:7f (ss-bceee732262b) via 192.168.20.1
Apr  1 12:45:49 firewall dhcpd: DHCPOFFER on 192.168.20.200 to 00:e0:4c:a0:51:7f (ss-bceee732262b) via 192.168.20.1
Apr  1 12:51:40 firewall dhcpd: DHCPDISCOVER from 00:e0:4c:a0:51:7f (ss-bceee732262b) via 192.168.20.1
Apr  1 12:51:41 firewall dhcpd: DHCPOFFER on 192.168.20.200 to 00:e0:4c:a0:51:7f (ss-bceee732262b) via 192.168.20.1
Apr  1 12:51:44 firewall dhcpd: DHCPDISCOVER from 00:e0:4c:a0:51:7f (ss-bceee732262b) via 192.168.20.1
Apr  1 12:51:44 firewall dhcpd: DHCPOFFER on 192.168.20.200 to 00:e0:4c:a0:51:7f (ss-bceee732262b) via 192.168.20.1
Apr  1 12:51:52 firewall dhcpd: DHCPDISCOVER from 00:e0:4c:a0:51:7f (ss-bceee732262b) via 192.168.20.1
Apr  1 12:51:52 firewall dhcpd: DHCPOFFER on 192.168.20.200 to 00:e0:4c:a0:51:7f (ss-bceee732262b) via 192.168.20.1
Apr  1 12:52:09 firewall dhcpd: DHCPDISCOVER from 00:e0:4c:a0:51:7f (ss-bceee732262b) via 192.168.20.1
Apr  1 12:52:09 firewall dhcpd: DHCPOFFER on 192.168.20.200 to 00:e0:4c:a0:51:7f (ss-bceee732262b) via 192.168.20.1

???
请各位帮忙看一下!谢谢!!!

论坛徽章:
0
2 [报告]
发表于 2007-04-02 17:10 |只看该作者
一台锐捷3550-24GE三层交换机划了三个VLAN  ,怎么能把VLAN1也算在里面呢
交换机刚买来的时候 所以端口就属于VLAN1.划分的时候VLAN1是不算在里面的

论坛徽章:
0
3 [报告]
发表于 2007-04-03 14:39 |只看该作者
我做过华为3526用winodws做dhcp的

论坛徽章:
0
4 [报告]
发表于 2007-04-03 14:48 |只看该作者
在每个VLAN ip地址后面都加:
ip helper-address 192.168.1.214

[ 本帖最后由 wolfandy000 于 2007-4-3 14:50 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2007-04-06 10:30 |只看该作者

看一看呀!

顶一下!
还没有找到解决的办法.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP