Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
router:networking [2024/10/24 06:17] – willy | router:networking [2025/02/06 09:17] (current) – removed willy | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Network Layout ====== | ||
- | |||
- | For a general IP networking understandings [[https:// | ||
- | |||
- | Let's start with the high level organization, | ||
- | * Internal network, or the home network, is the network (or networks) that sits on top of your [[: | ||
- | * External network, or the internet, which is what's outside the home network and should be considered //unsafe//, but it's also the only way into your home network services when you are not at home. | ||
- | |||
- | In the middle of the two, you need a firewall / router device and some magic glue to let things speak together safely and effectively. On the // | ||
- | |||
- | |||
- | ===== Internal Network addressing ===== | ||
- | You need to choose a proper subnet for your home network, and it must be a **private** subnet. The IANA defines | ||
- | |||
- | Of the various available ranges, my suggestion is to use the **10.X.Y.Z** and try to avoid the most obvious combinations like 10.0.0.0/ | ||
- | |||
- | For the following, i will assume your home network uses **10.20.30.0/ | ||
- | |||
- | You should not use a subnet in the 192.168.x.y range as many of these ranges are already used by ISP routers and devices and in case of a clash you might end up having to replace addresses on all your internal hosts, and this can be a mess. | ||
- | |||
- | You also need to choose some IP addresses range assignments. I suggest at the least: | ||
- | * A range for DHCP (10.20.30.100 - 10.20.30.200) since most of your phones/ | ||
- | * A range for network devices, like WiFi APs (10.20.30..2 - 10.20.30.19) | ||
- | * A range for home servers/ | ||
- | * A range for webcams / IoT devices (10.20.30.30 - 10.20.30.69) | ||
- | * A range for fixed IPs (10.20.30.70 - 10.20.30.99) | ||
- | * A fixed IP for your home server (10.20.30.1) | ||
- | * A fixed IP for your router/ | ||
- | |||
- | Of course, you might want to add VLANs so separate IoT stuff and/or create more segments as you prefer. | ||
- | |||
- | |||
- | ===== External Network ===== | ||
- | Upstream fro your home, lies your ISP (Internet Service Provider), or ISPs. They will place in your home one (or more) // | ||
- | |||
- | Your ISP gateways will typically have addresses like 192.168.0.1 or 192.168.1.254. | ||
- | |||
- | You **do not need** to have two ISPs. It's a resilience point tough, if you plan to host critical services you might want to have two. If you have only one, just ignore anything related to the second one in the followings. | ||
- | |||
- | I will assume that your access to the **external network** is hidden behind | ||
- | |||
- | (For you lucky from the USA, where sometimes you can, maybe paying or even for free, get a real IP, this might not apply, but since the world is big and 99% of people cannot access IPs anymore...) | ||
- | |||
- | Note that i am __not__ talking of a **static** IP address.... i am talking of a **public** IP address at all. You will //not// get out of CG-NAT with dyn-dns tricks or any kind of port-forwarding. CG-NAT is a jail you need to evade from, somehow, and you need outside help to do that. | ||
- | |||
- | The way to go around the CG-NAT limitations that i will show you involve having / renting a server with a static IP address on the internet. This can be the cheapest VPS (Virtual Private Server) out there, or a more powerful real hardware, it doesn' | ||
- | |||
- | |||
- | ===== Domain Name ===== | ||
- | |||
- | You **need** a domain name. This is not optional, because SSL certificates can be released only to domain names and not directly to IP addresses, and also because when you are outside home, you need a //name// to reach home. | ||
- | |||
- | I will assume you own **mydomain.com**. There are plenty of cheapo domains and also some are for free, remember you don't necessarily need a second-level domain, something third level under //.eu.org// for example would work fine. You will need somebody to manage your DNS records because you **cannot** use your home server for this, but this is usually provided by your DNS registrar. You sohuld also be able to create sub-domains, | ||
- | |||
- | So, i assume you have the following sub-domains: | ||
- | * __mydomain.com__: | ||
- | * __home.mydomain.com__: | ||
- | * external.mydomain.com: | ||
- | * failback.mydomain.com: | ||
- | |||