一.设置静态IP及DHCP网络服务 kk@yuanqiangfei:~$ cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface
试验拓扑 环境:dhcp server和客户端处于不同网段的情况 dhcp server的配置 no ip routing ip dhcp pool vlan27 network 172.28.27.0 255.255.255.0 default-router 172.28.27.254 dns-server 172.28.28.15 172.28.28.16 ip default-gateway 172.28.28.254 L3-switch的配置 interface Vlan27 ip dh
IDC小菜鸟一枚,非科班出身.常常有客户的centos服务器需要分配15个IP甚至30个IP.每次需要手动分配十分麻烦,于是花了一天时间学了shell脚本,写了这个脚本. #!/bin/bash read -p "The IP numbers: " num while [[ $num -gt 0 ]] do read -p "Please enter IP Address :" ipaddr touch /etc/sysconfig/network-scripts/