Linux lab RE-IP

Published by

Posted on October 13, 2016

I found a errorĀ on my lab network which required a Re-ip of some of my servers and network devices. I figured this information may help someone who need to configure a network interface

 

Gentoo

Locate your network card id

Net config fileĀ /etc/conf.d/net

Example options

dns_domain_lo=”home.zone”
config_enp0s10f0=”192.168.0.1/24″
routes_enp0s10f0=”default via 192.168.0.1″
dns_servers_enp0s10f0=”4.4.4.4 8.8.8.8″

restart the network

/etc/init.d/net.enp0s10f0 restart

If you used dhcp initially . you will need to release the ip assigned by the dhcp server

dhcpd –release <card>

 

 

Fedora release 22 (Twenty Two)
config file : /etc/sysconfig/network-scripts/ifcfg-virbr0
DEVICE=virbr0
STP=yes
TYPE=Bridge
BOOTPROTO=none
DNS1=4.4.4.4
DNS2=8.8.8.8
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME=virbr0
UUID=3418f6cc-a383-49e2-86db-a6da7a4f3cb4
ONBOOT=no
DELAY=2
BRIDGING_OPTS=priority=32768
IPADDR=192.168.0.3
PREFIX=24
GATEWAY=192.168.0.1

restart the interface

nmcli connect <ethernetid>

 

 

Debian

iface eth0 inet static
    address 192.168.3.3
    netmask 255.255.255.0
    gateway 192.168.3.1
    dns-search example.com
    dns-nameserver 192.168.3.45 
    dns-nameserver 192.168.8.10