Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # /etc/network/interfaces
- # Original file
- # The loopback network interface
- auto lo
- iface lo inet loopback
- # The primary network interface (NAT)
- auto eth0
- allow-hotplug eth0
- iface eth0 inet dhcp
- # Host-only interface (vboxnet0)
- auto eth1
- allow-hotplug eth1
- iface eth1 inet static
- address 192.168.56.2
- netmask 255.255.255.0
- network 192.168.56.0
- broadcast 192.168.56.255
- gateway 192.168.56.1
- Kernel IP routing table
- Destination Gateway Genmask Flags Metric Ref Use Iface
- 0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
- 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
- 192.168.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
- # /etc/network/interfaces
- # Modified file
- # The loopback network interface
- auto lo
- iface lo inet loopback
- # The primary network interface (NAT)
- auto eth0
- allow-hotplug eth0
- iface eth0 inet dhcp
- # Host-only interface (vboxnet0)
- auto eth1
- allow-hotplug eth1
- iface eth1 inet static
- address 192.168.56.2
- netmask 255.255.255.0
- network 192.168.56.0
- broadcast 192.168.56.255
- # gateway 192.168.56.1
- post-up route add default gw 192.168.56.1
- pre-down route del default gw 192.168.56.1
- Kernel IP routing table
- Destination Gateway Genmask Flags Metric Ref Use Iface
- 0.0.0.0 192.168.56.1 0.0.0.0 UG 0 0 0 eth1
- 0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
- 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
- 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