Git Product home page Git Product logo

lab-node-ubuntu's Introduction

Networking in plain English.

GitHub star Visit Networklessons.com Join Us Discourse YouTube LinkedIn Facebook Publish Docker image Docker Pulls Docker Image Version Docker

Lab Node Ubuntu

Lab Node Ubuntu on Docker Hub

WARNING: Don't use this container in production because it might contain default usernames, passwords, and/or keys. It is only intended for locally hosted labs.

Ubuntu base image with useful tools such as:

  • vim
  • nmap
  • iperf3
  • hping3
  • curl

You can use this as a host, server, or node in emulators such as EVE-NG, Containerlab, etc.

https://github.com/networklessons/lab-node-ubuntu

SSH

This container has a 'lab' user with password 'lab'. SSH is started on boot. This user can use sudo. If you don't want to execute everything with sudo, switch to the root user: sudo su.

Change MAC address

You can change the MAC address so that it is easier to recognize things in debugs or Wireshark:

ip link set dev eth1 address 00:50:c2:53:40:01

Change IP address

Delete the Current IP Address (if needed)

First, if there's already an IP address assigned to eth1 and you want to replace it, you can remove it using the ip addr del command. You need to know the current IP address assigned to do this. You can find it with ip addr show eth1. Then, replace current.ip.address/xx with the actual current IP configuration:

ip addr del current.ip.address/xx dev eth1

Add the New IP Address

To add the new IP address 192.168.12.1/24 to the eth1 interface, use:

ip addr add 192.168.12.1/24 dev eth1

Enable the Interface

If the interface is not up, you need to enable it using the ip link set command:

ip link set eth1 up

ARP / NDISC

ARP Cache

You can see the arp cache like this:

root@s1:/home/ubuntu# ip neigh show dev eth1
172.16.12.2  FAILED

Flush ARP & NDISC Cache

If you need to flush the IPv4 ARP or IPv6 NDISC cache, you can do this:

ip -s -s neighbor flush all

Static Route

You could set the default gateway, but that might not be possible if you connect to this Docker container remotely. You can see the current routes here:

root@s1:/# ip route
default via 172.100.100.1 dev eth0 
172.100.100.0/24 dev eth0 proto kernel scope link src 172.100.100.16 
192.168.0.0/16 via 192.168.12.254 dev eth1

You can add a static route like this:

ip route add 192.168.0.0/16 via 192.168.12.254 dev eth1

It will show up like this:

root@s1:/# ip route
default via 172.100.100.1 dev eth0 
172.100.100.0/24 dev eth0 proto kernel scope link src 172.100.100.16 
192.168.0.0/16 via 192.168.12.254 dev eth1 
192.168.12.0/24 dev eth1 proto kernel scope link src 192.168.12.1

lab-node-ubuntu's People

Contributors

networklessons avatar renemolenaar82 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.