Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Okay Linux newbie here. I set up a server with Ubuntu 12.04 LTS I’m going to use it as a fog server. It has lamp and samba. I have set an static IP address, but unable to access internet, and can’t ping IP address either. I have already tried network restart commands sudo and with out sudo. I'm not sure if that was the right track or not just need to get this up and running.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
You must use ifconfig to see if the interface is configured. If the network interface has the IP you want, then it's configured. If you can't ping it, a firewall or router is probably blocking the ping. If you have no router between the machines, then you have to use a xover cable. Traceroute might help after you make sure the interface is configured. If you have a default DROP packet filter, you must specifically allow ICMP for ping to pass through.
I'll add to what other members have suggested. From the 'ifconfig' your IP is assigned to ' Board of Regents of the University System of Georgia'. Do you have the kernel route table setup properly? From the 'cli' do a 'route -n';
Quote:
excerpt from 'man route';
route - show / manipulate the IP routing table
DESCRIPTION
Route manipulates the kernel's IP routing tables. Its primary use is to set up static routes to specific hosts or networks via an interface after it
has been configured with the ifconfig(8) program.
When the add or del options are used, route modifies the routing tables. Without these options, route displays the current contents of the routing
tables.
Sample route table;
Code:
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 1 0 0 wlan0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
Notice in the above route table that the gateway is '192.168.1.1' for wlan0 with flags 'UG';
Quote:
Flags Possible; flags include
U (route is up)
H (target is a host)
G (use gateway)
R (reinstate route for dynamic routing)
D (dynamically installed by daemon or redirect)
M (modified from routing daemon or redirect)
A (installed by addrconf)
C (cache entry)
! (reject route)
Which means the route is up & to use the gateway address 192.168.1.1 for device wlan0.
Quote:
excerpt from 'man route';
route add default gw mango-gw
adds a default route (which will be used if no other route matches). All packets using this route will be gateway through "mango-gw".
The device which will actually be used for that route depends on how we can reach "mango-gw" - the static route to "mango-gw" will have to be set up before.
To setup your route table then do from the cli' as root:
Code:
route add -net 168.30.166.27 netmask 255.255.255.0 dev eth0
Please note the netmask, I suggest you look at: http://www.aelius.com/njh/subnet_sheet.html to setup proper mask if needed.
Your University IT support admin should give you the correct mask if a change from 255.255.255.0 is necessary.
I assume from the sample output your mask is assigned by IT already.
then do;
route add default gw mango-gw
mango-gw would be the Georgia gateway IP assigned to you. You can then do a 'route -n' to show the kernel route table to make sure the gateway route is up (U) and that it is correctly assigned (G) flags.
If the eth device has been configured properly and with a valid IP then a valid 'route table a 'ping' to a known good IP should respond properly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.