modeemi:pub:computer-networking-event-22052026
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| modeemi:pub:computer-networking-event-22052026 [2026/05/17 17:31] – created niko | modeemi:pub:computer-networking-event-22052026 [2026/05/24 09:50] (current) – [1. How does the LAN works (single subnet)] niko | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| + | ==== 1. How does the LAN works (single subnet) ==== | ||
| - | ==== 1. How does the networks function? ==== | + | - Set up the static IP addresses |
| + | - Device IP: 192.168.1.x/24 (each participant has number from 1 to 254) | ||
| + | - Mask: 255.255.255.0 | ||
| + | - Gateway IP: 192.168.1.253 | ||
| + | - Open the wireshark | ||
| + | - use an "arp || icmp" as in a filter (that will show only ARP and ping messages) | ||
| + | - Ping the other people IPs | ||
| + | - Take a look at the ARP table in computer | ||
| + | - command "arp -a" in windows | ||
| + | - command "arp -n" in linux (net-tools have to be installed) | ||
| - | The following points will be discussed: | + | | {{:modeemi: |
| - | | + | | Local area network (4 participants) | |
| - | - Gateway | + | |
| - | - Broadcast | + | |
| - | - Network | + | |
| - | - Local network | + | |
| - | - Set it up | + | |
| - | - Take a look at packets | + | |
| - | - Beyond local network - connecting many networks! | + | |
| + | | ||
| + | ==== 2. Connect the local area networks into bigger one ==== | ||
| + | |||
| + | Each group (2-3 people) has it's own router (with OpenWRT). | ||
| + | One person should set up the router, together with rest of group, from one computer over the web interface (accessible over 192.168.1.1 - and later over 10.1.x.1 address from browser). | ||
| + | |||
| + | |||
| + | Set up following stuff: | ||
| + | - Set different network IP addresses (IPv4) | ||
| + | - First router - 10.1.1.0/24 | ||
| + | - Second router - 10.1.2.0/24 | ||
| + | - Third router - 10.1.3.0/24 | ||
| + | - Fourth router - 10.1.4.0/24 | ||
| + | - Reconnect to the router (so that Your computer gets NEW ip from router) | ||
| + | - Connect WAN port of all routers to common switch | ||
| + | - Set up WAN interfaces (static IPs) | ||
| + | - First router - 10.1.5.1/24 | ||
| + | - Second router - 10.1.5.2/24 | ||
| + | - Third router - 10.1.5.3/24 | ||
| + | - Fourth router - 10.1.5.4/24 | ||
| + | - Set up firewalls | ||
| + | - Forwarding between LAN and WAN has to be always allowed | ||
| + | - Disable the masquerade | ||
| + | |||
| + | Now time to verify: | ||
| + | - Ping people in the same subnet (behind the same router) | ||
| + | - Ping people in the other subnet (behind the other router) | ||
| + | - Traceroute the people in the other subnet, and take a look what are the routers the packet goes through | ||
| + | - Take a look with wireshark at all the packets | ||
| + | |||
| + | |||
| + | | {{: | ||
| + | | Interconnected LAN networks | | ||
| + | |||
| + | ==== 3. Set up point to point VPN (for next event) ==== | ||
| + | |||
| + | - Install wireguard in openwrt | ||
| + | - Then set it up with helpful instructions from this page | ||
| + | |||
| + | ==== 4. Turn Chromebook into cursed router (for next event) ==== | ||
| + | |||
| + | - we will find commands on the fly | ||
| + | - ip route add | ||
| + | - ip addr add | ||
| + | - and others:D | ||
| + | |||
| + | ==== Useful configurations ==== | ||
| + | |||
| + | 1. VPN project - two sites | ||
| + | - first with 10.1.1.0/24 network, VPN server | ||
| + | - second with 10.1.2.0/24 network, VPN client | ||
| + | - first has 10.1.3.1/ | ||
| + | |||
| + | Server: | ||
| + | < | ||
| + | [Interface] | ||
| + | PrivateKey = yourPrivateKey | ||
| + | Address = 10.1.3.1/30 | ||
| + | ListenPort = 51820 | ||
| + | PostUp = ip route add 10.1.2.0/24 via 10.1.3.2 | ||
| + | |||
| + | [Peer] | ||
| + | PublicKey = OtherpartyPublicKey | ||
| + | AllowedIPs = 10.1.2.0/ | ||
| + | </ | ||
| + | |||
| + | Client: | ||
| + | < | ||
| + | [Interface] | ||
| + | Address = 10.1.3.2/30 | ||
| + | PrivateKey = yourPrivateKey | ||
| + | PostUp = ip route add 10.1.1.0/24 via 10.1.3.1 | ||
| + | |||
| + | [Peer] | ||
| + | PublicKey = OtherPartyPublickey | ||
| + | Endpoint = publicIP: | ||
| + | AllowedIPs = 10.1.1.0/ | ||
| + | PersistentKeepalive = 21 | ||
| + | </ | ||
| + | |||
| + | ==== Useful commands ==== | ||
| + | |||
| + | Generate private and public key for VPN server | ||
| + | < | ||
| + | wg genkey | tee privatekey | wg pubkey > publickey; cat publickey; cat privatekey | ||
| + | </ | ||
modeemi/pub/computer-networking-event-22052026.1779039101.txt.gz · Last modified: by niko