Networking Forums

Networking Forums > Computer Networking > Linux Networking > router and server on one linux machine, need help.

Reply
Thread Tools Display Modes

router and server on one linux machine, need help.

 
 
Tamer Higazi
Guest
Posts: n/a

 
      11-08-2009, 12:52 PM
Hi people!
I am not a network pro, therefor I ask you gladly for help. I have a
gentoo box with 2 eth0 cards. I have red the gentoo home router guide at:

http://www.gentoo.org/doc/en/home-ro...tyle=printable

but I need to use the machine as router as well as server itself.

I have 2 NIC in the machine (eth0,eth1). On the machine is asterisk and
apache installed. I want to use the machine a router and server as well.

the sip gateway connected at eth0 is configured as:
192.168.1.5 with it's gateway 192.168.1.1 and nothing goes along to
asterisk.

and through eth1 the dialup with pppoe goes there.

I guess, it's not possible to have on the same gateway address a service
running. Could you give me some good advise how to get the thing to run?!


# This network configuration was written by net-setup

config_ppp0=("ppp")
link_ppp0="eth1"
plugins_ppp0=("pppoe")
pppd_ppp0=(
"defaultroute"
"usepeerdns"
)

username_ppp0="xxxx"
password_ppp0="xxxx"

config_eth1=("85.183.112.3 broadcast 85.255.255.255 netmask 255.0.0.0")
config_eth0=("192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0")

Tamer
 
Reply With Quote
 
 
 
 
Tamer Higazi
Guest
Posts: n/a

 
      11-08-2009, 05:07 PM
Hi David!
It has nothing todo with asterisk. I want the machine to run as router
as well as server at once and I don't know how to set up the machine.

ipforwading is activated and I want the device at eth0 (192.168.1.1) can
access the service. what ipadress will I give the device (connected at
eth0), gateway and subnetmask to make use from the service configured
for the network segment 192.168.0.0 ?!


tux tamer # route -n
Destination Gateway Genmask Flags Metric Ref Use
Iface
213.191.64.102 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
85.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 213.191.64.102 0.0.0.0 UG 0 0 0 ppp0



ifconfig:
tux tamer # ifconfig
eth0 Link encap:Ethernet HWaddr 00:18:f3:c1:db:b5
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::218:f3ff:fec1:dbb5/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:398 (398.0 B)
Interrupt:27 Base address:0x2000

eth1 Link encap:Ethernet HWaddr 00:40:95:31:65:ab
inet addr:85.183.112.3 Bcast:85.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::240:95ff:fe31:65ab/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:91436 errors:0 dropped:0 overruns:0 frame:0
TX packets:58048 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:122948770 (117.2 MiB) TX bytes:5652954 (5.3 MiB)
Interrupt:21 Base address:0x8c00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:258 errors:0 dropped:0 overruns:0 frame:0
TX packets:258 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:214961 (209.9 KiB) TX bytes:214961 (209.9 KiB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:85.183.112.3 P-t-P:213.191.64.102 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:91188 errors:0 dropped:0 overruns:0 frame:0
TX packets:57665 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:120927688 (115.3 MiB) TX bytes:4361162 (4.1 MiB)






David Schwartz schrieb:
> On Nov 8, 5:52 am, Tamer Higazi <n...@mail.de> wrote:
>
>> the sip gateway connected at eth0 is configured as:
>> 192.168.1.5 with it's gateway 192.168.1.1 and nothing goes along to
>> asterisk.

>
> Is this supposed to be your description of the problem? That "nothing
> goes along to asterisk"? Your message describes your setup a bit but
> doesn't specify what you need help with or what the symptoms are of
> your problem.
>
> If you have basic connectivity issues, it helps a lot to tell us what
> can ping what (and for a router, to/from which address). It also helps
> to paste in interface configurations, router tables, and the like. It
> also helps to mention which obviously stupid mistakes you've already
> checked for (such as forgetting to turn IP forwarding on). (Otherwise,
> 10 people will reply "did you turn on iP forwarding?')
>
> DS

 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      11-08-2009, 05:51 PM
Hello,

Tamer Higazi a écrit :
> It has nothing todo with asterisk. I want the machine to run as router
> as well as server at once and I don't know how to set up the machine.


1) Do the router settings as usual.
2) Do the server settings as usual.
They don't interfere.

> eth0 Link encap:Ethernet HWaddr 00:18:f3:c1:db:b5
> inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
> inet6 addr: fe80::218:f3ff:fec1:dbb5/64 Scope:Link
> UP BROADCAST MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0


Hmm, looks like eth0 is UP but not RUNNING. And it received no packet,
which would be quite surprising on a LAN with other active hosts if the
interface was running fine. Is the ethernet link ok ?

> eth1 Link encap:Ethernet HWaddr 00:40:95:31:65:ab
> inet addr:85.183.112.3 Bcast:85.255.255.255 Mask:255.0.0.0


Where does this address comes from ? There is no such 85.0.0.0/8
network, this block is split in multiple networks, and by using this
address and mask you prevent yourself from communicating with them. An
IP address is not necessary for an ethernet interface transporting only
PPPoE.
 
Reply With Quote
 
Bill Marcum
Guest
Posts: n/a

 
      11-08-2009, 11:20 PM
On 2009-11-08, Tamer Higazi <(E-Mail Removed)> wrote:
>
> eth1 Link encap:Ethernet HWaddr 00:40:95:31:65:ab
> inet addr:85.183.112.3 Bcast:85.255.255.255 Mask:255.0.0.0
> inet6 addr: fe80::240:95ff:fe31:65ab/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:91436 errors:0 dropped:0 overruns:0 frame:0
> TX packets:58048 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:122948770 (117.2 MiB) TX bytes:5652954 (5.3 MiB)
> Interrupt:21 Base address:0x8c00
>
> ppp0 Link encap:Point-to-Point Protocol
> inet addr:85.183.112.3 P-t-P:213.191.64.102 Mask:255.255.255.255
> UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
> RX packets:91188 errors:0 dropped:0 overruns:0 frame:0
> TX packets:57665 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:3
> RX bytes:120927688 (115.3 MiB) TX bytes:4361162 (4.1 MiB)
>

You have eth1 and ppp0 on the same ip address. If ppp0 is ppp-over-ethernet
on the eth1 interface, eth1 doesn't need to have an ip address.
I have this in /etc/network/interfaces on my router:

auto lo
iface lo inet loopback

# The primary network interface
iface eth0 inet static
address 0.0.0.0

auto dsl-provider
iface dsl-provider inet ppp
provider dsl-provider
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf

auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.224

(Debian and Ubuntu use /etc/network/interfaces. Other distros may use
different configuration files.)

 
Reply With Quote
 
Tamer Higazi
Guest
Posts: n/a

 
      11-11-2009, 06:12 PM
dear Bill!
I gladly love to thank you. The idea of cancelling the ethenets
interface's IP-Adress where the PPPoE Modem is connected to, solved all
my probelms at all.


I wish you a great day!


Tamer Higazi

Bill Marcum schrieb:
> On 2009-11-08, Tamer Higazi <(E-Mail Removed)> wrote:
>> eth1 Link encap:Ethernet HWaddr 00:40:95:31:65:ab
>> inet addr:85.183.112.3 Bcast:85.255.255.255 Mask:255.0.0.0
>> inet6 addr: fe80::240:95ff:fe31:65ab/64 Scope:Link
>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>> RX packets:91436 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:58048 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:1000
>> RX bytes:122948770 (117.2 MiB) TX bytes:5652954 (5.3 MiB)
>> Interrupt:21 Base address:0x8c00
>>
>> ppp0 Link encap:Point-to-Point Protocol
>> inet addr:85.183.112.3 P-t-P:213.191.64.102 Mask:255.255.255.255
>> UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
>> RX packets:91188 errors:0 dropped:0 overruns:0 frame:0
>> TX packets:57665 errors:0 dropped:0 overruns:0 carrier:0
>> collisions:0 txqueuelen:3
>> RX bytes:120927688 (115.3 MiB) TX bytes:4361162 (4.1 MiB)
>>

> You have eth1 and ppp0 on the same ip address. If ppp0 is ppp-over-ethernet
> on the eth1 interface, eth1 doesn't need to have an ip address.
> I have this in /etc/network/interfaces on my router:
>
> auto lo
> iface lo inet loopback
>
> # The primary network interface
> iface eth0 inet static
> address 0.0.0.0
>
> auto dsl-provider
> iface dsl-provider inet ppp
> provider dsl-provider
> pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
>
> auto eth1
> iface eth1 inet static
> address 192.168.0.1
> netmask 255.255.255.224
>
> (Debian and Ubuntu use /etc/network/interfaces. Other distros may use
> different configuration files.)
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP server on a Red Had Linux machine KAL Linux Networking 5 12-16-2006 05:00 AM
Simple client/server socket program works on one Linux machine, it doesnot work on other machine GS Linux Networking 2 05-09-2006 12:55 PM
How to create RedHat Linux machine as router chonja@inbox.lv Linux Networking 1 04-21-2005 02:31 PM
Making a router from a Linux machine iceman_to_the_max@yahoo.com Linux Networking 4 03-01-2005 12:30 PM
Windows can't see Apache on Linux machine when in one location, can in other. Linux PC can see server in both locations. Agent X Linux Networking 9 07-12-2004 05:17 PM



1 2 3 4 5 6 7 8 9 10 11