Wednesday, December 1, 2021

IPV6

 Three ways of learning IPv6 address

Static, SLAAC, DHCPv6.

Default gateway is learnt through SLAAC negotiation from router through RA msgs.

 

References:

https://www.networkacademy.io/ccna/ipv6/stateless-address-autoconfiguration-slaac  -- basic slaac flow is explained in very detail

Wednesday, June 9, 2021

Assembly code

Assembly code with examples:

---

stepi ---  Step each instruction:

 

-----

lea -- assembly code operation

lea    -0x40(%rbp),%rcx
(gdb) info registers rbp
rbp            0x7fd1cd6fc850   0x7fd1cd6fc850
(gdb) info registers rcx
rcx            0x7fd1cd6fc810   140539071547408
(gdb) p/x 0x7fd1cd6fc850- 0x40
$19 = 0x7fd1cd6fc810 

----

lea (%rdi, %rdi, 4), %rax  # set %rax to %rdi + %rdi * 4

(gdb) p/x $rax + $rcx * 8
$14203 = 0x480
(gdb) p/x $rbx
$14197 = 0x480
(gdb) p/x $rax
$14198 = 0x0  
(gdb) p/x $rcx
$14199 = 0x90
 0x0000560e660e05ab <+267>:   lea    (%rax,%rcx,8),%rbx

-----

Display current instruction:

(gdb) disp/i $pc
1: x/i $pc
=> 0x55fc7df2e297 <func [__be_func...]+39>: mov    %rax,%rdi

------

Display 10 instructions from current instruction:

----------

(gdb) x/10i $pc

Monday, March 8, 2021

Virtual Machine

 Loading Centos:

https://getlabsdone.com/10-easy-steps-to-install-centos-7-8-on-vmware-workstation/