Linux:VyOS: Difference between revisions
From Cheatsheet
Jump to navigationJump to search
(→NAT) Tag: Reverted |
(→BGP) Tag: Reverted |
||
| Line 80: | Line 80: | ||
=== BGP === | === BGP === | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
# Enter BGP configuration for AS number 11111 | |||
router BGP 11111 | |||
# Announce your range in this AS number | |||
network 10.0.76.0/24 | |||
# Add a neighbour from another AS number | |||
neighbor 10.0.76.21 remote-as 66666 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 12:18, 7 October 2024
Commandline
Basics
# Enter configuration mode configure # Commit changed configuration to RAM commit # Discard uncommitted changes discard # Save committed changes save # Exit the configuration mode exit
# Use ? to list available parameters for a command:
vyos@vyos# set
Possible completions:
> cluster Clustering
> container Container applications
> firewall Firewall
> high-availability
High availability settings
> interfaces Network interfaces
...
...
Checks
# Show the routers' full configuration show # Show interface configuration show interfaces # Show OS version show version
Configuration
Common
# Configure a hostname for this router set system host-name LinuxRouter # Configure DNS servers set system name-server 176.9.37.132 set system name-server 195.10.195.195
SSH
Enable SSH by configuring a port to listen on set service ssh port <port> # Optionally set an IP to listen on set service ssh listen-address 192.168.77.202
NAT
# Set an interface as outbound set nat source rule 100 outbound-interface 'eth0' # Set an internal range to NAT for set nat source rule 100 source address 10.0.0.0/8 # The method of NAT translation is masquerade as the IP (on eth0) set nat source rule 100 translation address masquerade
BGP
# Enter BGP configuration for AS number 11111 router BGP 11111 # Announce your range in this AS number network 10.0.76.0/24 # Add a neighbour from another AS number neighbor 10.0.76.21 remote-as 66666