route for Viewing Routing Tables in Linux

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024
  • Use route to view a Linux routing table, as well as add and delete routes. Uses a client-router-server virtual network within VirtualBox

Комментарии • 25

  • @LaeeqKhan01
    @LaeeqKhan01 2 года назад +5

    Clearest and crispest explanation about the subject. No frills. Thanks Steve.

  • @Economics21st
    @Economics21st 4 месяца назад

    Just what I needed - thanks! I'm familiar with IP itself, but I was always a bit hazy about the Unix-style routing tables. The explanation that it searches for the longest match was particularly helpful.

  • @FraYoshi
    @FraYoshi Год назад

    Loved this explanation. Calm, precise, in depth. Thanks a lot!! 🤓

  • @j.h.6672
    @j.h.6672 4 года назад

    You are definitely one of the best teachers on RUclips.

  • @wtry0067
    @wtry0067 5 лет назад +3

    Excellent...I always stuck in routing.. But this is really fantastic explanation and exactly what I was looking for.appreciate if you show routing for multi.nic configured server.

  • @AndersJackson
    @AndersJackson 5 лет назад +6

    The route(1) is obsoleted, you should use ip(1) now, like "ip route show". It do the same, and more.

  • @DontTakeCrack
    @DontTakeCrack 4 года назад +1

    thanks for this, useful for beginners like me trying to figure out how computers and their networks route to other systems!

  • @romcm7duong853
    @romcm7duong853 4 месяца назад

    Thanks, it is so clear

  • @shashikajayawardana6445
    @shashikajayawardana6445 Год назад

    you saved my day

  • @ross.shevchuk
    @ross.shevchuk 2 года назад

    Thanks a lot Steven. I've set up the same network but with "netplan" tool (I'm using Ubuntu 22.04). Now PCs from different networks see each other (ping goes fine) and next time I'll connect Kali Linux to start its tools and learn ethical hacking

  • @ruixue6955
    @ruixue6955 2 года назад

    1:49 route -n
    1:55 in order to reach some destination, send to some GATEWAY (or router) 2:06 *gateway is another word for router*

  • @ИванСахацкий
    @ИванСахацкий 4 года назад

    Very nice explanation. Thank you.

  • @girancanbaysec273
    @girancanbaysec273 5 лет назад +1

    Great tutorial. Thanks

  • @bibinvninan8057
    @bibinvninan8057 2 года назад

    Superb ...truly helpful

  • @AndersJackson
    @AndersJackson 5 лет назад

    It would also work if you on the server or client removed the default router and added an new to the router instead. That is the default route on the server is change from 10.0.2.2 to 192.168.2.2. It will use the router for all transmissions out on the internet from the server, instead of using the 10.0.2.2.
    To test routing, try the command tracepath(1) or traceroute(1) and you will see which routers will be used between the current computer and destination.

  • @FunkyELF
    @FunkyELF 5 лет назад

    Nice video, thanks. Would be nice to see how the router itself was set up. You said it was another Linux VM? You somehow used VirtualBox to attach two network interfaces to it and manually set up the routes?

    • @AndersJackson
      @AndersJackson 5 лет назад

      Yes, that is not anything strange. You can have up to four different interfaces in a VB virtual machine. And yes, it is explained in a previous video.

  • @elsdemaeyer5590
    @elsdemaeyer5590 6 лет назад

    I like it. Good. Great that it's with virtual box

  • @denniswigand8066
    @denniswigand8066 Год назад

    Perfect thanks!

  • @elsdemaeyer5590
    @elsdemaeyer5590 6 лет назад +2

    you does'nt explained the netmask 255.255.0.0 with network 192.168.0.0 why it is 16 and not 24.

    • @StevenGordonAU
      @StevenGordonAU  6 лет назад +4

      For this small network you could use 192.168.1.0/24. However I used 192.168.0.0/16 as in the future I plan to have network with three chained subnets, e.g. 192.168.1.0 connected to 192.168.2.0 connected to 192.168.3.0. Then a route on 192.168.3.1 could be designed as: "To reach any other subnet in 192.168.0.0/16, send to gateway 192.168.2.1". This route would cover reaching subnets 192.168.2.0 and 192.168.3.0 (I would need to add two separate route entries, just use the one generic entry).
      So in summary, in this demo 192.168.0.0/16 was not necessary, but I used it because I was thinking ahead to future scenarios of using virtual networks in VirtualBox. I should have explained that more in the video.

    • @AndersJackson
      @AndersJackson 5 лет назад +2

      Might I suggest that you try out the command ipcalc(1) to get more information.
      $ ipcalc 192.168.0.0/16
      Address: 192.168.0.0 11000000.10101000. 00000000.00000000
      Netmask: 255.255.0.0 = 16 11111111.11111111. 00000000.00000000
      Wildcard: 0.0.255.255 00000000.00000000. 11111111.11111111
      =>
      Network: 192.168.0.0/16 11000000.10101000. 00000000.00000000
      HostMin: 192.168.0.1 11000000.10101000. 00000000.00000001
      HostMax: 192.168.255.254 11000000.10101000. 11111111.11111110
      Broadcast: 192.168.255.255 11000000.10101000. 11111111.11111111
      Hosts/Net: 65534 Class C, Private Internet
      So here you see that the first two byte is network, so that is used to decide if a machine address is on the same network or not.
      So, /24 is the usual size, as it give a network with place for 253 machines, and /16 will get you 2^¹⁶ -2 addresses. If you have many /24 networks, you can collect them under the same router direction. So 192.168.0.0/16 will be a route for all networks that start with 192.168.0.0, for example 192.168.0.0/24, and 192.168.1.0/24 etc up to 192.168.255.0/24.

  • @raycrew
    @raycrew 2 года назад

    I am currently working on a lab environment "tap0" interface. When I type the command route, my "tap0" interface is not showing a default gateway address. How do I find the router on this network?

  • @elprquex
    @elprquex 6 лет назад

    Hi Steven , can you do tutorials about shell scripting ? thank you.

  • @HamitKumru
    @HamitKumru 3 года назад

    great