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.
0 Answers