{"id":21,"date":"2003-09-25T01:18:30","date_gmt":"2003-09-25T01:18:30","guid":{"rendered":"https:\/\/143-42-55-146.ip.linodeusercontent.com\/?p=21"},"modified":"2003-09-25T01:18:30","modified_gmt":"2003-09-25T01:18:30","slug":"o-routovani-zatim-statickem","status":"publish","type":"post","link":"https:\/\/nax.cz\/?p=21","title":{"rendered":"O ROUTOV\u0102\u0081N\u0102\u008d (ZAT\u0102\u008dM STATICK\u0102\u0089M)"},"content":{"rendered":"<p>Tak dnes jsem kone\u00c4\u008dn\u00c4\u009b nahodil router na balk\u0102\u0142n\u00c4\u009b a p\u0139\u0099ipojil do n\u00c4\u009bj nov\u0102\u0160 ant\u0102\u0160nky z i4. Celkem jsem za sito 19tku, sektorovku 180ti stupnovou s 10dbi, dalsi kartu x626 a pigtail dal p\u0139\u0099es 8000. V podstat\u00c4\u009b v\u0139\u0104echny svoje \u0102\u015fspory.<\/p>\n<p>No ale u\u0139\u017e te\u00c4\u008f jsem se za\u00c4\u008dal u\u00c4\u008dit dule\u0139\u017eit\u0102\u0160 v\u00c4\u009bci o routov\u0102\u0104ni. Moje \u0102\u015f\u0139\u017easn\u0102\u0104 routovac\u0102\u00ad tabulka toti\u0139\u017e po nahozen\u0102\u00ad v\u0139\u0104ech interfac\u0139\u017b vypadala n\u0102\u0104sledovn\u00c4\u009b:<br \/>\nnaxrouter:\/etc\/init.d# route -n<br \/>\nKernel IP routing table<br \/>\nDestination     Gateway         Genmask         Flags Metric Ref    Use Iface<br \/>\n10.27.72.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0<br \/>\n10.27.8.0       0.0.0.0         255.255.255.0   U     0      0        0 wlan0<br \/>\n10.27.4.0       0.0.0.0         255.255.255.0   U     0      0        0 wlan1<br \/>\n0.0.0.0         10.27.4.1       0.0.0.0         UG    0      0        0 wlan1<br \/>\n0.0.0.0         10.27.72.1      0.0.0.0         UG    0      0        0 eth0<\/p>\n<p>Obzv\u0102\u0104\u0139\u0104\u0139\u013d 2 default GW sou moc fajn. Kdy\u0139\u017e jsem nastavil adresu wlan1 co\u0139\u017e je interface sm\u00c4\u009b\u0139\u0099uj\u0102\u00adc\u0102\u00ad na bluehillz, tak sice zmizel p\u0139\u0099edposledn\u0102\u00ad \u0139\u0099\u0102\u0104dek, ale to je snad jedin\u0102\u02dd kter\u0102\u02dd mi tam vyhovoval. Tak\u0139\u017ee si mus\u0102\u00adm pro za\u00c4\u008d\u0102\u0104tek pohr\u0102\u0104t s routov\u0102\u0104n\u0102\u00adm. Je to ale docela nebezpe\u00c4\u008dn\u0102\u0104 hra, obzvl\u0102\u0104\u0139\u0104\u0139\u013d pokud nesed\u0102\u00adte jako j\u0102\u0104 p\u0139\u0099\u0102\u00admo u toho po\u00c4\u008d\u0102\u00adta\u00c4\u008de, ale p\u0139\u0099istupujete k n\u00c4\u009bmu p\u0139\u0099es ssh. To pak kdy\u0139\u017e sma\u0139\u017eete nespr\u0102\u0104vnou routu nezb\u0102\u02ddv\u0102\u0104 nic jin\u0102\u0160ho, ne\u0139\u017e reset.<\/p>\n<p>Konecna tabulka ke ktery je treba se dopracovat je<br \/>\nnaxrouter:~# route -n<br \/>\nKernel IP routing table<br \/>\nDestination     Gateway         Genmask         Flags Metric Ref    Use Iface<br \/>\n10.27.72.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0<br \/>\n10.27.8.0       0.0.0.0         255.255.255.0   U     0      0        0 wlan0<br \/>\n10.27.4.0       0.0.0.0         255.255.255.0   U     0      0        0 wlan1<br \/>\n0.0.0.0         10.27.4.1       0.0.0.0         UG    0      0        0 wlan1<\/p>\n<p>Syntaxe prikazu route vypada asi nasledovne:<br \/>\nroute del -net 10.27.72.0\/24 gw 10.27.72.1<br \/>\nroute add default gw 10.27.4.1<\/p>\n<p>ale nakonec jsem se to rozhodl udelat proste pres<br \/>\nnaxrouter:~# cat \/etc\/network\/interfaces<br \/>\n# \/etc\/network\/interfaces &#8212; configuration file for ifup(8), ifdown(8)<\/p>\n<p># The loopback interfaces<br \/>\nauto lo<br \/>\niface lo inet loopback<\/p>\n<p>auto dummy0<br \/>\niface dummy0 inet static<br \/>\n        address 10.27.0.8<br \/>\n        netmask 255.255.255.255<br \/>\n        broadcast 10.27.0.8<\/p>\n<p># The first network card &#8211; this entry was created during the Debian installation<br \/>\n# (network, broadcast and gateway are optional)<br \/>\nauto eth0<br \/>\niface eth0 inet static<br \/>\n        address 10.27.72.7<br \/>\n        netmask 255.255.255.0<br \/>\n        network 10.27.72.0<br \/>\n        broadcast 10.27.72.255<br \/>\n#       gateway 10.27.72.1<\/p>\n<p>auto wlan0<br \/>\niface wlan0 inet static<br \/>\n        address 10.27.8.1<br \/>\n        netmask 255.255.255.0<br \/>\n        network 10.27.8.0<br \/>\n        broadcast 10.27.8.255<\/p>\n<p>auto wlan1<br \/>\niface wlan1 inet static<br \/>\n        address 10.27.4.120<br \/>\n        netmask 255.255.255.0<br \/>\n        network 10.27.4.0<br \/>\n        broadcast 10.27.4.255<br \/>\n        gateway 10.27.4.1<\/p>\n<p>Bohuzel jsem udelal chybu u posledniho auto, kde jsem sice opravil po cut&#038;paste IP adresy, ale zapomel jsem prepsat 0 v auto wlan0 na 1 a dusledkem toho nabehl wlan1 s IP adresama eth0 a ten pro jistotu nenab\u00c4\u009bhl v\u0139\u017bbec. A co to pro mne kter\u0102\u02dd\u0139\u017eto sed\u00c4\u009bl u jin\u0102\u0160ho po\u00c4\u008d\u0102\u00adta\u00c4\u008de znamenalo? Vz\u0102\u00adt pod pa\u0139\u017e\u0102\u00ad monitor a vypravit se na dobrodru\u0139\u017enou cestu do \u00c4\u008derno\u00c4\u008dern\u0102\u0160 noci. Na\u0139\u0104t\u00c4\u009bst\u0102\u00ad jen na balkon. No a pak to u\u0139\u017e celkem jelo. Jen jsem je\u0139\u0104t\u00c4\u009b zjistil, \u0139\u017ee to \u0139\u0104patn\u00c4\u009b routuje z vnit\u0139\u0099n\u0102\u00adch po\u00c4\u008d\u0102\u00adta\u00c4\u008d\u0139\u017b m\u0102\u0160 s\u0102\u00adt\u00c4\u009b, ale LOC \u0139\u0104el u\u0139\u017e sp\u0102\u0104t a j\u0102\u0104 u\u0139\u017e p\u0139\u017bjdu taky.<\/p>\n<p>No a a\u0139\u017e budu cht\u0102\u00adt zprovoznit iproute2 neboli source routing tak se ur\u00c4\u008dit\u00c4\u009b bude hodit <a href=\"http:\/\/www.linuxgrill.com\/iproute2.doc.html\">tenhle<\/a> link. Nicm\u0102\u0160n\u00c4\u009b LOC mne informoval, \u0139\u017ee zebra se s t\u0102\u00adm nem\u0102\u0104 moc v l\u0102\u0104sce.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tak dnes jsem kone\u00c4\u008dn\u00c4\u009b nahodil router na balk\u0102\u0142n\u00c4\u009b a p\u0139\u0099ipojil do n\u00c4\u009bj nov\u0102\u0160 ant\u0102\u0160nky z i4. Celkem jsem za sito 19tku, sektorovku 180ti stupnovou s 10dbi, dalsi kartu x626 a pigtail dal p\u0139\u0099es 8000. V podstat\u00c4\u009b v\u0139\u0104echny svoje \u0102\u015fspory. No ale u\u0139\u017e te\u00c4\u008f jsem se za\u00c4\u008dal u\u00c4\u008dit dule\u0139\u017eit\u0102\u0160 v\u00c4\u009bci o routov\u0102\u0104ni. Moje \u0102\u015f\u0139\u017easn\u0102\u0104 routovac\u0102\u00ad tabulka [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21"}],"version-history":[{"count":0,"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts\/21\/revisions"}],"wp:attachment":[{"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}