From owner-freebsd-questions Wed May 1 13:46:19 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.mango-bay.com (mail.mango-bay.com [208.206.15.12]) by hub.freebsd.org (Postfix) with ESMTP id 70D2137B41D for ; Wed, 1 May 2002 13:45:54 -0700 (PDT) Received: from barbish ([63.70.155.55]) by mail.mango-bay.com (Post.Office MTA v3.5.3 release 223 ID# 0-52377U2500L250S0V35) with SMTP id com; Wed, 1 May 2002 16:45:50 -0400 From: "Joe & Fhe Barbish" To: "\"E. J. Cerejo\"" Cc: "FBSDQ" Subject: RE: How to enable IP Forwarding Date: Wed, 1 May 2002 16:45:49 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <1020286748.3cd0571c9b8a1@zapo.net> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG You are making good head way. Your resolv.conf: lists 205.171.3.65 as your ISP's primary DNS server and 198.233.10.20 as it's secondary DNS server. User ppp populated resolv.conf for you. Now you need to add these DNS ip address to your laptop win network configuration, just like you did for the 10.0.10.5 ip address and you should be able to access the internet through the FBSD gateway. On the laptop win box use c:\windows\winipcfg.exe to display lan configuration info. After changing win network conf you have to reboot win to enable changes. -----Original Message----- From: "E. J. Cerejo" [mailto:ecerejo@zapo.net] Sent: Wednesday, May 01, 2002 4:59 PM To: Joe & Fhe Barbish Cc: freebsd-questions@freebsd.org Subject: Re: How to enable IP Forwarding On Wednesday 01 May 2002 15:07, Joe & Fhe Barbish wrote: > So you now know you have to plug the crossover cable into your laptop before > booting up the fbsd system it's connected to. I do not see any statements in > rc.conf to startup user ppp to enable the tun0 connection to your ISP so I > guess you are issuing the ppp command from the command line. That's ok. Now > your problem is the you can not connect to the internet through the FBSD > gateway. First you have to assign an IP address to your FBSD Nic card. Add > this to rc.conf > # assign IP address to Nic card > ifconfig_fxp0="inet 10.0.10.2" > > Now you have to manually configure the laptop win system for LAN connection. > > Win start/settings/control panel/networking/ > > Use 10.0.10.5 for the ip address of your Win box > > Post your /etc/ppp/ppp.conf file & /etc/resolv.conf so I can see if you are > getting the DNS servers from your ISP. Now I can see the IP assigned to fxp0: fxp0: flags=8843 mtu 1500 inet 10.0.10.2 netmask 0xff000000 broadcast 10.255.255.255 inet6 fe80::2a0:c9ff:fed9:7b97%fxp0 prefixlen 64 scopeid 0x1 ether 00:a0:c9:d9:7b:97 media: Ethernet autoselect (100baseTX ) status: active lo0: flags=8049 mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 inet 127.0.0.1 netmask 0xff000000 ppp0: flags=8010 mtu 1500 sl0: flags=c010 mtu 552 faith0: flags=8002 mtu 1500 tun0: flags=8051 mtu 1500 inet6 fe80::2a0:c9ff:fed9:7b97%tun0 prefixlen 64 scopeid 0x6 inet 65.129.21.121 --> 63.152.0.185 netmask 0xffffff00 Opened by PID 189 but I still can't browse using the laptop! I can browse just fine with the FBSD box. I configured the laptop by assigning the 10.0.10.5 IP to it and the default gateway I gave the 10.0.10.2. I'm starting ppp with the following command: #ppp -ddial -nat dial (dial is the name of my connection). I didn't put it in the rc.conf file because I don't want to be connected to the net everytime I use FBSD but I think the above command will do the same thing. Am I correct? My ppp.conf: ################################################################# # PPP Sample Configuration File # Originally written by Toshiharu OHNO # Simplified 5/14/1999 by wself@cdrom.com # # See /usr/share/examples/ppp/ for some examples # # $FreeBSD: src/etc/ppp/ppp.conf,v 1.2.2.5 2001/07/13 10:55:23 brian Exp $ ################################################################# default: set log Phase Chat LCP IPCP CCP tun command ident user-ppp VERSION (built COMPILATIONDATE) # Ensure that "device" references the correct serial port # for your modem. (cuaa0 = COM1, cuaa1 = COM2) # set device /dev/cuaa1 set speed 115200 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT" set timeout 180 # 3 minute idle timer (the default) enable dns # request DNS info (for resolv.conf) dial: # # edit the next three lines and replace the items in caps with # the values which have been assigned by your ISP. # set phone 2015849705 set authname ecerejo set authkey xxxxxxxxx set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 add default HISADDR # Add a (sticky) default route dial2: set phone 2015843407 set authname ecerejo set authkey xxxxxxxxxx set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 add default HISADDR # Add a (sticky) default route My resolv.conf: domain acer-access.com nameserver 205.171.3.65 nameserver 198.233.10.20 > > > > -----Original Message----- > From: "E. J. Cerejo" [mailto:ecerejo@zapo.net] > Sent: Wednesday, May 01, 2002 3:12 PM > To: Joe & Fhe Barbish; FBSDQ > Cc: fgleiser@cactus.fi.uba.ar > Subject: Re: How to enable IP Forwarding > > > > If you are cabling your FBSD box straight to your laptop with out > > going through a hub or switch you can not use a standard cable. > > You have to use an crossover cable. > > It's connected with a crossover cable, I use the same cable under Win2k > and > works fine, now if I connect my laptop to my computer before I turn these > on > and then turn them on when the cable is connected I get a somewhat > different > output when I run 'ifconfig -a' as you can see: > > fxp0: flags=8802 mtu 1500 > ether 00:a0:c9:d9:7b:97 > media: Ethernet autoselect (100baseTX ) > status: active > lo0: flags=8049 mtu 16384 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 > inet 127.0.0.1 netmask 0xff000000 > ppp0: flags=8010 mtu 1500 > sl0: flags=c010 mtu 552 > faith0: flags=8002 mtu 1500 > tun0: flags=8051 mtu 1500 > inet6 fe80::2a0:c9ff:fed9:7b97%tun0 prefixlen 64 scopeid 0x6 > inet 65.129.45.48 --> 63.152.0.191 netmask 0xffffff00 > Opened by PID 186 > > Now the status says active, another thing I notice in my laptop running > win2k > is the local connection status icon tells me it's connected at 100 Mbps so > I > know the card is working. > > > This may be why your FBSD Nic thinks it's not connected. > > This problem has nothing to do with IP forwarding. > > Posting more info would help a lot. > > Post contents of your /etc/rc.conf and /var/run/dmesg.boot > > My rc.conf looks like this: > > # -- sysinstall generated deltas -- # Sun Mar 24 23:15:18 2002 > # Created: Sun Mar 24 23:15:18 2002 > # Enable network daemons for user convenience. > # Please make all changes to this file, not to /etc/defaults/rc.conf. > # This file now contains just the overrides from /etc/defaults/rc.conf. > hostname="ecerejo.dns2go.com" > kern_securelevel_enable="NO" > moused_enable="NO" > moused_type="NO" > nfs_reserved_port_only="YES" > saver="star" > sendmail_enable="YES" > sshd_enable="YES" > usbd_enable="YES" > linux_enable="YES" > sshd_enable="YES" > gateway_enable="YES" > > and my dmesg looks like this: > > Copyright (c) 1992-2002 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD 4.5-STABLE #0: Sat Apr 27 18:03:01 EDT 2002 > webdude@ecerejo.dns2go.com:/usr/src/sys/compile/MYKERNEL > Timecounter "i8254" frequency 1193182 Hz > CPU: Pentium/P55C (233.22-MHz 586-class CPU) > Origin = "GenuineIntel" Id = 0x543 Stepping = 3 > Features=0x8001bf > real memory = 134217728 (131072K bytes) > config> di sn0 > No such device: sn0 > Invalid command or syntax. Type `?' for help. > config> di lnc0 > No such device: lnc0 > Invalid command or syntax. Type `?' for help. > config> di ie0 > No such device: ie0 > Invalid command or syntax. Type `?' for help. > config> di fe0 > No such device: fe0 > Invalid command or syntax. Type `?' for help. > config> di ed0 > No such device: ed0 > Invalid command or syntax. Type `?' for help. > config> di cs0 > No such device: cs0 > Invalid command or syntax. Type `?' for help. > config> di bt0 > No such device: bt0 > Invalid command or syntax. Type `?' for help. > config> di aic0 > No such device: aic0 > Invalid command or syntax. Type `?' for help. > config> di aha0 > No such device: aha0 > Invalid command or syntax. Type `?' for help. > config> di adv0 > No such device: adv0 > Invalid command or syntax. Type `?' for help. > config> q > avail memory = 127266816 (124284K bytes) > Preloaded elf kernel "kernel" at 0xc0351000. > Preloaded userconfig_script "/boot/kernel.conf" at 0xc035109c. > Intel Pentium detected, installing workaround for F00F bug > md0: Malloc disk > npx0: on motherboard > npx0: INT 16 interface > pcib0: on motherboard > pci0: on pcib0 > isab0: at device 7.0 on pci0 > isa0: on isab0 > atapci0: port 0xf000-0xf00f at device 7.1 > on > pci0 > ata0: at 0x1f0 irq 14 on atapci0 > ata1: at 0x170 irq 15 on atapci0 > pci0: at 7.2 irq 11 > chip1: port 0x5f00-0x5f0f at > device 7.3 on pci0 > fxp0: port 0x6400-0x641f mem > 0xe3000000-0xe30fffff,0xe3100000-0xe3100fff irq 9 at device 9.0 on pci0 > fxp0: Ethernet address 00:a0:c9:d9:7b:97 > inphy0: on miibus0 > inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > pci0: at 10.0 irq 10 > orm0: