对于多作用域的配置,必须保证DHCP服务器能够侦听所有子网客户机的请求信息,下面将讲解配置多作用域的基本方法,为DHCP添加多个网卡连接每个子网,并发布多个作用域的声明。
注意:划分子网时,如果选择直接配置多作用域实现动态IP分配的任务,则必须要为DHCP服务器添加多块网卡,并配置多个IP地址,否则DHCP服务器只能分配与其现有网卡IP地址对应网段的作用域。
采用双网卡实现两个作用域
1)网卡配置IP地址
DHCP服务器有多块网卡时,需要使用ifconfig命令为每块网卡配置独立的IP地址,但要注意,IP地址配置的网段要与DHCP服务器发布的作用域对应哈~
ifconfig eth0 19216821 netmask 2552552550
ifconfig eth1 19216831 netmask 2552552550
2)编辑dhcpdconf主配置文件
当DHCP服务器网络环境搭建完毕后,可以编辑dhcpdconf主配置文件完成多作用域的设置。
ddns-update-style none;
ignore client-updates;
subnet 19216820 netmask 2552552550 {
# --- default gateway
option routers 19216821;
option subnet-mask 2552552550;
option nis-domain "domainorg";
option domain-name "domainorg";
option domain-name-servers 19216822;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 19216811;
# option netbios-name-servers 19216811;
# --- Selects point-to-point node (default is hybrid) Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192168250 1921682250;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvinredhatcom;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 20717542254;
}
}
subnet 19216830 netmask 2552552550 {
# --- default gateway
option routers 19216831;
option subnet-mask 2552552550;
option nis-domain "domainorg";
option domain-name "domainorg";
option domain-name-servers 19216822;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 19216811;
# option netbios-name-servers 19216811;
# --- Selects point-to-point node (default is hybrid) Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192168350 1921683250;
default-lease-time 21600;
max-lease-time 43200;
max-lease-time 43200;
}
保存退出。
3)测试验证
重启DHCP服务后检查系统日志,检测配置是否成功,使用tail命令动态显示日志信息。
tail -F /etc/log/messages
经过设置,对于DHCP服务器将通过eth0和eth1两块网卡侦听客户机的请求,并发送相应的回应。
Jan 19 16:02:51 rhel5 dhcpd: DHCPDISCOVER from 00:19:21:bd:a3:da via eth1
Jan 19 16:02:51 rhel5 dhcpd: DHCPDISCOVER from 00:19:21:bd:a3:da via eth0
Jan 19 16:02:52 rhel5 dhcpd: DHCPOFFER 1921683250 to 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:52 rhel5 dhcpd: DHCPOFFER 1921682250 to 00:19:21:bd:a3:da (mis) via eth0
Jan 19 16:02:52 rhel5 dhcpd: DHCPREQUEST for 1921683250 (19216831) from 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:52 rhel5 dhcpd: DHCPACK 1921683250 to 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:52 rhel5 dhcpd: DHCPREQUEST for 1921683250 (19216831) from 00:19:21:bd:a3:da (mis) via eth0: ignored (not authoritative)
Jan 19 16:02:53 rhel5 dhcpd: DHCPDISCOVER from 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:53 rhel5 dhcpd: DHCPOFFER 1921683250 to 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:53 rhel5 dhcpd: DHCPDISCOVER from 00:19:21:bd:a3:da (mis) via eth0
Jan 19 16:02:53 rhel5 dhcpd: DHCPOFFER 1921682250 to 00:19:21:bd:a3:da (mis) via eth0
Jan 19 16:02:53 rhel5 dhcpd: DHCPREQUEST for 1921683250 (19216831) from 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:53 rhel5 dhcpd: DHCPACK 1921683250 to 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:53 rhel5 dhcpd: DHCPREQUEST for 1921683250 (19216831) from 00:19:21:bd:a3:da (mis) via eth0: ignored (not authoritative)
Jan 19 16:02:54 rhel5 dhcpd: DHCPDISCOVER from 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:54 rhel5 dhcpd: DHCPOFFER 1921683250 to 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:54 rhel5 dhcpd: DHCPDISCOVER from 00:19:21:bd:a3:da (mis) via eth0
Jan 19 16:02:54 rhel5 dhcpd: DHCPOFFER 1921682250 to 00:19:21:bd:a3:da (mis) via eth0
Jan 19 16:02:54 rhel5 dhcpd: DHCPREQUEST for 1921683250 (19216831) from 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:54 rhel5 dhcpd: DHCPACK 1921683250 to 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:54 rhel5 dhcpd: DHCPREQUEST for 1921683250 (19216831) from 00:19:21:bd:a3:da (mis) via eth0: ignored (not authoritative)
Jan 19 16:02:55 rhel5 dhcpd: DHCPDISCOVER from 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:55 rhel5 dhcpd: DHCPOFFER 1921683250 to 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:55 rhel5 dhcpd: DHCPDISCOVER from 00:19:21:bd:a3:da (mis) via eth0
Jan 19 16:02:55 rhel5 dhcpd: DHCPOFFER 1921682250 to 00:19:21:bd:a3:da (mis) via eth0
Jan 19 16:02:55 rhel5 dhcpd: DHCPREQUEST for 1921683250 (19216831) from 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:55 rhel5 dhcpd: DHCPACK 1921683250 to 00:19:21:bd:a3:da (mis) via eth1
Jan 19 16:02:55 rhel5 dhcpd: DHCPREQUEST for 1921683250 (19216831) from 00:19:21:bd:a3:da (mis) via eth0: ignored (not authoritative)双网卡就好了 然后给内网的机器做一条表态路由表 方法就是:单击“开始→运行”,输入“CMD”,在打开的命令行窗口中敲入以下命令:
route add xxxxxxxxxxxx mask yyyyyyyyyyyy zzzzzzzzzzzz netric 2 if zzzzzzzzzzzz
其中:xxxxxxxxxxxx是你内网的网络地址,yyyyyyyyyyyy是你内网的掩码,zzzzzzzzzzzz是你内网网卡地址。
这样可以不需要屏蔽网卡的情况下,就可以两个网络同时访问金蝶KIS客户端和服务器不在同一IP段互相访问
现象:金蝶KIS的服务器在内网1921681这个网段中,同时在这个网段中我增加一个无线路由器分配的IP段是1921682;金蝶的客户端就在1921682这个网段中。
直接连接金蝶服务器,则发现找不到服务器。
采取措施:1、在金蝶的登录窗口服务器位置输入服务器所处的IP地址比如 1921681254 ,输入用户名后,发现登录界面中有出现可以 *** 作的帐套。
2、输入密码直接登录,发现连接登录失败。
然后修改客户端的DNS配置:
步骤如下:
1、 客户端的 网上邻居-》属性-》本地连接-》属性-》TCP/IC协议-》属性-》高级-》将DNS服务器设置成 19216811。
2、留在步骤1的位置,然后在WINS添加金蝶服务器所在电脑的IP地址,如1921681254。
3、完成以上步骤之后,一直选择确定按钮直至关闭窗口。
4、右键本地连接-》修复-》OK;
然后重新打开金蝶登录窗口-》OK了
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)