Početak›Forumi›Linuks distribucije›Arch,Manjaro,…›automatsko čitanje ruta
- This topic has 10 odgovora, 4 glasa, and was last updated 15 years, 2 months ranije by dens.
-
AutorČlanci
-
17. februar 2009. u 4:07 pm #10778KosavaUčesnik
koristim wireless i trebaju mi neke rute da se dižu automatski dodao sam skriptu u /etc/rc.local al mi izbacuje pri startovanju kompa
SIOCADDRT: File exists
pokušao sam da napravim .sh skript koji sam ubacio u deamon al opet se isto dešava
rute koje oću da se startuju kada pokrenem računar ovako izgledaju/etc/rc.local
iwconfig ath0 essid “wireless mreza”
route add -net xx.xxx.x.x netmask xxx.xxx.xxx.x gw xx.xx.xx.xxx
route add -net xx.xxx.x.x netmask xxx.xxx.xxx.x gw xx.xx.xx.xxx
route add -net xx.xxx.x.x netmask xxx.xxx.xxx.x gw xx.xx.xx.xxx
route add -net xx.xxx.x.x netmask xxx.xxx.xxx.x gw xx.xx.xx.xxx17. februar 2009. u 4:22 pm #75975densUčesnikProbaj:
[code]route add -net xx.xxx.x.x netmask xxx.xxx.xxx.x dev ath0[/code]17. februar 2009. u 5:08 pm #75976KosavaUčesnikprobao sam,al opet kada restartujem neće… kad učitava network piše
SIOCADDRT: File exists
17. februar 2009. u 5:50 pm #75977NekyUčesnikVerujem da ti se na 2 mesta izvršava to dodavanje rute, zato kaže to. Isproveravaj gde si sve nameštao.
17. februar 2009. u 5:58 pm #75978na12Učesnikproveri da vec nemas nesto od toga u /etc/rc.conf
17. februar 2009. u 7:40 pm #75979densUčesnikHm, da, rute se mogu dodati na više mesta u linuxu… a to je i malo “distribution specific”.
Za arch ne znam.
Potraži malo te tvoje mreže kao string u etc folderu pa vidi šta se događa…
Drugo, ako to već postoji, zašto ne radi?daj izlaz “route -n” komande
Drugo, probaj da oboriš eth0 interfejs.
18. februar 2009. u 1:01 pm #75980KosavaUčesnikproveri da vec nemas nesto od toga u /etc/rc.conf
Nemam ništa od tih routa u /etc/rc.conf neznam kako tamo da ih postavim.
evo route -n izlaz kada se resetuje i kada se defininišu route
pre reseta
bash-3.2$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
xxx.xxx.x.x 0.0.0.0 255.255.255.0 U 0 0 0 eth0
xx.xx.xx.x 0.0.0.0 255.255.255.0 U 0 0 0 ath0
0.0.0.0 xxx.xxx.x.x 0.0.0.0 UG 0 0 0 eth0kad se ručno unesu
bash-3.2# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
xxx.xxx.xxx.x xx.xx.xx.xxx 255.255.255.0 UG 0 0 0 ath0
xx.xxx.x.x xx.xx.xx.xxx 255.255.255.0 UG 0 0 0 ath0
xxx.xxx.x.x x.x.x.x 255.255.255.0 U 0 0 0 eth0
xx.xx.xx.x x.x.x.x 255.255.255.0 U 0 0 0 ath0
xx.xxx.x.x xx.xx.xx.xxx 255.255.248.0 UG 0 0 0 ath0
xx.xx.x.x xx.xx.xx.xxx 255.255.192.0 UG 0 0 0 ath0
x.x.x.x xxx.xxx.x.x 0.0.0.0 UG 0 0 0 eth018. februar 2009. u 1:07 pm #75981KosavaUčesnikproblem nastaje što ne želi da mi zapamti zadane rute tako ako neko ima neki predlog…
18. februar 2009. u 2:03 pm #75982na12Učesnikimas ovde sve lepo objasnjeno
http://wiki.archlinux.org/index.php/Wireless#Automatically_managed.2C_centralized_without_network_profile_supportThe /etc/rc.conf file is sourced by the network script. Therefore, you may define and configure a simple wireless setup within /etc/rc.conf for a centralized approach with wlan_=” essid ” and INTERFACES=( ). The name of the network goes in place of MyEssid.
For example:
# /etc/rc.conf
eth0=”dhcp”
wlan0=”dhcp”
wlan_wlan0=”wlan0 essid MyEssid” # Unencrypted
#wlan_wlan0=”wlan0 essid MyEssid key 1234567890″ # hex WEP key
#wlan_wlan0=”wlan0 essid MyEssid key s:asciikey” # ascii WEP key
INTERFACES=(eth0 wlan0)Not all wireless cards are wlan0. Determine your wireless interface with ifconfig -a. Atheros-based cards, for example, are typically ath0, so change wlan_wlan0 to:
wlan_ath0=”ath0 essid MyEssid key 12345678″Also define ath0 in the INTERFACES= line.)
Alternatively, you may define wlan_ within /etc/conf.d/wireless, (which is also sourced by the network script), for a de-centralized approach:
# /etc/conf.d/wireless
wlan_wlan0=”wlan0 essid MyEssid”18. februar 2009. u 3:37 pm #75983KosavaUčesnikda to je sve uredu al gde se tu rute poistavljaju ?
-
AutorČlanci
Moraš biti prijavljen da bi postavio komentar u ovoj temi.