3

Here is the layout of my local network:

Client (Running Ubuntu 17.10).

Server (Running Ubuntu Server 16.04).

Simplified ASCII art of my network:

Client~~~~~~~Server
  |            |
  |            |
  |---switch---|
         |
         |
       modem
         |
         |
     internet

~~~~~ 10G connection
----- 1G connection
  |   1G connection

So I have a client and server that are both connected to a 1G switch that is connected to the internet. They use this switch to access other things on my LAN as well as the outside world.

Both the server and client have 10G cards (in addition to separate 1G NICs - which are connected to the switch).

What I am trying to accomplish is to have these two machines use the 10G connection between them when they talk to each other, but then use the 1G connection to go everywhere else. The reason for doing this is because I only have these two 10G machines and have no need for a switch yet.

Is this possible?

Here is what I have got so far:

Client output (trimmed to relevant interface):

$ ifconfig
enp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    inet 10.0.0.1  netmask 255.255.255.0  broadcast 10.0.0.255
    ether 2c:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Client /etc/network/interfaces file:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
    iface lo inet loopback

auto enp2s0
    iface enp2s0 inet static
    address 10.0.0.1
    netmask 255.255.255.0

Client output (trimmed to relevant interface):

$ sudo lshw -class network
*-network                 
   description: Ethernet interface
   physical id: 0
   bus info: pci@0000:02:00.0
   logical name: enp2s0
   version: 02
   serial: 2c:xx:xx:xx:xx:xx
   capacity: 10Gbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pciexpress pm msix msi vpd bus_master cap_list rom ethernet physical tp 100bt-fd 1000bt-fd 10000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=atlantic driverversion=1.5.345.0 duplex=full firmware=1.5.44 ip=10.0.0.1 latency=0 link=no multicast=yes port=twisted pair
   resources: irq:36 memory:fb840000-fb84ffff memory:fb850000-fb850fff memory:fb400000-fb7fffff memory:fb800000-fb83ffff

Server output (trimmed to relevant interface):

$ ifconfig
veth4945bd1 Link encap:Ethernet  HWaddr 2e:xx:xx:xx:xx:xx  
      inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0
      inet6 addr: fe80::2c6f:1dff:feae:6e89/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:1032 errors:0 dropped:0 overruns:0 frame:0
      TX packets:197236 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0 
      RX bytes:9966154 (9.9 MB)  TX bytes:15130407 (15.1 MB)

Server /etc/network/interfaces file:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
    iface lo inet loopback

# The primary network interface
auto enp4s0
    iface enp4s0 inet dhcp

auto veth4945bd1
    iface veth4945bd1 inet static
    address 10.0.0.2
    netmask 255.255.255.0

Server output (trimmed to relevant interface):

*-network:0
   description: Ethernet interface
   physical id: 1
   logical name: veth4945bd1
   serial: 2e:xx:xx:xx:xx:xx
   size: 10Gbit/s
   capabilities: ethernet physical
   configuration: autonegotiation=off broadcast=yes driver=veth driverversion=1.0 duplex=full ip=10.0.0.2 link=yes multicast=yes port=twisted pair speed=10Gbit/s

So I have assigned a static IP to my client of 10.0.0.1 and my server as 10.0.0.2, both on submask 255.255.255.0.

When I ping server from client I just get the following:

$ ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
From 10.0.0.1 icmp_seq=1 Destination Host Unreachable

Similar error for server to client.

My 1G connections are unaffected and work just fine still.

Please ask if you need more info, I'm at a loss as to why this doesn't work.

jeklund
  • 71
  • 4
  • Where is the DHCP server? – Rinzwind Mar 08 '18 at 10:44
  • There is a DHCP server on my router between my switch and modem. Sorry I forgot to put that in my ASCII art. – jeklund Mar 08 '18 at 10:53
  • This already has an [answer on Server Fault](https://serverfault.com/questions/328804/direct-ethernet-link-between-two-servers) and that's a more natural place for this question anyway since it's about network topology and not specifically about Ubuntu. – devius Mar 08 '18 at 11:05
  • @devius, I read through that and it did not give me much else to try. I have already set the IPs. Maybe there is something wrong with my submasks? What submask should I be using? – jeklund Mar 08 '18 at 11:14
  • Should I repost this over on Server Fault? I don't mind moving it. – jeklund Mar 08 '18 at 11:15
  • Hmm... it says right there to use a submask of `/30`. – devius Mar 08 '18 at 11:16
  • Ha so it does. I have changed over to /30 and no dice still. – jeklund Mar 08 '18 at 11:24
  • I am leaning towards a bad cable(s). I will try to fix this tomorrow and report back. – jeklund Mar 08 '18 at 11:58
  • @jeklund Your question is on-topic here, so it's fine. If you would like it moved to [sf] we can do that too. Just drop me a comment or flag the post. Just be sure it won't get closed as a duplicate. – Seth Mar 08 '18 at 17:02
  • I have since tested the cables and they work fine. – jeklund Mar 10 '18 at 06:03

0 Answers0