Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: sonu chouhan <hi100nu@yahoo.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] multigateway routing with adsl and dynamic ip
Date: Wed, 31 Oct 2007 11:18:05 +0000	[thread overview]
Message-ID: <33723.46916.qm@web32504.mail.mud.yahoo.com> (raw)
In-Reply-To: <658869.14038.qm@web32513.mail.mud.yahoo.com>


[-- Attachment #1.1: Type: text/plain, Size: 4080 bytes --]

  Thanks ben & Grant,
  i am not so much expert in linux and don't have a proper knowledge of script writing, i am showing my problem again in detail below.
  i am using 4 adsl lines of an same isp, my adsl modem is working as a nat router so i can get static private ip on my linux multigateway router, all is working fine
  but my adsl router's wan port hang sometime in 4 to 5 days, and my linux router don't find that one line is down bcoz gateway is still up (i.e. adsl modem's lan port is working). i have try many different modem of different make but problem is same and when i use adsl modem as a bridge, there is no problem in modem, so i have desided to
  change my adsl modem in bridge mode, but my isp only provide dynamic ip and also getting many problem which i am showing you below with my rules which is working fine
  IFI=eth1 # local lan card 
  IPI=172.16.1.1 # local network's ip
  NMI=16 # local network's subnet
  IFE1=eth0 # adsl internet lan card
  IFE2=eth2 # adsl internet lan card
  IFE3=eth3 # adsl internet lan card
  IFE4=eth4 # adsl internet lan card
  IPE1=192.168.1.2 # adsl internet ip 
  IPE2=10.10.10.2 # adsl internet ip
  IPE3=10.10.16.2 # adsl internet ip
  IPE4=10.10.1.2 # adsl internet ip
  NWE1=192.168.1.0
  NWE2=10.10.10.0
  NWE3=10.10.16.0
  NWE4=10.10.1.0
  NME1=24
  NME2=24
  NME3=24
  NME4=24
  BRD1=192.168.1.255
  BRD2=10.10.10.255
  BRD3=10.10.16.255
  BRD4=10.10.1.255
  GWE1=192.168.1.1
  GWE2=10.10.10.1
  GWE3=10.10.16.1
  GWE4=10.10.1.1
  /sbin/ip addr flush dev lo
  /sbin/ip addr flush dev $IFI
  /sbin/ip addr flush dev $IFE1
  /sbin/ip addr flush dev $IFE2
  /sbin/ip addr flush dev $IFE3
  /sbin/ip addr flush dev $IFE4
  /sbin/ip link set lo up
  /sbin/ip addr add 127.0.0.1/8 brd + dev lo
  /sbin/ip link set $IFI up
  /sbin/ip addr add $IPI/$NMI brd + dev $IFI
  /sbin/ip rule add prio 50 table main
  /sbin/ip route del default table main
  /sbin/ip link set $IFE1 up
  /sbin/ip addr flush dev $IFE1
  /sbin/ip addr add $IPE1/$NME1 brd $BRD1 dev $IFE1
  /sbin/ip link set $IFE2 up
  /sbin/ip addr flush dev $IFE2
  /sbin/ip addr add $IPE2/$NME2 brd $BRD2 dev $IFE2
  /sbin/ip link set $IFE3 up
  /sbin/ip addr flush dev $IFE3
  /sbin/ip addr add $IPE3/$NME3 brd $BRD3 dev $IFE3
  /sbin/ip link set $IFE4 up
  /sbin/ip addr flush dev $IFE4
  /sbin/ip addr add $IPE4/$NME4 brd $BRD4 dev $IFE4
  /sbin/ip rule add prio 201 from $NWE1/$NME1 table T1 # problem 1 : how to know the subnet each time ip change
  /sbin/ip route add default via $GWE1 dev $IFE1 src $IPE1 proto static table T1 # problem 2 : how to add gw, it's already added. Problem 3 : how to know IPE, it's dynamic
  /sbin/ip route append prohibit default table T1 metric 1 proto static
  /sbin/ip rule add prio 202 from $NWE2/$NME2 table T2
  /sbin/ip route add default via $GWE2 dev $IFE2 src $IPE2 proto static table T2
  /sbin/ip route append prohibit default table T2 metric 1 proto static
  /sbin/ip rule add prio 203 from $NWE3/$NME3 table T3
  /sbin/ip route add default via $GWE3 dev $IFE3 src $IPE3 proto static table T3
  /sbin/ip route append prohibit default table T3
  /sbin/ip rule add prio 204 from $NWE4/$NME4 table T4
  /sbin/ip route add default via $GWE4 dev $IFE4 src $IPE4 proto static table T4
  /sbin/ip route append prohibit default table T4
  /sbin/ip rule add prio 222 table T6
  /sbin/ip route add default table T6 proto static nexthop via $GWE4 dev $IFE4 weight 1 nexthop via $GWE3 dev $IFE3 weight 1 nexthop via $GWE2 dev $IFE2 weight 1 nexthop via $GWE1 dev $IFE1 weight 1
  /sbin/ip rule add fwmark 0x11 table T1
  /sbin/ip rule add fwmark 0x12 table T2
  /sbin/ip rule add fwmark 0x13 table T3
  /sbin/ip rule add fwmark 0x14 table T4
  /sbin/ip route flush cache
  so plz help me out that how can i make a script, and i don't want to run any script manuly bcoz ip does change in every few hours
  sorry for my poor english
  thanks in advance.
  Nilesh..........

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[-- Attachment #1.2: Type: text/html, Size: 4973 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

  parent reply	other threads:[~2007-10-31 11:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29 12:44 [LARTC] multigateway routing with adsl and dynamic ip sonu chouhan
2007-10-29 13:15 ` Ben Scott
2007-10-29 22:17 ` Grant Taylor
2007-10-31 11:18 ` sonu chouhan [this message]
2007-10-31 16:34 ` Grant Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=33723.46916.qm@web32504.mail.mud.yahoo.com \
    --to=hi100nu@yahoo.com \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox