there is no problem with my internet connection i just want that to do this cent os automatically :<div>route add default gw 217.20.117.1 </div><div>before typing this my netstat -rn looks like this :</div><div><div>root@lin3 [~]# netstat -rn (that is not able to connect to internet)</div>
<div>Kernel IP routing table</div><div>Destination Gateway Genmask Flags MSS Window irtt Iface</div><div>217.20.117.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0</div><div>188.72.255.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0</div>
<div>169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0</div><div>after adding gateway : (this works perfect)</div><div>root@lin3 [~]# netstat -rn</div><div>Kernel IP routing table</div><div>Destination Gateway Genmask Flags MSS Window irtt Iface</div>
<div>217.20.117.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0</div><div>188.72.255.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0</div><div>169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0</div>
<div><b>0.0.0.0 217.20.117.1 0.0.0.0 UG 0 0 0 eth0 </b></div><div><br></div><div>i just want to add bold line automatically</div><div><br></div><div>and this is my ifconfig :</div><div><div>
root@lin3 [~]# ifconfig -a</div><div>eth0 Link encap:Ethernet HWaddr 00:0C:29:83:21:44</div><div> inet addr:188.72.255.189 Bcast:188.72.255.255 Mask:255.255.255.0</div><div> inet6 addr: fe80::20c:29ff:fe83:2144/64 Scope:Link</div>
<div> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1</div><div> RX packets:9653 errors:0 dropped:0 overruns:0 frame:0</div><div> TX packets:458 errors:0 dropped:0 overruns:0 carrier:0</div><div>
collisions:0 txqueuelen:1000</div><div> RX bytes:876648 (856.1 KiB) TX bytes:50814 (49.6 KiB)</div><div> Base address:0x2000 Memory:d8920000-d8940000</div><div><br></div><div>lo Link encap:Local Loopback</div>
<div> inet addr:127.0.0.1 Mask:255.0.0.0</div><div> inet6 addr: ::1/128 Scope:Host</div><div> UP LOOPBACK RUNNING MTU:16436 Metric:1</div><div> RX packets:483 errors:0 dropped:0 overruns:0 frame:0</div>
<div> TX packets:483 errors:0 dropped:0 overruns:0 carrier:0</div><div> collisions:0 txqueuelen:0</div><div> RX bytes:75305 (73.5 KiB) TX bytes:75305 (73.5 KiB)</div><div><br></div><div>sit0 Link encap:IPv6-in-IPv4</div>
<div> NOARP MTU:1480 Metric:1</div><div> RX packets:0 errors:0 dropped:0 overruns:0 frame:0</div><div> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0</div><div> collisions:0 txqueuelen:0</div>
<div> RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)</div></div><div><br></div><div><br></div><div><br></div><div class="gmail_quote">2010/3/29 Matt Iavarone <span dir="ltr"><<a href="mailto:matt.iavarone@gmail.com">matt.iavarone@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">2010/3/29 cahit Eyigünlü <<a href="mailto:cahit.eyigunlu@gmail.com">cahit.eyigunlu@gmail.com</a>>:<br>
<div><div></div><div class="h5">> This is my two line on route-eth0<br>
> address0=217.20.117.1<br>
> subnet0=255.255.255.255<br>
> but what should be next line for default gateway the only thing that i could<br>
> not complete is default gateway setting<br>
> and my netstat table must looklike this :<br>
> Destination Gateway Genmask Flags MSS Window irtt<br>
> Iface<br>
> 217.20.117.1 0.0.0.0 255.255.255.255 UH 0 0 0<br>
> eth0<br>
> xx.xx.xx.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0<br>
> 0.0.0.0 217.20.117.1 0.0.0.0 UG 0 0 0<br>
> eth0<br>
> and now i see only the first two line truely i am adding 3rd line on every<br>
> time restart manually with route add default gw<br>
><br>
> 2010/3/29 Les Mikesell <<a href="mailto:lesmikesell@gmail.com">lesmikesell@gmail.com</a>><br>
>><br>
>> cahit Eyigünlü wrote:<br>
>> > i am reaching the network with this :<br>
>> > route add -net 217.20.117.1 netmask 255.255.255.255 dev eth0<br>
>> > route add default gw 217.20.117.1<br>
>> ><br>
>> > i have added eth0<br>
>> > address0=217.20.117.1<br>
>> > subnet0=255.255.255.255<br>
>> ><br>
>> > the first command is ok but how could i set the second command to cent<br>
>> > os to do it automatically<br>
>> ><br>
>><br>
>> If you create a file named /etc/sysconfig/network-scripts/route-eth0 you<br>
>> can put<br>
>> lines in it that will have 'ip route' added at the beginning and executed<br>
>> after<br>
>> the interface is up. "ip route" takes some different arguments than the<br>
>> "route"<br>
>> command - see "man ip" for details.<br>
>><br>
>> --<br>
>> Les Mikesell<br>
>> <a href="mailto:lesmikesell@gmail.com">lesmikesell@gmail.com</a><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> CentOS mailing list<br>
>> <a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
>> <a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
><br>
><br>
> _______________________________________________<br>
> CentOS mailing list<br>
> <a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
> <a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
><br>
><br>
<br>
</div></div>Why don't you post the results of 'ifconfig -a' and 'ip route show'?<br>
Giving information piecemeal is not helping anyone.<br>
<div><div></div><div class="h5">_______________________________________________<br>
CentOS mailing list<br>
<a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
</div></div></blockquote></div><br></div>