Announcement

Collapse
No announcement yet.

how to connect desktop and netbook through router?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Re: how to connect desktop and netbook through router?

    Originally posted by tomcloyd
    Used to do this all the time in Windows, and it didn't take a week to set up.
    Samba usually only requires you to install the samba package and edit two lines in a single config file. How can that possibly take you a week?


    Your /etc/network/interfaces file looks like the normal default for Kubuntu as far as I can tell. I'm pretty sure that the reason the lines you are looking for are not there is because KNetworkManager (or whatever its called in KDE4) doesn't use that file to configure interfaces by default. However, if you add information to the file it should be honored the next time you reboot the system. Someone please confirm or correct this!

    Assuming we get past that problem, look at #5. I'm supposed to insert these lines:
    Code:
    iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    gateway 192.168.1.1
    iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    gateway 192.168.1.1
    The information from that site assumes your default network device is named eth0. Is it? You should be able to find out by looking into KNetworkManager or from the command line with ifconfig. For example:

    Code:
    $ ifconfig
    eth0   Link encap:Ethernet HWaddr 00:16:76:52:1b:fb
         inet addr:192.168.11.2 Bcast:192.168.11.255 Mask:255.255.255.0
         inet6 addr: fe80::216:76ff:fe52:1bfb/64 Scope:Link
         UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
         RX packets:457462226 errors:0 dropped:0 overruns:0 frame:0
         TX packets:495450700 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:1000
         RX bytes:1672332981 (1.5 GB) TX bytes:2408523110 (2.2 GB)
    
    lo    Link encap:Local Loopback
         inet addr:127.0.0.1 Mask:255.0.0.0
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING MTU:16436 Metric:1
         RX packets:34380 errors:0 dropped:0 overruns:0 frame:0
         TX packets:34380 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:3037586 (2.8 MB) TX bytes:3037586 (2.8 MB)
    Post your output from ifconfig and we'll go from there.

    Edit:
    I meant to have you run ifconfig on both computers, just forgot to say so explicitly.
    Welcome newbies!
    Verify the ISO
    Kubuntu's documentation

    Comment


      #32
      Re: how to connect desktop and netbook through router?

      I don't have Samba (whatever that is) installed, as my understanding was that was for Kubuntu/Windows networking - not my interest. Was trying to keep thing simple. (ha!)

      Code:
      tomc@tomc-desktop:~$ ifconfig
      eth0   Link encap:Ethernet HWaddr 00:11:85:68:26:50
           inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
           inet6 addr: fe80::211:85ff:fe68:2650/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
           RX packets:51205 errors:0 dropped:0 overruns:0 frame:0
           TX packets:49667 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:39784037 (39.7 MB) TX bytes:9704862 (9.7 MB)
           Interrupt:19
      
      lo    Link encap:Local Loopback
           inet addr:127.0.0.1 Mask:255.0.0.0
           inet6 addr: ::1/128 Scope:Host
           UP LOOPBACK RUNNING MTU:16436 Metric:1
           RX packets:328 errors:0 dropped:0 overruns:0 frame:0
           TX packets:328 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:26098 (26.0 KB) TX bytes:26098 (26.0 KB)
      
      tomc@tomc-desktop:~$
      Thanks very much for you help.

      Comment


        #33
        Re: how to connect desktop and netbook through router?

        Might be easier to use the network management GUI in the KDE Settings menu for the static IP - although unless you really have to, the DHCP server (his router) will always give his PC that address now - even if the PC is set to DHCP - as the picture shows the router has been configured for PC and Laptop as static
        Kubuntu<br />FreeBSD 8.1<br />OpenBSD 4.7<br />Meego

        Comment


          #34
          Re: how to connect desktop and netbook through router?

          Originally posted by GS2
          as the picture shows the router has been configured for PC and Laptop as static
          Yeah, that's fine. I did not want to mess with setting up static IPs anyway, since it is only required for name resolution anyway. If the router is giving him the same IP every time anyway, as mine does on my own LAN, then that's one less thing to hassle with.

          @Tom, you don't need Samba to share files, but it is what I use. Instead you may choose NFS or any number of other ways. I meant to have you run ifconfig on both computers, but forgot to say so. This step is only to determine which network devices are available and that both devices are configured for the same IP network. Until I see that for myself, I can not assume it is done.
          Welcome newbies!
          Verify the ISO
          Kubuntu's documentation

          Comment


            #35
            Re: how to connect desktop and netbook through router?

            I'd suggest Samba - it is far easier to setup than NFS - and also if you ever want to connect a Windows PC to the share you can
            Kubuntu<br />FreeBSD 8.1<br />OpenBSD 4.7<br />Meego

            Comment


              #36
              Re: how to connect desktop and netbook through router?

              OK - I'm installing Samba from the packages. I assume the documentation that comes with it is accessible to non-CS majors such as me?

              ifconfigs:

              Code:
              tomc@tomc-desktop:~$ ifconfig
              eth0   Link encap:Ethernet HWaddr 00:11:85:68:26:50
                   inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
                   inet6 addr: fe80::211:85ff:fe68:2650/64 Scope:Link
                   UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
                   RX packets:51205 errors:0 dropped:0 overruns:0 frame:0
                   TX packets:49667 errors:0 dropped:0 overruns:0 carrier:0
                   collisions:0 txqueuelen:1000
                   RX bytes:39784037 (39.7 MB) TX bytes:9704862 (9.7 MB)
                   Interrupt:19
              
              lo    Link encap:Local Loopback
                   inet addr:127.0.0.1 Mask:255.0.0.0
                   inet6 addr: ::1/128 Scope:Host
                   UP LOOPBACK RUNNING MTU:16436 Metric:1
                   RX packets:328 errors:0 dropped:0 overruns:0 frame:0
                   TX packets:328 errors:0 dropped:0 overruns:0 carrier:0
                   collisions:0 txqueuelen:0
                   RX bytes:26098 (26.0 KB) TX bytes:26098 (26.0 KB)
              
              tomc@tomc-desktop:~$
              Code:
              tomc@tomc-laptop:/etc/network$ ifconfig                     
              eth0   Link encap:Ethernet HWaddr 00:25:b3:7a:6c:b1             
                   inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0     
                   inet6 addr: fe80::225:b3ff:fe7a:6cb1/64 Scope:Link           
                   UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1           
                   RX packets:1700 errors:4294967290 dropped:4294967294 overruns:4294967295 frame:4294967291
                   TX packets:1713 errors:4294967292 dropped:0 overruns:4294967295 carrier:0        
                   collisions:4294967291 txqueuelen:1000                          
                   RX bytes:1198743 (1.1 MB) TX bytes:222856 (222.8 KB)                  
                   Interrupt:26                                       
              
              lo    Link encap:Local Loopback 
                   inet addr:127.0.0.1 Mask:255.0.0.0
                   inet6 addr: ::1/128 Scope:Host   
                   UP LOOPBACK RUNNING MTU:16436 Metric:1
                   RX packets:24 errors:0 dropped:0 overruns:0 frame:0
                   TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
                   collisions:0 txqueuelen:0
                   RX bytes:1240 (1.2 KB) TX bytes:1240 (1.2 KB)
              
              wlan1   Link encap:Ethernet HWaddr 00:26:5e:65:bf:e2
                   UP BROADCAST RUNNING 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)
                   Interrupt:16 Memory:feafc000-feb00000
              
              tomc@tomc-laptop:/etc/network$
              Sorry if the ifconfig stuff is irrelevant if I'm moving to Samba. I have no idea.

              Again, thanks for the help.

              Comment


                #37
                Re: how to connect desktop and netbook through router?

                Originally posted by tomcloyd
                OK - I'm installing Samba from the packages. I assume the documentation that comes with it is accessible to non-CS majors such as me?
                Not if you don't install it it isn't.

                Code:
                $ sudo apt-get install samba-doc samba-doc-pdf
                If you don't want to install the Samba documentation then you'll have to access it on the web. Here are the URLs which I think will serve you best:
                .

                It looks like both your computers are on the same IP network and ready to communicate. To verify connectivity between the two hosts you should ping each one from the other. On each computer enter the command ping -c 4 IP_address, but replace IP_address with the actual address you just found from the ipconfig command.

                So sit down at the computer whose IP address is 192.168.1.2 and enter the command below:

                Code:
                $ ping -c 4 192.168.1.4
                Then sit down at the computer whose IP address is 192.168.1.4 and enter the command below:

                Code:
                $ ping -c 4 192.168.1.2
                If you have IP connectivity between the two then you should get four replies of 64 bytes each. Here is what it looks like when I ping one of my computers from the other:

                Code:
                $ ping -c 4 192.168.11.7
                PING 192.168.11.7 (192.168.11.7) 56(84) bytes of data.
                64 bytes from 192.168.11.7: icmp_seq=1 ttl=64 time=0.152 ms
                64 bytes from 192.168.11.7: icmp_seq=2 ttl=64 time=0.127 ms
                64 bytes from 192.168.11.7: icmp_seq=3 ttl=64 time=0.131 ms
                64 bytes from 192.168.11.7: icmp_seq=4 ttl=64 time=0.131 ms
                
                --- 192.168.11.7 ping statistics ---
                4 packets transmitted, 4 received, 0% packet loss, time 2999ms
                rtt min/avg/max/mdev = 0.127/0.135/0.152/0.012 ms
                Sorry if the ifconfig stuff is irrelevant if I'm moving to Samba. I have no idea.
                But it is very relevant because Samba won't work if both computers are not on the same IP network!
                Welcome newbies!
                Verify the ISO
                Kubuntu's documentation

                Comment


                  #38
                  Re: how to connect desktop and netbook through router?

                  OK, THAT worked (the ping thing) - on each computer.

                  And I DID install the Samba documentation, both the How-to and the By-example. That's about 1500 pp of stuff. Somehow I don't feel like I'm gain ground too fast here.

                  Is there a next step I can take (I should clarify that I did install Samba on both machines)...?

                  I'm staring at the samba configuration file (on my desktop) at this moment. Looks well documented, so I'm studying it. My fear is that the lexicon is well beyond my knowledge (as usual!). Pushing on...

                  OK...I'm back. This config. file is waaay beyond me. I dare not touch this without advice. If this helps, here's my hardware:

                  desktop / netbook / both wired to wireless router / printer USB'd to desktop (it'd be nice to have that connected to the router, but I can't see how to do it at all)

                  Comment


                    #39
                    Re: how to connect desktop and netbook through router?

                    Originally posted by tomcloyd
                    OK, THAT worked (the ping thing) - on each computer.
                    Good. Congratulations Tom, you have a network!


                    Somehow I don't feel like I'm gain ground too fast here.
                    On the contrary, you've accomplished a great deal. See above.

                    Is there a next step I can take (I should clarify that I did install Samba on both machines)...?
                    What I want you to do first is read the documentation. I highly recommend trying the tutorial in Community Ubuntu Documentation which I linked you to in my last post. If you are serious about wanting to make this work, then start reading.

                    Meanwhile, I'll try to whip up a quick recipe which may speed you along a little faster.
                    Welcome newbies!
                    Verify the ISO
                    Kubuntu's documentation

                    Comment


                      #40
                      Re: how to connect desktop and netbook through router?

                      OK - diving into the recommended documentation. Staying hopeful...

                      Very helpful, this: Samba: An Introduction http://samba.org/samba/docs/SambaIntro.html

                      and this: SettingUpSamba https://help.ubuntu.com/community/SettingUpSamba

                      Comment


                        #41
                        Re: how to connect desktop and netbook through router?

                        Here is the quick recipe I promised. Cribbed and updated from an older post of mine in the thread "Configure File Sharing" in Dolphin not working. I am quite certain some of the steps below are unnecessary, and there are always easier ways to do anything. Even so I like to explain things in a rather verbose fashion just because I never know which step will become a sticking point for the reader.

                        You will have to edit Samba's configuration file /etc/samba/smb.conf. To get started, open a Konsole window (Alt+F2 -> konsole) and change to the /etc/samba/ directory:

                        Code:
                        $ cd /etc/samba/
                        This directory is owned by root so you will need to become superuser to manipulate files here. For Konsole commands, preface the command with sudo. For graphical applications, start the application with kdesudo.

                        The first thing to do is make a backup of the original smb.conf file:

                        Code:
                        /etc/samba$ sudo cp -iv smb.conf default_smb.conf_backup
                        `smb.conf' -> `default_smb.conf_backup'
                        You will be prompted for your password with the command above. Enter the same password you use to login to Kubuntu.

                        As superuser, open the smb.conf file in a text editor. Any plain text editor you are comfortable with is fine. For example, to use nano to edit the file:

                        Code:
                        /etc/samba$ sudo nano smb.conf
                        To use kate to edit the file:

                        Alt+F2 -> kdesudo kate /etc/samba/smb.conf

                        The default smb.conf file looks large, but it is simply an empty skeleton with lots of comments. To make Samba work you need only change a few lines. First look at the top of the file for the lines beginning with hashmarks (#). The hashmark is one of the comment characters used in smb.conf. You should read all the comments, but I will quote the most important part below for your convenience:

                        Originally posted by smb.conf
                        # Some options that are often worth tuning have been included as
                        # commented-out examples in this file.
                        # - When such options are commented with ";", the proposed setting
                        # differs from the default Samba behaviour
                        # - When commented with "#", the proposed setting is the default
                        # behaviour of Samba but the option is considered important
                        # enough to be mentioned here
                        #
                        # NOTE: Whenever you modify this file you should run the command
                        # "testparm" to check that you have not made any basic syntactic
                        # errors.
                        Essentially, if a line you edit in smb.conf begins with a comment character (`#' or `;') then you must first delete the comment character for the change to take effect.

                        First you should look at the assignment of the workgroup variable. The workgroup name should be the same for all computers participating in Samba file sharing. While not strictly a requirement, it does make things slightly easier. If all computers on your LAN are Kubuntu computers, then the default workgroup name should already be the same for all of them. For example, here is the workgroup assignment in my own smb.conf:

                        Code:
                        ## Browsing/Identification ###
                        
                        # Change this to the workgroup/NT-domain name your Samba server will part of
                          workgroup = MYWORKGROUP
                        Now we have to define some shares. The easiest way is to use Samba server's built-in Homes share. In the smb.conf file, find the Share Definitions section and make the edits shown below. (Remember to remove the semicolon from the beginning of any line you edit.)

                        Here we remove the semicolons from the beginning of each line and change the browseable variable from no to yes:
                        Code:
                        [homes]
                          comment = Home Directories
                          browseable = yes
                        Here we change the readonly variable from yes to no:
                        Code:
                          read only = no
                        Save the newly edited smb.conf file and close the editor. Now we should define a user and password to access the Homes share:

                        Code:
                        /etc/samba$ sudo smbpasswd -a username
                        
                        New SMB password:
                        Retype new SMB password:
                        Added user username.
                        I entered the same username and password I logon to the Jaunty computer with.

                        To check if your new Samba server has joined the workgroup:

                        Code:
                        /etc/samba$ smbtree
                        To list the shares available on the new Samba server:

                        Code:
                        /etc/samba$ smbclient -L //SERVERNAME
                        You should see the Homes share listed. Homes is a special share that actually refers to your home directory on the Samba server computer. In Konqueror, you can access the home directory with the smb protocol.

                        From the client computer, open Konqueror and enter the location shown below into the location bar, but change the server name and sharename to match the Samba server's name and the name of the user you configured above with the smbpasswd command.

                        Code:
                        smb://SERVERNAME/USERNAME
                        Now you are prompted for a user name and password. Enter the same user name and password you configured above with the smbpasswd command.

                        It all worked fine for me, but your computer and network may be vastly different than my own. It is up to you to read up and learn how to further customize the server to your own needs.
                        Welcome newbies!
                        Verify the ISO
                        Kubuntu's documentation

                        Comment


                          #42
                          Re: how to connect desktop and netbook through router?

                          Do I need to do something with this?

                          Code:
                          #### Networking ####
                          
                          # The specific set of interfaces / networks to bind to
                          # This can be either the interface name or an IP address/netmask;
                          # interface names are normally preferred
                          ;  interfaces = 127.0.0.0/8 eth0
                          
                          # Only bind to the named interfaces and/or networks; you must use the
                          # 'interfaces' option above to use this.
                          # It is recommended that you enable this feature if your Samba machine is
                          # not protected by a firewall or is a firewall itself. However, this
                          # option cannot handle dynamic or non-broadcast interfaces correctly.
                          ;  bind interfaces only = yes

                          Comment


                            #43
                            Re: how to connect desktop and netbook through router?

                            Originally posted by tomcloyd
                            Do I need to do something with this?
                            I don't think you do. We already established that your two computers are on the same network and capable of communicating, right?

                            If you decide to change your network configuration in the future then ... well ... who knows?
                            Welcome newbies!
                            Verify the ISO
                            Kubuntu's documentation

                            Comment


                              #44
                              Re: how to connect desktop and netbook through router?

                              Originally posted by tomcloyd
                              My goal is this: I want to see and access some or all of the filesystem of my computer A in my computer B's file tree, and viceversa, so I can run a file sync program and do some simply manual file transfers. That's it. Used to do this all the time in Windows, and it didn't take a week to set up.
                              The link that Vinny and I gave you (http://mostlylinux.wordpress.com/network/nfshowto/) is a very simple, foolproof how-to that requires no prior knowledge of networking. This is not the Static IP how-to you referred to. It allows you to do exactly what you state above. 12 simple steps, no ambiguity. I am in the same boat as you in terms of technical knowledge, and Little Girl's guide is written for people like us. Starting from complete ignorance, I had netbook and desktop networked in under an hour.

                              I wouldn't dissuade you from pursuing Samba instead of NFS, since you seem to be nearing success with that. And it will come in handy if you ever have to network with a Windows box. But if you get frustrated and feel like giving up, give the NFS how-to a try.

                              Comment


                                #45
                                Re: how to connect desktop and netbook through router?

                                Originally posted by arist
                                I wouldn't dissuade you from pursuing Samba instead of NFS, since you seem to be nearing success with that. And it will come in handy if you ever have to network with a Windows box. But if you get frustrated and feel like giving up, give the NFS how-to a try.
                                Agreed. There would be nothing wrong with choosing NFS over Samba IMHO. I really think we can get Samba working for him soon enough. If not, then I sincerely hope those with NFS know-how will step up to the plate.
                                Welcome newbies!
                                Verify the ISO
                                Kubuntu's documentation

                                Comment

                                Working...
                                X