Login Page - Create Account

Support Board


Date/Time: Sat, 11 May 2024 13:25:54 +0000



Post From: [usr dscssn] two NICs for a Box on Ubuntu/Linux

[2013-09-27 01:02:02]
ganz - Posts: 1048
hi all

if a pc box has two NICs there is a simple trick to fire up an another connection

ping will test a connection every 3 secs

199.30.196.6 is the example IP for testing

uuid for a connection may be checked with

nmcli con

vlc will play a sound

the script is

#!/bin/bash

while [ "true" ]
do

if !( ping -c 1 -s 1 199.30.196.6 ) > /dev/null; then
  nmcli con down uuid >>put basic uuid here<<;
  nmcli con up uuid >>put reserve uuid here<<;
  /usr/bin/vlc /home/ganz/Music/Net_Alarm.mp3 &  
fi

sleep 3

done

the another way to do it is bonding https://help.ubuntu.com/community/UbuntuBonding

gd lck
Date Time Of Last Edit: 2013-09-27 01:02:53