Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. # /etc/network/interfaces
  2.  
  3. # Original file
  4.  
  5. # The loopback network interface
  6. auto lo
  7. iface lo inet loopback
  8.  
  9. # The primary network interface (NAT)
  10. auto eth0
  11. allow-hotplug eth0
  12. iface eth0 inet dhcp
  13.  
  14. # Host-only interface (vboxnet0)
  15. auto eth1
  16. allow-hotplug eth1
  17. iface eth1 inet static
  18. address 192.168.56.2
  19. netmask 255.255.255.0
  20. network 192.168.56.0
  21. broadcast 192.168.56.255
  22. gateway 192.168.56.1
  23.  
  24. Kernel IP routing table
  25. Destination Gateway Genmask Flags Metric Ref Use Iface
  26. 0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
  27. 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
  28. 192.168.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
  29.  
  30. # /etc/network/interfaces
  31.  
  32. # Modified file
  33.  
  34. # The loopback network interface
  35. auto lo
  36. iface lo inet loopback
  37.  
  38. # The primary network interface (NAT)
  39. auto eth0
  40. allow-hotplug eth0
  41. iface eth0 inet dhcp
  42.  
  43. # Host-only interface (vboxnet0)
  44. auto eth1
  45. allow-hotplug eth1
  46. iface eth1 inet static
  47. address 192.168.56.2
  48. netmask 255.255.255.0
  49. network 192.168.56.0
  50. broadcast 192.168.56.255
  51. # gateway 192.168.56.1
  52. post-up route add default gw 192.168.56.1
  53. pre-down route del default gw 192.168.56.1
  54.  
  55. Kernel IP routing table
  56. Destination Gateway Genmask Flags Metric Ref Use Iface
  57. 0.0.0.0 192.168.56.1 0.0.0.0 UG 0 0 0 eth1
  58. 0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
  59. 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
  60. 192.168.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement