Point to Point Connection Between Two Hosts

8,124

Ensure that at least one of the Ethernet ports is GigE. Otherwise you might need a crossover cable.

Share:
8,124

Related videos on Youtube

THE DOCTOR
Author by

THE DOCTOR

I am a Time-Lord from the planet Gallifrey and the last remaining survivor of my race. I have regenerated several times now as follows: Database Developer -> QA Engineer -> Software Engineer -> Network/Systems Engineer -> Director of IT & Network Engineering.

Updated on September 18, 2022

Comments

  • THE DOCTOR
    THE DOCTOR over 1 year

    I am trying to set up a point to point connection between two Linux host machines. I've connected both of them with crossover cable, but they can't ping each other. Here are the configurations for each laptop:

    Laptop 1

    (eth0 configuration)
    IP Address - 128.110.1.6
    Subnet Mask - 255.255.255.240
    Gateway - 128.110.1.1
    

    Laptop 2

    (eth0 configuration)
    IP address - 128.110.1.1
    Subnet Mask - 255.255.255.240
    Gateway - 128.110.1.6
    

    Is there something that I'm missing here? How can I establish connectivity between the two laptops?

    Edit-1: I ran the 'arp -a' command and received the following output:

    Laptop 1

    ? (128.110.1.1) at <incomplete> on eth0
    

    Laptop 2

    ? (128.110.1.6) at <incomplete> on eth0
    

    I'm guessing these entries in the ARP table might be due to the failed pings.

    Edit-2: I discovered that one of the laptops has a bridge enabled which was previously used with a usb-to-ethernet adapter interface as eth1 and the built in ethernet interface is eth0. Not sure if that would affect anything though. Following the suggestion to run ethtool produced the following output:

    Laptop 1

    [root@link_3 doctor]# /sbin/ethtool eth0
    Settings for eth0:
            Link detected: yes
    [root@link_3 doctor]# /sbin/ethtool eth1
    Settings for eth1:
            Supported ports: [ TP MII ]
            Supported link modes:   10baseT/Half 10baseT/Full 
                                    100baseT/Half 100baseT/Full 
            Supports auto-negotiation: Yes
            Advertised link modes:  Not reported
            Advertised auto-negotiation: No
            Speed: 10Mb/s
            Duplex: Half
            Port: Twisted Pair
            PHYAD: 0
            Transceiver: internal
            Auto-negotiation: on
            Link detected: no
    

    Laptop 2

    [root@hitl3 doctor]# /sbin/ethtool eth0
    Settings for eth0:
            Supported ports: [ MII ]
            Supported link modes:   10baseT/Half 10baseT/Full 
                                    100baseT/Half 100baseT/Full 
                                    1000baseT/Half 1000baseT/Full 
            Supports auto-negotiation: Yes
            Advertised link modes:  10baseT/Half 10baseT/Full 
                                    100baseT/Half 100baseT/Full 
                                    1000baseT/Half 1000baseT/Full 
            Advertised auto-negotiation: Yes
            Speed: 1000Mb/s
            Duplex: Full
            Port: Twisted Pair
            PHYAD: 1
            Transceiver: internal
            Auto-negotiation: on
            Supports Wake-on: g
            Wake-on: d
            Current message level: 0x000000ff (255)
            Link detected: yes 
    
    • MadHatter
      MadHatter over 10 years
      Sorry to ask stupid questions, but I take it that neither box is running a firewall (iptables -L -n -v)?
    • Renan
      Renan over 10 years
      is the link on the network card detected? what about the speed they are working at? you can check with ethtool <ethX>
    • THE DOCTOR
      THE DOCTOR over 10 years
      @MadHatter - Firewall and SELinux are both disabled and there's nothing in the iptables.
    • Admin
      Admin over 10 years
      The ethtool suggestion was a good one. Let's see the result. And the received packet count from ifconfig - whether or not it goes up while you're attempting a ping would be interesting.
    • hookenz
      hookenz over 10 years
      You don't need to define the gateway address as the other machine. That's not really right but won't prevent it working. On Laptop 1 set the ethernet configuration to eth0 since eth1 doesn't have a link but eth0 does.
    • Admin
      Admin over 10 years
      The first ethtool just prints those 2 lines of output? That's really odd. What driver is running that eth0? And does ethtool report that the link goes down if you unplug the cable?
    • Admin
      Admin over 10 years
      Do you have ping enabled and are the cards giving led status orange/green both?
    • Renan
      Renan over 10 years
      I find it odd that laptop detected a link at 1Gbps while the other card only supports 100Mbps, though I don't remember what should happen in this case. What happens if you use ethtool -s eth0 speed 100 duplex full on laptop 2?
  • THE DOCTOR
    THE DOCTOR over 10 years
    Actually, I am using a crossover cable. I updated my question to mention that.
  • symcbean
    symcbean over 10 years
    Does it work? Do the systems connect when you use patch cables and a hub?