Help me cant assign gateway to interface
hi All....
I have been given an assignment to bring one of the SME server which is based on (red hat platform) on internet... i tried all but all in vain.. i ll let u knw the configurations.. im connected to the sme server by ssh 4m the system i want ot use it as gateway.....this system is Xandros.. now whn i type route -n in ssh to sme server i get Destination Gateway Genmask Flags Metric Ref Use Iface (222.111.9.0) 0.0.0.0 255.255.255.0 U 0 0 0 eth0 (127.0.0.0) 0.0.0.0 255.0.0.0 U 0 0 0 lo (0.0.0.0) 222.111.9.30 0.0.0.0 UG 0 0 0 eth0 the host file in sme server is as follows.. 127.0.0.1 localhost 222.111.9.1 shreyan-sme.shreyan.bus shreyan-sme the hosts.allow is #ALL:Shreyan-xandros.shreyan-xandros only written the main option...... the hosts.deny file is ALL:PARANOID hosts.conf is order bind hosts multi on resolv.conf is nameserver XXXX.XXXX.XXXX.XXXX My Isp Dns i want to assign the sme server of address 222.111.9.1 default gateway of 222.111.9.30 and use internet from the server..... whn i use the following command route add -net 222.111.9.1 gw 222.111.9.30 netmask 255.255.255.0 dev eth0 it shows netmask doesnt match route address... plz tell me wat to do.. well im new to linux..any help will be helpful to me.. Thanks All..... |
try netmask 255.255.255.255
ermm looks like u attempting to use korean ip_address in your LAN dude. if LAN u LAN IP eg (1)192.168.0.X/255 (2)192.168.1.X/255 then u can use netmask 255.255.255.0 |
You are trying to assign a default gateway, correct? If so, the target used in the "route" command is 0.0.0.0/0. So...
Code:
route add -net 0.0.0.0/0 gw 222.111.9.30 Code:
route add -net 0.0.0.0 netmask 0.0.0.0 gw 222.111.9.30 Destination Gateway Genmask Flags Metric Ref Use Iface (222.111.9.0) 0.0.0.0 255.255.255.0 U 0 0 0 eth0 (127.0.0.0) 0.0.0.0 255.0.0.0 U 0 0 0 lo (0.0.0.0) 222.111.9.30 0.0.0.0 UG 0 0 0 eth0 <---- |
yes gateway is set but i dont knw y im not able to ping yahoo or any other sire 4m this server
it shows... pinging www.yahoo.akadns.net [66.94.230.75] with 32 bytes of data: destination net unreachable |
Quote:
Your route tables look good, although I do not know why the destination field of the "route -n" command is shown in parens. 1) Are you sure your network address is correct? i.e. 222.111.9.0/24 2) Are you sure the default gateway is correct for your network address? 3) Are you sure layers 1 and 2 of the network OSI model are working? i.e. cable plugged into NIC and a link lite. 4) type: ifconfig eth0 Check to see if the interface is transmitting/receiving data -or- if there are any errors associated with the interface. Also, is the broadcast address correct? Thats all I got. Good Luck! |
yes the network address is correct ....
no i have written in parens for everyone to recognize its all congested thts y.. yes whn i ping 222.111.9.30 4m ...SME Server ie...222.111.9.1 it gets reply.. before adding the route i was getting message .for ping www.yahoo.com as unknown host ...after adding route im getting as..destination host unrechable. by doing ifconfig i get my ip as 222.111.9.1 netmask 255.255.255.0 and broadcast as 255.255.255.0 |
Quote:
|
oops broadcast is 222.111.9.255 ......any idea ...where the probs must be
|
tried the following command...
route add -net 222.111.9.1 gw 222.111.9.30 netmask 255.255.255.255 dev eth0 my route table shows.. route -n Destination Gateway Genmask Flags Metric Ref Use Iface 222.111.9.1 222.111.9.30 255.255.255.255 UGH 0 0 0 eth0 222.111.9.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 222.111.9.30 0.0.0.0 UG 0 0 0 eth0 and whn i ping www.yahoo.com it shows.. PING www.yahoo.akadns.net (66.94.230.75) from 222.111.9.1 : 56(84) bytes of data. From 23.1.1.5 icmp_seq=1 Destination Net Unreachable ???????????? any ideas..................................... |
Your routing table should look like below:
Code:
Destination Gateway Genmask Flags Metric Ref Use Iface |
Thanks friends....Finally im able to download rpm's 4m my server...by help of u all...
but knw wat...still whn i ping www.yahoo.com 4m server i get destination net unreachable... but no worries now i have installed the rpms 4m internet...n my Assignment is complete.. Thanks again |
All times are GMT -5. The time now is 05:07 PM. |