You are on page 1of 5

Prerequisite

1. First Step

rpm -ivh NetworkManager-dispatcher-routing-rules-1.4.0-14.el7_3.noarch.rpm – package ini biasanya


sdh ada default di rhel 7

2. Start Service

systemctl enable NetworkManager-dispatcher.service;systemctl start NetworkManager-


dispatcher.service

3.disable selinux

[root@jktmmplmsdb01 network-scripts]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

# enforcing - SELinux security policy is enforced.

# permissive - SELinux prints warnings instead of enforcing.

# disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of three two values:

# targeted - Targeted processes are protected,

# minimum - Modification of targeted policy. Only selected processes are protected.

# mls - Multi Level Security protection.

SELINUXTYPE=targeted
IP Configuration

1. Check member of bond0

[root@jktmmpictdb01 network-scripts]# cat /proc/net/bonding/bond0

Bonding Mode: fault-tolerance (active-backup)

Primary Slave: None

Currently Active Slave: eth4

MII Status: up

MII Polling Interval (ms): 100

Up Delay (ms): 0

Down Delay (ms): 0

Slave Interface: eth4

MII Status: up

Speed: 1000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 44:1e:a1:71:8a:98

Slave queue ID: 0

Slave Interface: eth5

MII Status: up

Speed: 1000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 44:1e:a1:71:8a:9c

Slave queue ID: 0


2. Set file config eth4, eth5 and bond0

[root@jktmmpictdb01 network-scripts]# cat ifcfg-eth4

DEVICE=eth4

NAME=eth4

HWADDR=44:1e:a1:71:8a:98

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

[root@jktmmpictdb01 network-scripts]# cat ifcfg-eth5

DEVICE=eth5

NAME=eth5

HWADDR=44:1e:a1:71:8a:9c

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

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

DEVICE=bond0

BONDING_OPTS="miimon=100 mode=active-backup"

TYPE=Bond

BONDING_MASTER=yes

BOOTPROTO=none

IPADDR=10.64.24.42
PREFIX=22

GATEWAY=10.64.24.1

DEFROUTE=yes <--- make this interface gateway become default gateway

NAME=bond0

ONBOOT=yes

3. Set rule and route file

[root@jktmmpictdb01 network-scripts]# cat rule-bond0

from 10.64.24.42/32 tab 3 priority 100

[root@jktmmpictdb01 network-scripts]# cat route-bond0

10.64.24.0/22 dev bond0 tab 3

default via 10.64.24.1 dev bond0 tab 3

Set Another IP

[root@jktmmpictdb01 network-scripts]# cat ifcfg-eth1

TYPE=Ethernet

NAME=eth1

HWADDR=00:25:b3:b3:65:d1

#NAME=enp8s0f1

UUID=d9b336c3-a870-412f-aff4-707a4ca45b85

#DEVICE=enp8s0f1

DEVICE=eth1

ONBOOT=yes

IPADDR=10.64.28.195

NETMASK=255.255.252.0

GATEWAY=10.64.28.1
[root@jktmmpictdb01 network-scripts]# cat rule-eth1

from 10.64.28.195/32 tab 2 priority 300

[root@jktmmpictdb01 network-scripts]# cat route-eth1

10.64.28.0/22 dev eth1 tab 2

default via 10.64.28.1 dev eth1 tab 2

On do molo redhat 7

You might also like