Home | Mirror | Search |
ifconfig eth0 192.168.0.10 netmask 255.255.255.0 or ip addr add 192.168.0.10 dev eth0
ifcfg-eth0,ifcfg-eth1,ifcfg-eth2 ... ifcfg-eth(n)
[root@development httpd]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 # Broadcom Corporation NetLink BCM5784M Gigabit Ethernet PCIe DEVICE=eth0 BOOTPROTO=static BROADCAST=192.168.3.255 HWADDR=00:25:64:A3:59:BF IPADDR=192.168.3.40 IPV6INIT=yes IPV6_AUTOCONF=yes NETMASK=255.255.255.0 NETWORK=192.168.3.0 ONBOOT=yes
eth0:1
[root@development httpd]# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1 [root@development httpd]# vi /etc/sysconfig/network-scripts/ifcfg-eth0:1 # Broadcom Corporation NetLink BCM5784M Gigabit Ethernet PCIe DEVICE=eth0:1 BOOTPROTO=static BROADCAST=192.168.3.255 HWADDR=00:25:64:A3:59:BF IPADDR=192.168.3.41 IPV6INIT=yes IPV6_AUTOCONF=yes NETMASK=255.255.255.0 NETWORK=192.168.3.0 ONBOOT=yes
reload network
[root@development ~]# /etc/init.d/network reload Shutting down interface eth0: [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: