Solved

PPPOE problem

Posted on 2001-07-05
10
351 Views
Last Modified: 2010-03-18
I am using RedHat 7.0.
My PC have 2 LAN card. Both of them are connected to a hub.
And my adsl modem cable is connected to the same hub.
Also, I have another win98 pc to connect this hub.

In fact, I try to use the linux server to act as internet gateway.However,I can connect to internet using adsl-start command when I disable the MASQ function of rp-pppoe on the linux server.
However, I cannot connect to internet using adsl-start command , when I enable the MASQ function of rp-pppoe on the linux server.

Can you tell me what I can do?
0
Comment
Question by:cstsang
  • 5
  • 4
10 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6255507
are aal 3 things connected to the same hub?
The pppoe needs its one device.
Could you please post the result of ifconfig -a, and the commands you use with ipcains/iptables.
0
 
LVL 7

Author Comment

by:cstsang
ID: 6257956
Yes all 3 thing are connected to the same hub.
In fact,I haven't setup the ipchains. However, it doesn't work.

eth0      Link encap:Ethernet  HWaddr 00:10:4B:0A:C7:F1  
          inet addr:192.168.0.110  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:169 errors:0 dropped:0 overruns:0 frame:0
          TX packets:130 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:9 Base address:0x300

eth1      Link encap:Ethernet  HWaddr 00:10:5A:7A:C6:E0  
          inet addr:192.168.0.111  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:30 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          Interrupt:11 Base address:0x6c00

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:3924  Metric:1
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6258751
Both NICs are part of the same subnet 192.168.0.0/24. This is useless, somehow. I'm not shure why this causes problems with masquerading, probably the ipchains table is confused somehow or uses the other NIC according to the routing table.

You should redisign your net, dor example as follows:

   Internet --- ADSL-Router --- Linux-Gateway --- Host1, Host2

where you plug the Linux-Gateway and all other hosts of your lokal net (Host1, Host2,etc.) into the hub. This subnet might use the 192.168.0.0/24 subnet.
The subnet connecting the Linux-Gateway and the ADSL must be different, for example 192.168.1.0/24 (you still may use the same hub, important is just that the subnet-IP differs, think that we can tolerate the collitons produced by using the same physical net for different logical nets).

After you have done this, you should also have a proper routing table, check with  netstat -rn  (then post it please).
If this scenario works you may simply use ipchains/iptables with the MASQ option.
0
 
LVL 7

Author Comment

by:cstsang
ID: 6258783
Do you mean I setup 1 LAN card with IP address(e.g. 192.168.0.110) and another lan card with IP address (e.g. 192.168.1.1)?

Also, I am using the Roaring Penguin's PPPoE . Do you know why once I enable the MASQ. then I cannot connect to Internet?


thank you
0
 
LVL 7

Author Comment

by:cstsang
ID: 6258805
Do you mean I setup 1 LAN card with IP address(e.g. 192.168.0.110) and another lan card with IP address (e.g. 192.168.1.1)?

Also, I am using the Roaring Penguin's PPPoE . Do you know why once I enable the MASQ. then I cannot connect to Internet?


thank you
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 7

Author Comment

by:cstsang
ID: 6259492
This is the output of netstat-rn:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6260380
assuming that eth1 is the network connected to your ADSL.router, then following should do the masquerading:

   iptables -t nat -A POSTROUTING -j MASQUERADE
   route add default gw 192.168.1.1
0
 
LVL 7

Author Comment

by:cstsang
ID: 6261069
Sorry!My kernel version is only 2.2.x therefore, I only use the ipchains.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 70 total points
ID: 6261439
ipchains -A forward -j MASQ -s 192.168.0.0/24

and if not already done, do before:

echo 1 > /proc/sys/net/ipv4/ip_forward


0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6855437
AMINISTRATION WILL BE CONTACTING YOU SHORTLY REGARDING YOUR OPEN AND ABANDONED QUESTIONS, SOME AS OLD AS THE YEAR 2000.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.11069265.html
http://www.experts-exchange.com/questions/Q.20075870.html
http://www.experts-exchange.com/questions/Q.20088543.html
http://www.experts-exchange.com/questions/Q.20115980.html
http://www.experts-exchange.com/questions/Q.11641318.html
http://www.experts-exchange.com/questions/Q.20146081.html
http://www.experts-exchange.com/questions/Q.20150364.html
http://www.experts-exchange.com/questions/Q.20180820.html
http://www.experts-exchange.com/questions/Q.20202235.html
http://www.experts-exchange.com/questions/Q.20226705.html
http://www.experts-exchange.com/questions/Q.20251551.html
http://www.experts-exchange.com/questions/Q.20255676.html
http://www.experts-exchange.com/questions/Q.20262636.html
http://www.experts-exchange.com/questions/Q.20272875.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.11483199.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now