Anda di halaman 1dari 6

Basic Configuration

Install Net Tools:


Find what tools provide ifconfig
yum whatprovides ifconfig
Install Net Tools Command
yum -y install net-tools
Install NTPdate
yum -y install ntpdate
ntpdate stdtime.gov.hk
date
uname -ar
Update the OS and some patches
yum -y update
(wait a moment)
Install WGET service
yum -y install wget

Disable IPv6 if you don't need it.


- Check using ifconfig
more vi /etc/sysctl.conf
- Edit /etc/sysctl.conf
# add the following lines
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

DHCP service Configuration


Install and configure DHCP
========================================
[root@s1 ~]# yum -y install dhcp
[root@s1 ~]# vi /etc/dhcp/dhcpd.conf

Change the IP
# default lease time
default-lease-time 600;
# max lease time
max-lease-time 7200;
# this DHCP server to be declared valid
authoritative;
# specify network address and subnet mask
subnet 192.168.112.0 netmask 255.255.255.0 {
# specify the range of lease IP address
range dynamic-bootp 192.168.112.13 192.168.112.23;
# specify broadcast address
option broadcast-address 192.168.112.255;
# specify default gateway
option routers 192.168.112.2;
}

Change network address

==============================
Edit
vi /etc/sysconfig/network-scripts/ifcfg-eno16777736
BOOTROTO=none
IPADDR=192.168.75.3
NETMASK=255.255.255.0
GATEWAY=192.168.75.2
[root@s1 ~]# route -n
Kernel IP routing table
Destination

Gateway

192.168.112.0 0.0.0.0
169.254.0.0
0.0.0.0

0.0.0.0

Genmask

Flags Metric Ref Use Iface

255.255.255.240 U
255.255.0.0

192.168.112.2 0.0.0.0

U
UG

1002 0
0

[root@s1 ~]#
stop vmware dhcp service on your Host Windows 7

start dhcpd service


==================================
[root@s1 ~]# service dhcpd start
Starting dhcpd:

[ OK ]

[root@s1 ~]# systemctl start dhcpd

open service in firewalld


============================
firewall-cmd --zone=public --add-service=dhcp

0 eth0
0 eth0
0 eth0

DNS Configuration
DNS:172.18.33.101(ox)
If you need to change the network setting, refer to above step on page 9.
If you cannot use the static IP address, it may something wrong, such as mac address and default gateway,
please troubleshoot until it works.
Install Bind-Chroot ps. Follow all the steps please
yum -y install bind-chroot
vi /usr/libexec/setup-named-chroot.sh /var/named/chroot on
systemctl stop named
systemctl disable named
systemctl start named-chroot
systemctl enable named-chroot
download the 5 files in http://172.18.39.107/na/centos7/na79_dns/
(in Lab)
Edit Doucments
First, open the named.conf test document
using the template: say 316a.naXX.named.conf
Changes
- naXX
- IPs

Warming: you need to change this number to XXX(172.18.33.XXX)


YOU GOTTA ENTER THE CORRECT NUMBER AND IP ADDRESS

Edit the files


- configuration file
/var/named/chroot/etc/named.conf
cd /var/named/chroot/etc
cp named.conf orig.named.conf
using the template: say 316a.naXX.named.conf
Changes
- naXX
- IPs
forward zone file,
create
vi /var/named/chroot/var/named/316a.db.naXX.na.net.inside
using the template: say 316a.db.naXX.na.net.
Changes
- naXX
- IPs

open port for dns


[root@s1 ~]# firewall-cmd --state
running
[root@s1 ~]# firewall-cmd --get-zones
block dmz drop external home internal public trusted work
[root@s1 ~]# firewall-cmd --get-default-zone
public
[root@s1 ~]# firewall-cmd --list-services
dhcpv6-client ssh
[root@s1 ~]# firewall-cmd --permanent --zone=public --add-service=dns
success
[root@s1 ~]# firewall-cmd --reload
success
[root@s1 ~]# firewall-cmd --list-services
dhcpv6-client dns ssh
vi /etc/resolv.conf
; generated by /sbin/dhclient-script
search localdomain naXX.na.net

nameserver 172.18.33.XXX
nameserver 172.18.33.101
Checking:The files
Forward zone
[root@s1 named]# named-checkzone na00.na.net /var/named/chroot/var/named/316a.db.naXX.na.net.inside
zone na00.na.net/IN: loaded serial 2013052401
OK
Reverse zone
[root@s1 named]# named-checkzone 80.168.192.in-addr.arpa /var/named/chroot/var/named/316a.naXX.mylan
zone 80.168.192.in-addr.arpa/IN: loaded serial 2013052401
OK
[root@s1 named]# host www
www.na00.na.net has address 172.18.33.191
[root@s1 named]# host ftp
ftp.na00.na.net has address 172.18.33.191
[root@s1 named]# host mail
mail.na00.na.net has address 172.18.33.191
dig s1.na00.na.net
note: if you edited the files, you need to reboot
Remember turn-off your win7 DNS service and add the 172.18.33.101(ox)

Anda mungkin juga menyukai