I have two network interfaces (in addition to the one I use for communication with the network):
Between the two interfaces is an Ethernet TAP. This is part of a one-way link project (more here: https://tryingtokeepitsecure.bz/one-way-network-links-for-small-businesses-part-1/). A program will open sockets for both 10.10.10.6 and 10.10.10.7. It will send a packet from 10.10.10.6 to 10.10.10.7, then from 10.10.10.7 to 10.10.10.6. The tap ports of the Ethernet TAP will provide two one-way links with a copy of the packet.
What is giving me trouble is the routing. In Windows, I could do this:
(
So I try to do what seems like the FreeBSD equivalent:
And I get these errors:
The routing table looks like this (per
So I tried deleting the existing route and got this:
I am trying to learn FreeBSD networking, but for some reason, it is really fighting me.
If what I am doing wrong is obvious to anyone, I would much appreciate a hint.
Thanks!
Code:
ue0: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
ether 00:50:b6:f3:c2:81
inet 10.10.10.6 netmask 0xffffff00 broadcast 10.10.10.255
media: Ethernet autoselect (1000baseT <full-duplex,master>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue1: flags=1008843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500
options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
ether 00:50:b6:f3:c2:70
inet 10.10.10.7 netmask 0xffffff00 broadcast 10.10.10.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
Between the two interfaces is an Ethernet TAP. This is part of a one-way link project (more here: https://tryingtokeepitsecure.bz/one-way-network-links-for-small-businesses-part-1/). A program will open sockets for both 10.10.10.6 and 10.10.10.7. It will send a packet from 10.10.10.6 to 10.10.10.7, then from 10.10.10.7 to 10.10.10.6. The tap ports of the Ethernet TAP will provide two one-way links with a copy of the packet.
What is giving me trouble is the routing. In Windows, I could do this:
Code:
route add 10.10.10.7 mask 255.255.255.255 10.10.10.6 if 15
route add 10.10.10.6 mask 255.255.255.255 10.10.10.7 if 27
if 15 is the interface for 10.10.10.6, and if 27 is the interface for 10.10.10.7)So I try to do what seems like the FreeBSD equivalent:
Code:
route add -host 10.10.10.7 -interface ue0 10.10.10.6 255.255.255.255
route add -host 10.10.10.6 -interface ue1 10.10.10.7 255.255.255.255
Code:
add net 10.10.10.7: gateway ue0 fib 0: route already in table
add net 10.10.10.6: gateway ue1 fib 0: route already in table
netstat -r):
Code:
Internet:
Destination Gateway Flags Netif Expire
default doorkeeper.lynngra UGS re0
10.10.10.0/24 link#3 U ue0
10.10.10.6 link#2 UHS lo0
10.10.10.7 link#2 UHS lo0
localhost link#2 UH lo0
192.168.20.0/24 link#1 U re0
mercer.lynngrant.b link#2 UHS lo0
So I tried deleting the existing route and got this:
Code:
route delete -host 10.10.10.6
delete host 10.10.10.6 fib 0: gateway uses the same route
I am trying to learn FreeBSD networking, but for some reason, it is really fighting me.
If what I am doing wrong is obvious to anyone, I would much appreciate a hint.
Thanks!