10-24-2020

https://youtu.be/G6DDJPAjnr0

 

10-25-2020

https://youtu.be/BaAolHcypdc

 

 

NIC – Network Ethernet Adapter

 

 

[root@zmpt01 ~]# cd /etc/sysconfig/network-scripts/

 

[root@zmpt01 network-scripts]# ls

ifcfg-enp0s3 

ifcfg-enp0s8 

ifcfg-enp0s9

 

 

Example of NIC configuration file - ifcfg-enp0s3

 

[root@zmpt01 network-scripts]# vi ifcfg-enp0s3

 

 

TYPE=Ethernet

BOOTPROTO=dhcp

NAME=enp0s3

DEVICE=enp0s3

ONBOOT=yes

 

TYPE=Ethernet

Connection

BOOTPROTO=dhcp

Protocol[dhcp is random ] [static is assigned]

NAME=enp0s3

This NiC name, matches with config file

DEVICE=enp0s3

This NiC device, matches with Config file

ONBOOT=yes

If yes system will automatically enable ip

 

 

DHCP

-          Dynamic Host Control Protocol – IP is assigned randomly by router

-          DCHP IP can change anytime

-          t/s check to see if the IP address has changed

 

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 08:00:27:28:09:c4 brd ff:ff:ff:ff:ff:ff

    inet 192.168.56.105/24 brd 192.168.56.255 scope global noprefixroute dynamic enp0s3

       valid_lft 1137sec preferred_lft 1137sec

    inet6 fe80::a00:27ff:fe28:9c4/64 scope link

       valid_lft forever preferred_lft forever

Static

-          the IP address is assigned manually to the host/ server/ computer/ box

 

[root@zmpt01 network-scripts]# vi ifcfg-enp0s3

 

TYPE=Ethernet

BOOTPROTO=static

NAME=enp0s3

DEVICE=enp0s3

ONBOOT=yes

HWADDR=08:00:27:28:09:c4

IPADDR=192.168.56.110

NETMASK=255.255.255.0

 

TYPE=Ethernet

Connection

BOOTPROTO=static

Protocol[dhcp is random ] [static is assigned]

NAME=enp0s3

This NiC name, matches with config file

DEVICE=enp0s3

This NiC device, matches with Config file

ONBOOT=yes

If yes system will automatically enable ip

HWADDR=08:00:27:79:66:e0

Hardware Address or MAC Address

IPADDR=192.168.56.110

Static IP of your choice

NETMASK=255.255.255.0

Sub Network Mask

 

 

Restart the system

2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 08:00:27:28:09:c4 brd ff:ff:ff:ff:ff:ff

    inet 192.168.56.110/24 brd 192.168.56.255 scope global noprefixroute enp0s3

       valid_lft forever preferred_lft forever

    inet6 fe80::a00:27ff:fe28:9c4/64 scope link

       valid_lft forever preferred_lft forever

10-25-2020

https://youtu.be/BaAolHcypdc

 

 

NiC Bonding

 

 Linux allows binding of multiple network interfaces into a single channel/NIC using special kernel module called bonding.

 

 

Edit files as needed and input following informaiton

 

[root@zmpt01 network-scripts]# cat ifcfg-enp0s3

DEVICE=enp0s3

ONBOOT=yes

BOOTPROTO=none

SLAVE=yes

MASTER=bond0

 

 

[root@zmpt01 network-scripts]# cat ifcfg-enp0s8

DEVICE=enp0s8

ONBOOT=yes

BOOTPROTO=none

SLAVE=yes

MASTER=bond0

 

Create file ifcfg-bond0

 

[root@zmpt01 network-scripts]# cat ifcfg-bond0

DEVICE=bond0

TYPE=Bond

ONBOOT=yes

BOOTPROTO=static

IPADDR=192.168.56.250

NETMASSK=255.255.255.0

 

Create bond configuration file

 

[root@zmpt01 ~]# cd /etc/modprobe.d/

 

[root@zmpt01 modprobe.d]# vi bonding.conf

 

alias bond0 bonding

 

Activate Bonding

 

[root@zmpt01 ~]# modprobe bonding

 

Check if the bonding is active in memory

 

 

[root@zmpt01 ~]# lsmod | grep bonding

bonding               152979  0

 

Restart network

 

[root@zmpt01 ~]# systemctl restart network

 

2: enp0s3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000

    link/ether 08:00:27:28:09:c4 brd ff:ff:ff:ff:ff:ff

3: enp0s8: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000

    link/ether 08:00:27:28:09:c4 brd ff:ff:ff:ff:ff:ff

4: enp0s9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

    link/ether 08:00:27:f5:49:e8 brd ff:ff:ff:ff:ff:ff

    inet 10.0.2.6/24 brd 10.0.2.255 scope global noprefixroute dynamic enp0s9

       valid_lft 1131sec preferred_lft 1131sec

    inet6 fe80::dc0b:5bd8:ba77:427f/64 scope link noprefixroute

       valid_lft forever preferred_lft forever

5: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

    link/ether 08:00:27:28:09:c4 brd ff:ff:ff:ff:ff:ff

    inet 192.168.56.250/24 brd 192.168.56.255 scope global noprefixroute bond0

       valid_lft forever preferred_lft forever

    inet6 fe80::a00:27ff:fe28:9c4/64 scope link

       valid_lft forever preferred_lft forever