LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I route from ppp0 to eth1 on my debian gateway? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-route-from-ppp0-to-eth1-on-my-debian-gateway-904072/)

Override.nl 09-20-2011 03:17 PM

How can I route from ppp0 to eth1 on my debian gateway?
 
How can I route from ppp0 to eth1 on my debian gateway?

I know how to build a router and used this many times.
But I now have a fiber connection with 8 static IP's, I loose 3 IP's for gateway, broadcast and network address.. So I have my gateway through pppoe running but how can I use the other public IP's behind my gateway?

I tried "parprouted ppp0 eth1" and I could reach the machine behind the gateway on his IP but it didn't realy work for me.
ipv4 forwarding also did not work.

I'm running Debian Squeeze.
So I have a eth0 configured "manual" so no IP, I have ppp0 running over eth0 through pppoe that works fine and I get automatically the gateway ip from my provider but now I want to use the other 5 IP's I have and have no clue how to do this.... I dont want to NAT... :(

Lexus45 09-22-2011 11:31 AM

What IP-addresses do you have?

Let's imagine, you "own" an IP-range of 192.168.0.0/24. In this case all the boxes will use 192.168.0.0 as the subnet, 192.168.0.1 (let it be so) as a gateway and 192.168.0.255 as a broadcast address.

The IP-addresses from 192.168.0.2 to 192.168.0.254 may be assigned to 253 boxes.

I think you have the same situation, just the "digits are different".
I think that you can connect your boxes with the switch. And one carrier , an uplink, will go to your ISP's router.

Override.nl 09-22-2011 11:58 AM

Hi, thanks for the reply. I also am a bit further but still no luck in a good setup.. :(

I have a 8 IP's x.x.189.1[76..83]. my subnet is 255.255.255.248 and x.x.189.183 is my broadcast. My Gateway is x.x.189.177 and network address is .176.

On the ppp0 (via eth0) device I get the 189.177 address with subnet 255.255.255.255, looks logical because this is the gateway but now I want to use the other IP's also for my other servers.
So I gave on my gateway the ETH1 a static address wich was the same as the external only with offcourse a different subnet and turned on ipv4 forwarding. On the first glance it seemed to work, I could connect from an internal machine with ip x.x.189.178 and gateway x.x.189.177 to the internet and also I was reachable on this IP from internet.
So I thought whoohooo! But after really using this line and downloading some bigfiles the pppoe connection broke, restarted networking, did the poff / pon thingies and kill even the ppp daemon.
Nothing worked, after a reboot the pppoe magically worked again, but again after downloading some files from the x.x.189.178 machine it first kept on running but the third GB was to much and it killed ppp0 again.

I put the ppp logging on debug mode but still I only see things like:
Sep 21 19:52:30 gateway pppd[1853]: Send PPPOE Discovery V1T1 PADI session 0x0 length 12
Sep 21 19:52:30 gateway pppd[1853]: dst ff:ff:ff:ff:ff:ff src 0:c0:6c:81:2:3f
Sep 21 19:52:30 gateway pppd[1853]: [service-name] [host-uniq 3d 07 00 00]
Sep 21 19:52:44 gateway pppd[1589]: Timeout waiting for PADO packets
Sep 21 19:52:44 gateway pppd[1589]: Unable to complete PPPoE Discovery


I just also noticed in my login that this whole day the gateway was connected on ppp0 without any problems, but then again I did not really use it, it was just sitting there being up.

Some loggin I just saw, dont really understand why watchdog kicks in:
Sep 21 20:15:31 gateway pppd[829]: Script /etc/ppp/ip-up finished (pid 1366), status = 0x0
Sep 21 20:17:01 gateway /USR/SBIN/CRON[1387]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Sep 21 20:19:54 gateway kernel: [ 289.091861] eth1: Link speed = undefined!
Sep 21 20:35:04 gateway kernel: [ 1199.110860] eth1: Link speed = 1000Mbps.
Sep 21 20:35:04 gateway kernel: [ 1199.110866] eth1: setting full duplex, TX flow control, RX flow control.
Sep 21 20:35:39 gateway kernel: [ 1233.477348] eth1: Link speed = undefined!
Sep 21 20:35:42 gateway kernel: [ 1236.951868] r8169: eth0: link up
Sep 21 20:35:42 gateway kernel: [ 1236.952140] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sep 21 20:35:52 gateway kernel: [ 1247.024043] eth0: no IPv6 routers present
Sep 21 20:59:10 gateway kernel: [ 2644.988068] ------------[ cut here ]------------
Sep 21 20:59:10 gateway kernel: [ 2644.988081] WARNING: at /build/buildd-linux-2.6_2.6.32-35squeeze2-i386-XoyoyB/linux-2.6-2.6.32/debian/build/source_i386_none/net/sched/sch_generic.c:261 dev_watchdog+0xbd/0x15d()
Sep 21 20:59:10 gateway kernel: [ 2644.988085] Hardware name: To Be Filled By O.E.M.
Sep 21 20:59:10 gateway kernel: [ 2644.988089] NETDEV WATCHDOG: eth1 (Sundance Technology IPG Triple-Speed Ethernet): transmit queue 0 timed out
Sep 21 20:59:10 gateway kernel: [ 2644.988092] Modules linked in: xt_TCPMSS xt_tcpmss xt_tcpudp iptable_mangle ip_tables x_tables pppoe pppox ppp_generic slhc loop snd_pcm snd_timer i915 snd soundcore drm_kms_helper snd_page_alloc i2c_i801 drm i2c_algo_bit psmouse i2c_core pcspkr serio_raw evdev video output rng_core button processor ext3 jbd mbcache sd_mod crc_t10dif dl2k ata_generic uhci_hcd pcnet32 ata_piix pata_via libata thermal ipg ehci_hcd r8169 mii scsi_mod thermal_sys usbcore nls_base [last unloaded: scsi_wait_scan]
Sep 21 20:59:10 gateway kernel: [ 2644.988158] Pid: 0, comm: swapper Not tainted 2.6.32-5-686 #1
Sep 21 20:59:10 gateway kernel: [ 2644.988162] Call Trace:
Sep 21 20:59:10 gateway kernel: [ 2644.988171] [<c1030709>] ? warn_slowpath_common+0x5e/0x8a
Sep 21 20:59:10 gateway kernel: [ 2644.988176] [<c11e8eb8>] ? dev_watchdog+0x0/0x15d
Sep 21 20:59:10 gateway kernel: [ 2644.988181] [<c1030767>] ? warn_slowpath_fmt+0x26/0x2a
Sep 21 20:59:10 gateway kernel: [ 2644.988185] [<c11e8f75>] ? dev_watchdog+0xbd/0x15d
Sep 21 20:59:10 gateway kernel: [ 2644.988192] [<c1041803>] ? delayed_work_timer_fn+0x0/0x28
Sep 21 20:59:10 gateway kernel: [ 2644.988198] [<c103af4c>] ? run_timer_softirq+0x16a/0x1eb
Sep 21 20:59:10 gateway kernel: [ 2644.988204] [<c10357da>] ? __do_softirq+0xaa/0x156
Sep 21 20:59:10 gateway kernel: [ 2644.988208] [<c10358b7>] ? do_softirq+0x31/0x3c
Sep 21 20:59:10 gateway kernel: [ 2644.988213] [<c1035991>] ? irq_exit+0x26/0x58
Sep 21 20:59:10 gateway kernel: [ 2644.988219] [<c10142dd>] ? smp_apic_timer_interrupt+0x6c/0x76
Sep 21 20:59:10 gateway kernel: [ 2644.988227] [<c1003b35>] ? apic_timer_interrupt+0x31/0x38
Sep 21 20:59:10 gateway kernel: [ 2644.988235] [<c101a8c8>] ? native_safe_halt+0x2/0x3
Sep 21 20:59:10 gateway kernel: [ 2644.988240] [<c1008593>] ? default_idle+0x3c/0x5a
Sep 21 20:59:10 gateway kernel: [ 2644.988245] [<c1002388>] ? cpu_idle+0x89/0xa5
Sep 21 20:59:10 gateway kernel: [ 2644.988248] ---[ end trace dcbdc6f7f8fbc334 ]---


Hope you can help me, I think my next step is to use different hardware.
Maybe the thing I'm trying to just doesnt work like this.

Would be strange because although it an old dual core P4 the mainboard and memory are new.

Lexus45 09-26-2011 05:06 AM

Well...

A PPPoE connection means using a login and a password for being authorized on the server.
You have only one pair - login/password, don't you?
What IP address do you receive when you connect?

Override.nl 09-26-2011 06:22 AM

Quote:

Originally Posted by Lexus45 (Post 4482418)
Well...

A PPPoE connection means using a login and a password for being authorized on the server.
You have only one pair - login/password, don't you?
What IP address do you receive when you connect?


I get the gateway IP address and yes, I only have one login like metioned in the text above.

I was going thrue mij logging and I think that it's a networkcard issue.
In the beginning I had missing realtek firmware issue's so I put another networkcard in it, but now it seems that this one is also not working 100%.
I am going to test it on another server today. Hope this is the problem, never had 2 networkcards in a row not working but hey, there should be a first time for everything.. right? :)


All times are GMT -5. The time now is 07:23 AM.