标签:out star ip地址 挂载 dhcp中继 forward default scripts err
中继
1、[root@localhost ~]# mkdir /media/cdrom //新建目录
2、[root@localhost ~]# mount /dev/cdrom /media/cdrom //挂载镜像
3、[root@localhost ~]# rpm -ivh /media/cdrom/Packages/dhcp-4.2.5-36.el7.centos.x86_64.rpm //rpm安装dhcp
4、[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eno16777736 //编辑第一个网卡的配置文件
5、[root@localhost ~]# cp /etc/sysconfig/network-scripts/ifcfg-eno16777736 /etc/sysconfig/network-scripts/ifcfg-eno33554984
6、[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eno33554984 //修改第二个网卡的配置文件
TYPE="Ethernet"
BOOTPROTO="static"
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="eno33554984"
DEVICE="eno33554984"
ONBOOT="yes"
IPADDR=192.168.203.12
NETMASK=255.255.255.0
~
~
7、[root@localhost ~]# systemctl restart network //重启网络
8、[root@localhost ~]# rpm -ql dhcp //查看关于dhcp的指定软件包
9、[root@localhost ~]# vim /etc/sysctl.conf //编辑虚拟机的交换功能
10、[root@localhost ~]# sysctl -p //开启交换功能
net.ipv4.ip_forward = 1
11、[root@localhost ~]# systemctl restart network //重启网络服务
服务器
1、[root@localhost ~]# mkdir /media/cdrom
2、[root@localhost ~]# mount /dev/cdrom /media/cdrom
3、[root@localhost ~]# rpm -ivh /media/cdrom/Packages/dhcp-4.2.5-36.el7.centos.x86_64.rpm
4、[root@localhost ~]# vim /etc/dhcp/dhcpd.conf //编辑安装dhcp
标签:out star ip地址 挂载 dhcp中继 forward default scripts err
原文地址:https://www.cnblogs.com/tanxiaojuncom/p/11365902.html