# use two network

## hedmo

hi.

I need to setup two networks that is working at the same time but cannot figure out how to do it (network is not my thing).

I have one network :

```

enp0s20u7

```

that i am using for my tpcast. i need to have that on its own because it needs to have as low latency as possible

the next is :

```

 enp3s0

```

and that one is for network. 

i cannot use them both   :Confused:  . if i set  enp3s0 i have internet but no enp0s20u7 access and the opposite if i set enp0s20u7. one more note for you is that they are both enabled all the time...

some more  info for you:

enp0s20u7=

```

kodi@myx51 ~ $ lsusb

Bus 003 Device 009: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter

kodi@myx51 ~ $ 

```

 enp3s0=

```

kodi@myx51 ~ $ lspci

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)

kodi@myx51 ~ $ 

```

some info what i am doing : https://github.com/OpenTPCast/Docs/blob/master/guides/ROUTER.md

 *Quote:*   

> 
> 
> It is recommended to run the TPCast router independently of your home router by connecting the TPCast router to your computer using a secondary ethernet port on your motherboard, a secondary network card, or a USB-to-Ethernet adapter.
> 
> 

 

regards

----------

## alamahant

These are ifaces no?

Please assign default gateway only to the main one ie the one you use to reach the internet.

For the second one use routing.

Assign address and dns but not gateway.

Then add a route

```

ip route add <your-lan/cidr> dev  enp3s0

ip route add <your-internal network/cidr> dev enp0s20u7

```

Your /etc/conf.d/net should look like this

```

config_eth0="192.168.2.3/24"

routes_eth0="default via 192.168.2.1"

dns_servers_eth0="127.0.0.1"

config_eth1="192.168.2.3/24"

dns_servers_eth1="127.0.0.1"

```

replacing with your ifaces' names.

Needs ip_forwarding..

----------

## hedmo

alamahant 

Thank you for THE reply.is there a way to DO this via Networkmanager?

----------

## alamahant

yes

```

nmcli con add type ethernet autoconnect yes con-name eth0 ifname enp3s0 ip4 <address/cidr> gw4 <router-ip>

nmcli con mod eth0 ipv4.dns <nameserver-ip> ipv4.method manual

nmcli con add type ethernet autoconnect yes con-name eth1 ifname  enp0s20u7  ip4 <address/cidr> 

nmcli con mod eth1 ipv4.dns <nameserver-ip> ipv4.method manual

```

You will need to create the routes yourself###not really necessary.but needed in other machines if they need to use this machine as a router in which case you will need to add some iptables rules

Do you need this machine to function as a router?

----------

## hedmo

 *alamahant wrote:*   

> 
> 
> You will need to create the routes yourself###not really necessary.but needed in other machines if they need to use this machine as a router in which case you will need to add some iptables rules
> 
> Do you need this machine to function as a router?

 

alamahant

good morning

as i said . this is not my cup of tea and i have real hard time to understand it all. i dont think i need this machine to act as a router.

enp3s0 is my aimesh system that is connected to my hole local network and the only thing i need this for is to get network accsess

and ssh to the media pc i am working on from another machine.

enp0s20u7 is just a wireless adapter  (router,usb and hdmi) for my HMD , lighthouses and controllers to play steamvr wireless.

ATM i have manage to understand : 

```

nmcli con add type ethernet autoconnect yes con-name eth0 ifname enp3s0 ip4 <address/cidr> gw4 <router-ip>

```

i think  :Embarassed:   . This will give me a new entry = con-name eth0 that is using the enp3s0 network . ip4 <address/cidr> gw4 <router-ip> = it will use ip4(ip address) with the address/cidr = 192.168.1.85/32 and have a gw4(gateway) <router-ip> = 192.168.1.1 .

the same goes for enp0s20u7:

```

nmcli con add type ethernet autoconnect yes con-name eth1 ifname  enp0s20u7  ip4 192.168.1.103/32

```

but wont have a gateway as i understand. the one i cannot understand is :

```

nmcli con mod eth0 ipv4.dns <nameserver-ip> ipv4.method manual

```

i dont understand where to find <nameserver-ip>

----------

## alamahant

```
nmcli con mod eth0 ipv4.dns <nameserver-ip> ipv4.method manual
```

Safe to give the address of your router or any other dns server like 8.8.8.8 or 1.1.1.1 or your own dns server if you have one.

You assign dns and make the iface config static ie not dhcp.

If you also do not need ipv6

you may add

```

...ipv6.method disabled ### or in some cases "ignored"

```

BUT iam not sure which the internet going  iface.Please assign that one to con-name eth0.

----------

## NeddySeagoon

hedmo,

Lets look at a fully static setup for an illustration.

```
config_eth0="192.168.100.20/24 brd 192.168.100.255"

routes_eth0="default via 192.168.100.253"
```

That says to assign eth0 the IP address 192.168.100.20/24, winth a broadcast address of  192.168.100.25.

The routes line assigns the default route to 192.168.100.253.

The default route is used for everything not in the 192.168.100.0/24 subnet, so you can only have one default route.

If I add another interface on a different subnet.

```
config_eth0="192.168.100.20/24 brd 192.168.100.255"

config_eth1="192.168.020.10/24  brd 192.168.20.255"

routes_eth0="default via 192.168.100.253"
```

This sets up traffic to the 192.168.020.0/24 to use eth1 and everything else to use eth0.

If one of the systems on 192.168.020.0/24 was a gateway to yet another subnet, I would need a  routes_eth1= entry to describe how to reach it.

I don't know how to write that for networkmanager.

By the way, USB is not low latency, nor is Wifi. If you want a low latency network link, you need wired.

That not to say it won't be good enough to meet your requements.

----------

## hedmo

alamahant

sorry but i still dont get it.where can i find the <nameserver-ip> or is that some ting i just make up?.

 NeddySeagoon

so if i understand this correct . i need to tell my connections what ip they will handle  . for example :

enp3s0 :

```

nmcli con add type ethernet autoconnect yes con-name hedmo-local ifname enp3s0 ip4 192.168.1.0/100 gw4 192.168.1.1

```

this will make enp3s0 use addresses from 192.168.1.0 to 192.168.1.10 and 

```

nmcli con add type ethernet autoconnect yes con-name hedmo-tpcast ifname enp0s20u3 ip4 192.168.1.101/200

```

will handle the rest?

NeddySeagoon

about the latency . it runs in about 2~6ms if i dont have any net trafic in the way . and one nice thing would be if i could use my wifi card without the router.

for mor info . this is what i am working on:

```

kodi@myx51 ~ $ ifconfig

enp0s20u3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.136  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::5af4:e262:7572:291a  prefixlen 64  scopeid 0x20<link>

        ether a0:ce:c8:d9:a9:84  txqueuelen 1000  (Ethernet)

        RX packets 1352  bytes 178579 (174.3 KiB)

        RX errors 0  dropped 3  overruns 0  frame 0

        TX packets 230  bytes 20281 (19.8 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.85  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::914e:d508:8a68:2611  prefixlen 64  scopeid 0x20<link>

        ether f8:bc:12:fe:50:bd  txqueuelen 1000  (Ethernet)

        RX packets 228263  bytes 333401244 (317.9 MiB)

        RX errors 0  dropped 9  overruns 0  frame 0

        TX packets 76623  bytes 4486727 (4.2 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1000  (Local Loopback)

        RX packets 287  bytes 30006 (29.3 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 287  bytes 30006 (29.3 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.225  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::37c4:4e9f:ac00:3df4  prefixlen 64  scopeid 0x20<link>

        ether b8:ee:65:58:3d:ab  txqueuelen 1000  (Ethernet)

        RX packets 30998  bytes 39571445 (37.7 MiB)

        RX errors 0  dropped 0  overruns 0  frame 20177

        TX packets 5822  bytes 688136 (672.0 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

        device interrupt 16  

kodi@myx51 ~ $

```

----------

## alamahant

For nameserver either use your router-ip or 8.8.8.8 or 1.1.1.1 etc

----------

## NeddySeagoon

hedmo,

A few things, in no particular order.

```
wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.225  netmask 255.255.255.0  broadcast 192.168.1.255 
```

You may not have a host on the broadcast address as you do above.

Packets sent to to broadcast address are supposed to get a response from every host that receives them.

```
ping 192.168.1.255 
```

should tell you what IPs are in use on 192.168.1.255/24 

```
enp0s20u3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.136 

enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.85

wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.225
```

That's three interfaces in the same subnet. Don't do that. It can be made to work but its hard.

Use three different subnets for the three different interfaces.

I don't understand your ip4 192.168.1.101/200 and 192.168.1.0/100 in your nmcli commands.

You need to have a basic understanding of CDIR.

----------

## hedmo

 *NeddySeagoon wrote:*   

> hedmo,
> 
> I don't understand your ip4 192.168.1.101/200 and 192.168.1.0/100 in your nmcli commands.
> 
> You need to have a basic understanding of CDIR.

 

NeddySeagoon

i was trying to understand yours.. but i made it wrong because i dont undrstand this sort of things. 

it should be 192.168.1.85/32 and 192.168.1.103/32. this is quite hard for me sorry..

 *NeddySeagoon wrote:*   

> 
> 
> That's three interfaces in the same subnet. Don't do that. It can be made to work but its hard.
> 
> Use three different subnets for the three different interfaces.
> ...

 

how ? 

 *NeddySeagoon wrote:*   

> 
> 
> You may not have a host on the broadcast address as you do above.
> 
> Packets sent to to broadcast address are supposed to get a response from every host that receives them.
> ...

 

the ping gave me :

```

kodi@myx51 ~ $ ping 192.168.1.255

ping: Do you want to ping broadcast? Then -b. If not, check your local firewall rules

kodi@myx51 ~ $ ping -b 192.168.1.255

WARNING: pinging broadcast address

PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data.

64 bytes from 192.168.1.26: icmp_seq=1 ttl=128 time=0.918 ms

64 bytes from 192.168.1.162: icmp_seq=1 ttl=64 time=80.7 ms

64 bytes from 192.168.1.217: icmp_seq=1 ttl=64 time=125 ms

```

----------

## NeddySeagoon

hedmo,

```
PING 192.168.1.255 (192.168.1.255) 56(84) bytes of data.

64 bytes from 192.168.1.26: icmp_seq=1 ttl=128 time=0.918 ms

64 bytes from 192.168.1.162: icmp_seq=1 ttl=64 time=80.7 ms

64 bytes from 192.168.1.217: icmp_seq=1 ttl=64 time=125 ms 
```

That's replies from three different hosts. The broadcast address is special. You may not use in for a system.

192.168.1.85/32 and 192.168.1.103/32 is better but if it warks or not will depend on the order of the routes in your routing table. That in turn depends on the order that the interfaces start in, which is not determinate, so it may or may not work ... sometimes.

The network addresses are in two parts. The network part and the host part. The netmask, or /<number> is used to determine the split.

With a 255.255.255.0 netmask, which is the same as /24, the network address is the first three groups of digits and the host address is the last group.

This means that the private range.192.168.0.0/16 (1962.168.0.0 netmask 255.255.0.0) contains 256 networks (called subnets here) of 256 IP addresses each.

You must use a private IP range, so we will use the 192.168.0.0/16 range split into 256 subnets.

That's 192.168.x.0/24  (192.168.x.0 netmask 255.255.255.0 where you can choose a different value of x for each interface.

The value of x must match for every device connected to that interface and they must all be different.

A long time ago, Iset my x to 10, 100 and 54. 

192.168.10.0/24 was thinnet. (10 Mbit)

192.168.54.0/24  was wifi (54 Mbit)

192.168.100.0/24 was wired (100 Mbit}

----------

## alamahant

Your cidr is probably "/24"

----------

## hedmo

NeddySeagoon and alamahant

sorry for taking your time  . but i just dont understand it . i have been trying to figure this out this week and i cannot by ... make the two network to work at the same time.

i think i am giving this one up   :Embarassed: 

NeddySeagoon

even if i try something like :

```

kodi@myx51 ~ $ nmcli con add type ethernet autoconnect yes con-name hedmo-local ifname enp3s0 ip4 192.168.100.85/32 gw4 192.168.1.1

kodi@myx51 ~ $ nmcli con add type ethernet autoconnect yes con-name hedmo-tpcast ifname enp0s20u3 ip4 192.168.50.136/32

```

it does not work.

----------

## hedmo

 *alamahant wrote:*   

> Your cidr is probably "/24"

 

that was the first one i was trying . but if i removed them all it defaults to /32 so i went with that.

----------

## alamahant

If you use /32 you will be unable to use the iface

I think @Neddy explained it very well.

if you do though subnetting etc its difficult to calculate the cidr and you may use a cidr calculator utility(many online are available).

----------

## NeddySeagoon

hedmo,

A /32 is a network with only a single IP address in it, so it can only talk to itself.

A /31 is a network with two IP addresses. Its not really a network, but it can be used for point to point.

A /30 has four IP addresses. That's not really useful as you have the network address at the bottom, the broadcast address at the top, leaving two addresses far hosts.

A /29 has eight IP addresses. This is the first useful allocation. The network address at the bottom, the broadcast address at the top leaves six IPs for hosts.

...

A /24 has 256  IP addresses.

I was trying to avoid going into binary or hex but its less confusing that the dotted decimal conventional way to write IPv4 address.

The hostmask, 255.255.255.0 in dotted decimal is ff.ff.ff.00 in hex, or /24 in CDIR.

The 24 is the count of the number of bits in the network address. That's the ff.ff.ff part above. 

The hostmask is callehd that becase its used by routers to mask the host part of the IP address by performing a logical and operation (masking) of the whole IP address to derive the network address.

Routers only care about the network address.

Your kernel has a router. The route command will show the rules. 

```
$ route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

default         router          0.0.0.0         UG    2      0        0 eth0

loopback        0.0.0.0         255.0.0.0       U     0      0        0 lo

loopback        localhost       255.0.0.0       UG    0      0        0 lo

192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
```

Rules are applied from the bottom working up. Packets are routed according to the first matched rule.

Routing rules should not attempt to route overlapping IP ranges.

----------

## hedmo

NeddySeagoon

thank you for the Education as always.

so :

```

kodi@myx51 ~ $ nmcli con add type ethernet autoconnect yes con-name hedmo-local ifname enp3s0 ip4 192.168.x.85/24 gw4 192.168.1.1

kodi@myx51 ~ $ nmcli con add type ethernet autoconnect yes con-name hedmo-tpcast ifname enp0s20u3 ip4 192.168.x.136/24

```

it is.  

as i understand the x is something that has to diff ?.

 The router that came with the tpcast had the ip address of 192.168.144.1. is this something that can help me?. that should be simple to fix in the new router i think.

because it does not work now . i have setup the router to be a access pint ATM it works but i getting  about +2-4ms of latency.

----------

## NeddySeagoon

hedmo,

144 looks like good value for x with the network to the tpcast router as it already has 192.168.144.1/24

You must not use 192.168.144.1 as its already taken.

192.168.144.0 and 192.168.144.255 are the network and broadcast addresses so you can't use them either.

If that router has dhcp, you could use that be you would need to turn off its default route.

You could also turn off its dhcp server and set a static IP.

----------

## hedmo

 *NeddySeagoon wrote:*   

> hedmo,
> 
> 144 looks like good value for x with the network to the tpcast router as it already has 192.168.144.1/24
> 
> You must not use 192.168.144.1 as its already taken.
> ...

 

NeddySeagoon

that router was not good so i have replaced it with a asus rt-ac2900.i think i am going to use that number . is that ok?

so the first thing is to change stuff in the  hedmo_tpcast router and set its gatway ip to 192.168.144.1 and turn of dhcp?.

the next is to reconfigure nmcli to fit hedmo_tpcast=192.168.144.136/24.?

how about something like this:

```

IP address: 192.168.144.136

Subnet mask: 255.255.255.0

Default gateway: 192.168.144.1

Preferred DNS server: 192.168.144.1

Static ip for the tpcast : 192.168.144.203

```

is there something more after that?. i am going to take this slow and trying to understan more of it  :Laughing:  .

----------

## NeddySeagoon

hedmo,

That's two interfaces in the 144 subnet.

Can you do a drawing of the network you want to achieve?

ASCII art works.

Make it in nano and post in in code tags.  My router looks like

```
              +---------------+

              |               |

              |    Router     +---- 192.168.100.253 --- Wired

   Internet---|               +---- 192.168.54.253  --- Wireless

              |               +---- 192.168.10.253  --- DMZ (Public Servers)

              |               |

              +---------------+

```

You need to show your router, your PC, with two network interfaces and the things that will connect to them. 

I'm only expecting one other thing. Other systems connected to your router do not affect anything.

Show the IP addresses in use too. Not your public IP on the internet, just the 192. ... addresses we have been discussing.

----------

## hedmo

NeddySeagoon

I Will DO a Good One for you tomorrow . But in Short . One router (My local Network with all My Network stuff) with internet "eth0" connected to One port to the pc and One router (only for THE tpcast ) for THE wifi usb,HMD and controllers "eth1" connected to the other port on the pc. They need to work att THE same time.the router for THE tpcast is only for that PC... 

Sorry it was not Short

----------

## hedmo

NeddySeagoon

like this:

```
              +---------------+

              |               |

              |    Router 1   |

   Internet---| 192.168.1.1   +---- 192.168.1.85  --- pc eth0 port

              |               |

              |               |

              +---------------+

              +---------------+

              |               |

              |    Router 2   |

     tpcast---| 192.168.144.1 +---- 192.168.144.136  --- pc eth1 port

192.168.144.203               |

              |               |

              +---------------+

```

----------

## NeddySeagoon

hedmo,

That will just work as long as you have exactly one default route and it uses 192.168.1.1 an the gateway.

You wall also need a static route to 192.168.144.136 (but no default route). However, you will get that for free when you assign an address is the 192.168.144.0/24 subnet to pc eth1 port.

Bring it up a piece at a time. On your PC, start eth0 however you usually do then run 

```
route -n
```

or 

```
ip route show
```

if you prefer the ip command.

Now you can reach the internet and everything on etho0 works.  Not the tpcast, as that's on eth1.

```
ifconfig eth1 192.168.144.10
```

will bring up eth1, with the address  192.168.144.10. This may destroy your internet connection.

Look at your routing table again.

If you have two default routes, delete the one via 192.168.144.1 as it goes nowhere.

```
route del -net gw 192.168.144.1
```

or something like that.

Now it should all work. Its not permanent yet but test it.

----------

## hedmo

 *NeddySeagoon wrote:*   

> hedmo,
> 
> ```
> ifconfig eth1 192.168.144.10
> ```
> ...

 

I Will check and post back . BTW when i am using THE nmcli commands i dont add a gw to THE tpcast and it does not work ..?

----------

## hedmo

 *NeddySeagoon wrote:*   

> hedmo,
> 
> ```
> ifconfig eth1 192.168.144.10
> ```
> ...

 

That is the problem i am facing.as soon as i am adding eth1 i Will loose internet and as soon as i reading eth0 i Will loose THE tpcast

 *NeddySeagoon wrote:*   

> 
> 
> If you have two default routes, delete the one via 192.168.144.1 as it goes nowhere.
> 
> ```
> ...

 

I Will check and post back . BTW when i am using THE nmcli commands i dont add a gw to THE tpcast and it does not work ..?

----------

## NeddySeagoon

hedmo,

That's correct. Some unhelpful tools assume that if you bring up an interface, it should be your default route too.

That's why you loose the internet. 

Your routing table needs to look like

```
$ route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

0.0.0.0         192.168.100.253 0.0.0.0         UG    2      0        0 eth0

127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo

192.168.20.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1

192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 eth0
```

with just a single (correct) default route and a route for the tpcast subnet over its own interface.

----------

## hedmo

NeddySeagoon

thank you so much . ATM it works . i did even reboot  :Laughing: 

ifconfig:

```

enp0s20u3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.144.134  netmask 255.255.255.0  broadcast 192.168.144.255

        inet6 fe80::a2ce:c8ff:fed9:a984  prefixlen 64  scopeid 0x20<link>

        inet6 fe80::a0ed:9396:1f3:d9a8  prefixlen 64  scopeid 0x20<link>

        ether a0:ce:c8:d9:a9:84  txqueuelen 1000  (Ethernet)

        RX packets 375  bytes 48131 (47.0 KiB)

        RX errors 0  dropped 1  overruns 0  frame 0

        TX packets 1199  bytes 99424 (97.0 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.85  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::65e1:1870:2f5d:7335  prefixlen 64  scopeid 0x20<link>

        ether f8:bc:12:fe:50:bd  txqueuelen 1000  (Ethernet)

        RX packets 111808  bytes 164711251 (157.0 MiB)

        RX errors 0  dropped 2  overruns 0  frame 0

        TX packets 22877  bytes 1334550 (1.2 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 1000  (Local Loopback)

        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

wlp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        ether b8:ee:65:58:3d:ab  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 283

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

        device interrupt 16

```

route -n

```

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

0.0.0.0         192.168.1.1     0.0.0.0         UG    101    0        0 enp3s0

192.168.1.0     0.0.0.0         255.255.255.0   U     101    0        0 enp3s0

192.168.144.0   0.0.0.0         255.255.255.0   U     100    0        0 enp0s20u3

```

----------

## NeddySeagoon

hedmo,

That all looks correct. As it persists over reboot, is should stay working.

----------

## hedmo

 *NeddySeagoon wrote:*   

> hedmo,
> 
> That all looks correct. As it persists over reboot, is should stay working.

 

yes .

 one more thing ... i have read about using my wifi (wlp2s0) and connect my tpcast to that (ad-hoc mode).

is that something you know about?

----------

## NeddySeagoon

hedmo,

I've never used ad-hoc mode. The theory is that both devices get self assigned link local addresses.

They are in the 169.254.0.0/16 network.

There is no router and no gatway devices in that range can only communicate amoung themselves within that subnet.

The IP address is easy. When dhcpcd fails, it will allocate a link local address and check that its not is use already.

I don't know how you set up Wifi crypo, or even if cryto is supported at all in ad-hoc mode.

----------

