Created
February 5, 2017 15:49
-
-
Save mdpuma/944eee1a5cd2f4ba15a93bbccf679541 to your computer and use it in GitHub Desktop.
Different configuration of ip addresses on distros
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # cat /etc/sysconfig/network-scripts/ifcfg-eth0 | |
| DEVICE="eth0" | |
| BOOTPROTO="static" | |
| HWADDR="00:26:6C:F3:11:A8" # match network interface by mac address | |
| ONBOOT="yes" | |
| TYPE="Ethernet" | |
| IPADDR=XXX.XXX.XXX.XXX | |
| PREFIX=24 | |
| GATEWAY=XXX.XXX.XXX.XXX | |
| DNS1=8.8.8.8 | |
| DNS2=8.8.4.4 | |
| ARPCHECK=no # skip arp checking of ip address | |
| # cat /etc/sysconfig/network-scripts/ifcfg-eth0-range* | |
| IPADDR_START=YYY.YYY.YYY.YYY | |
| IPADDR_END=YYY.YYY.YYY.YYY | |
| NETMASK=255.255.255.0 | |
| CLONENUM_START=10 | |
| # cat /etc/sysconfig/network-scripts/route-eth0 | |
| 1.1.1.1 dev eth0 | |
| # here you may write routes similar like you will type ip route add 1.1.1.1 dev eth0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment