1

Problem

I have a laptop that is connected to the Internet via wifi. It also has a spare Ethernet port I never use.

I have an IP phone that needs to be hard connected to a modem/router to connect to the Internet. Unfortunately, I live on a property where I do not have access to the modem. The phone has a dynamically assigned IP address, but it is set to search for a particular call server/http/https address which is on a different network than my residence network.

Is there a way for my IP phone to acquire an Internet connection by being hard connected to my laptop's Ethernet port while my laptop is connected to the Internet via wifi?

Details

  • OS: Windows 8.1
  • IP Phone: Avaya IP Phone / Anatel 9608

Attempts

  • Powerline adapters: I do not have access to the router to pair the device
  • Wifi Range Extender: I do not have access to the router to pair the device
  • Straight connection to my computer: I tried to create a custom network, but the prompt could not find the phone (presumably because the phone is not really on a network yet).
  • I've looked online, but every discussion is on how to turn the computer into a wifi hotspot. I want to accomplish the reverse.

I'm not that good with networks, so I'm not sure how to proceed or what key terms to look for. Your help is much appreciated.

Clarification I used the wrong term. I meant router instead of switch as I did not appreciate that these devices were on different networks.

7
  • 1
    On Windows, you can just enable bridging.
    – Ron Maupin
    Commented May 25, 2017 at 18:38
  • @RonMaupin what is that going to accomplish in terms of what he wants to do? Bridging merges 2 networks into a new one. He wants to create a new network for his LAN port and forward the traffic through the wifi connection.
    – LPChip
    Commented May 25, 2017 at 18:57
  • @LPChip, the title of the question asks about turning the PC into a switch, which is really a bridge. If the networks are different, then it would need to be a router, not a switch (bridge).
    – Ron Maupin
    Commented May 25, 2017 at 19:02
  • @RonMaupin Bridging between Ethernet and a client STA-mode Wi-Fi interface won't work, because bridging doesn't change MAC addresses, and the AP will reject frames from a source MAC address that hasn't 802.11-authenticated with it. For straight bridging to work, the Wi-Fi link would have to be a WDS link (not a typical STA-to-AP link), or the client STA would have to do Proxy STA Mode (do 802.11 auth's and assoc's on behalf of any Ethernet devices it's bridging for).
    – Spiff
    Commented May 25, 2017 at 20:00
  • @Spiff, the question, "How do I turn my spare Ethernet port into a network switch?" means bridging. My comment tells how to use the PC as a switch. I didn't explain everything in a full answer, I just said that enabling bridging will make the PC a switch, I didn't write a full answer.
    – Ron Maupin
    Commented May 25, 2017 at 20:04

1 Answer 1

0

Like Spiff said, WiFi station interfaces (as opposed to the access point interface) cannot be bridged.

However, there is a more basic problem: SIP isn’t really “compatible” with NAT routers. You’ll likely experience issues like not hearing the other end or vice versa, the phone might not ring on incoming calls and whatnot. I suggest you just give up on this idea.

If you insist on continuing, there are multiple options. First, you can create a pseudobridge using “relayd”. It’s described in this OpenWRT wiki page. However, obtaining relayd is not entirely easy: You need to obtain the source code from the OpenWRT project and compile relayd yourself.

You’d use it like this:

relayd -I eth0 -I wlan0 -B -D 

You may need to specify additional options to uphold the laptop’s network connectivity.

Unfortunately, I wasn’t successful in setting up relayd in my latest try. It just kept spamming the network with ARP requests while not forwarding DHCP replies.


Next, you can go fully routed. Just enable routing on your laptop and maybe install a DHCP server to serve the wired network. However, you’ll also need to set up a route to your wired network on the “real” router, using your laptop as the gateway. So if you cannot control those settings, it’s a no-go.


Finally, you can turn your laptop into a NAT router. This will probably make the issues indicated above even worse. However, it does not require changes to the “real” router. On Windows, this is called “Internet Connection Sharing”.

On Linux, you just enable routing and NAT:

  1. Edit /etc/sysctl.conf, setting

    net.ipv4.ip_forward = 1
    

    Immediately enable this setting:

    echo 1 > /proc/sys/net/ipv4/ip_forward
    
  2. Set up MASQUERADE with IPTables:

    iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
    iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
    iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
    
1
  • I took your initial advice @Daniel B. The IT team was able to route a physical cable to my location so I did not have to turn my laptop into a router.
    – Ryan
    Commented Jul 26, 2017 at 19:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .