LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problem setting up network with PPPOE (https://www.linuxquestions.org/questions/linux-networking-3/problem-setting-up-network-with-pppoe-362151/)

ozymandias 09-10-2005 03:29 PM

Problem setting up network with PPPOE
 
I am trying to set up my Debian system to network with another machine. I have a fixed IP address, and want to use fixed network IP addresses. I connect to my ISP using PPPOE with an ADSL ethernet modem attached to eth0 - this works fine. However, when I try to configure my other ethernet socket (eth1) to connect to my other computer I can't seem to connect from the other machine. On the second machine I am using manual connection with an IP address of 192.168.0.100 and a gateway of 192.168.0.1
I know that I need to configure my internal network interface - but I am confused about what exactly ppp0 is all about!
I'd be very grateful for some advice about what needs configuring - is it the routing that's going wrong - or - (as I suspect) is it just that I don't really understand enough yet!

Any help gratefully appreciated!

--------------------------------------------------

my routing table looks like:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
vispahg2.birmin * 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
default vispahg2.birmin 0.0.0.0 UG 0 0 0 ppp0

the results of ifconfig look like:
eth0 Link encap:Ethernet HWaddr 00:90:27:0F:A5:30
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:867 errors:0 dropped:0 overruns:0 frame:0
TX packets:946 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:428988 (418.9 KiB) TX bytes:121928 (119.0 KiB)
Interrupt:10 Base address:0xbc00 Memory:cffff000-cffff038

eth1 Link encap:Ethernet HWaddr 00:0B:6A:CE:0B:8C
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7023 (6.8 KiB) TX bytes:42 (42.0 b)
Interrupt:11 Base address:0xd400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:44 errors:0 dropped:0 overruns:0 frame:0
TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2800 (2.7 KiB) TX bytes:2800 (2.7 KiB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:83.217.~~~.~~~ P-t-P:213.120.198.41 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:721 errors:0 dropped:0 overruns:0 frame:0
TX packets:802 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:404303 (394.8 KiB) TX bytes:99523 (97.1 KiB)

Snowbat 09-10-2005 04:06 PM

Re: Problem setting up network with PPPOE
 
Quote:

Originally posted by ozymandias
On the second machine I am using manual connection with an IP address of 192.168.0.100 and a gateway of 192.168.0.1
However, your first machine also uses 192.168.0.100 for its IP address, which isn't going to work:
eth1 Link encap:Ethernet HWaddr 00:0B:6A:CE:0B:8C
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0

I suggest you reconfigure eth1 to use IP address 192.168.0.1 since it is normal practice to have a gateway (which your Debian box will be) at .1. Give the second machine an IP address of 192.168.0.2 and route add default gw 192.168.0.1

To give the second machine access to the internet, you'll want to set up NAT routing on the Debian box and enable packet forwarding. Here's how to do it in Mandrake - I'm not sure if Debian differs:

/sbin/modprobe iptable_nat
/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

You'll also want to enter your ISP nameserver details on the second machine. You'll find these in /etc/resolv.conf on the Debian machine when your connection is up.

ozymandias 09-10-2005 06:16 PM

Thanks! I had previously tried other IP combinations as I thought that they couldn't both share 192.168.0.100! But I tried it in case you were supposed to name the network card IP address the same as the computer you wanted to attach to it - obvoiusly not the case.
I'll try whaty you suggest - thanks for the help!
Ozymandias


All times are GMT -5. The time now is 12:38 PM.