-1

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.

THE DOCTOR
  • 185
  • 4
  • 14
  • Giving us the ip address without the subnet mask is like giving us the house number without the street name. – joeqwerty Mar 11 '14 at 21:44
  • Lol, oops. I just added in that little detail. – THE DOCTOR Mar 11 '14 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 '14 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 '14 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 '14 at 01:19
  • @TessellatingHeckler - Thanks for the suggestion to use crossover cables. I can ping each phone from the laptop now, but still can't make a call from one phone to the other. – THE DOCTOR Mar 12 '14 at 17:44
  • @THEDOCTOR To do that you will need each phone to have the laptop address as the gateway. 121.1.2.1 on phone 1, and 123.1.2.1 on phone 2. Then have routing/packet forwarding enabled on the laptop to pass traffic between the two networks. I guess you're using Linux from the mention of SELinux, but you don't say what version. Something like http://www.ducea.com/2006/08/01/how-to-enable-ip-forwarding-in-linux/ might do it. – TessellatingHeckler Mar 12 '14 at 17:57
  • Thanks, I've gone ahead and enabled ip-forwarding. For some strange reason I can't ping the 2nd phone now. Still trying to troubleshoot to see what I screwed up that's broken connectivity to that phone. – THE DOCTOR Mar 12 '14 at 18:34

3 Answers3

0

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?...

maxxvw
  • 321
  • 1
  • 7
  • 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 '14 at 15:00
  • Ok that should work. Gateway is only needed to join unknown routes. – maxxvw Mar 12 '14 at 15:05
0

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.

THE DOCTOR
  • 185
  • 4
  • 14
  • 1
    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. http://www.cyberciti.biz/faq/debian-network-interfaces-bridge-eth0-eth1-eth2/ – TessellatingHeckler Mar 12 '14 at 21:35
0

Lots of devices even 10 Mbps are auto MDI-MDX but always carry a crossover cable in case.

By making each devices the others' gateway : The phones think that the laptop is the router, and laptop thinks the phones are routers.