LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-27-2009, 06:32 AM   #1
mr_magen
LQ Newbie
 
Registered: Mar 2009
Location: Europe
Distribution: Debian, Gentoo, Slackware
Posts: 19

Rep: Reputation: 2
simple network setup question


hi again,

i'm quite familiar now with how to setup my adsl connction to work in linux, but i'm quite a newbie spaking of network in general. and now comes the problems, i'm trying to install FreeBSD from ftp (i didn't put this in the freebsd forum 'cause it's simple networking doubts, not referring in particular to freebsd) via my adsl connection, wich seems a "not-so-supported" options, but it can be done apparently. thing is, i don't know about network terminology, and the installations asks for information that i'm not sure what they are. i'll explain:

in linux, let's say a gentoo install, i put this infos:

1. the ethernet card setup
- the ip address: 192.168.whatever.whaterver (works anyway)
- netmask 255.255.255.0
- routes (default via 192.168.0.1)
2. PPP setup
- the device is eth0
- i put passwd & login
- set DNS 212.216.112.112
- and it's done

in the installation it ask me this:

1. the ethernet card setup
- host
- domain
- ipv4 gateway
- name server
- ip4 address
- netmask

2. PPP setup
- exacly the same things

now, i have a problem with the terminology
what are the right values for me to put, basing on the infos i put in the gentoo config?

thank for any tip.
 
Old 03-27-2009, 08:48 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 2,863

Rep: Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698
From what you've got, it looks like you have a DSL modem, router and one or more computers. Your router does the connection to the DSL modem (call that the "outside" side) and your Ethernet devices (your computer(s), network printer(s) and the like) connect to it (call that the "inside" side). When the modem connects to your ISP, it gets assigned an address, they start mumbling at each other and, via the router, your devices can then talk to the outside world (and to each other as a bonus). Basically, you don't much care what the outside address is -- unless you've got a fixed IP address from your ISP, that address will change when you shut the modem off and turn it back on.

On the inside, you have assigned a name to your devices (the name you give to your computer(s)); let's say you've called a computer, oh, willie -- that's your host name. Let's also say that you're going to use a common domain name, com (or net or info or org). So the computer is known inside as willie.com (that will be in /etc/HOSTNAME). If, on the other hand, you have a registered name, you would use that (and you would set those values in the router -- if you don't have a registered name, don't put "willie" and "com" in the router's host name and domain name fields).

Now addresses. 192.168.x.x is assigned as "private" network addresses. Generally, you want to use 192.168.1.1 (not 192.168.0.1) as the address of the first router. The dot-1-dot-1 is the subnet and device number; subnet one, device one (if you add an additional router, you'd use dot-2-dot-1 for it; subnet two, device one).

It looks like you're using fixed addresses on the inside, so, for example, let's say you give old willie a fixed address of 192.168.1.10 (and another system, say, suzie, 192.168.1.20). Bear in mind that these addresses are only valid for your inside subnet -- the outside world does not and never will know these addresses.

Then, you'd go into /etc/hosts and (if your setup utility didn't do it for you) make entries so all your devices can find each other conveniently; e.g.,
Code:
# For loopbacking.
127.0.0.1               localhost
192.168.1.10            willie.com willie
192.168.1.15            InkJet                 # a network printer
192.168.1.20            suzie.com suzie
And everybody can talk to each other by name instead of by address. And, remember, your inside names and addresses have absolutely nothing to do with the outside world (unless, that is, you have a registered name).

If you're using DHCP, well, things are a little different (you don't do fixed addresses in /etc/hosts).

In either case, your system(s) need to know where and how to talk to your router, and that would be done in a configuration file, probably (but not always) named something like inet1.conf. In that file there are settings for your fixed IP address (192.168.1.10 for willie), netmask (255.255.255.0, usually), gateway (192.168.1.1); if you're using DHCP you won't have a fixed IP address for willie, the router will set an address for you).

So, if you're using fixed IP for "willie.com"
Code:
host willie
domain com
gateway 192.168.1.1
name server 212.216.112.112
address 192.168.1.10
netmask 255.255.255.0
ought to do it.

The PPP part should be done in the router configuration screen (it connects to the ADSL modem, probably with PPPoE, not one of your systems).

Hope this helps more than hurts.
 
Old 03-28-2009, 06:43 AM   #3
mr_magen
LQ Newbie
 
Registered: Mar 2009
Location: Europe
Distribution: Debian, Gentoo, Slackware
Posts: 19

Original Poster
Rep: Reputation: 2
yes it helped thanks alot for the patience, i've been configuring this dsl connection for a long time without actually knowing what it all means, it's more clear now. i didn't solve the problem with freebsd anyway, but i think i should ask in a specific place for that, it's way to handle config files is different from the various linux distros i use, i cannot find the right places where to put these informations, i'm quite confused. also, it doesn't say much about the failure, it only says network unreachable... well that doesn't say that much. thanks again for the answer.
 
Old 03-28-2009, 07:31 AM   #4
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 2,863

Rep: Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698Reputation: 698
One way to search for a file name that contains a pattern is to use a combination of the find, xargs and grep (or fgrep) utilities; e.g.,
Code:
become root
cd /etc
find . -type f -print | xargs grep -ilw gateway
What -ilw does is ignore case, display the file name, and match a "word" (a pattern, in this case "gateway," surrounded by white space; i.e., not part of a larger word).

On my systems (not the same as yours!) that turns up this too-long list of file names
Code:
./ppp/firewall-masq
./ppp/pppoe.conf
./file/magic
./rc.d/rc.wireless.conf
./rc.d/rc.inet1.conf
./rc.d/rc.modules-2.6.27.7
./rc.d/rc.modules-2.6.27.7-smp
./rc.d/rc.inet1
./radiusclient/dictionary.ascend
./raddb/dictionary.usr
./raddb/dictionary.ascend
./raddb/dictionary.quintum
./raddb/dictionary.cisco
./termcap-BSD
./lynx.cfg
./vmware/vmnet8/nat/nat.conf
./services
./openvpn/openvpn.conf.sample
./bluetooth/audio.conf
./protocols
Now, that's too many hits, so let's narrow it a little by removing the ignore case option:
Code:
become root
cd /etc
find . -type f -print | xargs grep -lw GATEWAY
and that turns up this list
Code:
./rc.d/rc.inet1.conf
./rc.d/rc.inet1
On my systems, those two files contain the pattern GATEWAY and, chances are, one of those two is the configuration file (well, one of 'em is: rc.inet1.conf). Your distribution probably does not use that file name, though (and the configuration file may or may not be in the /etc directory!).

That's a way to find configuration files, look for a pattern, in this case GATEWAY then use an editor to look at the files you find. Additionally, many configuration (many, not all) are named dot-conf, dot-config, dot-cnf, dot-cfg and the like and that can give you a hint when you're searching.

And, last but not least, there really ought to be some sort of documentation somewhere on that box that tells you what file to edit and what to edit in that file to get networking going or perhaps a how-to at the distribution web site...

Hope this helps some.
 
Old 03-29-2009, 06:32 AM   #5
mr_magen
LQ Newbie
 
Registered: Mar 2009
Location: Europe
Distribution: Debian, Gentoo, Slackware
Posts: 19

Original Poster
Rep: Reputation: 2
i got it! the files were in /etc like on linux. being able to launch links to get informations from inside the system is a great step forward.. i could not even chroot in that ufs filesystem and rebooting every time stresses! what you showed me in your last post will certainly be very useful for me in future circumastances, so thanks alot again for your tips!

Last edited by mr_magen; 03-29-2009 at 06:33 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple/stupid question - LAN setup soccercisco Linux - Networking 8 09-05-2007 07:15 PM
A simple network setup...if possible. SILVERPENGUIN Linux - Networking 3 11-09-2006 01:35 PM
simple network setup nenyo Linux - Software 2 02-12-2005 07:39 PM
Simple network setup filburt1 Linux - Wireless Networking 12 03-15-2004 08:44 PM
Simple Network Setup -- 2 Routers Apollo77 Linux - Networking 12 07-01-2003 09:14 AM


All times are GMT -5. The time now is 11:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration