Wednesday, December 28, 2016

The secondary network interface did not show up

The secondary network interface did not show up

Find out the subnet mask:

/bin/ipcalc --netmask 172.31.26.153/20

Initialize the secondary:

# ifconfig eth1 172.31.26.153 netmask 255.255.240.0

Edit interfaces setting:

# vi /etc/network/interfaces

# The primary network interface
auto eth0
iface eth0 inet dhcp
post-up ip route add default via 10.0.0.1 dev eth0 tab 1
post-up ip rule add from 10.0.0.170/32 tab 1 priority 500

auto eth1
iface eth1 inet dhcp
post-up ip route add default via 10.0.0.1 dev eth1 tab 2
post-up ip rule add from 10.0.0.190/32 tab 2 priority 600

Restart network:

# /etc/init.d/networking restart

Reference:

http://work.allaboutken.com/node/21

No comments: