All pastes #177798 Raw Edit

Stuff

public text v1 · immutable
#177798 ·published 2006-09-20 18:19 UTC
rendered paste body
#! /bin/bash
# EBT_1 = Saida Internet
# EBT_2 = Comunicacao com Campinas
# SPD_1 = Download de e-mail Campinas

# Variavies

EBT_1="200.211.x.2"
EBT_2="200.210.x.2"
SPD_1="200.206.x.145"
GW_EBT_1="200.211.x.1"
GW_EBT_2="200.210.x.1"
GW_SPD_1="200.206.x.129"

# Adicionando as rotas nas tabelas

ip route add $EBT_1 via $GW_EBT_1 table ebt1
ip route add $EBT_2 via $GW_EBT_2 table ebt2
ip route add $SPD_1 via $GW_SPD_1 table speedy

# Adicionando as regras as tabelas (linkando a tabela na interface)

ip rule add from $EBT_1 table ebt1
ip rule add from $EBT_2 table ebt2
ip rule add from $SPD_1 table speedy

# Adicionando rota default para as tabelas

ip route add default via $GW_EBT_1 table ebt1
ip route add default via $GW_EBT_2 table ebt2
ip route add default via $GW_SPD_1 table speedy

# Definindo rota default

ip route add default via $GW_EBT_1