Friday, May 20, 2011

First Post; Ubuntu Networking Crash Course

Hello world!

This is my first post.  Here's some quick networking info about networking on Ubuntu 10.10 (should be applicable to earlier versions as well as 11.04).

First off: Networkin' on Ubuntu is EASY.

Wired: You plug it in (the RJ45 into the RJ45 port, duh), you are connected to your local network.  To check if you have connectivity, you can look at the link lights on the plug, they should be lit or blinking.  Furthermore, you can try to go to a website to see if you are connected to the Internet, or view your local network by clicking on "places -> network".  It's pretty basic, to troubleshoot your connection if it's not working you can type "ifconfig -a" into a terminal to get information about your connection.  My "ifconfig -a" output:

"eth0      Link encap:Ethernet  HWaddr 00:16:d3:5a:64:e0 
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::216:d3ff:fe5a:64e0/64 Scope:Link
          RX packets:39443315 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29875076 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2076862443 (2.0 GB)  TX bytes:2079179665 (2.0 GB)
          Interrupt:44 Base address:0xa000

eth1      Link encap:Ethernet  HWaddr 00:19:7e:8f:dd:49 
          inet6 addr: fe80::219:7eff:fe8f:dd49/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback 
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:5510 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5510 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:534795 (534.7 KB)  TX bytes:534795 (534.7 KB)"

Neat things you can do with this connection: share it!  If you've got 2 NICs, you can share your wired connection to another computer using the second NIC.  Right click on your network icon and click "Edit Connections".  Under the "Wired" tab, click your preferred network connection or create a new one, then click "Edit".  Click on the IPv4 tab, then click on "Automatic DHCP" and change it to "Shared to Other Computers".  Then you either log out and log back in again, restart, or restart your network services, the choice is yours.  When you connect to your network, it will then share your connection with any other computers connected to yours via an ethernet cable.  You can use the same technique with a wireless connection and 1 NIC card to share your wireless connection over your wired NIC, which is especially useful if you have a laptop with wireless and a desktop without, but a spare ethernet cable laying around.

This is just a quick howto, more will be expanded upon later.

Networking Ubuntu (Part II)

So lets say you've got a few computers all connected to your LAN and you'd like to be able to access any of them from any of them.  This is easily accomplished from directly within Nautilus. 

To do so you need to have an active internet connection. 

Hit Alt-F2, then type "gksu nautilus".  It will prompt you for your password, and then after that open up a root nautilus window.  Navigate to the parent folder of the folder you want to share, right click on the folder you want to share then click on "properties".  Go to "permissions" and set the folder access permissions to your liking (as in who can view the items in the folder, who can create, who can delete, etc...
Once you are done with that click "apply permissions to enclosed files", then click on the "sharing options" tab and click the box "share this folder".  If you don't already have it installed, Ubuntu will prompt you to install the file sharing service (Samba), after which you need to restart or log out and log back in, or just restart the service.  Then repeat the first couple steps, open a root nautilus window, navigate, blah blah and go to sharing options again and click the check box "share this folder".  It should work just at that, but sometimes you may need to rename it (it'll tell you if there is an error at the bottom of the window).  Then click the two check boxes granting access to people without an account and granting access to people who can create and delete files.  When you finish all these steps, your share should show up if you go to "places", then "network".  You should see an icon right on this screen listing your computer's share, but if you don't click on "windows network", and it should show up in there.  

No comments:

Post a Comment