title: How to change route/gateway, subnet mask and ip address used by Python scapy?
body: <p>Let's say I have my</p>
  <p><em><strong>default gateway 192.168.10.1 , subnet mask 255.255.255.0 , interface enp2s0 and ip 192.168.10.40</strong></em></p>
  <p>If I wanted to send an ICMP packet from a different network using scapy with</p>
  <p><em><strong>gateway 192.168.40.1, subnet mask 255.255.254.0, interface enp2s0 and ip 192.168.40.224</strong></em></p>
  <p>how should I go about doing it?</p>
  <p>i understand that i need to change the route using conf.route from <a href="https://scapy.readthedocs.io/en/latest/routing.html" rel="nofollow noreferrer">here</a>  but i don't get the exact configuration for my use case.</p>
  <p>i've tried many route configs but the ping just doesn't go through.</p>