Summer Course at Mekelle Institute of Technology. July, 2015. Linux Routers and Community Networks Llorenç Cerdà-Alabern http://personals.ac.upc.edu/llorenc llorenc@ac.upc.edu Universitat Politènica de Catalunya, Barcelona, Spain Revision: 0e36644 (2015-07-09) Llorenç Cerdà-Alabern Linux Routers and Community Networks 1 / 191
Summer Course at Mekelle Institute of Technology. Linux Routers and Community Networks Introduction Where I come from Parts Linux Routers I Introduction II Lab 1: Basic Network Configuration III Lab 2: RIP and OSPF IV Lab 3: Firewall configuration V Lab 4: Community Networks VI Lab 5: Network Management Llorenç Cerdà-Alabern Linux Routers and Community Networks 2 / 191
Summer Course at Mekelle Institute of Technology. Linux Routers and Community Networks Introduction Where I come Part I from Linux Routers Introduction Outline Where I come from Linux Routers Llorenç Cerdà-Alabern Linux Routers and Community Networks 3 / 191
Introduction Where I come from Introduction Mekelle vs. Barcelona Where I come from Linux Routers • Barcelona - Mekelle: 7,660 km Ethiopia Spain Tigray Catalonia Mekelle Barcelona Area [km 2 ] 1.1 M 0.5 M 41 k 32 k 24.4 803 4.3 M ∗ Population 90 M 47 M 7.5 M 219 k 4.7 M ∗ 2007 Census. Source: Wikipedia. Llorenç Cerdà-Alabern Linux Routers and Community Networks 4 / 191
Introduction Where I come from Introduction A bit of history: Barcino Where I come from Linux Routers • Iberian, Carthaginian and Roman Town, called Barcino 15 BC. Llorenç Cerdà-Alabern Linux Routers and Community Networks 5 / 191
Introduction Where I come from Introduction Barcelona Where I come from Linux Routers Eixample Sagrada Familia Barça Llorenç Cerdà-Alabern Linux Routers and Community Networks 6 / 191
Introduction Where I come from Introduction Universitat Politècnica de Catalunya (UPC) Where I come from Linux Routers Campus Nord • UPC: Public University of Catalonia, focussed on tech. studies. • UPC has 22 Schools in 7 towns. • Facultat d’Informàtica de Barcelona (Computer Science) is in Campus Nord and has around 2,000 students. Llorenç Cerdà-Alabern Linux Routers and Community Networks 7 / 191
Summer Course at Mekelle Institute of Technology. Linux Routers and Community Networks Introduction Where I come Part I from Linux Routers Introduction Outline Where I come from Linux Routers Llorenç Cerdà-Alabern Linux Routers and Community Networks 8 / 191
Introduction Linux Routers Introduction Where I come from Linux Routers What is a Router? • Devices that use a common protocol: The Internet Protocol, IP. • Exchange Datagramans using any kind of physical network (LAN or WAN). • Interconnect IP Networks: Networks of devices having interfaces with unique addresses, sharing a common netid, or IP prefix (most significant bits of the IP address). Llorenç Cerdà-Alabern Linux Routers and Community Networks 9 / 191
Introduction Linux Routers Introduction IPv4 address Where I come 0 bits 31 from ++++++++++++++++ Linux Routers |netid | hostid| ++++++++++++++++ • 4 bytes (32 bits) • Dotted notation: 10.0.1.1 , Mask: 255.255.255.0 or /24 . • Host loopback network: 127.0.0.0/8. • Private add.: 10.0.0.0/8 , 172.16.0.0/12 , 192.168.0.0/16 . netid hostid Class (bytes) (bytes) Codification range A 1 3 0xxxx ··· x 0.0.0.0 ∼ 127.255.255.255 B 2 2 10xxx ··· x 128.0.0.0 ∼ 191.255.255.255 C 3 1 110xx ··· x 192.0.0.0 ∼ 223.255.255.255 D - - 1110x ··· x 224.0.0.0 ∼ 239.255.255.255 E - - 1111x ··· x 240.0.0.0 ∼ 255.255.255.255 Llorenç Cerdà-Alabern Linux Routers and Community Networks 10 / 191
Introduction Linux Routers Introduction IPv6 address 0 bits 127 Where I come ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ from | netid | hostid | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Linux Routers • 16 bytes (128 bits) • Notation: ff02:0000:0000:0000:0000:0000:0000:0001/64 (8 quads of 4 nibbles). Simplification: supress leading and group zeroes: ff02::1/64 • Loopback: ::1/128 • Link local unicast: fe80::/10 . Interface notation: fe80::4e5e:cff:fee9:fc89%eth0 • Unique local unicast (ULA): fc00::/7 (equivalent to private IPv4) • Global unicast: 2000::/3 • Multicast: ff00::/8 • Link local all nodes: ff02::1 Example: IPv6ll of all nodes in eth0: ping6 ff02::1%eth0 • Link local all routers: ff02::2 Llorenç Cerdà-Alabern Linux Routers and Community Networks 11 / 191
Introduction Linux Routers Introduction How a router works Where I come from Linux Routers ~# route -n Kernel IP routing table Destination Gateway Genmask Metric Iface 0.0.0.0 10.1.24.97 0.0.0.0 30 eth1.3 10.1.24.96 0.0.0.0 255.255.255.224 30 eth1.3 ~# ip r l default via 10.1.24.97 dev eth1.3 proto static metric 30 10.1.24.96/27 dev eth1.3 proto static scope link metric 30 Llorenç Cerdà-Alabern Linux Routers and Community Networks 12 / 191
Introduction Linux Routers Introduction Commertial routers Where I come from Linux Routers CISCO Juniper Llorenç Cerdà-Alabern Linux Routers and Community Networks 13 / 191
Introduction Linux Routers Introduction SOHO routers Where I come from Linux Routers CISCO Buffalo TP-link Mikrotik Huawei Ubiquiti Zyxel D-link ··· Llorenç Cerdà-Alabern Linux Routers and Community Networks 14 / 191
Introduction Linux Routers Introduction Router Operating Systems Where I come • CISCO: Internetwork Operating System, IOS. from Linux Routers • Juniper: Junos OS. • Mikrotic: RouterOS. • Ubiquiti: AirOS. • Zyxel: ZyNOS. • Device specific: TP-Link, ··· • Unix/Linux a : Alpine, NetBSD, DD-WRT, EdgeOS, FREESCO, FreeWRT, OpenWrt, Tomato, ··· . a See Wikipedia: https://en.wikipedia.org/wiki/List_of_router_ and_firewall_distributions Llorenç Cerdà-Alabern Linux Routers and Community Networks 15 / 191
Introduction Linux Routers Introduction Where I come from Linux Routers Why OpenWrt? • GNU/Linux distribution originally designed for embedded devices. • Free, open source. • Active web page with a lot of documentation a . • Continuously improved by a wide and very active community. • Supported by a large number of devices b . a https://openwrt.org/ b http://wiki.openwrt.org/toh/start Llorenç Cerdà-Alabern Linux Routers and Community Networks 16 / 191
Summer Course at Mekelle Institute of Technology. Linux Routers and Community Networks Lab 1: Basic Network Configuration Description Parts Unix basic commands I Introduction Lab set up II Lab 1: Basic Network Configuration Building a patch cord III Lab 2: RIP and OSPF Flashing IV Lab 3: Firewall configuration OpenWrt Accessing V Lab 4: Community Networks OpenWrt VI Lab 5: Network Management Installing packages OpenWrt Net. Interfaces Configure VLANs Configure WiFi Static Routing Llorenç Cerdà-Alabern Linux Routers and Community Networks 17 / 191
Summer Course at Mekelle Institute of Technology. Linux Routers and Community Networks Part II Lab 1: Basic Network Configuration Lab 1: Basic Network Configuration Description Unix basic commands Lab set up Outline Building a patch cord Description Installing packages Flashing OpenWrt Unix basic commands OpenWrt Net. Interfaces Accessing OpenWrt Lab set up Configure VLANs Installing packages Building a patch cord Configure WiFi OpenWrt Net. Interfaces Flashing OpenWrt Configure Static Routing VLANs Accessing OpenWrt Configure WiFi Static Routing Llorenç Cerdà-Alabern Linux Routers and Community Networks 18 / 191
Lab 1: Basic Network Configuration Description Lab 1: Basic Network Configuration Description Unix basic Objectives commands Lab set up • Basic Linux administration commands. Building a • Build a straight-through patch cord. patch cord Flashing • Install OpenWrt. OpenWrt Accessing • Configuring networking interfaces and static routing. OpenWrt Installing packages OpenWrt Net. Interfaces Configure VLANs Configure WiFi Static Routing Llorenç Cerdà-Alabern Linux Routers and Community Networks 19 / 191
Summer Course at Mekelle Institute of Technology. Linux Routers and Community Networks Part II Lab 1: Basic Network Configuration Lab 1: Basic Network Configuration Description Unix basic commands Lab set up Outline Building a patch cord Description Installing packages Flashing OpenWrt Unix basic commands OpenWrt Net. Interfaces Accessing OpenWrt Lab set up Configure VLANs Installing packages Building a patch cord Configure WiFi OpenWrt Net. Interfaces Flashing OpenWrt Configure Static Routing VLANs Accessing OpenWrt Configure WiFi Static Routing Llorenç Cerdà-Alabern Linux Routers and Community Networks 20 / 191
Recommend
More recommend