![]() | ![]() | ![]() | ![]() |
|
faq search add article cool-stuff how-to main tips |
Posted by Understudy on Wednesday September 04, @07:52PMfrom the my brain, it hurts dept. Okay this windoze background makes my life interesting. Especially when it comes to dealing with FreeBSD. There aren't a lot of pretty colors or windows when you first start FreeBSD. And you don't get little prompt boxes that tell you to click next whenever you load something. There is however the ability to learn a little bit more about what goes on when you are working on it. There is also the ability to have a box that won't crash on you every time you do something the computer doesn't agree with. So I wanted to have my FreeBSD box connect to my DSL service. The FreeBSD Handbook is still very intimidating to me. So as I have learned things I have decided to share them not always in the order I have done them. First a little bit about DSL. It faster than standard dial up. Which is what makes it cool. It gets more complicated from here so I will try to make it easy. You will need this info to see if my instructions will even work with your DSL. DSL is digital subscriber line. There are several different types. ADSL is Asynchronous DSL most common for homes. SDSL is Symmetric DSL common for business although my business has the above type because this one costs a lot. IDSL is like SDSL but the speeds are different. Bored yet. I know you just want to hook up your computer. But this stuff does matter. And knowing it won't turn you into a geek. So your safe. Now here is where my personal experience will limit me and may cause you grief. My setup is with ADSL not any of the others so I can't say for sure the following will or won't work with the others. To find out all you have to do ask your provider they won't mind but don't tell them you asking so you can hook up your FreeBSD box, tell them because your girlfriend thinks you know everything and you don't want to look stupid. Also I hate the lecture some $7.00 an hour peon is going to give me about hooking up my FreeBSD box and the agreement I have with them. I am not hacking the web I am trying to use a real OS. Now for the scary part. What type of protocol does your ISP use for it's DSL. Say what, protocol? I give up. Breathe I will walk you through this. Protocol is a set of rules or standards used to allow different computers to talk to one another. It can be more complicated but that is all you really need to know. You computer talks to another computer when you connect through your DSL the other computer is at the office of the ISP who provides you with your DSL. Types of Protocol: Take a drink of water you will be okay. PPP is point to point protocol. It is basically the foundation term. It is also the type of protocol you used when you were on a dial up connection. but those were the old days. Now for the advanced type. PPPoE is point to point protocol over Ethernet. This is the most common type here in the US with most ISPs. This basically allows you to connect to another computer via a broadcast type signal. Kinda like radio but not wireless. PPPoA is point to point protocol over ATM ( Asynchronous transfer mode). This is common in Europe as I understand it. Basically it is the same as above but the signal type is different from Ethernet. Also this one tends to run more hardware based than software based. Think AM/ FM type difference. Okay somebody call an ambulance. I think one of our readers just passed out. I can here the rumbling now, I just want to hook up. Well take a pill and chill. You need to know that your ISP is providing PPPoE because that is what we are going to deal with here. Other types are not explained here and I haven't dealt with them. You will also need to see if you have a static IP or a dynamic IP from your ISP. Mine are Dynamic. But I will share static information with you. What the hell am I talking about. IP is Internet Protocol. Think of it as your home address only it's just numbers. You live at 5555 Oakwood St. Orlando, Fl 33333. You computer address is 192.168.35.98. But here is the thing while your home address doesn't change unless you move or the city changes the zoning (you home address would be static as in non changing). Your IP (computer address) can change all the time. Your saying "I don't recall doing anything to make it change." Well you don't your address comes from your ISP just like the city gives your home it's address. The only difference is the ISP has a limited number of IPs and you may not be on 24/7 so if your not using it they give it to someone else. Also if you are on 24/7 they may change every few hours. You won't notice. This happens deep inside the computer software and runs in the background, kinda like toothpaste on cavities. You know it's there you just don't see it. Also it protects both you and the ISP. How? Well lets say someone is trying to remotely get into your box (sometimes called hacking but that is not what true hacking is, I won't start that debate here). One of the ways they can work on it is through your IP address but if your IP changes then the person can lose you. This doesn't mean a dynamic IP completely protects you but it helps a little. It also means you can't run a web,ftp, or mail server from your box. ISPs charge extra for your ability to do that. So it also helps them cut down on revenue loss. You want the extra service you pay for it. Ask your ISP if you don't know. If they do give you a static IP write it down. Let's get to the stuff you will need. 1. A DSL line. What you don't have one! Go away and don't come back till you do. 2. A DSL modem. Specially one with a RJ-45 jack built into it. That is the one that looks like a fat phone jack. Sometimes called an 8 pin connection. If you have a usb type DSL modem. This instructional will not help you. I like the Alcatel speed touch home DSL modem. Hey it's mine and it works fine for me. quit your whinning. There are plenty of others that are good also. 3. A NIC (Network Interface Card) not a NIC card that is redundant. No NIC, no connection so go buy one. 4. A CAT 5 patch cord, standard, not a cross over. No you cannot use the cord from your phone. Okay some stuff you need to know the new versions of FreeBSD 4.4 and up have stuff built into the kernel already to help facilitate having a DSL connection. Older versions may not so this instructional will not help you. Do an upgrade. You got everything. Your foaming at the mouth and ready to go. Do everything here as root. Lets see if your computer sees you NIC. At the prompt type ifconfig (configure network interface parameters) # ifconfig rl0: flags=8843 Okay on the left hand side you will see rl0. You might see xlo,ml0,il0,ed0,fxp0 or something similar in nature to that (Please note that is rl0 as in R L Zero not R One Zero). That is the chipset id for your NIC and it is important so write it down. If you don't see that your NIC it wasn't detected and you issues that must be dealt with before you can continue. Hey I can't explain every error here. The web isn't big enough. Okay you've got your NIC. Make your connections from your NIC to your modem and your modem connections to your incoming line. Yes I forgot this step and couldn't figure out why it wasn't working. Let's edit. At the prompt do this: # ee /etc/ppp/ppp.conf ee is the easy editor think of it as notepad for FreeBSD. You may see a file come up. It may say new file. If you have an existing file you will want to clean it out. Press CTRL+K at the beginning of each line and you will erase it. Don't worry you aren't going to to ruin anything. And I have provided you with a handy dandy copy of a nice ppp.conf document complete with some explanations. Put that in the ppp.conf file.
default:
set timeout 0 #Change to 0 if no timeout desired
name_of_service_provider:
#the device your modem is connected to
set device PPPoE:xxx: #replace xxx with the NIC chipset id
#line quality reporting, allows auto reconnects
enable lqr
# sets nutty ISP mtus. These numbers may vary.
set mru 1492
set mtu 1492
set speed sync
set dial
set login
set timeout 0
#username and password here
set authname username@isp.com
set authkey password
#don't worry about this bit here :)
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
#adds a default route to the IP ISP give you
add 0 0 HISADDR
#allow unlimited amount of redials
set redial 0 0
Okay if your provider is more than one word instead of a space you will need to place a underscore mark. Like this name_of_service_provider. Do not do this nameofserviceprovider or this name of service provider. They will cause things to not work. Okay small note here when the # symbol shows up in a file the computer ignores the stuff after it for the rest of that line. You can use more than one ###. But you really don't need to. Stuff before the # (hash mark, pound symbol) is read and processed by the computer. So basically you are writing a mini program here. and you have some comments (the stuff after the # symbol telling you what it does). Cool ain't it. Yeah I know everyone can write in C,C++,Java, Python,and Perl. But not me so I thought it was cool and I would share. Okay if you have a static IP. You will need change the following line in the ppp.conf file. add 0 0 HISADDR # this is setup for Dynamic IPs add xxx.xxx.xx.xx HISADDR # this is setup for static IPs Replace the xxx.xxx.xx.xx with your static IP. Okay you have done that. Press ESC+Enter+Enter. That will save the changes. But wait with this television offer there is more. Okay that was bad. But the next steps should be done also. At the prompt type this: # ee /etc/rc.conf You will want to add the following lines to the bottom of everything that is in there. Enter them exactly as you see them including quotation marks.
ppp_enable="YES"
ppp_mode="ddial"
ppp_nat="no" # if you heading a local network say yes
ppp_profile="name_of_service_provider" # place the name of your ISP here
Press ESC+Enter+Enter and this will save the changes.This gives your FreeBSD box the ability to connect on startup. Cool isn't it. Your rc.conf is like a startup folder from windoze.If you have a static IP also add these lines: ifconfig_lo0="inet 127.0.0.1" ifconfig_xlo="inet xxx.xxx.xxx.xxx netmask 255.255.255.0" ifconfig_tun0="inet xxx.xxx.xxx.xxx netmask 255.255.255.255" #replace xxx.xxx.xxx.xxx with your IP Now lets get the IPs of the ISP placed in here. Those are called nameservers. You do this at prompt. # ee /etc/resolv.conf This will probably create a new file which is fine. Add these lines: nameserver xxx.xxx.xxx.xxx nameserver xxx.xxx.xxx.xxx These are the IPs of your ISPs computers that route traffic through the Internet. They are called the DNS (Domain Name Server). These are the machines that give your computer it's IP address. You can always call your ISP and ask, remember you want to look smart in front of your girlfriend. Replace the xxx with the IPs. You have done all this. Let us see if you can connect. At the prompt type this. # ppp -ddial name_of_service_provider You did that you didn't get any error messages. But it just went back to the prompt. Well that is good. What were you expecting bells and whistles. So how do you know it works. At the prompt type: # ifconfig tun0 tun0: flags=8051 Do see where I have all those xxx.xxx.xx.xx you should see some numbers similar to that. Those are the IP address numbers. Okay you have them but they don't look right. at the prompt type this: # ping www.yahoo.com If you get this you are good. PING www.yahoo.akadns.net (64.58.76.179): 56 data bytes 64 bytes from 64.58.76.179: icmp_seq=0 ttl=48 time=52.653 ms 64 bytes from 64.58.76.179: icmp_seq=1 ttl=48 time=51.968 ms 64 bytes from 64.58.76.179: icmp_seq=2 ttl=48 time=53.157 ms 64 bytes from 64.58.76.179: icmp_seq=3 ttl=48 time=51.991 ms 64 bytes from 64.58.76.179: icmp_seq=4 ttl=48 time=53.794 ms 64 bytes from 64.58.76.179: icmp_seq=5 ttl=48 time=53.487 ms 64 bytes from 64.58.76.179: icmp_seq=6 ttl=48 time=52.434 ms If you get this you are bad. ping: cannot resolve www.yahoo.com: Host name lookup failure You got the good one but you can't make it stop. Press CTRL+C. That is basically the command to end a active situation. Remember it. Okay so you ping flooded yahoo. Bad boy but now you know your DSL works on your FreeBSD box. So how can I surf the net without a browser. Well you can but from a command line your browser will only show text. No pictures. Which will really bum you out if you were hoping to go to playboy.com. But browsers is another article. Enjoy. Okay let's give credit where it is due. Net_Fish who puts up with my silly questions. acb who I don't have a homepage for. Lucky who has a very nice and short version of what I have here. Please also read Jason's article on PPP. His article deals mainly with a dial up setup but he explains items in his article very well that I don't explain here. < | >
|
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||
| "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate |
|
| All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann. |