Skip to content

Instantly share code, notes, and snippets.

@raspberrypisig
Last active May 31, 2025 08:42
Show Gist options
  • Save raspberrypisig/0f7a63e917ce87d390675d697fb35aef to your computer and use it in GitHub Desktop.
Save raspberrypisig/0f7a63e917ce87d390675d697fb35aef to your computer and use it in GitHub Desktop.
network:
version: 2
renderer: networkd
ethernets:
ens1:
dhcp4: true
dhcp4-overrides:
use-dns: false
nameservers:
addresses: [8.8.8.8, 8.8.4.4, 192.168.20.1]
enp2s2:
dhcp4: true
vlans:
vlan80:
id: 80
link: enp2s2
dhcp4: true
vlan81:
id: 81
link: enp2s2
dhcp4: true

GNS3

Using Debian from

https://gns3.com/marketplace/appliances/debian-2

c3640

need to be done each time the GNS3 VM is started from cold boot.

vlan database
vlan 80 name vlan80
exit
vlan database
vlan 81 name vlan81
exit
sh ip int br

Debian

first manually connect to internet through cloud via

dhclient -v ens1

resolvconf doesnt work properly need to

apt remove --purge resolvconf
apt install -y systemd-resolved netplan.io
#apt install -y netplan-generator
poweroff

Only after this should apply netplan configuration.

Router#
Router#sh run
Building configuration...
Current configuration : 1525 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
!
!
no ip cef
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.80.254
ip dhcp excluded-address 192.168.81.254
!
ip dhcp pool vlan80_pool
network 192.168.80.0 255.255.255.0
default-router 192.168.80.254
!
ip dhcp pool vlan81_pool
network 192.168.81.0 255.255.255.0
default-router 192.168.81.254
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
switchport access vlan 80
!
interface FastEthernet0/1
switchport access vlan 81
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
shutdown
!
interface FastEthernet0/5
shutdown
!
interface FastEthernet0/6
shutdown
!
interface FastEthernet0/7
shutdown
!
interface FastEthernet0/8
shutdown
!
interface FastEthernet0/9
shutdown
!
interface FastEthernet0/10
shutdown
!
interface FastEthernet0/11
shutdown
!
interface FastEthernet0/12
shutdown
!
interface FastEthernet0/13
shutdown
!
interface FastEthernet0/14
shutdown
!
interface FastEthernet0/15
shutdown
!
interface Vlan1
no ip address
no ip route-cache
!
interface Vlan80
ip address 192.168.80.254 255.255.255.0
!
interface Vlan81
ip address 192.168.81.254 255.255.255.0
!
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
line con 0
line aux 0
line vty 0 4
login
!
!
end
netplan try
netplan apply
netplan status
netplan ip leases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment