当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > OpenBSD系统 DHCP 多 vlan 配置

Unix/Linux
Ubuntu 8.04系统下Opera浏览器安装配置
Ubuntu系统软件安装方式
解决Ubuntu启动时的Routine check检查时间过长
Ubuntu系统下安装网络打印机
Ubuntu系统下zend for linux中文乱码解决
Ubuntu 8.04升级到Ubuntu 8.10
Ubuntu 8.04中使用fast-cgi搭建Apache2+PHP5环境
Ubuntu压缩/解压缩RAR文件的方法
64位ubuntu8.04 安装QQ
ubuntu关闭图形模式
解决ubuntu系统下vimtutor乱码
Ubuntu下安装KDE桌面环境
Ubuntu 8.10 Intrepid Ibex Alpha4 官方正式版下载
ubuntu8.04下源码安装wine 设置中文
ubuntu下设置共享目录
Ubuntu下Flash乱码的解决方法
Ubuntu 8.04中启用FrameBuffer
Ubuntu系统下升级内核的方法
ubuntu系统下播放mp3及中文乱码的解决
ubuntu 8.04.1 LTS 下的cpu温度监控软件lm-sensors

Unix/Linux 中的 OpenBSD系统 DHCP 多 vlan 配置


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-15   浏览: 81 ::
收藏到网摘: n/a

4块DLINK 530 ,1个连接Internet,3个内网

    -------------------------------
     |        |            |    |
vr0 连接Internet    vr1 内网交换机1    vr2 内网交换机2    vr3 内网交换机3
59.108.38.*        192.168.1.0/24    192.168.2.0/24    172.16.71.0/24

采用OpenBSD 4.3自带的DHCP

1. /etc/dhcpd.conf
# cat /etc/dhcpd.conf
default-lease-time 36000;
max-lease-time 72000;

option domain-name-servers 59.108.38.195;

#ddns-update-style ad-hoc;
#log-facility local7;


# for admin vr1
shared-network Admin-NET {
    option  domain-name "atyu30.com";
subnet 192.168.1.0 netmask 255.255.255.0 {
        option broadcast-address 192.168.1.255;
        option routers 192.168.1.1;
        range 192.168.1.10 192.168.1.200;
    }
}
# for office vr2
shared-network Office-NET {
subnet 192.168.2.0 netmask 255.255.255.0 {
        option broadcast-address 192.168.2.255;
        option routers 192.168.2.1;
        range 192.168.2.50 192.168.2.150;
    }
}

# for Server vr3
shared-network Server-NET {
subnet 172.16.71.0 netmask 255.255.255.0 {
        option broadcast-address 172.16.71.255;
        option routers 172.16.71.1;
        range 172.16.71.50 172.16.71.150;
    }
}

host Gate-OpenBSD {
next-server 192.168.1.100;
hardware ethernet 00:0E:7B:37:96:6C;
fixed-address 192.168.1.120;
}
}

2.启动
# touch /var/db/dhcpd.leases
# dhcpd vr1 vr2 vr3

3./etc/rc.conf.local

dhcpd_flags="" # for normal use: ""


4./etc/dhcpd.interfaces

#dhcpd的****端口:

# cat /etc/dhcpd.interfaces
# $OpenBSD: dhcpd.interfaces,v 1.1 1998/08/19 04:25:45 form Exp $
#
# List of network interfaces served by dhcpd(8).
#
# ep0
# ed0 le0
# de1
vr1
vr2
vr3