Networking section: Difference between revisions

From SaruWiki
Jump to navigation Jump to search
m (Reverted edits by 190.5.202.207 (Talk); changed back to last version by Saruman!)
Line 1: Line 1:
==Routes under Debian==
fine asian boobs, <a href="http://honda-odess.pilomatrixoma.co.cc/buckaroo-tack.html">buckaroo tack</a>, [url="http://honda-odess.pilomatrixoma.co.cc/buckaroo-tack.html"]buckaroo tack[/url], http://honda-odess.pilomatrixoma.co.cc/buckaroo-tack.html buckaroo tack, >:-DDD, <a href="http://hottie-gott.pilomatrixoma.co.cc/metaformin.html">metaformin</a>, [url="http://hottie-gott.pilomatrixoma.co.cc/metaformin.html"]metaformin[/url], http://hottie-gott.pilomatrixoma.co.cc/metaformin.html metaformin,  56219, <a href="http://legacy-of.pilomatrixoma.co.cc/shopgoodwill.html">shopgoodwill</a>, [url="http://legacy-of.pilomatrixoma.co.cc/shopgoodwill.html"]shopgoodwill[/url], http://legacy-of.pilomatrixoma.co.cc/shopgoodwill.html shopgoodwill,  596, <a href="http://irukandji-j.pilomatrixoma.co.cc/domai-sabrina.html">domai sabrina</a>, [url="http://irukandji-j.pilomatrixoma.co.cc/domai-sabrina.html"]domai sabrina[/url], http://irukandji-j.pilomatrixoma.co.cc/domai-sabrina.html domai sabrina, >:PPP, <a href="http://hottie-gott.pilomatrixoma.co.cc/ballad-of-bilbo-baggins.html">ballad of bilbo baggins</a>, [url="http://hottie-gott.pilomatrixoma.co.cc/ballad-of-bilbo-baggins.html"]ballad of bilbo baggins[/url], http://hottie-gott.pilomatrixoma.co.cc/ballad-of-bilbo-baggins.html ballad of bilbo baggins, rcaj, <a href="http://gangster-tw.pilomatrixoma.co.cc/clea-koff.html">clea koff</a>, [url="http://gangster-tw.pilomatrixoma.co.cc/clea-koff.html"]clea koff[/url], http://gangster-tw.pilomatrixoma.co.cc/clea-koff.html clea koff, 5810, <a href="http://eu3000is-.pilomatrixoma.co.cc/lara-croft-bares-all.html">lara croft bares all</a>, [url="http://eu3000is-.pilomatrixoma.co.cc/lara-croft-bares-all.html"]lara croft bares all[/url], http://eu3000is-.pilomatrixoma.co.cc/lara-croft-bares-all.html lara croft bares all,  981221, <a href="http://legacy-of.pilomatrixoma.co.cc/kathrine-hepburn.html">kathrine hepburn</a>, [url="http://legacy-of.pilomatrixoma.co.cc/kathrine-hepburn.html"]kathrine hepburn[/url], http://legacy-of.pilomatrixoma.co.cc/kathrine-hepburn.html kathrine hepburn, hpd, <a href="http://dovey-coe.pilomatrixoma.co.cc/shamu-cam.html">shamu cam</a>, [url="http://dovey-coe.pilomatrixoma.co.cc/shamu-cam.html"]shamu cam[/url], http://dovey-coe.pilomatrixoma.co.cc/shamu-cam.html shamu cam, >:-(((, <a href="http://irukandji-j.pilomatrixoma.co.cc/kalwall.html">kalwall</a>, [url="http://irukandji-j.pilomatrixoma.co.cc/kalwall.html"]kalwall[/url], http://irukandji-j.pilomatrixoma.co.cc/kalwall.html kalwall,  hpz, <a href="http://legacy-of.pilomatrixoma.co.cc/omnimon.html">omnimon</a>, [url="http://legacy-of.pilomatrixoma.co.cc/omnimon.html"]omnimon[/url], http://legacy-of.pilomatrixoma.co.cc/omnimon.html omnimon,  25545, <a href="http://irukandji-j.pilomatrixoma.co.cc/krystal-steal-sex.html">krystal steal sex</a>, [url="http://irukandji-j.pilomatrixoma.co.cc/krystal-steal-sex.html"]krystal steal sex[/url], http://irukandji-j.pilomatrixoma.co.cc/krystal-steal-sex.html krystal steal sex, %O, <a href="http://castrating-.pilomatrixoma.co.cc/monkys.html">monkys</a>, [url="http://castrating-.pilomatrixoma.co.cc/monkys.html"]monkys[/url], http://castrating-.pilomatrixoma.co.cc/monkys.html monkys, >:-O, <a href="http://dovey-coe.pilomatrixoma.co.cc/truesync-desktop-download.html">truesync desktop download</a>, [url="http://dovey-coe.pilomatrixoma.co.cc/truesync-desktop-download.html"]truesync desktop download[/url], http://dovey-coe.pilomatrixoma.co.cc/truesync-desktop-download.html truesync desktop download,  63244, <a href="http://legacy-of.pilomatrixoma.co.cc/famous-mainers.html">famous mainers</a>, [url="http://legacy-of.pilomatrixoma.co.cc/famous-mainers.html"]famous mainers[/url], http://legacy-of.pilomatrixoma.co.cc/famous-mainers.html famous mainers, 45704, <a href="http://castrating-.pilomatrixoma.co.cc/lizzy-borden-nude.html">lizzy borden nude</a>, [url="http://castrating-.pilomatrixoma.co.cc/lizzy-borden-nude.html"]lizzy borden nude[/url], http://castrating-.pilomatrixoma.co.cc/lizzy-borden-nude.html lizzy borden nude,  2995, <a href="http://castrating-.pilomatrixoma.co.cc/flexitec.html">flexitec</a>, [url="http://castrating-.pilomatrixoma.co.cc/flexitec.html"]flexitec[/url], http://castrating-.pilomatrixoma.co.cc/flexitec.html flexitec,  =-(((, <a href="http://irukandji-j.pilomatrixoma.co.cc/ngk-spark-plug-cross-reference.html">ngk spark plug cross reference</a>, [url="http://irukandji-j.pilomatrixoma.co.cc/ngk-spark-plug-cross-reference.html"]ngk spark plug cross reference[/url], http://irukandji-j.pilomatrixoma.co.cc/ngk-spark-plug-cross-reference.html ngk spark plug cross reference, cgoiit, <a href="http://legacy-of.pilomatrixoma.co.cc/umpa-lumpas.html">umpa lumpas</a>, [url="http://legacy-of.pilomatrixoma.co.cc/umpa-lumpas.html"]umpa lumpas[/url], http://legacy-of.pilomatrixoma.co.cc/umpa-lumpas.html umpa lumpas, dsmp, <a href="http://trish-strau.pilomatrixoma.co.cc/oberweis-dairy.html">oberweis dairy</a>, [url="http://trish-strau.pilomatrixoma.co.cc/oberweis-dairy.html"]oberweis dairy[/url], http://trish-strau.pilomatrixoma.co.cc/oberweis-dairy.html oberweis dairy,  344973,
 
When you need to add a networking route, there generally are two ways to do it:
# manually adding a route at the command prompt: this means that the machine will "understand" the route for as long as it is running. However, when you reboot the machine, it will have "forgotten" the route. This is called a non-persistent route.
# adding a route to the networking configuration files, so that it will be in place regardless of reboots or network restarts. This is called a persistent route.
 
===Manipulating non-persistent routes===
From the days of yore, the venerable ''route'' command enables us to view, add, change and delete routes. Its most known use is for printing the current routing table:
#route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.70.0    212.214.172.50 255.255.255.0  UG    0      0        0 eth1
192.168.67.0    *              255.255.255.0  U    0      0        0 eth0
  212.214.172.0  *              255.255.255.0  U    0      0        0 eth1
default        212.214.172.1  0.0.0.0        UG    0      0        0 eth1
The addition of -n makes sure the ''route'' command does not try to substitute DNS names for IP addresses it knows.
The second most used incarnation of ''route'' lies in the addition of a route, as has happened in the previous example. The route was added to the routing table using something like this:
  #route add -net 192.168.70.0 netmask 255.255.255.0 gw 212.214.172.40
However, there is a newer command available to us, that gives us a bit more options (however, at the cost of losing the well-known output format): this is the ''ip'' command, which is part of the [[Essential_system_software|essential]] ''iproute2'' package:
#ip route show
192.168.70.0/24 via 212.214.172.50 dev eth1  src 192.168.67.10
192.168.67.0/24 dev eth0  proto kernel  scope link  src 192.168.67.10
  212.214.172.0/24 dev eth1  proto kernel  scope link  src 212.214.172.50
default via 212.214.172.1 dev eth1
This is the output from the same system as the previous example. However, we see something interesting here: "ip" is capable of adding extra information to the route, like the first line shows (it's using "via"). The addition of that particular route would go like this:
#ip route add 192.168.70.0/24 via 212.214.172.50 src 192.168.67.10
 
Ofcourse, being capable of adding routes means we also need to be capable of deleting them:
#route del -net 192.168.70.0 netmask 255.255.255.0
  #ip route del 192.168.70.0/24
As you can see, we only need to specify the target of the route to delete, not the options.
 
===Manipulating persistent routes===
To make a route persistent across reboots, we need to enter them somewhere where they're saved. There are many possible routes available, but the two that fit Debian the most are the following:
 
'''A)''' You could add the route addition command to the ''/etc/network/interfaces'' file; let the command itself be preceeded with the keyword "up" to signal the networking scripts that the command must be executed when an interface is brought "up"; the line could look like this (just as the examples from the preceeding section):
<pre>
# Internet interface
auto eth1
iface eth1 inet dhcp
up ip route add 192.168.70.0/24 via 212.214.172.50 src 192.168.67.10</pre>
Naturally, you could also use the ''route add'' command instead of the ''ip route add'' command, but we prefer ''ip''. Note: it matters --where-- in the ''interfaces'' file you put this line: it should be put in the same stanza as the interface it operates on. In this example, the external interface of the server is 212.214.172.50, which belongs with interface ''eth1''. Therefore, the "up" line appears in the stanza for ''eth1''.
 
'''B)''' You could create a script that sets the route(s), and put it in the directory ''/etc/network/if-up.d''. Since all scripts that reside there get called when any interface goes "up", your route setting script would be called when ''any'' interface comes up, including ''lo''. This in turn means that a script for setting a route that belongs with a particular interface, should check on invocation which is the interface that goes up. At this moment in time, we don't employ any such script, so no example here, but if you look at the existing scripts in ''/etc/network/if-up.d'' you'll see how other programmers have done this.

Revision as of 14:16, 16 October 2008

fine asian boobs, <a href="http://honda-odess.pilomatrixoma.co.cc/buckaroo-tack.html">buckaroo tack</a>, [url="http://honda-odess.pilomatrixoma.co.cc/buckaroo-tack.html"]buckaroo tack[/url], http://honda-odess.pilomatrixoma.co.cc/buckaroo-tack.html buckaroo tack, >:-DDD, <a href="http://hottie-gott.pilomatrixoma.co.cc/metaformin.html">metaformin</a>, [url="http://hottie-gott.pilomatrixoma.co.cc/metaformin.html"]metaformin[/url], http://hottie-gott.pilomatrixoma.co.cc/metaformin.html metaformin, 56219, <a href="http://legacy-of.pilomatrixoma.co.cc/shopgoodwill.html">shopgoodwill</a>, [url="http://legacy-of.pilomatrixoma.co.cc/shopgoodwill.html"]shopgoodwill[/url], http://legacy-of.pilomatrixoma.co.cc/shopgoodwill.html shopgoodwill, 596, <a href="http://irukandji-j.pilomatrixoma.co.cc/domai-sabrina.html">domai sabrina</a>, [url="http://irukandji-j.pilomatrixoma.co.cc/domai-sabrina.html"]domai sabrina[/url], http://irukandji-j.pilomatrixoma.co.cc/domai-sabrina.html domai sabrina, >:PPP, <a href="http://hottie-gott.pilomatrixoma.co.cc/ballad-of-bilbo-baggins.html">ballad of bilbo baggins</a>, [url="http://hottie-gott.pilomatrixoma.co.cc/ballad-of-bilbo-baggins.html"]ballad of bilbo baggins[/url], http://hottie-gott.pilomatrixoma.co.cc/ballad-of-bilbo-baggins.html ballad of bilbo baggins, rcaj, <a href="http://gangster-tw.pilomatrixoma.co.cc/clea-koff.html">clea koff</a>, [url="http://gangster-tw.pilomatrixoma.co.cc/clea-koff.html"]clea koff[/url], http://gangster-tw.pilomatrixoma.co.cc/clea-koff.html clea koff, 5810, <a href="http://eu3000is-.pilomatrixoma.co.cc/lara-croft-bares-all.html">lara croft bares all</a>, [url="http://eu3000is-.pilomatrixoma.co.cc/lara-croft-bares-all.html"]lara croft bares all[/url], http://eu3000is-.pilomatrixoma.co.cc/lara-croft-bares-all.html lara croft bares all, 981221, <a href="http://legacy-of.pilomatrixoma.co.cc/kathrine-hepburn.html">kathrine hepburn</a>, [url="http://legacy-of.pilomatrixoma.co.cc/kathrine-hepburn.html"]kathrine hepburn[/url], http://legacy-of.pilomatrixoma.co.cc/kathrine-hepburn.html kathrine hepburn, hpd, <a href="http://dovey-coe.pilomatrixoma.co.cc/shamu-cam.html">shamu cam</a>, [url="http://dovey-coe.pilomatrixoma.co.cc/shamu-cam.html"]shamu cam[/url], http://dovey-coe.pilomatrixoma.co.cc/shamu-cam.html shamu cam, >:-(((, <a href="http://irukandji-j.pilomatrixoma.co.cc/kalwall.html">kalwall</a>, [url="http://irukandji-j.pilomatrixoma.co.cc/kalwall.html"]kalwall[/url], http://irukandji-j.pilomatrixoma.co.cc/kalwall.html kalwall, hpz, <a href="http://legacy-of.pilomatrixoma.co.cc/omnimon.html">omnimon</a>, [url="http://legacy-of.pilomatrixoma.co.cc/omnimon.html"]omnimon[/url], http://legacy-of.pilomatrixoma.co.cc/omnimon.html omnimon, 25545, <a href="http://irukandji-j.pilomatrixoma.co.cc/krystal-steal-sex.html">krystal steal sex</a>, [url="http://irukandji-j.pilomatrixoma.co.cc/krystal-steal-sex.html"]krystal steal sex[/url], http://irukandji-j.pilomatrixoma.co.cc/krystal-steal-sex.html krystal steal sex, %O, <a href="http://castrating-.pilomatrixoma.co.cc/monkys.html">monkys</a>, [url="http://castrating-.pilomatrixoma.co.cc/monkys.html"]monkys[/url], http://castrating-.pilomatrixoma.co.cc/monkys.html monkys, >:-O, <a href="http://dovey-coe.pilomatrixoma.co.cc/truesync-desktop-download.html">truesync desktop download</a>, [url="http://dovey-coe.pilomatrixoma.co.cc/truesync-desktop-download.html"]truesync desktop download[/url], http://dovey-coe.pilomatrixoma.co.cc/truesync-desktop-download.html truesync desktop download, 63244, <a href="http://legacy-of.pilomatrixoma.co.cc/famous-mainers.html">famous mainers</a>, [url="http://legacy-of.pilomatrixoma.co.cc/famous-mainers.html"]famous mainers[/url], http://legacy-of.pilomatrixoma.co.cc/famous-mainers.html famous mainers, 45704, <a href="http://castrating-.pilomatrixoma.co.cc/lizzy-borden-nude.html">lizzy borden nude</a>, [url="http://castrating-.pilomatrixoma.co.cc/lizzy-borden-nude.html"]lizzy borden nude[/url], http://castrating-.pilomatrixoma.co.cc/lizzy-borden-nude.html lizzy borden nude, 2995, <a href="http://castrating-.pilomatrixoma.co.cc/flexitec.html">flexitec</a>, [url="http://castrating-.pilomatrixoma.co.cc/flexitec.html"]flexitec[/url], http://castrating-.pilomatrixoma.co.cc/flexitec.html flexitec, =-(((, <a href="http://irukandji-j.pilomatrixoma.co.cc/ngk-spark-plug-cross-reference.html">ngk spark plug cross reference</a>, [url="http://irukandji-j.pilomatrixoma.co.cc/ngk-spark-plug-cross-reference.html"]ngk spark plug cross reference[/url], http://irukandji-j.pilomatrixoma.co.cc/ngk-spark-plug-cross-reference.html ngk spark plug cross reference, cgoiit, <a href="http://legacy-of.pilomatrixoma.co.cc/umpa-lumpas.html">umpa lumpas</a>, [url="http://legacy-of.pilomatrixoma.co.cc/umpa-lumpas.html"]umpa lumpas[/url], http://legacy-of.pilomatrixoma.co.cc/umpa-lumpas.html umpa lumpas, dsmp, <a href="http://trish-strau.pilomatrixoma.co.cc/oberweis-dairy.html">oberweis dairy</a>, [url="http://trish-strau.pilomatrixoma.co.cc/oberweis-dairy.html"]oberweis dairy[/url], http://trish-strau.pilomatrixoma.co.cc/oberweis-dairy.html oberweis dairy, 344973,