Vyos Documentation Release Current
Total Page:16
File Type:pdf, Size:1020Kb
VyOS Documentation Release current VyOS maintainers and contributors Jun 04, 2019 Contents: 1 Installation 3 1.1 Verify digital signatures.........................................5 2 Command-Line Interface 7 3 Quick Start Guide 9 3.1 Basic QoS................................................ 11 4 Configuration Overview 13 5 Network Interfaces 17 5.1 Interface Addresses........................................... 18 5.2 Dummy Interfaces............................................ 20 5.3 Ethernet Interfaces............................................ 20 5.4 L2TPv3 Interfaces............................................ 21 5.5 PPPoE.................................................. 23 5.6 Wireless Interfaces............................................ 25 5.7 Bridging................................................. 26 5.8 Bonding................................................. 27 5.9 Tunnel Interfaces............................................. 28 5.10 VLAN Sub-Interfaces (802.1Q)..................................... 31 5.11 QinQ................................................... 32 5.12 VXLAN................................................. 33 5.13 WireGuard VPN Interface........................................ 37 6 Routing 41 6.1 Static................................................... 41 6.2 RIP.................................................... 41 6.3 OSPF................................................... 42 6.4 BGP................................................... 43 6.5 ARP................................................... 45 7 Policy Routing 47 8 MSS Clamping 49 8.1 IPv4.................................................... 49 8.2 IPv6.................................................... 49 i 9 Firewall 51 9.1 Zone-based Firewall Policy....................................... 51 9.2 Groups.................................................. 51 9.3 Rule-Sets................................................. 52 9.4 Applying a Rule-Set to an Interface................................... 52 9.5 Applying a Rule-Set to a Zone...................................... 52 9.6 Example Partial Config.......................................... 53 9.7 MSS Clamping.............................................. 54 9.8 IPv4.................................................... 54 9.9 IPv6.................................................... 54 10 NAT 55 10.1 Source NAT............................................... 55 10.2 Destination NAT............................................. 57 10.3 1-to-1 NAT................................................ 58 10.4 1-to-1 NAT example........................................... 58 10.5 NPTv6 (RFC6296)............................................ 59 10.6 NAT before VPN............................................. 60 11 VPN 63 11.1 OpenVPN................................................ 63 11.2 L2TP over IPsec............................................. 66 11.3 Site-to-Site IPsec............................................. 68 11.4 DMVPN................................................. 70 11.5 PPTP-Server............................................... 77 11.6 WireGuard VPN Interface........................................ 77 12 QoS and Traffic Policy 81 12.1 Configuration nodes........................................... 81 12.2 Traffic policies in VyOS......................................... 83 12.3 Ingress shaping.............................................. 100 12.4 Classful policies and traffic matching.................................. 100 13 Services 105 13.1 Conntrack................................................ 105 13.2 DHCP Server............................................... 108 13.3 DHCPv6 server.............................................. 111 13.4 DHCP Relay............................................... 115 13.5 DNS Forwarding............................................. 118 13.6 Dynamic DNS.............................................. 119 13.7 LLDP................................................... 121 13.8 mDNS Repeater............................................. 123 13.9 PPPoE server............................................... 123 13.10 UDP broadcast relay........................................... 126 13.11 SNMP.................................................. 127 13.12 SSH.................................................... 130 13.13 TFTP................................................... 132 13.14 Webproxy................................................. 133 14 System 137 14.1 Event Handler.............................................. 137 14.2 Flow Accounting............................................. 138 14.3 Host Information............................................. 138 14.4 Serial console............................................... 141 14.5 Login................................................... 141 ii 14.6 Syslog.................................................. 143 14.7 Task scheduler.............................................. 145 14.8 Config Management........................................... 146 14.9 Time Zone................................................ 147 15 High availability 149 15.1 Basic setup................................................ 149 15.2 IPv6 support............................................... 150 15.3 Disabling a VRRP group......................................... 150 15.4 Setting VRRP group priority....................................... 150 15.5 Preemption................................................ 150 15.6 Unicast VRRP.............................................. 150 15.7 Scripting................................................. 151 16 Clustering 153 17 System Image Management 155 17.1 Update VyOS Installation........................................ 156 18 Command scripting 157 18.1 Run configuration commands...................................... 157 18.2 Run operational commands....................................... 157 18.3 Other script language........................................... 158 18.4 Executing Configuration Scripts..................................... 158 18.5 Postconfig on boot............................................ 159 19 Release notes 161 19.1 1.2 (Crux)................................................ 161 19.2 Earlier releases.............................................. 162 20 Troubleshooting 163 20.1 Basic Connectivity Verification..................................... 163 20.2 Monitoring................................................ 164 20.3 Clear Command............................................. 167 20.4 Basic System Information........................................ 168 21 Configuration Examples 171 21.1 VyOS DMVPN Hub........................................... 171 21.2 Zone-Policy example........................................... 173 21.3 VyOS BGP ipv6 unnumbered with extended nexthop.......................... 179 21.4 VyOS OSPF unnumbered with ecmp.................................. 181 22 Command tree 185 22.1 Operational mode............................................ 185 22.2 Configuration mode........................................... 192 23 Running on Bare Metal 201 23.1 Intel Atom C3000............................................ 201 24 Building VyOS using Docker 209 25 Issues and Feature requests 211 25.1 Bug Report / Issue............................................ 211 25.2 Feature Request............................................. 211 26 Development 213 iii 27 VyOS CLI 215 27.1 Example XML File............................................ 215 27.2 Configuration mode command definitions................................ 217 27.3 Mapping old node.def style to new XML definitions.......................... 219 28 Python Coding Guidelines 221 28.1 Configuration script structure and behaviour.............................. 221 28.2 Coding guidelines............................................ 223 28.3 Code policy................................................ 223 iv VyOS Documentation, Release current VyOS is an open source network operating system based on Debian GNU/Linux. VyOS provides a free routing platform that competes directly with other commercially available solutions from well known network providers. Because VyOS is run on standard amd64, i586 and ARM systems, it is able to be used as a router and firewall platform for cloud deployments. Contents: 1 VyOS Documentation, Release current 2 Contents: CHAPTER 1 Installation The latest ISO image for VyOS can be downloaded at https://www.vyos.net. The recommended system requirements are 512 MiB RAM and 2 GiB storage. The VyOS ISO is a Live CD and will boot to a functional VyOS image. To login to the system, use the default username vyos with password vyos. The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. vyos@vyos:~$ vyos@vyos:~$ uname -a Linux vyos4.18.11-amd64-vyos #23 SMP Mon Oct 1 17:29:22 CEST 2018 x86_64 GNU/Linux Unlike general purpose Linux distributions, VyOS uses “image installation” that mimics the user experience of tradi- tional hardware routers and allows you to keep multiple VyOS versions on the same machine and switch to a previous version if something breaks after upgrade. Every version is contained in its own squashfs image that is mounted in a union filesystem together with a directory for mutable data (configs etc.). Note: Older versions used to support non-image installation (install system