---
# System prepended metadata

title: CentOS Steps For Manual Configuration.

---

# CentOS Steps For Manual Configuration.

## Network restart command
* ```sudo systemctl restart network``` (This didn't work for me)
* I had to run the followings
    * ```sudo systemctl restart NetworkManager.service```
    * ```sudo nmcli networking off ```
    * ```sudo nmcli networking on ``` 

## File Location
```/etc/sysconfig/network-scripts/```

## Only DHCP 

```
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33-test
UUID=32ee6c07-273e-4bbd-8e85-3d7d6ce85c33
DEVICE=ens33
ONBOOT=yes
```
* Run network restart commands
* Run ```ip a```
### ens33 :

```
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:56:35:9a:3d brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.8/24 brd 192.168.1.255 scope global dynamic noprefixroute ens33
       valid_lft 86397sec preferred_lft 86397sec
    inet6 fe80::2261:b8e1:e2c3:ed97/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
```

Here ```192.168.1.8``` is assigned by the router

## Assigning Single Static IP
```
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33-test
UUID=32ee6c07-273e-4bbd-8e85-3d7d6ce85c33
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.1.23                        
NETMASK=255.255.255.0                      
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4
```
* Run network restart commands
* Run ```ip a```
### ens33 :

```
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:56:35:9a:3d brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.23/24 brd 192.168.1.255 scope global noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::2261:b8e1:e2c3:ed97/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
```

Here I have assigned ```192.168.1.23``` IP

## Assigning Multiple Static IPs
```
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33-test
UUID=32ee6c07-273e-4bbd-8e85-3d7d6ce85c33
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.1.23                        
NETMASK=255.255.255.0                      
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4
IPADDR1=192.168.1.21                        
NETMASK1=255.255.255.0                      
GATEWAY1=192.168.1.1
```
* Run network restart commands
* Run ```ip a```
### ens33 :

```
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:56:35:9a:3d brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.23/24 brd 192.168.1.255 scope global noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet 192.168.1.21/24 brd 192.168.1.255 scope global secondary noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::2261:b8e1:e2c3:ed97/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
```

Here I have assigned ```192.168.1.23``` & ```192.168.1.21 ``` IPs


## Assigning Multiple Static IPs with DHCP enabled
```
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33-test
UUID=32ee6c07-273e-4bbd-8e85-3d7d6ce85c33
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.1.23                        
NETMASK=255.255.255.0                      
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4
IPADDR1=192.168.1.21                        
NETMASK1=255.255.255.0                      
GATEWAY1=192.168.1.1
```
* Run network restart commands
* Run ```ip a```
### ens33 :

```
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:56:35:9a:3d brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.8/24 brd 192.168.1.255 scope global dynamic noprefixroute ens33
       valid_lft 86399sec preferred_lft 86399sec
    inet 192.168.1.23/24 brd 192.168.1.255 scope global secondary noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet 192.168.1.21/24 brd 192.168.1.255 scope global secondary noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::2261:b8e1:e2c3:ed97/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
```

Here I have assigned ```192.168.1.23``` & ```192.168.1.21 ``` IPs and router assigned ```192.168.1.8```

## Bridge Network
* ```cd /etc/sysconfig/network-scripts/```
* ```sudo touch ifcfg-virbrN``` here N can be any number in my case I have used ifcfg-virbr0
* Now Add the following to the file : 
```
STP=yes
BRIDGING_OPTS=priority=32768
TYPE=Bridge
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=virbr0-test
UUID=44123894-8fb3-41a5-9a1e-ddf35d0ac9d1
DEVICE=virbr0
ONBOOT=yes
IPADDR=192.168.1.16                        
NETMASK=255.255.255.0                      
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4
```
* Let’s now change the ifcfg-ens33 file to this : 
```
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
NAME=ens33-test
UUID=32ee6c07-273e-4bbd-8e85-3d7d6ce85c33
DEVICE=ens33
ONBOOT=yes
BRIDGE=virbr0
```

* Run network restart commands
* Run ```ip a```


### ens33 :

```
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master virbr0 state UP group default qlen 1000
    link/ether 00:50:56:35:9a:3d brd ff:ff:ff:
```

### virbr0 :

```
9: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 00:50:56:35:9a:3d brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.16/24 brd 192.168.1.255 scope global noprefixroute virbr0
       valid_lft forever preferred_lft forever
```

## Reassigning to ens33
* ```sudo ip link set dev br0 down```
* Now Add the following to the file(ifcfg-ens33) : 
```
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33-test
UUID=32ee6c07-273e-4bbd-8e85-3d7d6ce85c33
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.1.23                        
NETMASK=255.255.255.0                      
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4
```

* Run network restart commands
* Run ```ip a```
### ens33 :

```
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:56:35:9a:3d brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.23/24 brd 192.168.1.255 scope global noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::2261:b8e1:e2c3:ed97/64 scope link tentative noprefixroute 
       valid_lft forever preferred_lft forever
```

### virbr0 :

```
10: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether e6:4e:f0:92:c1:fc brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.16/24 brd 192.168.1.255 scope global noprefixroute virbr0
       valid_lft forever preferred_lft forever
```

If you want you can now safely remove virbr0 by running ```sudo ip link delete virbr0 type bridge```







