10-24-2020 10-25-2020 |
|||||||||||||||||
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 |
|||||||||||||||||
|
|||||||||||||||||
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
|
|||||||||||||||||
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 |
|||||||||||||||||
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 |