Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to connect two VoIP phones to a laptop using the internal ethernet adapter and a usb-to-ethernet adapter. My configurations are as follows:

Laptop

eth0 - 121.1.2.1/24
Gateway - 121.1.2.4

eth1 - 123.1.2.1/24
Gateway - 123.1.2.4

VoIP Phone #1

IP Address - 121.1.2.4/24
Gateway - 121.1.2.1

VoIP Phone #2

IP Address - 123.1.2.4/24
Gateway - 123.1.2.1

Also, my firewall and SELinux are both disabled.

How do I connect these two phones to the laptop to establish network connectivity?

Edit #1: I can ping each phone successfully now that I'm using crossover cables, but cannot make a call from one phone to the other.

Edit #2: Not sure what caused it, but now I can only ping one phone and not the other. If I disable the interface for the phone I can ping, then suddenly I'm able to ping the other one. However, I cannot get both connections up and running at the same time. The only things I can think of that I've changed are use of crossover cables and enabling of ip-forwarding from the sysctl.conf file.

Edit #3: I decided to use a different subnet for the other phone in order to avoid collisions that I believe I was experiencing and now everything works properly.

share|improve this question
    
Giving us the ip address without the subnet mask is like giving us the house number without the street name. –  joeqwerty Mar 11 at 21:44
    
Lol, oops. I just added in that little detail. –  THE DOCTOR Mar 11 at 21:47
    
@THEDOCTOR Why are you trying to use a VOIP phone as a gateway for your laptop? And two gateways? And you presumably have WiFi with another gateway? Have you tried with no gateway on either laptop card, and no gateway on either phone? What OS does the laptop run? –  TessellatingHeckler Mar 11 at 21:48
    
Not using a WiFi connection. Just connecting a cable from one phone to the internal ethernet adapter of my laptop and the other phone is connected with a cable to the usb-to-ethernet adapter of the laptop. If I specify no gateway on the laptop or phone, will they know how to talk to each other? I'm running Fedora 8. –  THE DOCTOR Mar 11 at 22:00
1  
@THEDOCTOR hosts on the same subnet are local, and can be contacted directly. Because you're making a /24 network with your laptop and a VOIP phone they should be able to talk. Other hosts (e.g. the internet) go via the gateway. BTW are you using crossover cables? The laptop and phone would need to be gigabit ethernet to handle autonegotiation, and I guess the phones are not - so you will need crossover network cables or a switch involved. –  TessellatingHeckler Mar 12 at 1:19

2 Answers 2

You don't need a gateway for a direct link point to point connection, just set ip adresses on the same network and you will have connectivity between your interface and your phone. You should also use private ip addresses...

Exemple:

Eth0: 192.168.1.1/24 Phone0: 192.168.1.2/24

Btw, i suppose you don't want to make external calls and you don't have internet connectivity?...

share|improve this answer
    
I just want to be able to make a call from one phone to the other with an application running on the laptop that will allow me to decrease the call quality. This purpose of this type of setup is for me to be able to easily test that application with the least amount of hardware possible. –  THE DOCTOR Mar 12 at 15:00
    
Ok that should work. Gateway is only needed to join unknown routes. –  maxxvw Mar 12 at 15:05

I just got it to work. The problem seemed to be with the fact that I was using only 1 subnet for everything. I ended up changing my configuration as follows:

eth0 - 192.168.1.1/24
Phone #1 - 192.168.1.2/24

eth1 - 192.168.2.1/24
Phone #2 - 192.168.2.2/24

By using different subnets, I believe that it helped me avoid collisions which I believe were the source of my problems with establishing my setup.

I am now able to place a call from one phone to the other through my linux machine.

share|improve this answer
    
But you told us you were using different subnets - 121.1.2.0/24 and 123.1.2.0/24; your laptop can't route between two subnets if there aren't two subnets. I would have told you to look at bridging not routing/forwarding in that case - e.g. cyberciti.biz/faq/… –  TessellatingHeckler Mar 12 at 21:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.