Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
11-24-2005, 09:14 AM
|
#1
|
Member
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276
Rep:
|
Share Internet w/ 2 NICs
I would like to access the Internet with my (Slackware 10.2) Laptop through my (Debian Testing) Desktop.
The Desktop has 2 NICs (one on-board [eth1] and one card [eth0]). I have DSL plugged into eth1.
I originally configured access with pppoeconf and it works just fine.
Is it possible to plug my Laptop into the eth0 card and get access? Or, do I need some extra hardware like a router or switch?
|
|
|
11-24-2005, 10:26 AM
|
#2
|
Member
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456
Rep:
|
if you are just going from ethernet connector to ethernet connector you do not need a router or switch, but you do need a crossover cable. If you set it up like this.
DSL --------> eth1 | debian| eth0 -------------------------------> eth0 |slackware|
for your debian computer to act as a router you need a crossover ethernet cable
about 15 bucks at Radioshack. or if you use a hub or switch, you do not use a crossover cable.
either way, you have your debian computer acting as a firewall/ router for the slackware laptop.
the easiest way , in my opinion, is to use firestarter. its a simple-to-use, gui app that sets up your home network for you with simple wizards.
take whatever ethernet card is not on the DSL on your debian box, and bring up the other as your server-to-slackware card , kinda like this:
as root:
ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
thats if eth0 is not the card on the dsl otherwise use eth1
then on the slackware system, set up a static ip like this
as root:
ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up
then on debian, use firestarter to share your internet connection. don't select dhcp
just folllow the wizard, and post any questions here.
good luck
Last edited by nephish; 11-24-2005 at 10:27 AM.
|
|
|
11-25-2005, 01:35 AM
|
#3
|
Member
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276
Original Poster
Rep:
|
Cool thanks. I'll stop buy the electronics store after work and get a cross-over cable. I'll report back from my laptop
|
|
|
11-26-2005, 07:28 AM
|
#4
|
Member
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276
Original Poster
Rep:
|
Ok, I did all of the above, but I can't get to the Internet from the Laptop. But, I can ping my desktop and sftp to the Desktop.
Hmmm...I don't know.
Perhaps it is a dhcp thing?
|
|
|
11-26-2005, 08:14 AM
|
#5
|
Member
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456
Rep:
|
ok, you should not need to set up dhcp if you are only going to share with one computer, you can, of course, but i find it simpler to go static.
you are connected, that is the main part. it could be your dns servers are not set on the slackware unit. try this,
open a terminal and see if you can ping google by its ip address.
ping -c 3 216.239.39.99
see if that works.
then type (some systems require you to be root for this)
ifconfig
and post what it gives you here.
also, what window manager are you using on both systems ?
let us know
|
|
|
11-26-2005, 08:43 AM
|
#6
|
Member
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276
Original Poster
Rep:
|
On the Slackware 10.2 box is KDE 3.4.
In a terminal, ping -c 216.239.39.99 outputs:
connect: Network is unreachable.
The Desktop is Debian Testing and right now I'm running Icewm.
|
|
|
11-26-2005, 09:04 AM
|
#7
|
Member
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456
Rep:
|
ok, from the slackware laptop, try to ping the debian computer.
then try to ping slack from debian
make sure in debian that you have both network interfaces up
do an ifcongfig on both and let us know the results of just the eth0 or eth1 part. i think you gotta be root to do ifconfig on debian, maybe slack too.
i think konsole lets you copy and paste.
let us know
|
|
|
11-26-2005, 09:25 AM
|
#8
|
Member
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276
Original Poster
Rep:
|
The Debian Box tries to ping the Laptop
Code:
desktop:# ping -c 3 198.168.1.2
PING 198.168.1.2 (198.168.1.2) 56(84) bytes of data.
--- 198.168.1.2 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
Here is ifconfig on the Debian Box:
Code:
eth0 Link encap:Ethernet HWaddr 00:04:5A:45:41:8C
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::204:5aff:fe45:418c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:81 errors:0 dropped:0 overruns:0 frame:0
TX packets:72 errors:3 dropped:0 overruns:0 carrier:6
collisions:0 txqueuelen:1000
RX bytes:7822 (7.6 KiB) TX bytes:21199 (20.7 KiB)
Interrupt:177 Base address:0xe800
eth1 Link encap:Ethernet HWaddr 00:07:E9:A9:D7:F5
inet6 addr: fe80::207:e9ff:fea9:d7f5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10350191 errors:0 dropped:0 overruns:0 frame:0
TX packets:10389382 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:909972577 (867.8 MiB) TX bytes:2661855707 (2.4 GiB)
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:2519 errors:0 dropped:0 overruns:0 frame:0
TX packets:2519 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:170874 (166.8 KiB) TX bytes:170874 (166.8 KiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr: :) P-t-P:217.0.116.53 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:47643 errors:0 dropped:0 overruns:0 frame:0
TX packets:35710 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:55345341 (52.7 MiB) TX bytes:3695825 (3.5 MiB)
The Laptop tries to Ping the Desktop:
Code:
ping -c 1 192.168.1.1
PING 198.168.1.1 (198.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.315 ms
--- 192.168.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min /avg/max/mdev = 0.315/0.315/0.315/0.000 ms
Ifconfig on the Laptopn looks like:
Code:
eth0 Link encap:Ethernet HWaddr 00:10:A4:F0:AE:D3
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:46 errors:0 dropped:0 overruns:0 frame:0
TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19263 (18.8 Kb) TX bytes:9114 (8.9 Kb)
Interrupt:3 Base address:0x300
Thanks for all the help. Looks like we're close...
|
|
|
11-26-2005, 09:36 AM
|
#9
|
Member
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456
Rep:
|
yeah, i think we are close too. what firewall are you using on the debian box ?
i had a home net set up with debian a few months ago. ( got geeky and switched to arch) but it was set up the same way. dsl to debian to another computer. i remember that i sometimes had to restart the firewall to get it to work. if you are using firestarter, stop the firewall and restart it. best to open it from a terminal, so if it fails, you can see what happened easier.
also, make sure you have internet connection sharing enabled in your preferences.
let me know
|
|
|
11-26-2005, 09:43 AM
|
#10
|
Member
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276
Original Poster
Rep:
|
I tried stopping the firewall then restarting, but no dice. I'm using Firestarter and Internet connection sharing is enabled in the preferences.
|
|
|
11-26-2005, 09:56 AM
|
#11
|
Member
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456
Rep:
|
on firestarter, there is a policy tab.
do you have a rule in the first box that allows connection from
192.168.1.2 (or LAN)
if not, you can add one by right clicking in that window and selecting 'add rule'
also, does firestarter give you a blue circle with the little arrow in it ?
or does firestarter fail ?
Last edited by nephish; 11-26-2005 at 09:57 AM.
|
|
|
11-26-2005, 10:04 AM
|
#12
|
Member
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276
Original Poster
Rep:
|
Nope, I didn't have that---but I do now. I can now ping the Laptop from the desktop, but still no net on the Laptop.
Yep, got the blue circle in Firestarter.
Last edited by Optimistic; 11-26-2005 at 10:13 AM.
|
|
|
11-26-2005, 10:13 AM
|
#13
|
Member
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456
Rep:
|
good. we are getting closer.
try to ping debian from slack
if that works, try to ping google
( ping -c 216.239.39.99 ) by its ip address.
if it does not work, either restart your slack network.
i think its /etc/rc.d/network restart
or /etc/init.d/network restart.
or reboot the laptop and see what happens
|
|
|
11-26-2005, 10:38 AM
|
#14
|
Member
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276
Original Poster
Rep:
|
Ok, we are very close now.
Out of frustration I re-ran the netconfig tool in Slackware setting it up for a static ip address, then restarted the box. After rebooting I could ping google---using the ip address. I opened a browser and tried google, but it could not be found. So, I tried the IP address in the browser and success! So, it looks like a name-resolving problem now with the Slackware box.
I remember an option in the netconfig tool asking if I would be accessing a nameserver. I think I said no, and I bet that is where I went wrong.
One more reboot should do it.
I'll report back.
-------------------
Blah. It didn't work. I can still go to google via the IP address, but not with text. I had to give the netconfig tool an address for the nameserver and I used the desktop IP (192.168.1.1), maybe this wasn't right? Or, maybe I must do something different with the Desktop now?
Last edited by Optimistic; 11-26-2005 at 10:49 AM.
|
|
|
11-26-2005, 10:49 AM
|
#15
|
Member
Registered: Jun 2005
Distribution: arch, ubuntu
Posts: 456
Rep:
|
cool, yeah, let me know. DNS is the only thing missing now.
|
|
|
All times are GMT -5. The time now is 04:22 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|