User Tools
Writing /app/www/public/data/meta/databaseandnetworkmanagement/static_ip_on_redhat.meta failed
databaseandnetworkmanagement:static_ip_on_redhat
Set Static IP on RedHat
- # check the connected interface - usually eth0 but could be eth1, this affects what file we want to edit
- ifconfig
- # backup the config file of that interface
- sudo cp /etc/sysconfig/network-scripts/ifcfg-eth0 /home/scotty/backup/ifcfg-eth0.backup
- # A Config File without a static IP will look like :
DEVICE=eth0 HWADDR=F4:CE:46:89:DD:D0 TYPE=Ethernet UUID=1c4472a7-41a3-43bf-8b16-c0643976b2f8 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp
- # A config file with a static IP will look like :
DEVICE=eth0 TYPE=Ethernet UUID=1c4472a7-41a3-43bf-8b16-c0643976b2f8 ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none HWADDR=F4:CE:46:89:DD:D0 IPADDR=10.91.100.71 PREFIX=24 GATEWAY=10.91.100.1 DNS1=10.91.100.71 DNS2=10.5.5.15 DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth0"
- # make change as appropriate to the appropriate config file
- # save and exit
- # Be 100% confident with your changes - if you are not do not do this
- sudo service network restart
- # The server should now have the static ip you assigned it
databaseandnetworkmanagement/static_ip_on_redhat.txt · Last modified: 2021/06/25 10:09 by 127.0.0.1