Subnet Routing

A few notes based on testing adding subnets on the home network.

Routed Subnet

172.16.0.0/24 in a routed subnet.

Steps Followed

Adding 172.16.0.0/24 onto the ShedHex

In ShedHex Router:

  1. add DHCP Pool 172.16.0.1-172.16.0.199
  2. add DHCP Network using that pool only, GW=172.16.0.254, DNS=192.168.182.2
  3. assign IP address 172.16.0.254 to ether3
  4. add DHCP server to ether3 using DHCP Network from step 2

On Pi1:

  1. add static route to 172.16.0.0/24 via ShedHex (192.168.182.248)

Testing

Add a PC onto that ether3, using DHCP. It can ping router and pi1, it can do DNS lookups. It can access devices on local network, but cannot access the internet, presumably because ADSL does not have a route back.

Add a second PC onto a switch (Desk Switch) which is conncted to ether3. It can ping router and pi1, it can do DNS lookups. It can access devices on local network, but cannot access the internet, presumably because ADSL does not have a route back.

Other Notes

It was necessary to configure web browsers on the PCs in the subnet to use the proxy on pi1.brusch.co.uk:1080.

NAT’d Subnet

172.17.0.0/24 in a routed subnet.

Steps Followed

Adding 172.17.0.0/24 onto the ShedHex

In ShedHex Router:

  1. Under IP -> Firewall -> NAT add: srcnat - arrgghhh! not working. Error is Couldn’t add New NAT Rule - incoming interface matching not possible in output and postrouting chains (6)

Mikrotik NAT Notes

This took me while to sus, so here are some notes.

  • Normal NAT is known as srcnat. With action=masquerade.
  • Out Interface is the internet facing side.
  • Default In interface is All Interfaces
  • Looks like it is paired with DHCP server (makes sense).
  • DHCP server, serves to bridge of non-Out-Interface ports.

Looks like we need to setup DHCP Pool, DHCP Server, NAT and routes. Not sure which order to set those up…..

Lets try:

  1. DHCP Pool
  2. DHCP Server
  3. NAT - src =nat with action=masquarade, in-interface and out-interface.

Now testing…..