AdminTalk - Talk to Learn

Navigation
Go Back   AdminTalk - Talk to Learn > Server Operating System > Linux Server
Linux Server Cài đặt, bảo mật, kinh nghiệm quản trị máy chủ Linux: CentOS, OpenSuSe, RedHat, Debian ...

Đề mục chính

Cấu trúc diễn đàn
Thông tin tổng hợp
Thông báo và quy định chung
Đóng góp ý kiến
Những bài viết có giá trị
Tin tức công nghệ
•• Tin tức công nghệ thông tin
•• Doanh Nghiệp & Người Tiêu Dùng
Premium Server, Hosting Support
Web Hosting / Domain
•• Kiến thức cơ bản về Web Hosting/Domain
•• Plesk - CPanel
Server / VPS
•• Kiến thức cơ bản Server - VPS
•• Server Review/ Hardware
•• Mail Server - AntiSPAM
Virtuozzo - VMWare - HyperV
•• For Windows
•• For Linux
Security
•• Mạng Wan - Lan
•• Internet - Virus - Hacker
VoIP
•• Kiến Thức Cơ Bản VoIP
•• Phần Cứng VoIP
•• Phần Mềm VoIP
•• Nhà cung cấp VoIP
Server Operating System
Linux Server
Windows Server 200x
Computer Supports and Discussion
Operating System
•• Hệ điều hành Linux
•• Hệ điều hành Windows
•• Hệ điều hành Mac
•• Hệ điều hành Chrome
Laptop, Netbook
Hardware
•• Cpu Intel
•• Cpu AMD
•• PSU, Overclocking & Cooling
•• Mainboard & Memory
•• Đồ họa máy tính
•• Kinh nghiệm
Software
•• Linux Apps
•• Windows Apps
Webmaster Area
Webmaster talk
Programming Language
•• HTML & CSS
•• PHP
•• C++ / C#
•• .NET
•• Java
•• Other
Graphic & Mutimedia
SEO (Search Engine Optimization)
Browsers
•• Mozilla Firefox
•• Chrome
•• Internet Explorer
Thủ Thuật Internet
Thương mại điện tử
•• Hình thức thanh toán
•• Giải pháp
HiTech, Mobile, Movies, Music, eBooks, Relax
Tablet PC
•• iPad
Mobile
•• iPhone
•• BlackBerry
•• Others
Movies
•• Download phim HD
•• Download phim DVD
Music
•• Download nhạc Lossless Album
•• Download nhạc Lossless tuyển chọn
eBooks - Tài liệu
•• Tin học - Lập trình
•• Khoa học - Kỹ thuật
•• Ngoại Ngữ
•• Tutorials - Training
•• Kinh tế
•• Thể Loại Khác
Bài học trong cuộc sống
AdminTalk – Talk to You
Introduce Youself
Off topic/ Chatting
Mua bán - Rao vặt - Tuyển dụng
Quảng cáo
Tuyển dụng

Bầu chọn mới nhất
Bạn nghĩ sao về công nghệ USB 3.0 ?

Rất tuyệt! Sẽ sử dụng ngay nếu được bán trên thị trường: 47.37%

Tốt hơn USB 2.0 , nhưng giá có thể mắc hơn nhiều: 42.11%

Bình thường thôi, công nghệ luôn thay đổi mà: 10.53%

Không quan tâm lắm: 0%
Voters: 38. You may not vote on this poll

Thống kê
Đề tài: 10610
Bài gửi: 12174
Thành viên: 20,205
Thành viên tích cực: 82
Xin cùng nhau chào đón thành viên mới nhất: ddvtien
Kỷ lục: 624 người đã ghé thăm 17/11/2010 lúc 06:16 AM.
Thành viên mới:
Hôm qua
- ddvtien
Hôm qua
- thanhtam1028
Hôm qua
- goodhealthvn1
Hôm qua
- honghobao286
07/02/2012
- condau
07/02/2012
- timlaibautroi7408
07/02/2012
- NguyenLien
07/02/2012
- quydona
06/02/2012
- hhhh11
06/02/2012
- danit

Số người đang xem
View Who's Online Thành viên: 1
Khách: 64
Tổng: 65
Nhóm: 0
Nhóm:  
Thành viên:  aviomobile
Mở Sổ Bạn Bè

Trả lời
 
LinkBack Ðiều Chỉnh Kiếm Trong Bài Xếp Bài

  #1 (permalink)
Old 06/04/2010, 10:22 AM
Cấu hình DHCP server

IrimiNage
Admintalk's SMod
love talking
 
IrimiNage's Avatar
 
Tham gia ngày: Mar 2010
Bài gởi: 219
My Mood:
Thanks: 0
Thanked 25 Times in 24 Posts
VP: 0.00
Donate
Cấu hình DHCP server

1. Soạn file cấu hình /etc/dhcpd.conf

Code:
ddns-update-style interim;
    ignore client-updates;

    subnet 172.16.0.0 netmask 255.240.0.0 {
    # default gateway
    option routers 172.31.255.254;

    option subnet-mask 255.240.0.0;
    option nis-domain "nis-domain";
    option domain-name "domain.name";
    option domain-name-servers ns1.domain.name, ns2.domain.name;
    # ntp server, nếu có
    # option ntp-servers 172.16.0.2;

    # dành 100 địa chỉ IP cho DHCP client
    range dynamic-bootp 172.30.255.1 172.30.255.100;
    default-lease-time 7200;
    max-lease-time 18000;

    # những máy luôn nhận IP cố định
    host kiemtra {
    hardware ethernet 08:00:20:x:x:x:x;
    fixed-address 172.31.0.1;
    }
    host testtest {
    hardware ethernet 00:03:93:x:x:x:x;
    fixed-address 172.31.0.2;
    option host-name "testtest";
    }
    }
2. Khởi động dhcpd
Code:
# /etc/init.d/dhcpd start
Ví dụ về script khởi động /etc/init.d/dhcpd (của FC1)

Code:
#!/bin/sh
    #
    # dhcpd This script takes care of starting and stopping
    # dhcpd.
    #
    # chkconfig: - 65 35
    # description: dhcpd provide access to Dynamic Host Control Protocol.

    # Source function library.
    . /etc/rc.d/init.d/functions

    # Source networking configuration.
    . /etc/sysconfig/network
    . /etc/sysconfig/dhcpd

    # Check that networking is up.
    [ ${NETWORKING} = "no" ] && exit 0

    [ -f /usr/sbin/dhcpd ] || exit 0
    [ -f /etc/dhcpd.conf ] || exit 0
    [ -f /var/lib/dhcp/dhcpd.leases ] || touch /var/lib/dhcp/dhcpd.leases

    RETVAL=0
    prog="dhcpd"

    configtest()
    {
    local retval TEMP=/tmp/dhcpd$$.err

    /usr/sbin/dhcpd -t 2>$TEMP
    retval=$?
    if [ $retval -ne 0 ]
    then
    cat $TEMP
    rm -f $TEMP
    fi

    return $retval
    }

    start() {
    # Start daemons.
    echo -n $"Starting $prog: "
    daemon /usr/sbin/dhcpd ${DHCPDARGS}
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dhcpd
    return $RETVAL
    }

    stop() {
    # Stop daemons.
    echo -n $"Shutting down $prog: "
    killproc dhcpd
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dhcpd
    return $RETVAL
    }

    # See how we were called.
    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    restart|reload)
    configtest || exit $?
    stop
    start
    RETVAL=$?
    ;;
    condrestart)
    if [ -f /var/lock/subsys/dhcpd ]; then
    stop
    start
    RETVAL=$?
    fi
    ;;
    configtest)
    configtest
    RETVAL=$?
    ;;
    status)
    status dhcpd
    RETVAL=$?
    ;;
    *)
    echo $"Usage: $0 {start|stop|restart|condrestart|configtest|status}"
    exit 1
    esac

    exit $RETVAL
Tham khảo

1. /usr/share/doc/dhcp-x.x.x/dhcpd.conf.sample
2. man dhcpd.conf

(Nguồn: HVA)


Bài viết cùng chủ đề:
IrimiNage vẫn chưa có mặt trong diễn đàn  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Trả Lời Với Trích Dẫn
Trả lời

Bookmarks

Tags
admin server, admintalk, bao mat, bảo mật, kinh nghiệm, kinh nghiem, linux, linux server, may chu, máy chủ, server, server admin, support, unix


Ðang đọc: 1 (0 thành viên và 1 khách)
 
Ðiều Chỉnh Kiếm Trong Bài
Kiếm Trong Bài:

Kiếm Chi Tiết
Xếp Bài

Quyền Sử Dụng Ở Diễn Ðàn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Smilies đang Mở
[IMG] đang Mở
HTML đang Tắt
Trackbacks are Mở
Pingbacks are Mở
Refbacks are Mở

Chuyển đến



Múi giờ GMT. Hiện tại là 12:00 AM.
Powered by: vBulletin - Copyright © 2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.AdminTalk.vn
Powered by vBCMS® 1.2.5 ©2002 - 2012 VinaCIS® Corporation