This is a discussion on routing problem within the Linux Networking forums, part of the Linux Forums category; When I dial into my Linux device over ppp, I need to be able to access devices connected to the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
When I dial into my Linux device over ppp, I need to be able to access
devices connected to the eth0 interface. On the device, I can ping devices on eth0, but not on the connected device. Here is a summary: [root@Linux ide]# cat /proc/sys/net/ipv4/ip_forward 1 [root@Linux ide]# ifconfig eth0 Link encap:Ethernet HWaddr 00:50:15:03:00:62 inet addr:10.0.0.2 Bcast:10.255.255.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2424 errors:0 dropped:0 overruns:0 frame:0 TX packets:3229 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 Base address:0x300 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:3904 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 ppp0 Link encap:Point-to-Point Protocol inet addr:2.15.3.85 P-t-P:2.15.3.84 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:125 errors:0 dropped:0 overruns:0 frame:0 TX packets:88 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 [root@Linux ide]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 2.15.3.84 * 255.255.255.255 UH 0 0 0 ppp0 10.0.0.0 * 255.255.255.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo [root@Linux ide]# arp Address HWtype HWaddress Flags Mask Iface 10.0.0.1 ether 08:00:19:00:E1:77 C eth0 PPP adapter linuxmodem: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 2.15.3.84 Subnet Mask . . . . . . . . . . . : 255.255.255.255 Default Gateway . . . . . . . . . : 2.15.3.84 I want to be able to ping 10.0.0.1 from the dialed in device: C:\>ping 10.0.0.1 Pinging 10.0.0.1 with 32 bytes of data: Request timed out. Ping statistics for 10.0.0.1: Packets: Sent = 1, Received = 0, Lost = 1 (100% loss), When I am on the device, I get a response: [root@Linux ide]# ping 10.0.0.1 PING 10.0.0.1 (10.0.0.1) from 10.0.0.2 : 56 data bytes 64 bytes from 10.0.0.1: icmp_seq=0 ttl=128 time=1.4 ms 64 bytes from 10.0.0.1: icmp_seq=1 ttl=128 time=1.2 ms 64 bytes from 10.0.0.1: icmp_seq=2 ttl=128 time=1.2 ms --- 10.0.0.1 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 1.2/1.2/1.4 ms Any suggestions? |
|
|||
|
bryan <bryanhahn@yahoo.com> wrote:
> When I dial into my Linux device over ppp, I need to be able to access > devices connected to the eth0 interface. On the device, I can ping > devices on eth0, but not on the connected device. Here is a summary: > [root@Linux ide]# cat /proc/sys/net/ipv4/ip_forward > 1 On the "Linux device," add the pppd option proxyarp and use :10.0.0.x to specify the peer IP address, where x doesn't belong to any device on the eth0 LAN. Also make sure the "Linux device" pppd doesn't have the noipdefault option configured. If there is a special need to use 2.15.3.84 for the dialed-in and 2.15.3.85 for the Linux device on the PPP link then this won't work. -- Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13" PPP-Q&A links, downloads: http://ckite.no-ip.net/ /* I hear and I forget. I see and I remember. I do and I understand. --Confucius, 551-479 BC */ |
|
|||
|
On Fri, 4 Feb 2005 18:56:44 -0600, Clifford Kite <kite@see.signature.id> wrote:
> bryan <bryanhahn@yahoo.com> wrote: >> When I dial into my Linux device over ppp, I need to be able to access >> devices connected to the eth0 interface. On the device, I can ping >> devices on eth0, but not on the connected device. Here is a summary: > >> [root@Linux ide]# cat /proc/sys/net/ipv4/ip_forward >> 1 > > On the "Linux device," add the pppd option proxyarp and use :10.0.0.x > to specify the peer IP address, where x doesn't belong to any device > on the eth0 LAN. Also make sure the "Linux device" pppd doesn't have > the noipdefault option configured. If there is a special need to use > 2.15.3.84 for the dialed-in and 2.15.3.85 for the Linux device on the > PPP link then this won't work. It has always worked for me using eth0 (10.0.0.2 in your case) IP local pppd IP, another unused LAN IP for remote, with proxyarp pppd option. You generally would NOT use defaultroute pppd option for the server end of such a connection (but would typically use it on the remote, if not more specific routing). Windows networking has not worked over such a connection for me, even when I had samba doing wins on the pppd box, unless the name of the remote was lmhosts. So I scripted some things into /etc/ppp/auth-up & ip-up to assume the remote machine name was same as login name and plug that into lmhosts (and remove it in ip-down). |
|
|||
|
Thanks for the information, I will set the ip address to be on the
local LAN (I.E 10.0.0.6). You are talking about setting the lmhosts file on the client system to be the username--> IP address, right? So, if my username was bryan, then the lmhosts file would be the following: bryan 10.0.0.6 Have you had better luck doing this on non-windows clients? Any chance you would be willing to share what you put in your ip-up to set the remote machine name? When I currently connect, my client machine has the gateway automatically set to 2.15.3.84. Any reason to think the automatic setting is wrong? |
|
|||
|
On 5 Feb 2005 07:38:30 -0800, bryan <bryanhahn@yahoo.com> wrote:
> Thanks for the information, I will set the ip address to be on the > local LAN (I.E 10.0.0.6). > > You are talking about setting the lmhosts file on the client system to > be the username--> IP address, right? So, if my username was bryan, > then the lmhosts file would be the following: > > bryan 10.0.0.6 Yes assuming netbios (Windows) name of remote machine was bryan and login name for pppd was bryan. > Have you had better luck doing this on non-windows clients? Any chance > you would be willing to share what you put in your ip-up to set the > remote machine name? When I currently connect, my client machine has > the gateway automatically set to 2.15.3.84. Any reason to think the > automatic setting is wrong? Unfortunately the info maniputlating lmhosts is on an old machine in storage at work, if not erased when upgraded from RH 5.2 to 6.1. I gave up on that when I discovered I could simply hang a modem on our Cisco router, configure it for ppp (proxy arp to LAN) and made the remote IP an ip-helper-address so it would see LAN netbios (Windows) broadcasts. Until recently, dialin to our LAN was my boss' only internet access from home. The basic idea is that /etc/ppp/auth-up is passed the username as 3rd parameter, so I would plug $3 into a file. Then from /etc/ppp/ip-up (or ip-up.local), I would grab the username from the file saved by auth-up and append, that username and $5 to lmhosts. From ip-down (or ip-down.local) I removed the line from lmhosts that contained $5 (remote IP). I forget exactly how (I may have used Perl, since I know that better than shell scripts). |
|
|||
|
I made the recommended changes and the configuration definitely is
different, but I still cannot ping 10.0.0.1 from the client device. Here is the updated configuration: PPP adapter linuxmodem: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 10.0.0.7 Subnet Mask . . . . . . . . . . . : 255.255.255.255 Default Gateway . . . . . . . . . : 10.0.0.7 [root@Linux ide]# ifconfig eth0 Link encap:Ethernet HWaddr 00:50:15:03:00:62 inet addr:10.0.0.2 Bcast:10.255.255.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:81078 errors:0 dropped:0 overruns:0 frame:0 TX packets:107926 errors:0 dropped:0 overruns:0 carrier:0 collisions:4 txqueuelen:100 Base address:0x300 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:3904 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 ppp0 Link encap:Point-to-Point Protocol inet addr:10.0.0.6 P-t-P:10.0.0.7 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:173 errors:0 dropped:0 overruns:0 frame:0 TX packets:119 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:3 [root@Linux ide]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.0.7 * 255.255.255.255 UH 0 0 0 ppp0 10.0.0.0 * 255.255.255.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo [root@Linux ide]# arp Address HWtype HWaddress Flags Mask Iface 10.0.0.1 ether 08:00:19:00:E1:77 C eth0 10.0.0.7 * * MP eth0 Any suggestions? |
|
|||
|
bryan wrote:
> I made the recommended changes and the configuration definitely is > different, but I still cannot ping 10.0.0.1 from the client device. > Here is the updated configuration: > > > PPP adapter linuxmodem: > > Connection-specific DNS Suffix . : > IP Address. . . . . . . . . . . . : 10.0.0.7 > Subnet Mask . . . . . . . . . . . : 255.255.255.255 > Default Gateway . . . . . . . . . : 10.0.0.7 > > [root@Linux ide]# ifconfig > eth0 Link encap:Ethernet HWaddr 00:50:15:03:00:62 > inet addr:10.0.0.2 Bcast:10.255.255.255 Mask:255.255.255.0 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:81078 errors:0 dropped:0 overruns:0 frame:0 > TX packets:107926 errors:0 dropped:0 overruns:0 carrier:0 > collisions:4 txqueuelen:100 > Base address:0x300 > > lo Link encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > UP LOOPBACK RUNNING MTU:3904 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > > ppp0 Link encap:Point-to-Point Protocol > inet addr:10.0.0.6 P-t-P:10.0.0.7 Mask:255.255.255.255 > UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 > RX packets:173 errors:0 dropped:0 overruns:0 frame:0 > TX packets:119 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:3 > > [root@Linux ide]# route > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use > Iface > 10.0.0.7 * 255.255.255.255 UH 0 0 0 > ppp0 > 10.0.0.0 * 255.255.255.0 U 0 0 0 > eth0 > 127.0.0.0 * 255.0.0.0 U 0 0 0 > lo > > [root@Linux ide]# arp > Address HWtype HWaddress Flags Mask > Iface > 10.0.0.1 ether 08:00:19:00:E1:77 C > eth0 > 10.0.0.7 * * MP > eth0 The tables seem OK, except for (4) below. The ARP line with the MP flags is for proxy ARP for the Windows client. 1. Did you remember to enable ip forwarding in the Linux box? (cat /proc/sys/net/ipv4/ip_forward to check). 2. Can you ping the Linux box from the Windows client? 3. Is there a firewall active in the Linux box? (use iptables -nvL to check) 4. The default route is missing from the routing table above. If the gateway is 10.0.0.1, try: route add default gw 10.0.0.1 -- Tauno Voipio tauno voipio (at) iki fi |
|
|||
|
bryan <bryanhahn@yahoo.com> wrote:
> I made the recommended changes and the configuration definitely is > different, but I still cannot ping 10.0.0.1 from the client device. > Here is the updated configuration: > PPP adapter linuxmodem: > Connection-specific DNS Suffix . : > IP Address. . . . . . . . . . . . : 10.0.0.7 > Subnet Mask . . . . . . . . . . . : 255.255.255.255 > Default Gateway . . . . . . . . . : 10.0.0.7 I don't know what "PPP adapter linuxmodem" means. > [root@Linux ide]# ifconfig > eth0 Link encap:Ethernet HWaddr 00:50:15:03:00:62 > inet addr:10.0.0.2 Bcast:10.255.255.255 Mask:255.255.255.0 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:81078 errors:0 dropped:0 overruns:0 frame:0 > TX packets:107926 errors:0 dropped:0 overruns:0 carrier:0 > collisions:4 txqueuelen:100 > Base address:0x300 > lo Link encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > UP LOOPBACK RUNNING MTU:3904 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > ppp0 Link encap:Point-to-Point Protocol > inet addr:10.0.0.6 P-t-P:10.0.0.7 Mask:255.255.255.255 > UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 > RX packets:173 errors:0 dropped:0 overruns:0 frame:0 > TX packets:119 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:3 The local PPP link IP address (for "Linux ide") should be the same as the IP address for eth0 for proxy arp to work. One way to make this happen is to use the pppd option 10.0.0.2:10.0.0.7 and don't configure the PPP implementation on the other end to supply an address for "Linux ide". -- Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13" PPP-Q&A links, downloads: http://ckite.no-ip.net/ /* They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin */ |
|
|||
|
Your suggestions did the trick. Thanks for all your help!!!!!
Clifford Kite wrote: > bryan <bryanhahn@yahoo.com> wrote: > > I made the recommended changes and the configuration definitely is > > different, but I still cannot ping 10.0.0.1 from the client device. > > Here is the updated configuration: > > > > PPP adapter linuxmodem: > > > Connection-specific DNS Suffix . : > > IP Address. . . . . . . . . . . . : 10.0.0.7 > > Subnet Mask . . . . . . . . . . . : 255.255.255.255 > > Default Gateway . . . . . . . . . : 10.0.0.7 > > I don't know what "PPP adapter linuxmodem" means. > > > [root@Linux ide]# ifconfig > > eth0 Link encap:Ethernet HWaddr 00:50:15:03:00:62 > > inet addr:10.0.0.2 Bcast:10.255.255.255 Mask:255.255.255.0 > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:81078 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:107926 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:4 txqueuelen:100 > > Base address:0x300 > > > lo Link encap:Local Loopback > > inet addr:127.0.0.1 Mask:255.0.0.0 > > UP LOOPBACK RUNNING MTU:3904 Metric:1 > > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > > ppp0 Link encap:Point-to-Point Protocol > > inet addr:10.0.0.6 P-t-P:10.0.0.7 Mask:255.255.255.255 > > UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 > > RX packets:173 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:119 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:3 > > The local PPP link IP address (for "Linux ide") should be the > same as the IP address for eth0 for proxy arp to work. One way to make > this happen is to use the pppd option > > 10.0.0.2:10.0.0.7 > > and don't configure the PPP implementation on the other end to supply > an address for "Linux ide". > > -- Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13" > PPP-Q&A links, downloads: http://ckite.no-ip.net/ > /* They that can give up essential liberty to obtain a little temporary > safety deserve neither liberty nor safety." Benjamin Franklin */ |