Advertisement
mar_w

R6220_tagowany_vlan_dhcp_client

Sep 7th, 2022 (edited)
1,292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.51 KB | None | 0 0
  1. # uci show network
  2. ...
  3. network.@device[1]=device
  4. network.@device[1].name='lan4.602'
  5. network.@device[1].macaddr='d4:4d:24:4b:b6:f1'
  6. network.@device[2]=device
  7. network.@device[2].name='lan4.2000'
  8. network.@device[2].macaddr='d4:4d:24:4b:b6:f6'
  9. ...
  10. network.lan4u=interface
  11. network.lan4u.device='lan4'
  12. network.lan4u.proto='dhcp'
  13. network.lan4t2000=interface
  14. network.lan4t2000.device='lan4.2000'
  15. network.lan4t2000.proto='dhcp'
  16. network.lan4t602=interface
  17. network.lan4t602.device='lan4.602'
  18. network.lan4t602.proto='dhcp'
  19.  
  20.  
  21. # ip a | grep lan4 -A 1
  22.      
  23. 23: lan4.2000@lan4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
  24.     link/ether d4:4d:24:4b:b6:f6 brd ff:ff:ff:ff:ff:ff
  25.     inet 192.168.200.63/24 brd 192.168.200.255 scope global lan4.2000
  26.        
  27. 24: lan4.602@lan4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
  28.     link/ether d4:4d:24:4b:b6:f1 brd ff:ff:ff:ff:ff:ff
  29.     inet 192.168.100.11/24 brd 192.168.100.255 scope global lan4.602
  30.        
  31. # po zmianie macadresów
  32. # ip a | grep lan4 -A 1
  33.  
  34. 20: lan4.2000@lan4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
  35.     link/ether d4:4d:24:4b:b6:f7 brd ff:ff:ff:ff:ff:ff
  36.     inet 192.168.200.73/24 brd 192.168.200.255 scope global lan4.2000
  37.  
  38. 21: lan4.602@lan4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
  39.     link/ether d4:4d:24:4b:b6:f2 brd ff:ff:ff:ff:ff:ff
  40.     inet 192.168.100.21/24 brd 192.168.100.255 scope global lan4.602
  41.  
  42.  
  43. ###########  A tu podsłuch po stronie serwera DHCP.
  44. # nietagowany
  45. # tcpdump -i eth0.3 port 67 -t
  46. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  47. listening on eth0.3, link-type EN10MB (Ethernet), capture size 262144 bytes
  48. IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 8c:3b:ad:3a:ab:88 (oui Unknown), length 300
  49. IP OpenWrt.lan.67 > 192.168.50.209.68: BOOTP/DHCP, Reply, length 300
  50. IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 8c:3b:ad:3a:ab:88 (oui Unknown), length 300
  51. IP OpenWrt.lan.67 > 192.168.50.209.68: BOOTP/DHCP, Reply, length 306
  52. IP 192.168.50.209.68 > OpenWrt.lan.67: BOOTP/DHCP, Request from 8c:3b:ad:3a:ab:88 (oui Unknown), length 300
  53.  
  54. # tagowany vlanem 602
  55. # tcpdump -i eth0 -t -e vlan | grep -e 'vlan 602'
  56. 192.168.100.11 > 6c:b0:ce:f9:d8:b1 (oui Unknown), ethertype 802.1Q (0x8100), length 346: vlan 602, p 0, ethertype IPv4, 192.168.100.11.68 > OpenWrt.lan.67: BOOTP/DHCP, Request from 192.168.100.11, length 300
  57. 192.168.100.11 > Broadcast, ethertype 802.1Q (0x8100), length 346: vlan 602, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 192.168.100.11, length 300
  58. 192.168.100.11 > Broadcast, ethertype 802.1Q (0x8100), length 346: vlan 602, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 192.168.100.11, length 300
  59. 6c:b0:ce:f9:d8:b1 (oui Unknown) > 192.168.100.11, ethertype 802.1Q (0x8100), length 346: vlan 602, p 0, ethertype IPv4, OpenWrt.lan.67 > 192.168.100.11.68: BOOTP/DHCP, Reply, length 300
  60. 6c:b0:ce:f9:d8:b1 (oui Unknown) > 192.168.100.11, ethertype 802.1Q (0x8100), length 346: vlan 602, p 0, ethertype IPv4, OpenWrt.lan.67 > 192.168.100.11.68: BOOTP/DHCP, Reply, length 300
  61. 192.168.100.11 > Broadcast, ethertype 802.1Q (0x8100), length 346: vlan 602, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 192.168.100.11, length 300
  62. 6c:b0:ce:f9:d8:b1 (oui Unknown) > 192.168.100.11, ethertype 802.1Q (0x8100), length 346: vlan 602, p 0, ethertype IPv4, OpenWrt.lan.67 > 192.168.100.11.68: BOOTP/DHCP, Reply, length 300
  63. 6c:b0:ce:f9:d8:b1 (oui Unknown) > 192.168.100.11, ethertype 802.1Q (0x8100), length 46: vlan 602, p 0, ethertype ARP, Request who-has 192.168.100.11 tell OpenWrt.lan, length 28
  64. 192.168.100.11 > 6c:b0:ce:f9:d8:b1 (oui Unknown), ethertype 802.1Q (0x8100), length 64: vlan 602, p 0, ethertype ARP, Reply 192.168.100.11 is-at 192.168.100.11, length 46
  65.  
  66. # tagowany vlanem 2000
  67. # tcpdump -i eth0 -t -e vlan | grep -e 'vlan 2000'
  68. tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
  69. listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
  70. 192.168.200.63 > 6c:b0:ce:f9:d8:b1 (oui Unknown), ethertype 802.1Q (0x8100), length 346: vlan 2000, p 0, ethertype IPv4, 192.168.200.63.68 > OpenWrt.lan.67: BOOTP/DHCP, Request from 192.168.200.63, length 300
  71. 192.168.200.63 > Broadcast, ethertype 802.1Q (0x8100), length 346: vlan 2000, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 192.168.200.63, length 300
  72. 6c:b0:ce:f9:d8:b1 (oui Unknown) > 192.168.200.63, ethertype 802.1Q (0x8100), length 346: vlan 2000, p 0, ethertype IPv4, OpenWrt.lan.67 > 192.168.200.63.68: BOOTP/DHCP, Reply, length 300
  73. 192.168.200.63 > Broadcast, ethertype 802.1Q (0x8100), length 346: vlan 2000, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 192.168.200.63, length 300
  74. 6c:b0:ce:f9:d8:b1 (oui Unknown) > 192.168.200.63, ethertype 802.1Q (0x8100), length 346: vlan 2000, p 0, ethertype IPv4, OpenWrt.lan.67 > 192.168.200.63.68: BOOTP/DHCP, Reply, length 300
  75. 192.168.200.63 > Broadcast, ethertype 802.1Q (0x8100), length 346: vlan 2000, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 192.168.200.63, length 300
  76. 6c:b0:ce:f9:d8:b1 (oui Unknown) > 192.168.200.63, ethertype 802.1Q (0x8100), length 346: vlan 2000, p 0, ethertype IPv4, OpenWrt.lan.67 > 192.168.200.63.68: BOOTP/DHCP, Reply, length 300
  77. 6c:b0:ce:f9:d8:b1 (oui Unknown) > 192.168.200.63, ethertype 802.1Q (0x8100), length 46: vlan 2000, p 0, ethertype ARP, Request who-has 192.168.200.63 tell OpenWrt.lan, length 28
  78. 192.168.200.63 > 6c:b0:ce:f9:d8:b1 (oui Unknown), ethertype 802.1Q (0x8100), length 64: vlan 2000, p 0, ethertype ARP, Reply 192.168.200.63 is-at 192.168.200.63, length 46
  79. 6c:b0:ce:f9:d8:b1 (oui Unknown) > 192.168.200.63, ethertype 802.1Q (0x8100), length 102: vlan 2000, p 0, ethertype IPv4, OpenWrt.lan > 192.168.200.63: ICMP echo request, id 2890, seq 0, length 64
  80. 192.168.200.63 > 6c:b0:ce:f9:d8:b1 (oui Unknown), ethertype 802.1Q (0x8100), length 102: vlan 2000, p 0, ethertype IPv4, 192.168.200.63 > OpenWrt.lan: ICMP echo reply, id 2890, seq 0, length 64
  81. 192.168.200.63 > 6c:b0:ce:f9:d8:b1 (oui Unknown), ethertype 802.1Q (0x8100), length 64: vlan 2000, p 0, ethertype ARP, Request who-has OpenWrt.lan tell 192.168.200.63, length 46
  82. 6c:b0:ce:f9:d8:b1 (oui Unknown) > 192.168.200.63, ethertype 802.1Q (0x8100), length 46: vlan 2000, p 0, ethertype ARP, Reply OpenWrt.lan is-at 6c:b0:ce:f9:d8:b1 (oui Unknown), length 28
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement