• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • Last Modified:

PPPOE problem

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
cstsang
Asked:
cstsang
  • 5
  • 4
1 Solution
 
ahoffmannCommented:
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
 
cstsangAuthor Commented:
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
 
ahoffmannCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
cstsangAuthor Commented:
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
 
cstsangAuthor Commented:
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
 
cstsangAuthor Commented:
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
 
ahoffmannCommented:
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
 
cstsangAuthor Commented:
Sorry!My kernel version is only 2.2.x therefore, I only use the ipchains.
0
 
ahoffmannCommented:
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
 
MoondancerCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now