- 论坛徽章:
- 0
|
我在一个物理网络上,划分了三个子网,分别为:
10.0.3.0 255.255.255.0 网关:10.0.3.1
10.0.4.0 255.255.255.0 网关:10.0.4.1
10.0.6.0 255.255.255.0 网关:10.0.6.1
在/etc/dhcpd.conf里的配置如下:
subnet 10.0.6.0 netmask 255.255.255.0 {
# --- default gateway
option routers 10.0.6.1;
option subnet-mask 255.255.255.0;
option nis-domain "XXXXXX";
option domain-name "XXXXXXXX";
option domain-name-servers XXX.XXX.XXX.XXX,XXX.XXX.XXX.XXX;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 10.0.6.100;
# option netbios-name-servers 10.0.6.100;
# --- 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 10.0.6.150 10.0.6.180;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host web {
hardware ethernet 00:20:ED:A7:02:16;
fixed-address 10.0.6.13;
}
host oa {
hardware ethernet 00:0C:76:80:BA:64;
fixed-address 10.0.6.21;
如果在这个配置文件中,再加一个subnet配置的话,他们共享的都是一个全局网关10.0.6.1,怎么样使他们自已用自已的网关?比如说,10.0.3.0这个网段的,用10.0.3.1这个网关,每个网段都相互独立!
注意::以上全是基于“单臂路由”,因为我的交换机是二层的,所以我划分子网是采用单臂路由,“子接口”的形式! |
|